Changeset e29cc2e for trip-planner-front/node_modules/@angular/core/bundles
- Timestamp:
- 11/25/21 22:08:24 (3 years ago)
- Branches:
- master
- Children:
- 8d391a1
- Parents:
- 59329aa
- Location:
- trip-planner-front/node_modules/@angular/core/bundles
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trip-planner-front/node_modules/@angular/core/bundles/core-testing.umd.js
r59329aa re29cc2e 1 1 /** 2 * @license Angular v12.2. 92 * @license Angular v12.2.13 3 3 * (c) 2010-2021 Google LLC. https://angular.io/ 4 4 * License: MIT -
trip-planner-front/node_modules/@angular/core/bundles/core.umd.js
r59329aa re29cc2e 1 1 /** 2 * @license Angular v12.2. 92 * @license Angular v12.2.13 3 3 * (c) 2010-2021 Google LLC. https://angular.io/ 4 4 * License: MIT … … 458 458 * found in the LICENSE file at https://angular.io/license 459 459 */ 460 // Base URL for the error details page. 461 // Keep this value in sync with a similar const in 462 // `packages/compiler-cli/src/ngtsc/diagnostics/src/error_code.ts`. 460 /** 461 * Base URL for the error details page. 462 * 463 * Keep the files below in sync: 464 * - packages/compiler-cli/src/ngtsc/diagnostics/src/error_details_base_url.ts 465 * - packages/core/src/render3/error_details_base_url.ts 466 */ 463 467 var ERROR_DETAILS_PAGE_BASE_URL = 'https://angular.io/errors'; 468 464 469 var RuntimeError = /** @class */ (function (_super) { 465 470 __extends(RuntimeError, _super); … … 3919 3924 this._lView = _lView; 3920 3925 } 3921 NodeInjector.prototype.get = function (token, notFoundValue ) {3922 return getOrCreateInjectable(this._tNode, this._lView, token, undefined, notFoundValue);3926 NodeInjector.prototype.get = function (token, notFoundValue, flags) { 3927 return getOrCreateInjectable(this._tNode, this._lView, token, flags, notFoundValue); 3923 3928 }; 3924 3929 return NodeInjector; … … 4145 4150 * 4146 4151 * `InjectionToken` is parameterized on `T` which is the type of object which will be returned by 4147 * the `Injector`. This provides a dditional level of type safety.4152 * the `Injector`. This provides an additional level of type safety. 4148 4153 * 4149 4154 * ``` 4150 4155 * interface MyInterface {...} 4151 * varmyInterface = injector.get(new InjectionToken<MyInterface>('SomeToken'));4156 * const myInterface = injector.get(new InjectionToken<MyInterface>('SomeToken')); 4152 4157 * // myInterface is inferred to be MyInterface. 4153 4158 * ``` … … 4157 4162 * `InjectionToken` using this factory as a provider as if it was defined explicitly in the 4158 4163 * application's root injector. If the factory function, which takes zero arguments, needs to inject 4159 * dependencies, it can do so using the `inject` function. See below for an example. 4164 * dependencies, it can do so using the `inject` function. 4165 * As you can see in the Tree-shakable InjectionToken example below. 4160 4166 * 4161 4167 * Additionally, if a `factory` is specified you can also specify the `providedIn` option, which … … 4164 4170 * 4165 4171 * @usageNotes 4166 * ### Basic Example 4172 * ### Basic Examples 4167 4173 * 4168 4174 * ### Plain InjectionToken … … 4178 4184 */ 4179 4185 var InjectionToken = /** @class */ (function () { 4186 /** 4187 * @param _desc Description for the token, 4188 * used only for debugging purposes, 4189 * it should but does not need to be unique 4190 * @param options Options for the token's usage, as described above 4191 */ 4180 4192 function InjectionToken(_desc, options) { 4181 4193 this._desc = _desc; … … 22035 22047 * @publicApi 22036 22048 */ 22037 var VERSION = new Version('12.2. 9');22049 var VERSION = new Version('12.2.13'); 22038 22050 22039 22051 /** -
trip-planner-front/node_modules/@angular/core/bundles/core.umd.js.map
r59329aa re29cc2e 1 {"version":3,"file":"core.umd.js","sources":["../../../../../packages/core/src/util/property.ts","../../../../../packages/core/src/util/stringify.ts","../../../../../packages/core/src/di/forward_ref.ts","../../../../../external/npm/node_modules/tslib/tslib.es6.js","../../../../../packages/core/src/render3/error_ code.ts","../../../../../packages/core/src/render3/util/stringify_utils.ts","../../../../../packages/core/src/render3/errors_di.ts","../../../../../packages/core/src/util/assert.ts","../../../../../packages/core/src/di/interface/defs.ts","../../../../../packages/core/src/di/interface/injector.ts","../../../../../packages/core/src/di/inject_switch.ts","../../../../../packages/core/src/util/closure.ts","../../../../../packages/core/src/change_detection/constants.ts","../../../../../packages/core/src/metadata/view.ts","../../../../../packages/core/src/util/global.ts","../../../../../packages/core/src/util/ng_dev_mode.ts","../../../../../packages/core/src/util/empty.ts","../../../../../packages/core/src/render3/fields.ts","../../../../../packages/core/src/render3/definition.ts","../../../../../packages/core/src/render3/interfaces/container.ts","../../../../../packages/core/src/render3/interfaces/view.ts","../../../../../packages/core/src/render3/interfaces/type_checks.ts","../../../../../packages/core/src/render3/assert.ts","../../../../../packages/core/src/render3/definition_factory.ts","../../../../../packages/core/src/interface/simple_change.ts","../../../../../packages/core/src/render3/features/ng_onchanges_feature.ts","../../../../../packages/core/src/render3/profiler.ts","../../../../../packages/core/src/render3/namespaces.ts","../../../../../packages/core/src/render3/interfaces/document.ts","../../../../../packages/core/src/render3/interfaces/renderer.ts","../../../../../packages/core/src/render3/util/view_utils.ts","../../../../../packages/core/src/render3/state.ts","../../../../../packages/core/src/render3/hooks.ts","../../../../../packages/core/src/render3/interfaces/injector.ts","../../../../../packages/core/src/render3/interfaces/node.ts","../../../../../packages/core/src/render3/node_assert.ts","../../../../../packages/core/src/render3/util/attrs_utils.ts","../../../../../packages/core/src/render3/util/injector_utils.ts","../../../../../packages/core/src/render3/di.ts","../../../../../packages/core/src/render3/instructions/di_attr.ts","../../../../../packages/core/src/util/decorators.ts","../../../../../packages/core/src/di/metadata_attr.ts","../../../../../packages/core/src/di/injection_token.ts","../../../../../packages/core/src/metadata/di.ts","../../../../../packages/core/src/compiler/compiler_facade_interface.ts","../../../../../packages/core/src/compiler/compiler_facade.ts","../../../../../packages/core/src/interface/type.ts","../../../../../packages/core/src/util/array_utils.ts","../../../../../packages/core/src/reflection/reflection_capabilities.ts","../../../../../packages/core/src/di/injector_compatibility.ts","../../../../../packages/core/src/di/metadata.ts","../../../../../packages/core/src/di/jit/util.ts","../../../../../packages/core/src/metadata/resource_loading.ts","../../../../../packages/core/src/util/security/trusted_types.ts","../../../../../packages/core/src/util/security/trusted_types_bypass.ts","../../../../../packages/core/src/sanitization/bypass.ts","../../../../../packages/core/src/sanitization/inert_body.ts","../../../../../packages/core/src/sanitization/url_sanitizer.ts","../../../../../packages/core/src/sanitization/html_sanitizer.ts","../../../../../packages/core/src/sanitization/security.ts","../../../../../packages/core/src/sanitization/sanitization.ts","../../../../../packages/core/src/render3/context_discovery.ts","../../../../../packages/core/src/util/errors.ts","../../../../../packages/core/src/errors.ts","../../../../../packages/core/src/error_handler.ts","../../../../../packages/core/src/metadata/schema.ts","../../../../../packages/core/src/util/dom.ts","../../../../../packages/core/src/util/named_array_type.ts","../../../../../packages/core/src/util/ng_reflect.ts","../../../../../packages/core/src/render3/util/misc_utils.ts","../../../../../packages/core/src/render3/errors.ts","../../../../../packages/core/src/render/api_flags.ts","../../../../../packages/core/src/render3/i18n/i18n_tree_shaking.ts","../../../../../packages/core/src/render3/interfaces/projection.ts","../../../../../packages/core/src/render3/util/view_traversal_utils.ts","../../../../../packages/core/src/render3/node_manipulation.ts","../../../../../packages/core/src/render3/styling/class_differ.ts","../../../../../packages/core/src/render3/node_selector_matcher.ts","../../../../../packages/core/src/render3/tokens.ts","../../../../../packages/core/src/render3/instructions/advance.ts","../../../../../packages/core/src/render3/interfaces/styling.ts","../../../../../packages/core/src/render3/util/debug_utils.ts","../../../../../packages/core/src/render3/instructions/lview_debug.ts","../../../../../packages/core/src/render3/instructions/shared.ts","../../../../../packages/core/src/render3/styling/static_styling.ts","../../../../../packages/core/src/render3/instructions/change_detection.ts","../../../../../packages/core/src/di/injector_token.ts","../../../../../packages/core/src/di/null_injector.ts","../../../../../packages/core/src/di/scope.ts","../../../../../packages/core/src/di/r3_injector.ts","../../../../../packages/core/src/di/injector.ts","../../../../../packages/core/src/render3/util/discovery_utils.ts","../../../../../packages/core/src/render3/util/change_detection_utils.ts","../../../../../packages/core/src/render3/util/global_utils.ts","../../../../../packages/core/src/render3/component.ts","../../../../../packages/core/src/render3/features/inherit_definition_feature.ts","../../../../../packages/core/src/render3/features/copy_definition_feature.ts","../../../../../packages/core/src/util/symbol.ts","../../../../../packages/core/src/change_detection/change_detection_util.ts","../../../../../packages/core/src/render3/bindings.ts","../../../../../packages/core/src/render3/instructions/attribute.ts","../../../../../packages/core/src/render3/instructions/interpolation.ts","../../../../../packages/core/src/render3/instructions/attribute_interpolation.ts","../../../../../packages/core/src/render3/instructions/template.ts","../../../../../packages/core/src/render3/instructions/storage.ts","../../../../../packages/core/src/di/jit/environment.ts","../../../../../packages/core/src/di/jit/injectable.ts","../../../../../packages/core/src/di/util.ts","../../../../../packages/core/src/di/injectable.ts","../../../../../packages/core/src/di/reflective_errors.ts","../../../../../packages/core/src/di/reflective_key.ts","../../../../../packages/core/src/reflection/reflector.ts","../../../../../packages/core/src/reflection/reflection.ts","../../../../../packages/core/src/di/reflective_provider.ts","../../../../../packages/core/src/di/reflective_injector.ts","../../../../../packages/core/src/di/index.ts","../../../../../packages/core/src/di.ts","../../../../../packages/core/src/render3/instructions/di.ts","../../../../../packages/core/src/render3/instructions/property.ts","../../../../../packages/core/src/render3/instructions/element.ts","../../../../../packages/core/src/render3/instructions/element_container.ts","../../../../../packages/core/src/render3/instructions/get_current_view.ts","../../../../../packages/core/src/util/lang.ts","../../../../../packages/core/src/render3/instructions/listener.ts","../../../../../packages/core/src/render3/instructions/namespace.ts","../../../../../packages/core/src/render3/instructions/next_context.ts","../../../../../packages/core/src/render3/instructions/projection.ts","../../../../../packages/core/src/render3/instructions/property_interpolation.ts","../../../../../packages/core/src/render3/styling/style_binding_list.ts","../../../../../packages/core/src/render3/styling/styling_parser.ts","../../../../../packages/core/src/render3/instructions/styling.ts","../../../../../packages/core/src/render3/instructions/text.ts","../../../../../packages/core/src/render3/instructions/text_interpolation.ts","../../../../../packages/core/src/render3/instructions/class_map_interpolation.ts","../../../../../packages/core/src/render3/instructions/style_map_interpolation.ts","../../../../../packages/core/src/render3/instructions/style_prop_interpolation.ts","../../../../../packages/core/src/render3/instructions/host_property.ts","../../../../../packages/core/src/util/ng_i18n_closure_mode.ts","../../../../../packages/core/src/i18n/locale_en.ts","../../../../../packages/core/src/i18n/locale_data_api.ts","../../../../../packages/core/src/i18n/localization.ts","../../../../../packages/core/src/render3/interfaces/i18n.ts","../../../../../packages/core/src/render3/i18n/i18n_locale_id.ts","../../../../../packages/core/src/render3/node_manipulation_i18n.ts","../../../../../packages/core/src/render3/i18n/i18n_insert_before_index.ts","../../../../../packages/core/src/render3/i18n/i18n_util.ts","../../../../../packages/core/src/render3/i18n/i18n_apply.ts","../../../../../packages/core/src/render3/instructions/i18n_icu_container_visitor.ts","../../../../../packages/core/src/render3/i18n/i18n_debug.ts","../../../../../packages/core/src/render3/i18n/i18n_parse.ts","../../../../../packages/core/src/render3/i18n/i18n_postprocess.ts","../../../../../packages/core/src/render3/instructions/i18n.ts","../../../../../packages/core/src/render3/instructions/all.ts","../../../../../packages/core/src/render3/di_setup.ts","../../../../../packages/core/src/render3/features/providers_feature.ts","../../../../../packages/core/src/linker/component_factory.ts","../../../../../packages/core/src/linker/component_factory_resolver.ts","../../../../../packages/core/src/util/noop.ts","../../../../../packages/core/src/linker/element_ref.ts","../../../../../packages/core/src/render/api.ts","../../../../../packages/core/src/sanitization/sanitizer.ts","../../../../../packages/core/src/version.ts","../../../../../packages/core/src/change_detection/differs/default_iterable_differ.ts","../../../../../packages/core/src/change_detection/differs/default_keyvalue_differ.ts","../../../../../packages/core/src/change_detection/differs/iterable_differs.ts","../../../../../packages/core/src/change_detection/differs/keyvalue_differs.ts","../../../../../packages/core/src/render3/collect_native_nodes.ts","../../../../../packages/core/src/render3/view_ref.ts","../../../../../packages/core/src/change_detection/change_detector_ref.ts","../../../../../packages/core/src/change_detection/change_detection.ts","../../../../../packages/core/src/linker/template_ref.ts","../../../../../packages/core/src/linker/ng_module_factory.ts","../../../../../packages/core/src/linker/view_container_ref.ts","../../../../../packages/core/src/view/errors.ts","../../../../../packages/core/src/view/types.ts","../../../../../packages/core/src/view/util.ts","../../../../../packages/core/src/view/ng_module.ts","../../../../../packages/core/src/view/view_attach.ts","../../../../../packages/core/src/view/refs.ts","../../../../../packages/core/src/view/provider.ts","../../../../../packages/core/src/render3/component_ref.ts","../../../../../packages/core/src/render3/metadata.ts","../../../../../packages/core/src/linker/ng_module_factory_registration.ts","../../../../../packages/core/src/render3/ng_module_ref.ts","../../../../../packages/core/src/render3/pure_function.ts","../../../../../packages/core/src/render3/pipe.ts","../../../../../packages/core/src/event_emitter.ts","../../../../../packages/core/src/linker/query_list.ts","../../../../../packages/core/src/render3/interfaces/definition.ts","../../../../../packages/core/src/render3/interfaces/query.ts","../../../../../packages/core/src/render3/query.ts","../../../../../packages/core/src/render3/view_engine_compatibility_prebound.ts","../../../../../packages/core/src/render3/index.ts","../../../../../packages/core/src/render3/jit/environment.ts","../../../../../packages/core/src/render3/jit/jit_options.ts","../../../../../packages/core/src/render3/jit/module.ts","../../../../../packages/core/src/render3/jit/directive.ts","../../../../../packages/core/src/render3/jit/pipe.ts","../../../../../packages/core/src/metadata/directives.ts","../../../../../packages/core/src/metadata/ng_module.ts","../../../../../packages/core/src/metadata.ts","../../../../../packages/core/src/application_init.ts","../../../../../packages/core/src/application_tokens.ts","../../../../../packages/core/src/console.ts","../../../../../packages/core/src/i18n/tokens.ts","../../../../../packages/core/src/ivy_switch.ts","../../../../../packages/core/src/linker/compiler.ts","../../../../../packages/core/src/util/microtask.ts","../../../../../packages/core/src/util/raf.ts","../../../../../packages/core/src/zone/ng_zone.ts","../../../../../packages/core/src/testability/testability.ts","../../../../../packages/core/src/util/is_dev_mode.ts","../../../../../packages/core/src/application_ref.ts","../../../../../packages/core/src/zone.ts","../../../../../packages/core/src/render.ts","../../../../../packages/core/src/linker/ng_module_factory_loader.ts","../../../../../packages/core/src/linker/system_js_ng_module_factory_loader.ts","../../../../../packages/core/src/linker/view_ref.ts","../../../../../packages/core/src/linker.ts","../../../../../packages/core/src/debug/debug_node.ts","../../../../../packages/core/src/change_detection.ts","../../../../../packages/core/src/platform_core_providers.ts","../../../../../packages/core/src/application_module.ts","../../../../../packages/core/src/view/element.ts","../../../../../packages/core/src/view/query.ts","../../../../../packages/core/src/view/ng_content.ts","../../../../../packages/core/src/view/pure_expression.ts","../../../../../packages/core/src/view/text.ts","../../../../../packages/core/src/view/view.ts","../../../../../packages/core/src/view/services.ts","../../../../../packages/core/src/view/entrypoint.ts","../../../../../packages/core/src/view/index.ts","../../../../../packages/core/src/core_private_export.ts","../../../../../packages/core/src/render3/jit/partial.ts","../../../../../packages/core/src/core_render3_private_export.ts","../../../../../packages/core/src/codegen_private_exports.ts","../../../../../packages/core/src/core.ts","../../../../../packages/core/public_api.ts","../../../../../packages/core/index.ts","../../../../../packages/core/core.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\nexport function getClosureSafeProperty<T>(objWithPropertyToExtract: T): string {\n for (let key in objWithPropertyToExtract) {\n if (objWithPropertyToExtract[key] === getClosureSafeProperty as any) {\n return key;\n }\n }\n throw Error('Could not find renamed property on target object.');\n}\n\n/**\n * Sets properties on a target object from a source object, but only if\n * the property doesn't already exist on the target object.\n * @param target The target to set properties on\n * @param source The source of the property keys and values to set\n */\nexport function fillProperties(target: {[key: string]: string}, source: {[key: string]: string}) {\n for (const key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport function stringify(token: any): string {\n if (typeof token === 'string') {\n return token;\n }\n\n if (Array.isArray(token)) {\n return '[' + token.map(stringify).join(', ') + ']';\n }\n\n if (token == null) {\n return '' + token;\n }\n\n if (token.overriddenName) {\n return `${token.overriddenName}`;\n }\n\n if (token.name) {\n return `${token.name}`;\n }\n\n const res = token.toString();\n\n if (res == null) {\n return '' + res;\n }\n\n const newLineIndex = res.indexOf('\\n');\n return newLineIndex === -1 ? res : res.substring(0, newLineIndex);\n}\n\n/**\n * Concatenates two strings with separator, allocating new strings only when necessary.\n *\n * @param before before string.\n * @param separator separator string.\n * @param after after string.\n * @returns concatenated string.\n */\nexport function concatStringsWithSpace(before: string|null, after: string|null): string {\n return (before == null || before === '') ?\n (after === null ? '' : after) :\n ((after == null || after === '') ? before : before + ' ' + after);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {getClosureSafeProperty} from '../util/property';\nimport {stringify} from '../util/stringify';\n\n\n\n/**\n * An interface that a function passed into {@link forwardRef} has to implement.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref_fn'}\n * @publicApi\n */\nexport interface ForwardRefFn {\n (): any;\n}\n\nconst __forward_ref__ = getClosureSafeProperty({__forward_ref__: getClosureSafeProperty});\n\n/**\n * Allows to refer to references which are not yet defined.\n *\n * For instance, `forwardRef` is used when the `token` which we need to refer to for the purposes of\n * DI is declared, but not yet defined. It is also used when the `token` which we use when creating\n * a query is not yet defined.\n *\n * @usageNotes\n * ### Example\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}\n * @publicApi\n */\nexport function forwardRef(forwardRefFn: ForwardRefFn): Type<any> {\n (<any>forwardRefFn).__forward_ref__ = forwardRef;\n (<any>forwardRefFn).toString = function() {\n return stringify(this());\n };\n return (<Type<any>><any>forwardRefFn);\n}\n\n/**\n * Lazily retrieves the reference value from a forwardRef.\n *\n * Acts as the identity function when given a non-forward-ref value.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'}\n *\n * @see `forwardRef`\n * @publicApi\n */\nexport function resolveForwardRef<T>(type: T): T {\n return isForwardRef(type) ? type() : type;\n}\n\n/** Checks whether a function is wrapped by a `forwardRef`. */\nexport function isForwardRef(fn: any): fn is() => any {\n return typeof fn === 'function' && fn.hasOwnProperty(__forward_ref__) &&\n fn.__forward_ref__ === forwardRef;\n}\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 (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// Base URL for the error details page.\n// Keep this value in sync with a similar const in\n// `packages/compiler-cli/src/ngtsc/diagnostics/src/error_code.ts`.\nconst ERROR_DETAILS_PAGE_BASE_URL = 'https://angular.io/errors';\n\nexport const enum RuntimeErrorCode {\n // Internal Errors\n\n // Change Detection Errors\n EXPRESSION_CHANGED_AFTER_CHECKED = '100',\n\n // Dependency Injection Errors\n CYCLIC_DI_DEPENDENCY = '200',\n PROVIDER_NOT_FOUND = '201',\n\n // Template Errors\n MULTIPLE_COMPONENTS_MATCH = '300',\n EXPORT_NOT_FOUND = '301',\n PIPE_NOT_FOUND = '302',\n UNKNOWN_BINDING = '303',\n UNKNOWN_ELEMENT = '304',\n TEMPLATE_STRUCTURE_ERROR = '305'\n\n // Styling Errors\n\n // Declarations Errors\n\n // i18n Errors\n\n // Compilation Errors\n}\n\nexport class RuntimeError extends Error {\n constructor(public code: RuntimeErrorCode, message: string) {\n super(formatRuntimeError(code, message));\n }\n}\n\n// Contains a set of error messages that have details guides at angular.io.\n// Full list of available error guides can be found at https://angular.io/errors\n/* tslint:disable:no-toplevel-property-access */\nexport const RUNTIME_ERRORS_WITH_GUIDES = new Set([\n RuntimeErrorCode.EXPRESSION_CHANGED_AFTER_CHECKED,\n RuntimeErrorCode.CYCLIC_DI_DEPENDENCY,\n RuntimeErrorCode.PROVIDER_NOT_FOUND,\n RuntimeErrorCode.MULTIPLE_COMPONENTS_MATCH,\n RuntimeErrorCode.EXPORT_NOT_FOUND,\n RuntimeErrorCode.PIPE_NOT_FOUND,\n]);\n/* tslint:enable:no-toplevel-property-access */\n\n/** Called to format a runtime error */\nexport function formatRuntimeError(code: RuntimeErrorCode, message: string): string {\n const fullCode = code ? `NG0${code}: ` : '';\n\n let errorMessage = `${fullCode}${message}`;\n\n // Some runtime errors are still thrown without `ngDevMode` (for example\n // `throwProviderNotFoundError`), so we add `ngDevMode` check here to avoid pulling\n // `RUNTIME_ERRORS_WITH_GUIDES` symbol into prod bundles.\n // TODO: revisit all instances where `RuntimeError` is thrown and see if `ngDevMode` can be added\n // there instead to tree-shake more devmode-only code (and eventually remove `ngDevMode` check\n // from this code).\n if (ngDevMode && RUNTIME_ERRORS_WITH_GUIDES.has(code)) {\n errorMessage = `${errorMessage}. Find more at ${ERROR_DETAILS_PAGE_BASE_URL}/NG0${code}`;\n }\n return errorMessage;\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 * Used for stringify render output in Ivy.\n * Important! This function is very performance-sensitive and we should\n * be extra careful not to introduce megamorphic reads in it.\n * Check `core/test/render3/perf/render_stringify` for benchmarks and alternate implementations.\n */\nexport function renderStringify(value: any): string {\n if (typeof value === 'string') return value;\n if (value == null) return '';\n // Use `String` so that it invokes the `toString` method of the value. Note that this\n // appears to be faster than calling `value.toString` (see `render_stringify` benchmark).\n return String(value);\n}\n\n\n/**\n * Used to stringify a value so that it can be displayed in an error message.\n * Important! This function contains a megamorphic read and should only be\n * used for error messages.\n */\nexport function stringifyForError(value: any): string {\n if (typeof value === 'function') return value.name || value.toString();\n if (typeof value === 'object' && value != null && typeof value.type === 'function') {\n return value.type.name || value.type.toString();\n }\n\n return renderStringify(value);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {InjectorType} from '../di/interface/defs';\nimport {stringify} from '../util/stringify';\nimport {RuntimeError, RuntimeErrorCode} from './error_code';\nimport {stringifyForError} from './util/stringify_utils';\n\n\n/** Called when directives inject each other (creating a circular dependency) */\nexport function throwCyclicDependencyError(token: string, path?: string[]): never {\n const depPath = path ? `. Dependency path: ${path.join(' > ')} > ${token}` : '';\n throw new RuntimeError(\n RuntimeErrorCode.CYCLIC_DI_DEPENDENCY,\n `Circular dependency in DI detected for ${token}${depPath}`);\n}\n\nexport function throwMixedMultiProviderError() {\n throw new Error(`Cannot mix multi providers and regular providers`);\n}\n\nexport function throwInvalidProviderError(\n ngModuleType?: InjectorType<any>, providers?: any[], provider?: any) {\n let ngModuleDetail = '';\n if (ngModuleType && providers) {\n const providerDetail = providers.map(v => v == provider ? '?' + provider + '?' : '...');\n ngModuleDetail =\n ` - only instances of Provider and Type are allowed, got: [${providerDetail.join(', ')}]`;\n }\n\n throw new Error(\n `Invalid provider for the NgModule '${stringify(ngModuleType)}'` + ngModuleDetail);\n}\n\n\n/** Throws an error when a token is not found in DI. */\nexport function throwProviderNotFoundError(token: any, injectorName?: string): never {\n const injectorDetails = injectorName ? ` in ${injectorName}` : '';\n throw new RuntimeError(\n RuntimeErrorCode.PROVIDER_NOT_FOUND,\n `No provider for ${stringifyForError(token)} found${injectorDetails}`);\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// The functions in this file verify that the assumptions we are making\n// about state in an instruction are correct before implementing any logic.\n// They are meant only to be called in dev mode as sanity checks.\n\nimport {stringify} from './stringify';\n\nexport function assertNumber(actual: any, msg: string): asserts actual is number {\n if (!(typeof actual === 'number')) {\n throwError(msg, typeof actual, 'number', '===');\n }\n}\n\nexport function assertNumberInRange(\n actual: any, minInclusive: number, maxInclusive: number): asserts actual is number {\n assertNumber(actual, 'Expected a number');\n assertLessThanOrEqual(actual, maxInclusive, 'Expected number to be less than or equal to');\n assertGreaterThanOrEqual(actual, minInclusive, 'Expected number to be greater than or equal to');\n}\n\nexport function assertString(actual: any, msg: string): asserts actual is string {\n if (!(typeof actual === 'string')) {\n throwError(msg, actual === null ? 'null' : typeof actual, 'string', '===');\n }\n}\n\nexport function assertFunction(actual: any, msg: string): asserts actual is Function {\n if (!(typeof actual === 'function')) {\n throwError(msg, actual === null ? 'null' : typeof actual, 'function', '===');\n }\n}\n\nexport function assertEqual<T>(actual: T, expected: T, msg: string) {\n if (!(actual == expected)) {\n throwError(msg, actual, expected, '==');\n }\n}\n\nexport function assertNotEqual<T>(actual: T, expected: T, msg: string): asserts actual is T {\n if (!(actual != expected)) {\n throwError(msg, actual, expected, '!=');\n }\n}\n\nexport function assertSame<T>(actual: T, expected: T, msg: string): asserts actual is T {\n if (!(actual === expected)) {\n throwError(msg, actual, expected, '===');\n }\n}\n\nexport function assertNotSame<T>(actual: T, expected: T, msg: string) {\n if (!(actual !== expected)) {\n throwError(msg, actual, expected, '!==');\n }\n}\n\nexport function assertLessThan<T>(actual: T, expected: T, msg: string): asserts actual is T {\n if (!(actual < expected)) {\n throwError(msg, actual, expected, '<');\n }\n}\n\nexport function assertLessThanOrEqual<T>(actual: T, expected: T, msg: string): asserts actual is T {\n if (!(actual <= expected)) {\n throwError(msg, actual, expected, '<=');\n }\n}\n\nexport function assertGreaterThan<T>(actual: T, expected: T, msg: string): asserts actual is T {\n if (!(actual > expected)) {\n throwError(msg, actual, expected, '>');\n }\n}\n\nexport function assertGreaterThanOrEqual<T>(\n actual: T, expected: T, msg: string): asserts actual is T {\n if (!(actual >= expected)) {\n throwError(msg, actual, expected, '>=');\n }\n}\n\nexport function assertNotDefined<T>(actual: T, msg: string) {\n if (actual != null) {\n throwError(msg, actual, null, '==');\n }\n}\n\nexport function assertDefined<T>(actual: T|null|undefined, msg: string): asserts actual is T {\n if (actual == null) {\n throwError(msg, actual, null, '!=');\n }\n}\n\nexport function throwError(msg: string): never;\nexport function throwError(msg: string, actual: any, expected: any, comparison: string): never;\nexport function throwError(msg: string, actual?: any, expected?: any, comparison?: string): never {\n throw new Error(\n `ASSERTION ERROR: ${msg}` +\n (comparison == null ? '' : ` [Expected=> ${expected} ${comparison} ${actual} <=Actual]`));\n}\n\nexport function assertDomNode(node: any): asserts node is Node {\n // If we're in a worker, `Node` will not be defined.\n if (!(typeof Node !== 'undefined' && node instanceof Node) &&\n !(typeof node === 'object' && node != null &&\n node.constructor.name === 'WebWorkerRenderNode')) {\n throwError(`The provided value must be an instance of a DOM Node but got ${stringify(node)}`);\n }\n}\n\n\nexport function assertIndexInRange(arr: any[], index: number) {\n assertDefined(arr, 'Array must be defined.');\n const maxLen = arr.length;\n if (index < 0 || index >= maxLen) {\n throwError(`Index expected to be less than ${maxLen} but got ${index}`);\n }\n}\n\n\nexport function assertOneOf(value: any, ...validValues: any[]) {\n if (validValues.indexOf(value) !== -1) return true;\n throwError(`Expected value to be one of ${JSON.stringify(validValues)} but was ${\n JSON.stringify(value)}.`);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../../interface/type';\nimport {getClosureSafeProperty} from '../../util/property';\nimport {ClassProvider, ConstructorProvider, ExistingProvider, FactoryProvider, StaticClassProvider, ValueProvider} from './provider';\n\n\n\n/**\n * Information about how a type or `InjectionToken` interfaces with the DI system.\n *\n * At a minimum, this includes a `factory` which defines how to create the given type `T`, possibly\n * requesting injection of other types if necessary.\n *\n * Optionally, a `providedIn` parameter specifies that the given type belongs to a particular\n * `Injector`, `NgModule`, or a special scope (e.g. `'root'`). A value of `null` indicates\n * that the injectable does not belong to any scope.\n *\n * @codeGenApi\n * @publicApi The ViewEngine compiler emits code with this type for injectables. This code is\n * deployed to npm, and should be treated as public api.\n\n */\nexport interface ɵɵInjectableDeclaration<T> {\n /**\n * Specifies that the given type belongs to a particular injector:\n * - `InjectorType` such as `NgModule`,\n * - `'root'` the root injector\n * - `'any'` all injectors.\n * - `null`, does not belong to any injector. Must be explicitly listed in the injector\n * `providers`.\n */\n providedIn: InjectorType<any>|'root'|'platform'|'any'|null;\n\n /**\n * The token to which this definition belongs.\n *\n * Note that this may not be the same as the type that the `factory` will create.\n */\n token: unknown;\n\n /**\n * Factory method to execute to create an instance of the injectable.\n */\n factory: (t?: Type<any>) => T;\n\n /**\n * In a case of no explicit injector, a location where the instance of the injectable is stored.\n */\n value: T|undefined;\n}\n\n/**\n * Information about the providers to be included in an `Injector` as well as how the given type\n * which carries the information should be created by the DI system.\n *\n * An `InjectorDef` can import other types which have `InjectorDefs`, forming a deep nested\n * structure of providers with a defined priority (identically to how `NgModule`s also have\n * an import/dependency structure).\n *\n * NOTE: This is a private type and should not be exported\n *\n * @codeGenApi\n */\nexport interface ɵɵInjectorDef<T> {\n // TODO(alxhub): Narrow down the type here once decorators properly change the return type of the\n // class they are decorating (to add the ɵprov property for example).\n providers: (Type<any>|ValueProvider|ExistingProvider|FactoryProvider|ConstructorProvider|\n StaticClassProvider|ClassProvider|any[])[];\n\n imports: (InjectorType<any>|InjectorTypeWithProviders<any>)[];\n}\n\n/**\n * A `Type` which has a `ɵprov: ɵɵInjectableDeclaration` static field.\n *\n * `InjectableType`s contain their own Dependency Injection metadata and are usable in an\n * `InjectorDef`-based `StaticInjector.\n *\n * @publicApi\n */\nexport interface InjectableType<T> extends Type<T> {\n /**\n * Opaque type whose structure is highly version dependent. Do not rely on any properties.\n */\n ɵprov: unknown;\n}\n\n/**\n * A type which has an `InjectorDef` static field.\n *\n * `InjectorTypes` can be used to configure a `StaticInjector`.\n *\n * This is an opaque type whose structure is highly version dependent. Do not rely on any\n * properties.\n *\n * @publicApi\n */\nexport interface InjectorType<T> extends Type<T> {\n ɵfac?: unknown;\n ɵinj: unknown;\n}\n\n/**\n * Describes the `InjectorDef` equivalent of a `ModuleWithProviders`, an `InjectorType` with an\n * associated array of providers.\n *\n * Objects of this type can be listed in the imports section of an `InjectorDef`.\n *\n * NOTE: This is a private type and should not be exported\n */\nexport interface InjectorTypeWithProviders<T> {\n ngModule: InjectorType<T>;\n providers?: (Type<any>|ValueProvider|ExistingProvider|FactoryProvider|ConstructorProvider|\n StaticClassProvider|ClassProvider|any[])[];\n}\n\n\n/**\n * Construct an injectable definition which defines how a token will be constructed by the DI\n * system, and in which injectors (if any) it will be available.\n *\n * This should be assigned to a static `ɵprov` field on a type, which will then be an\n * `InjectableType`.\n *\n * Options:\n * * `providedIn` determines which injectors will include the injectable, by either associating it\n * with an `@NgModule` or other `InjectorType`, or by specifying that this injectable should be\n * provided in the `'root'` injector, which will be the application-level injector in most apps.\n * * `factory` gives the zero argument function which will create an instance of the injectable.\n * The factory can call `inject` to access the `Injector` and request injection of dependencies.\n *\n * @codeGenApi\n * @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm.\n */\nexport function ɵɵdefineInjectable<T>(opts: {\n token: unknown,\n providedIn?: Type<any>|'root'|'platform'|'any'|null, factory: () => T,\n}): unknown {\n return {\n token: opts.token,\n providedIn: opts.providedIn as any || null,\n factory: opts.factory,\n value: undefined,\n } as ɵɵInjectableDeclaration<T>;\n}\n\n/**\n * @deprecated in v8, delete after v10. This API should be used only by generated code, and that\n * code should now use ɵɵdefineInjectable instead.\n * @publicApi\n */\nexport const defineInjectable = ɵɵdefineInjectable;\n\n/**\n * Construct an `InjectorDef` which configures an injector.\n *\n * This should be assigned to a static injector def (`ɵinj`) field on a type, which will then be an\n * `InjectorType`.\n *\n * Options:\n *\n * * `providers`: an optional array of providers to add to the injector. Each provider must\n * either have a factory or point to a type which has a `ɵprov` static property (the\n * type must be an `InjectableType`).\n * * `imports`: an optional array of imports of other `InjectorType`s or `InjectorTypeWithModule`s\n * whose providers will also be added to the injector. Locally provided types will override\n * providers from imports.\n *\n * @codeGenApi\n */\nexport function ɵɵdefineInjector(options: {providers?: any[], imports?: any[]}): unknown {\n return {providers: options.providers || [], imports: options.imports || []};\n}\n\n/**\n * Read the injectable def (`ɵprov`) for `type` in a way which is immune to accidentally reading\n * inherited value.\n *\n * @param type A type which may have its own (non-inherited) `ɵprov`.\n */\nexport function getInjectableDef<T>(type: any): ɵɵInjectableDeclaration<T>|null {\n return getOwnDefinition(type, NG_PROV_DEF) || getOwnDefinition(type, NG_INJECTABLE_DEF);\n}\n\n/**\n * Return definition only if it is defined directly on `type` and is not inherited from a base\n * class of `type`.\n */\nfunction getOwnDefinition<T>(type: any, field: string): ɵɵInjectableDeclaration<T>|null {\n return type.hasOwnProperty(field) ? type[field] : null;\n}\n\n/**\n * Read the injectable def (`ɵprov`) for `type` or read the `ɵprov` from one of its ancestors.\n *\n * @param type A type which may have `ɵprov`, via inheritance.\n *\n * @deprecated Will be removed in a future version of Angular, where an error will occur in the\n * scenario if we find the `ɵprov` on an ancestor only.\n */\nexport function getInheritedInjectableDef<T>(type: any): ɵɵInjectableDeclaration<T>|null {\n const def = type && (type[NG_PROV_DEF] || type[NG_INJECTABLE_DEF]);\n\n if (def) {\n const typeName = getTypeName(type);\n // TODO(FW-1307): Re-add ngDevMode when closure can handle it\n // ngDevMode &&\n console.warn(\n `DEPRECATED: DI is instantiating a token \"${\n typeName}\" that inherits its @Injectable decorator but does not provide one itself.\\n` +\n `This will become an error in a future version of Angular. Please add @Injectable() to the \"${\n typeName}\" class.`);\n return def;\n } else {\n return null;\n }\n}\n\n/** Gets the name of a type, accounting for some cross-browser differences. */\nfunction getTypeName(type: any): string {\n // `Function.prototype.name` behaves differently between IE and other browsers. In most browsers\n // it'll always return the name of the function itself, no matter how many other functions it\n // inherits from. On IE the function doesn't have its own `name` property, but it takes it from\n // the lowest level in the prototype chain. E.g. if we have `class Foo extends Parent` most\n // browsers will evaluate `Foo.name` to `Foo` while IE will return `Parent`. We work around\n // the issue by converting the function to a string and parsing its name out that way via a regex.\n if (type.hasOwnProperty('name')) {\n return type.name;\n }\n\n const match = ('' + type).match(/^function\\s*([^\\s(]+)/);\n return match === null ? '' : match[1];\n}\n\n/**\n * Read the injector def type in a way which is immune to accidentally reading inherited value.\n *\n * @param type type which may have an injector def (`ɵinj`)\n */\nexport function getInjectorDef<T>(type: any): ɵɵInjectorDef<T>|null {\n return type && (type.hasOwnProperty(NG_INJ_DEF) || type.hasOwnProperty(NG_INJECTOR_DEF)) ?\n (type as any)[NG_INJ_DEF] :\n null;\n}\n\nexport const NG_PROV_DEF = getClosureSafeProperty({ɵprov: getClosureSafeProperty});\nexport const NG_INJ_DEF = getClosureSafeProperty({ɵinj: getClosureSafeProperty});\n\n// We need to keep these around so we can read off old defs if new defs are unavailable\nexport const NG_INJECTABLE_DEF = getClosureSafeProperty({ngInjectableDef: getClosureSafeProperty});\nexport const NG_INJECTOR_DEF = getClosureSafeProperty({ngInjectorDef: getClosureSafeProperty});\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/**\n * Special flag indicating that a decorator is of type `Inject`. It's used to make `Inject`\n * decorator tree-shakable (so we don't have to rely on the `instanceof` checks).\n * Note: this flag is not included into the `InjectFlags` since it's an internal-only API.\n */\nexport const enum DecoratorFlags {\n Inject = -1\n}\n\n/**\n * Injection flags for DI.\n *\n * @publicApi\n */\nexport enum InjectFlags {\n // TODO(alxhub): make this 'const' (and remove `InternalInjectFlags` enum) when ngc no longer\n // writes exports of it into ngfactory files.\n\n /** Check self and check parent injector if needed */\n Default = 0b0000,\n\n /**\n * Specifies that an injector should retrieve a dependency from any injector until reaching the\n * host element of the current component. (Only used with Element Injector)\n */\n Host = 0b0001,\n\n /** Don't ascend to ancestors of the node requesting injection. */\n Self = 0b0010,\n\n /** Skip the node that is requesting injection. */\n SkipSelf = 0b0100,\n\n /** Inject `defaultValue` instead if token not found. */\n Optional = 0b1000,\n}\n\n/**\n * This enum is an exact copy of the `InjectFlags` enum above, but the difference is that this is a\n * const enum, so actual enum values would be inlined in generated code. The `InjectFlags` enum can\n * be turned into a const enum when ViewEngine is removed (see TODO at the `InjectFlags` enum\n * above). The benefit of inlining is that we can use these flags at the top level without affecting\n * tree-shaking (see \"no-toplevel-property-access\" tslint rule for more info).\n * Keep this enum in sync with `InjectFlags` enum above.\n */\nexport const enum InternalInjectFlags {\n /** Check self and check parent injector if needed */\n Default = 0b0000,\n\n /**\n * Specifies that an injector should retrieve a dependency from any injector until reaching the\n * host element of the current component. (Only used with Element Injector)\n */\n Host = 0b0001,\n\n /** Don't ascend to ancestors of the node requesting injection. */\n Self = 0b0010,\n\n /** Skip the node that is requesting injection. */\n SkipSelf = 0b0100,\n\n /** Inject `defaultValue` instead if token not found. */\n Optional = 0b1000,\n\n /**\n * This token is being injected into a pipe.\n *\n * This flag is intentionally not in the public facing `InjectFlags` because it is only added by\n * the compiler and is not a developer applicable flag.\n */\n ForPipe = 0b10000,\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 {throwProviderNotFoundError} from '../render3/errors_di';\nimport {assertNotEqual} from '../util/assert';\nimport {stringify} from '../util/stringify';\n\nimport {getInjectableDef, ɵɵInjectableDeclaration} from './interface/defs';\nimport {InjectFlags} from './interface/injector';\nimport {ProviderToken} from './provider_token';\n\n\n/**\n * Current implementation of inject.\n *\n * By default, it is `injectInjectorOnly`, which makes it `Injector`-only aware. It can be changed\n * to `directiveInject`, which brings in the `NodeInjector` system of ivy. It is designed this\n * way for two reasons:\n * 1. `Injector` should not depend on ivy logic.\n * 2. To maintain tree shake-ability we don't want to bring in unnecessary code.\n */\nlet _injectImplementation: (<T>(token: ProviderToken<T>, flags?: InjectFlags) => T | null)|\n undefined;\nexport function getInjectImplementation() {\n return _injectImplementation;\n}\n\n\n/**\n * Sets the current inject implementation.\n */\nexport function setInjectImplementation(\n impl: (<T>(token: ProviderToken<T>, flags?: InjectFlags) => T | null)|\n undefined): (<T>(token: ProviderToken<T>, flags?: InjectFlags) => T | null)|undefined {\n const previous = _injectImplementation;\n _injectImplementation = impl;\n return previous;\n}\n\n\n/**\n * Injects `root` tokens in limp mode.\n *\n * If no injector exists, we can still inject tree-shakable providers which have `providedIn` set to\n * `\"root\"`. This is known as the limp mode injection. In such case the value is stored in the\n * injectable definition.\n */\nexport function injectRootLimpMode<T>(\n token: ProviderToken<T>, notFoundValue: T|undefined, flags: InjectFlags): T|null {\n const injectableDef: ɵɵInjectableDeclaration<T>|null = getInjectableDef(token);\n if (injectableDef && injectableDef.providedIn == 'root') {\n return injectableDef.value === undefined ? injectableDef.value = injectableDef.factory() :\n injectableDef.value;\n }\n if (flags & InjectFlags.Optional) return null;\n if (notFoundValue !== undefined) return notFoundValue;\n throwProviderNotFoundError(stringify(token), 'Injector');\n}\n\n\n/**\n * Assert that `_injectImplementation` is not `fn`.\n *\n * This is useful, to prevent infinite recursion.\n *\n * @param fn Function which it should not equal to\n */\nexport function assertInjectImplementationNotEqual(\n fn: (<T>(token: ProviderToken<T>, flags?: InjectFlags) => T | null)) {\n ngDevMode &&\n assertNotEqual(_injectImplementation, fn, 'Calling ɵɵinject would cause infinite recursion');\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 * Convince closure compiler that the wrapped function has no side-effects.\n *\n * Closure compiler always assumes that `toString` has no side-effects. We use this quirk to\n * allow us to execute a function but have closure compiler mark the call as no-side-effects.\n * It is important that the return value for the `noSideEffects` function be assigned\n * to something which is retained otherwise the call to `noSideEffects` will be removed by closure\n * compiler.\n */\nexport function noSideEffects<T>(fn: () => T): T {\n return {toString: fn}.toString() as unknown as T;\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/**\n * The strategy that the default change detector uses to detect changes.\n * When set, takes effect the next time change detection is triggered.\n *\n * @see {@link ChangeDetectorRef#usage-notes Change detection usage}\n *\n * @publicApi\n */\nexport enum ChangeDetectionStrategy {\n /**\n * Use the `CheckOnce` strategy, meaning that automatic change detection is deactivated\n * until reactivated by setting the strategy to `Default` (`CheckAlways`).\n * Change detection can still be explicitly invoked.\n * This strategy applies to all child directives and cannot be overridden.\n */\n OnPush = 0,\n\n /**\n * Use the default `CheckAlways` strategy, in which change detection is automatic until\n * explicitly deactivated.\n */\n Default = 1,\n}\n\n/**\n * Defines the possible states of the default change detector.\n * @see `ChangeDetectorRef`\n */\nexport enum ChangeDetectorStatus {\n /**\n * A state in which, after calling `detectChanges()`, the change detector\n * state becomes `Checked`, and must be explicitly invoked or reactivated.\n */\n CheckOnce,\n\n /**\n * A state in which change detection is skipped until the change detector mode\n * becomes `CheckOnce`.\n */\n Checked,\n\n /**\n * A state in which change detection continues automatically until explicitly\n * deactivated.\n */\n CheckAlways,\n\n /**\n * A state in which a change detector sub tree is not a part of the main tree and\n * should be skipped.\n */\n Detached,\n\n /**\n * Indicates that the change detector encountered an error checking a binding\n * or calling a directive lifecycle method and is now in an inconsistent state. Change\n * detectors in this state do not detect changes.\n */\n Errored,\n\n /**\n * Indicates that the change detector has been destroyed.\n */\n Destroyed,\n}\n\n/**\n * Reports whether a given strategy is currently the default for change detection.\n * @param changeDetectionStrategy The strategy to check.\n * @returns True if the given strategy is the current default, false otherwise.\n * @see `ChangeDetectorStatus`\n * @see `ChangeDetectorRef`\n */\nexport function isDefaultChangeDetectionStrategy(changeDetectionStrategy: ChangeDetectionStrategy):\n boolean {\n return changeDetectionStrategy == null ||\n changeDetectionStrategy === ChangeDetectionStrategy.Default;\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 * Defines template and style encapsulation options available for Component's {@link Component}.\n *\n * See {@link Component#encapsulation encapsulation}.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/ts/metadata/encapsulation.ts region='longform'}\n *\n * @publicApi\n */\nexport enum ViewEncapsulation {\n /**\n * Emulate `Native` scoping of styles by adding an attribute containing surrogate id to the Host\n * Element and pre-processing the style rules provided via {@link Component#styles styles} or\n * {@link Component#styleUrls styleUrls}, and adding the new Host Element attribute to all\n * selectors.\n *\n * This is the default option.\n */\n Emulated = 0,\n\n // Historically the 1 value was for `Native` encapsulation which has been removed as of v11.\n\n /**\n * Don't provide any template or style encapsulation.\n */\n None = 2,\n\n /**\n * Use Shadow DOM to encapsulate styles.\n *\n * For the DOM this means using modern [Shadow\n * DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM) and\n * creating a ShadowRoot for Component's Host Element.\n */\n ShadowDom = 3\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// TODO(jteplitz602): Load WorkerGlobalScope from lib.webworker.d.ts file #3492\ndeclare var WorkerGlobalScope: any /** TODO #9100 */;\n// CommonJS / Node have global context exposed as \"global\" variable.\n// We don't want to include the whole node.d.ts this this compilation unit so we'll just fake\n// the global \"global\" var for now.\ndeclare var global: any /** TODO #9100 */;\n\nconst __globalThis = typeof globalThis !== 'undefined' && globalThis;\nconst __window = typeof window !== 'undefined' && window;\nconst __self = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&\n self instanceof WorkerGlobalScope && self;\nconst __global = typeof global !== 'undefined' && global;\n\n// Always use __globalThis if available, which is the spec-defined global variable across all\n// environments, then fallback to __global first, because in Node tests both __global and\n// __window may be defined and _global should be __global in that case.\nconst _global = __globalThis || __global || __window || __self;\n\n/**\n * Attention: whenever providing a new value, be sure to add an\n * entry into the corresponding `....externs.js` file,\n * so that closure won't use that global for its purposes.\n */\nexport {_global as global};\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 {global} from './global';\n\ndeclare global {\n /**\n * Values of ngDevMode\n * Depending on the current state of the application, ngDevMode may have one of several values.\n *\n * For convenience, the “truthy” value which enables dev mode is also an object which contains\n * Angular’s performance counters. This is not necessary, but cuts down on boilerplate for the\n * perf counters.\n *\n * ngDevMode may also be set to false. This can happen in one of a few ways:\n * - The user explicitly sets `window.ngDevMode = false` somewhere in their app.\n * - The user calls `enableProdMode()`.\n * - The URL contains a `ngDevMode=false` text.\n * Finally, ngDevMode may not have been defined at all.\n */\n const ngDevMode: null|NgDevModePerfCounters;\n interface NgDevModePerfCounters {\n namedConstructors: boolean;\n firstCreatePass: number;\n tNode: number;\n tView: number;\n rendererCreateTextNode: number;\n rendererSetText: number;\n rendererCreateElement: number;\n rendererAddEventListener: number;\n rendererSetAttribute: number;\n rendererRemoveAttribute: number;\n rendererSetProperty: number;\n rendererSetClassName: number;\n rendererAddClass: number;\n rendererRemoveClass: number;\n rendererSetStyle: number;\n rendererRemoveStyle: number;\n rendererDestroy: number;\n rendererDestroyNode: number;\n rendererMoveNode: number;\n rendererRemoveNode: number;\n rendererAppendChild: number;\n rendererInsertBefore: number;\n rendererCreateComment: number;\n }\n}\n\nexport function ngDevModeResetPerfCounters(): NgDevModePerfCounters {\n const locationString = typeof location !== 'undefined' ? location.toString() : '';\n const newCounters: NgDevModePerfCounters = {\n namedConstructors: locationString.indexOf('ngDevMode=namedConstructors') != -1,\n firstCreatePass: 0,\n tNode: 0,\n tView: 0,\n rendererCreateTextNode: 0,\n rendererSetText: 0,\n rendererCreateElement: 0,\n rendererAddEventListener: 0,\n rendererSetAttribute: 0,\n rendererRemoveAttribute: 0,\n rendererSetProperty: 0,\n rendererSetClassName: 0,\n rendererAddClass: 0,\n rendererRemoveClass: 0,\n rendererSetStyle: 0,\n rendererRemoveStyle: 0,\n rendererDestroy: 0,\n rendererDestroyNode: 0,\n rendererMoveNode: 0,\n rendererRemoveNode: 0,\n rendererAppendChild: 0,\n rendererInsertBefore: 0,\n rendererCreateComment: 0,\n };\n\n // Make sure to refer to ngDevMode as ['ngDevMode'] for closure.\n const allowNgDevModeTrue = locationString.indexOf('ngDevMode=false') === -1;\n global['ngDevMode'] = allowNgDevModeTrue && newCounters;\n return newCounters;\n}\n\n/**\n * This function checks to see if the `ngDevMode` has been set. If yes,\n * then we honor it, otherwise we default to dev mode with additional checks.\n *\n * The idea is that unless we are doing production build where we explicitly\n * set `ngDevMode == false` we should be helping the developer by providing\n * as much early warning and errors as possible.\n *\n * `ɵɵdefineComponent` is guaranteed to have been called before any component template functions\n * (and thus Ivy instructions), so a single initialization there is sufficient to ensure ngDevMode\n * is defined for the entire instruction set.\n *\n * When checking `ngDevMode` on toplevel, always init it before referencing it\n * (e.g. `((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode())`), otherwise you can\n * get a `ReferenceError` like in https://github.com/angular/angular/issues/31595.\n *\n * Details on possible values for `ngDevMode` can be found on its docstring.\n *\n * NOTE:\n * - changes to the `ngDevMode` name must be synced with `compiler-cli/src/tooling.ts`.\n */\nexport function initNgDevMode(): boolean {\n // The below checks are to ensure that calling `initNgDevMode` multiple times does not\n // reset the counters.\n // If the `ngDevMode` is not an object, then it means we have not created the perf counters\n // yet.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (typeof ngDevMode !== 'object') {\n ngDevModeResetPerfCounters();\n }\n return typeof ngDevMode !== 'undefined' && !!ngDevMode;\n }\n return 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 */\nimport {initNgDevMode} from './ng_dev_mode';\n\n/**\n * This file contains reuseable \"empty\" symbols that can be used as default return values\n * in different parts of the rendering code. Because the same symbols are returned, this\n * allows for identity checks against these values to be consistently used by the framework\n * code.\n */\n\nexport const EMPTY_OBJ: {} = {};\nexport const EMPTY_ARRAY: any[] = [];\n\n// freezing the values prevents any code from accidentally inserting new values in\nif ((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode()) {\n // These property accesses can be ignored because ngDevMode will be set to false\n // when optimizing code and the whole if statement will be dropped.\n // tslint:disable-next-line:no-toplevel-property-access\n Object.freeze(EMPTY_OBJ);\n // tslint:disable-next-line:no-toplevel-property-access\n Object.freeze(EMPTY_ARRAY);\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 {getClosureSafeProperty} from '../util/property';\n\nexport const NG_COMP_DEF = getClosureSafeProperty({ɵcmp: getClosureSafeProperty});\nexport const NG_DIR_DEF = getClosureSafeProperty({ɵdir: getClosureSafeProperty});\nexport const NG_PIPE_DEF = getClosureSafeProperty({ɵpipe: getClosureSafeProperty});\nexport const NG_MOD_DEF = getClosureSafeProperty({ɵmod: getClosureSafeProperty});\nexport const NG_LOC_ID_DEF = getClosureSafeProperty({ɵloc: getClosureSafeProperty});\nexport const NG_FACTORY_DEF = getClosureSafeProperty({ɵfac: getClosureSafeProperty});\n\n/**\n * If a directive is diPublic, bloomAdd sets a property on the type with this constant as\n * the key and the directive's unique ID as the value. This allows us to map directives to their\n * bloom filter bit for DI.\n */\n// TODO(misko): This is wrong. The NG_ELEMENT_ID should never be minified.\nexport const NG_ELEMENT_ID = getClosureSafeProperty({__NG_ELEMENT_ID__: getClosureSafeProperty});\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 {ChangeDetectionStrategy} from '../change_detection/constants';\nimport {Mutable, Type} from '../interface/type';\nimport {NgModuleDef, NgModuleType} from '../metadata/ng_module_def';\nimport {SchemaMetadata} from '../metadata/schema';\nimport {ViewEncapsulation} from '../metadata/view';\nimport {noSideEffects} from '../util/closure';\nimport {EMPTY_ARRAY, EMPTY_OBJ} from '../util/empty';\nimport {initNgDevMode} from '../util/ng_dev_mode';\nimport {stringify} from '../util/stringify';\nimport {NG_COMP_DEF, NG_DIR_DEF, NG_LOC_ID_DEF, NG_MOD_DEF, NG_PIPE_DEF} from './fields';\nimport {ComponentDef, ComponentDefFeature, ComponentTemplate, ComponentType, ContentQueriesFunction, DirectiveDef, DirectiveDefFeature, DirectiveTypesOrFactory, HostBindingsFunction, PipeDef, PipeTypesOrFactory, ViewQueriesFunction} from './interfaces/definition';\nimport {TAttributes, TConstantsOrFactory} from './interfaces/node';\nimport {CssSelectorList} from './interfaces/projection';\n\n\nlet _renderCompCount = 0;\n\n\n/**\n * Create a component definition object.\n *\n *\n * # Example\n * ```\n * class MyDirective {\n * // Generated by Angular Template Compiler\n * // [Symbol] syntax will not be supported by TypeScript until v2.7\n * static ɵcmp = defineComponent({\n * ...\n * });\n * }\n * ```\n * @codeGenApi\n */\nexport function ɵɵdefineComponent<T>(componentDefinition: {\n /**\n * Directive type, needed to configure the injector.\n */\n type: Type<T>;\n\n /** The selectors that will be used to match nodes to this component. */\n selectors?: CssSelectorList;\n\n /**\n * The number of nodes, local refs, and pipes in this component template.\n *\n * Used to calculate the length of this component's LView array, so we\n * can pre-fill the array and set the binding start index.\n */\n // TODO(kara): remove queries from this count\n decls: number;\n\n /**\n * The number of bindings in this component template (including pure fn bindings).\n *\n * Used to calculate the length of this component's LView array, so we\n * can pre-fill the array and set the host binding start index.\n */\n vars: number;\n\n /**\n * A map of input names.\n *\n * The format is in: `{[actualPropertyName: string]:(string|[string, string])}`.\n *\n * Given:\n * ```\n * class MyComponent {\n * @Input()\n * publicInput1: string;\n *\n * @Input('publicInput2')\n * declaredInput2: string;\n * }\n * ```\n *\n * is described as:\n * ```\n * {\n * publicInput1: 'publicInput1',\n * declaredInput2: ['publicInput2', 'declaredInput2'],\n * }\n * ```\n *\n * Which the minifier may translate to:\n * ```\n * {\n * minifiedPublicInput1: 'publicInput1',\n * minifiedDeclaredInput2: ['publicInput2', 'declaredInput2'],\n * }\n * ```\n *\n * This allows the render to re-construct the minified, public, and declared names\n * of properties.\n *\n * NOTE:\n * - Because declared and public name are usually same we only generate the array\n * `['public', 'declared']` format when they differ.\n * - The reason why this API and `outputs` API is not the same is that `NgOnChanges` has\n * inconsistent behavior in that it uses declared names rather than minified or public. For\n * this reason `NgOnChanges` will be deprecated and removed in future version and this\n * API will be simplified to be consistent with `output`.\n */\n inputs?: {[P in keyof T]?: string | [string, string]};\n\n /**\n * A map of output names.\n *\n * The format is in: `{[actualPropertyName: string]:string}`.\n *\n * Which the minifier may translate to: `{[minifiedPropertyName: string]:string}`.\n *\n * This allows the render to re-construct the minified and non-minified names\n * of properties.\n */\n outputs?: {[P in keyof T]?: string};\n\n /**\n * Function executed by the parent template to allow child directive to apply host bindings.\n */\n hostBindings?: HostBindingsFunction<T>;\n\n /**\n * The number of bindings in this directive `hostBindings` (including pure fn bindings).\n *\n * Used to calculate the length of the component's LView array, so we\n * can pre-fill the array and set the host binding start index.\n */\n hostVars?: number;\n\n /**\n * Assign static attribute values to a host element.\n *\n * This property will assign static attribute values as well as class and style\n * values to a host element. Since attribute values can consist of different types of values, the\n * `hostAttrs` array must include the values in the following format:\n *\n * attrs = [\n * // static attributes (like `title`, `name`, `id`...)\n * attr1, value1, attr2, value,\n *\n * // a single namespace value (like `x:id`)\n * NAMESPACE_MARKER, namespaceUri1, name1, value1,\n *\n * // another single namespace value (like `x:name`)\n * NAMESPACE_MARKER, namespaceUri2, name2, value2,\n *\n * // a series of CSS classes that will be applied to the element (no spaces)\n * CLASSES_MARKER, class1, class2, class3,\n *\n * // a series of CSS styles (property + value) that will be applied to the element\n * STYLES_MARKER, prop1, value1, prop2, value2\n * ]\n *\n * All non-class and non-style attributes must be defined at the start of the list\n * first before all class and style values are set. When there is a change in value\n * type (like when classes and styles are introduced) a marker must be used to separate\n * the entries. The marker values themselves are set via entries found in the\n * [AttributeMarker] enum.\n */\n hostAttrs?: TAttributes;\n\n /**\n * Function to create instances of content queries associated with a given directive.\n */\n contentQueries?: ContentQueriesFunction<T>;\n\n /**\n * Defines the name that can be used in the template to assign this directive to a variable.\n *\n * See: {@link Directive.exportAs}\n */\n exportAs?: string[];\n\n /**\n * Template function use for rendering DOM.\n *\n * This function has following structure.\n *\n * ```\n * function Template<T>(ctx:T, creationMode: boolean) {\n * if (creationMode) {\n * // Contains creation mode instructions.\n * }\n * // Contains binding update instructions\n * }\n * ```\n *\n * Common instructions are:\n * Creation mode instructions:\n * - `elementStart`, `elementEnd`\n * - `text`\n * - `container`\n * - `listener`\n *\n * Binding update instructions:\n * - `bind`\n * - `elementAttribute`\n * - `elementProperty`\n * - `elementClass`\n * - `elementStyle`\n *\n */\n template: ComponentTemplate<T>;\n\n /**\n * Constants for the nodes in the component's view.\n * Includes attribute arrays, local definition arrays etc.\n */\n consts?: TConstantsOrFactory;\n\n /**\n * An array of `ngContent[selector]` values that were found in the template.\n */\n ngContentSelectors?: string[];\n\n /**\n * Additional set of instructions specific to view query processing. This could be seen as a\n * set of instruction to be inserted into the template function.\n *\n * Query-related instructions need to be pulled out to a specific function as a timing of\n * execution is different as compared to all other instructions (after change detection hooks but\n * before view hooks).\n */\n viewQuery?: ViewQueriesFunction<T>| null;\n\n /**\n * A list of optional features to apply.\n *\n * See: {@link NgOnChangesFeature}, {@link ProvidersFeature}\n */\n features?: ComponentDefFeature[];\n\n /**\n * Defines template and style encapsulation options available for Component's {@link Component}.\n */\n encapsulation?: ViewEncapsulation;\n\n /**\n * Defines arbitrary developer-defined data to be stored on a renderer instance.\n * This is useful for renderers that delegate to other renderers.\n *\n * see: animation\n */\n data?: {[kind: string]: any};\n\n /**\n * A set of styles that the component needs to be present for component to render correctly.\n */\n styles?: string[];\n\n /**\n * The strategy that the default change detector uses to detect changes.\n * When set, takes effect the next time change detection is triggered.\n */\n changeDetection?: ChangeDetectionStrategy;\n\n /**\n * Registry of directives and components that may be found in this component's view.\n *\n * The property is either an array of `DirectiveDef`s or a function which returns the array of\n * `DirectiveDef`s. The function is necessary to be able to support forward declarations.\n */\n directives?: DirectiveTypesOrFactory | null;\n\n /**\n * Registry of pipes that may be found in this component's view.\n *\n * The property is either an array of `PipeDefs`s or a function which returns the array of\n * `PipeDefs`s. The function is necessary to be able to support forward declarations.\n */\n pipes?: PipeTypesOrFactory | null;\n\n /**\n * The set of schemas that declare elements to be allowed in the component's template.\n */\n schemas?: SchemaMetadata[] | null;\n}): unknown {\n return noSideEffects(() => {\n // Initialize ngDevMode. This must be the first statement in ɵɵdefineComponent.\n // See the `initNgDevMode` docstring for more information.\n (typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode();\n\n const type = componentDefinition.type;\n const declaredInputs: {[key: string]: string} = {} as any;\n const def: Mutable<ComponentDef<any>, keyof ComponentDef<any>> = {\n type: type,\n providersResolver: null,\n decls: componentDefinition.decls,\n vars: componentDefinition.vars,\n factory: null,\n template: componentDefinition.template || null!,\n consts: componentDefinition.consts || null,\n ngContentSelectors: componentDefinition.ngContentSelectors,\n hostBindings: componentDefinition.hostBindings || null,\n hostVars: componentDefinition.hostVars || 0,\n hostAttrs: componentDefinition.hostAttrs || null,\n contentQueries: componentDefinition.contentQueries || null,\n declaredInputs: declaredInputs,\n inputs: null!, // assigned in noSideEffects\n outputs: null!, // assigned in noSideEffects\n exportAs: componentDefinition.exportAs || null,\n onPush: componentDefinition.changeDetection === ChangeDetectionStrategy.OnPush,\n directiveDefs: null!, // assigned in noSideEffects\n pipeDefs: null!, // assigned in noSideEffects\n selectors: componentDefinition.selectors || EMPTY_ARRAY,\n viewQuery: componentDefinition.viewQuery || null,\n features: componentDefinition.features as DirectiveDefFeature[] || null,\n data: componentDefinition.data || {},\n // TODO(misko): convert ViewEncapsulation into const enum so that it can be used\n // directly in the next line. Also `None` should be 0 not 2.\n encapsulation: componentDefinition.encapsulation || ViewEncapsulation.Emulated,\n id: 'c',\n styles: componentDefinition.styles || EMPTY_ARRAY,\n _: null,\n setInput: null,\n schemas: componentDefinition.schemas || null,\n tView: null,\n };\n const directiveTypes = componentDefinition.directives!;\n const feature = componentDefinition.features;\n const pipeTypes = componentDefinition.pipes!;\n def.id += _renderCompCount++;\n def.inputs = invertObject(componentDefinition.inputs, declaredInputs),\n def.outputs = invertObject(componentDefinition.outputs),\n feature && feature.forEach((fn) => fn(def));\n def.directiveDefs = directiveTypes ?\n () => (typeof directiveTypes === 'function' ? directiveTypes() : directiveTypes)\n .map(extractDirectiveDef) :\n null;\n def.pipeDefs = pipeTypes ?\n () => (typeof pipeTypes === 'function' ? pipeTypes() : pipeTypes).map(extractPipeDef) :\n null;\n\n return def;\n });\n}\n\n/**\n * Generated next to NgModules to monkey-patch directive and pipe references onto a component's\n * definition, when generating a direct reference in the component file would otherwise create an\n * import cycle.\n *\n * See [this explanation](https://hackmd.io/Odw80D0pR6yfsOjg_7XCJg?view) for more details.\n *\n * @codeGenApi\n */\nexport function ɵɵsetComponentScope(\n type: ComponentType<any>, directives: Type<any>[], pipes: Type<any>[]): void {\n const def = (type.ɵcmp as ComponentDef<any>);\n def.directiveDefs = () => directives.map(extractDirectiveDef);\n def.pipeDefs = () => pipes.map(extractPipeDef);\n}\n\nexport function extractDirectiveDef(type: Type<any>): DirectiveDef<any>|ComponentDef<any> {\n const def = getComponentDef(type) || getDirectiveDef(type);\n if (ngDevMode && !def) {\n throw new Error(`'${type.name}' is neither 'ComponentType' or 'DirectiveType'.`);\n }\n return def!;\n}\n\nexport function extractPipeDef(type: Type<any>): PipeDef<any> {\n const def = getPipeDef(type);\n if (ngDevMode && !def) {\n throw new Error(`'${type.name}' is not a 'PipeType'.`);\n }\n return def!;\n}\n\nexport const autoRegisterModuleById: {[id: string]: NgModuleType} = {};\n\n/**\n * @codeGenApi\n */\nexport function ɵɵdefineNgModule<T>(def: {\n /** Token representing the module. Used by DI. */\n type: T;\n\n /** List of components to bootstrap. */\n bootstrap?: Type<any>[] | (() => Type<any>[]);\n\n /** List of components, directives, and pipes declared by this module. */\n declarations?: Type<any>[] | (() => Type<any>[]);\n\n /** List of modules or `ModuleWithProviders` imported by this module. */\n imports?: Type<any>[] | (() => Type<any>[]);\n\n /**\n * List of modules, `ModuleWithProviders`, components, directives, or pipes exported by this\n * module.\n */\n exports?: Type<any>[] | (() => Type<any>[]);\n\n /** The set of schemas that declare elements to be allowed in the NgModule. */\n schemas?: SchemaMetadata[] | null;\n\n /** Unique ID for the module that is used with `getModuleFactory`. */\n id?: string | null;\n}): unknown {\n return noSideEffects(() => {\n const res: NgModuleDef<T> = {\n type: def.type,\n bootstrap: def.bootstrap || EMPTY_ARRAY,\n declarations: def.declarations || EMPTY_ARRAY,\n imports: def.imports || EMPTY_ARRAY,\n exports: def.exports || EMPTY_ARRAY,\n transitiveCompileScopes: null,\n schemas: def.schemas || null,\n id: def.id || null,\n };\n if (def.id != null) {\n autoRegisterModuleById[def.id!] = def.type as unknown as NgModuleType;\n }\n return res;\n });\n}\n\n/**\n * Adds the module metadata that is necessary to compute the module's transitive scope to an\n * existing module definition.\n *\n * Scope metadata of modules is not used in production builds, so calls to this function can be\n * marked pure to tree-shake it from the bundle, allowing for all referenced declarations\n * to become eligible for tree-shaking as well.\n *\n * @codeGenApi\n */\nexport function ɵɵsetNgModuleScope(type: any, scope: {\n /** List of components, directives, and pipes declared by this module. */\n declarations?: Type<any>[]|(() => Type<any>[]);\n\n /** List of modules or `ModuleWithProviders` imported by this module. */\n imports?: Type<any>[] | (() => Type<any>[]);\n\n /**\n * List of modules, `ModuleWithProviders`, components, directives, or pipes exported by this\n * module.\n */\n exports?: Type<any>[] | (() => Type<any>[]);\n}): unknown {\n return noSideEffects(() => {\n const ngModuleDef = getNgModuleDef(type, true);\n ngModuleDef.declarations = scope.declarations || EMPTY_ARRAY;\n ngModuleDef.imports = scope.imports || EMPTY_ARRAY;\n ngModuleDef.exports = scope.exports || EMPTY_ARRAY;\n });\n}\n\n/**\n * Inverts an inputs or outputs lookup such that the keys, which were the\n * minified keys, are part of the values, and the values are parsed so that\n * the publicName of the property is the new key\n *\n * e.g. for\n *\n * ```\n * class Comp {\n * @Input()\n * propName1: string;\n *\n * @Input('publicName2')\n * declaredPropName2: number;\n * }\n * ```\n *\n * will be serialized as\n *\n * ```\n * {\n * propName1: 'propName1',\n * declaredPropName2: ['publicName2', 'declaredPropName2'],\n * }\n * ```\n *\n * which is than translated by the minifier as:\n *\n * ```\n * {\n * minifiedPropName1: 'propName1',\n * minifiedPropName2: ['publicName2', 'declaredPropName2'],\n * }\n * ```\n *\n * becomes: (public name => minifiedName)\n *\n * ```\n * {\n * 'propName1': 'minifiedPropName1',\n * 'publicName2': 'minifiedPropName2',\n * }\n * ```\n *\n * Optionally the function can take `secondary` which will result in: (public name => declared name)\n *\n * ```\n * {\n * 'propName1': 'propName1',\n * 'publicName2': 'declaredPropName2',\n * }\n * ```\n *\n\n */\nfunction invertObject<T>(\n obj?: {[P in keyof T]?: string|[string, string]},\n secondary?: {[key: string]: string}): {[P in keyof T]: string} {\n if (obj == null) return EMPTY_OBJ as any;\n const newLookup: any = {};\n for (const minifiedKey in obj) {\n if (obj.hasOwnProperty(minifiedKey)) {\n let publicName: string|[string, string] = obj[minifiedKey]!;\n let declaredName = publicName;\n if (Array.isArray(publicName)) {\n declaredName = publicName[1];\n publicName = publicName[0];\n }\n newLookup[publicName] = minifiedKey;\n if (secondary) {\n (secondary[publicName] = declaredName as string);\n }\n }\n }\n return newLookup;\n}\n\n/**\n * Create a directive definition object.\n *\n * # Example\n * ```ts\n * class MyDirective {\n * // Generated by Angular Template Compiler\n * // [Symbol] syntax will not be supported by TypeScript until v2.7\n * static ɵdir = ɵɵdefineDirective({\n * ...\n * });\n * }\n * ```\n *\n * @codeGenApi\n */\nexport const ɵɵdefineDirective =\n ɵɵdefineComponent as any as<T>(directiveDefinition: {\n /**\n * Directive type, needed to configure the injector.\n */\n type: Type<T>;\n\n /** The selectors that will be used to match nodes to this directive. */\n selectors?: CssSelectorList;\n\n /**\n * A map of input names.\n *\n * The format is in: `{[actualPropertyName: string]:(string|[string, string])}`.\n *\n * Given:\n * ```\n * class MyComponent {\n * @Input()\n * publicInput1: string;\n *\n * @Input('publicInput2')\n * declaredInput2: string;\n * }\n * ```\n *\n * is described as:\n * ```\n * {\n * publicInput1: 'publicInput1',\n * declaredInput2: ['declaredInput2', 'publicInput2'],\n * }\n * ```\n *\n * Which the minifier may translate to:\n * ```\n * {\n * minifiedPublicInput1: 'publicInput1',\n * minifiedDeclaredInput2: [ 'publicInput2', 'declaredInput2'],\n * }\n * ```\n *\n * This allows the render to re-construct the minified, public, and declared names\n * of properties.\n *\n * NOTE:\n * - Because declared and public name are usually same we only generate the array\n * `['declared', 'public']` format when they differ.\n * - The reason why this API and `outputs` API is not the same is that `NgOnChanges` has\n * inconsistent behavior in that it uses declared names rather than minified or public. For\n * this reason `NgOnChanges` will be deprecated and removed in future version and this\n * API will be simplified to be consistent with `output`.\n */\n inputs?: {[P in keyof T]?: string | [string, string]};\n\n /**\n * A map of output names.\n *\n * The format is in: `{[actualPropertyName: string]:string}`.\n *\n * Which the minifier may translate to: `{[minifiedPropertyName: string]:string}`.\n *\n * This allows the render to re-construct the minified and non-minified names\n * of properties.\n */\n outputs?: {[P in keyof T]?: string};\n\n /**\n * A list of optional features to apply.\n *\n * See: {@link NgOnChangesFeature}, {@link ProvidersFeature}, {@link InheritDefinitionFeature}\n */\n features?: DirectiveDefFeature[];\n\n /**\n * Function executed by the parent template to allow child directive to apply host bindings.\n */\n hostBindings?: HostBindingsFunction<T>;\n\n /**\n * The number of bindings in this directive `hostBindings` (including pure fn bindings).\n *\n * Used to calculate the length of the component's LView array, so we\n * can pre-fill the array and set the host binding start index.\n */\n hostVars?: number;\n\n /**\n * Assign static attribute values to a host element.\n *\n * This property will assign static attribute values as well as class and style\n * values to a host element. Since attribute values can consist of different types of values,\n * the `hostAttrs` array must include the values in the following format:\n *\n * attrs = [\n * // static attributes (like `title`, `name`, `id`...)\n * attr1, value1, attr2, value,\n *\n * // a single namespace value (like `x:id`)\n * NAMESPACE_MARKER, namespaceUri1, name1, value1,\n *\n * // another single namespace value (like `x:name`)\n * NAMESPACE_MARKER, namespaceUri2, name2, value2,\n *\n * // a series of CSS classes that will be applied to the element (no spaces)\n * CLASSES_MARKER, class1, class2, class3,\n *\n * // a series of CSS styles (property + value) that will be applied to the element\n * STYLES_MARKER, prop1, value1, prop2, value2\n * ]\n *\n * All non-class and non-style attributes must be defined at the start of the list\n * first before all class and style values are set. When there is a change in value\n * type (like when classes and styles are introduced) a marker must be used to separate\n * the entries. The marker values themselves are set via entries found in the\n * [AttributeMarker] enum.\n */\n hostAttrs?: TAttributes;\n\n /**\n * Function to create instances of content queries associated with a given directive.\n */\n contentQueries?: ContentQueriesFunction<T>;\n\n /**\n * Additional set of instructions specific to view query processing. This could be seen as a\n * set of instructions to be inserted into the template function.\n */\n viewQuery?: ViewQueriesFunction<T>| null;\n\n /**\n * Defines the name that can be used in the template to assign this directive to a variable.\n *\n * See: {@link Directive.exportAs}\n */\n exportAs?: string[];\n }) => never;\n\n/**\n * Create a pipe definition object.\n *\n * # Example\n * ```\n * class MyPipe implements PipeTransform {\n * // Generated by Angular Template Compiler\n * static ɵpipe = definePipe({\n * ...\n * });\n * }\n * ```\n * @param pipeDef Pipe definition generated by the compiler\n *\n * @codeGenApi\n */\nexport function ɵɵdefinePipe<T>(pipeDef: {\n /** Name of the pipe. Used for matching pipes in template to pipe defs. */\n name: string,\n\n /** Pipe class reference. Needed to extract pipe lifecycle hooks. */\n type: Type<T>,\n\n /** Whether the pipe is pure. */\n pure?: boolean\n}): unknown {\n return (<PipeDef<T>>{\n type: pipeDef.type,\n name: pipeDef.name,\n factory: null,\n pure: pipeDef.pure !== false,\n onDestroy: pipeDef.type.prototype.ngOnDestroy || null\n });\n}\n\n/**\n * The following getter methods retrieve the definition from the type. Currently the retrieval\n * honors inheritance, but in the future we may change the rule to require that definitions are\n * explicit. This would require some sort of migration strategy.\n */\n\nexport function getComponentDef<T>(type: any): ComponentDef<T>|null {\n return type[NG_COMP_DEF] || null;\n}\n\nexport function getDirectiveDef<T>(type: any): DirectiveDef<T>|null {\n return type[NG_DIR_DEF] || null;\n}\n\nexport function getPipeDef<T>(type: any): PipeDef<T>|null {\n return type[NG_PIPE_DEF] || null;\n}\n\nexport function getNgModuleDef<T>(type: any, throwNotFound: true): NgModuleDef<T>;\nexport function getNgModuleDef<T>(type: any): NgModuleDef<T>|null;\nexport function getNgModuleDef<T>(type: any, throwNotFound?: boolean): NgModuleDef<T>|null {\n const ngModuleDef = type[NG_MOD_DEF] || null;\n if (!ngModuleDef && throwNotFound === true) {\n throw new Error(`Type ${stringify(type)} does not have 'ɵmod' property.`);\n }\n return ngModuleDef;\n}\n\nexport function getNgLocaleIdDef(type: any): string|null {\n return (type as any)[NG_LOC_ID_DEF] || null;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {TNode} from './node';\nimport {RComment, RElement} from './renderer_dom';\nimport {HOST, LView, NEXT, PARENT, T_HOST, TRANSPLANTED_VIEWS_TO_REFRESH} from './view';\n\n\n\n/**\n * Special location which allows easy identification of type. If we have an array which was\n * retrieved from the `LView` and that array has `true` at `TYPE` location, we know it is\n * `LContainer`.\n */\nexport const TYPE = 1;\n\n/**\n * Below are constants for LContainer indices to help us look up LContainer members\n * without having to remember the specific indices.\n * Uglify will inline these when minifying so there shouldn't be a cost.\n */\n\n/**\n * Flag to signify that this `LContainer` may have transplanted views which need to be change\n * detected. (see: `LView[DECLARATION_COMPONENT_VIEW])`.\n *\n * This flag, once set, is never unset for the `LContainer`. This means that when unset we can skip\n * a lot of work in `refreshEmbeddedViews`. But when set we still need to verify\n * that the `MOVED_VIEWS` are transplanted and on-push.\n */\nexport const HAS_TRANSPLANTED_VIEWS = 2;\n\n// PARENT, NEXT, TRANSPLANTED_VIEWS_TO_REFRESH are indices 3, 4, and 5\n// As we already have these constants in LView, we don't need to re-create them.\n\n// T_HOST is index 6\n// We already have this constants in LView, we don't need to re-create it.\n\nexport const NATIVE = 7;\nexport const VIEW_REFS = 8;\nexport const MOVED_VIEWS = 9;\n\n\n/**\n * Size of LContainer's header. Represents the index after which all views in the\n * container will be inserted. We need to keep a record of current views so we know\n * which views are already in the DOM (and don't need to be re-added) and so we can\n * remove views from the DOM when they are no longer required.\n */\nexport const CONTAINER_HEADER_OFFSET = 10;\n\n/**\n * The state associated with a container.\n *\n * This is an array so that its structure is closer to LView. This helps\n * when traversing the view tree (which is a mix of containers and component\n * views), so we can jump to viewOrContainer[NEXT] in the same way regardless\n * of type.\n */\nexport interface LContainer extends Array<any> {\n /**\n * The host element of this LContainer.\n *\n * The host could be an LView if this container is on a component node.\n * In that case, the component LView is its HOST.\n */\n readonly[HOST]: RElement|RComment|LView;\n\n /**\n * This is a type field which allows us to differentiate `LContainer` from `StylingContext` in an\n * efficient way. The value is always set to `true`\n */\n [TYPE]: true;\n\n /**\n * Flag to signify that this `LContainer` may have transplanted views which need to be change\n * detected. (see: `LView[DECLARATION_COMPONENT_VIEW])`.\n *\n * This flag, once set, is never unset for the `LContainer`.\n */\n [HAS_TRANSPLANTED_VIEWS]: boolean;\n\n /**\n * Access to the parent view is necessary so we can propagate back\n * up from inside a container to parent[NEXT].\n */\n [PARENT]: LView;\n\n /**\n * This allows us to jump from a container to a sibling container or component\n * view with the same parent, so we can remove listeners efficiently.\n */\n [NEXT]: LView|LContainer|null;\n\n /**\n * The number of direct transplanted views which need a refresh or have descendants themselves\n * that need a refresh but have not marked their ancestors as Dirty. This tells us that during\n * change detection we should still descend to find those children to refresh, even if the parents\n * are not `Dirty`/`CheckAlways`.\n */\n [TRANSPLANTED_VIEWS_TO_REFRESH]: number;\n\n /**\n * A collection of views created based on the underlying `<ng-template>` element but inserted into\n * a different `LContainer`. We need to track views created from a given declaration point since\n * queries collect matches from the embedded view declaration point and _not_ the insertion point.\n */\n [MOVED_VIEWS]: LView[]|null;\n\n /**\n * Pointer to the `TNode` which represents the host of the container.\n */\n [T_HOST]: TNode;\n\n /** The comment element that serves as an anchor for this LContainer. */\n readonly[NATIVE]:\n RComment; // TODO(misko): remove as this value can be gotten by unwrapping `[HOST]`\n\n /**\n * Array of `ViewRef`s used by any `ViewContainerRef`s that point to this container.\n *\n * This is lazily initialized by `ViewContainerRef` when the first view is inserted.\n *\n * NOTE: This is stored as `any[]` because render3 should really not be aware of `ViewRef` and\n * doing so creates circular dependency.\n */\n [VIEW_REFS]: unknown[]|null;\n}\n\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nexport const unusedValueExportToPlacateAjd = 1;\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 '../../di/injector';\nimport {ProviderToken} from '../../di/provider_token';\nimport {Type} from '../../interface/type';\nimport {SchemaMetadata} from '../../metadata/schema';\nimport {Sanitizer} from '../../sanitization/sanitizer';\nimport {LContainer} from './container';\nimport {ComponentDef, ComponentTemplate, DirectiveDef, DirectiveDefList, HostBindingsFunction, PipeDef, PipeDefList, ViewQueriesFunction} from './definition';\nimport {I18nUpdateOpCodes, TI18n, TIcu} from './i18n';\nimport {TConstants, TNode} from './node';\nimport {PlayerHandler} from './player';\nimport {LQueries, TQueries} from './query';\nimport {Renderer3, RendererFactory3} from './renderer';\nimport {RComment, RElement} from './renderer_dom';\nimport {TStylingKey, TStylingRange} from './styling';\n\n\n\n// Below are constants for LView indices to help us look up LView members\n// without having to remember the specific indices.\n// Uglify will inline these when minifying so there shouldn't be a cost.\nexport const HOST = 0;\nexport const TVIEW = 1;\nexport const FLAGS = 2;\nexport const PARENT = 3;\nexport const NEXT = 4;\nexport const TRANSPLANTED_VIEWS_TO_REFRESH = 5;\nexport const T_HOST = 6;\nexport const CLEANUP = 7;\nexport const CONTEXT = 8;\nexport const INJECTOR = 9;\nexport const RENDERER_FACTORY = 10;\nexport const RENDERER = 11;\nexport const SANITIZER = 12;\nexport const CHILD_HEAD = 13;\nexport const CHILD_TAIL = 14;\n// FIXME(misko): Investigate if the three declarations aren't all same thing.\nexport const DECLARATION_VIEW = 15;\nexport const DECLARATION_COMPONENT_VIEW = 16;\nexport const DECLARATION_LCONTAINER = 17;\nexport const PREORDER_HOOK_FLAGS = 18;\nexport const QUERIES = 19;\n/**\n * Size of LView's header. Necessary to adjust for it when setting slots.\n *\n * IMPORTANT: `HEADER_OFFSET` should only be referred to the in the `ɵɵ*` instructions to translate\n * instruction index into `LView` index. All other indexes should be in the `LView` index space and\n * there should be no need to refer to `HEADER_OFFSET` anywhere else.\n */\nexport const HEADER_OFFSET = 20;\n\n\n// This interface replaces the real LView interface if it is an arg or a\n// return value of a public instruction. This ensures we don't need to expose\n// the actual interface, which should be kept private.\nexport interface OpaqueViewState {\n '__brand__': 'Brand for OpaqueViewState that nothing will match';\n}\n\n\n/**\n * `LView` stores all of the information needed to process the instructions as\n * they are invoked from the template. Each embedded view and component view has its\n * own `LView`. When processing a particular view, we set the `viewData` to that\n * `LView`. When that view is done processing, the `viewData` is set back to\n * whatever the original `viewData` was before (the parent `LView`).\n *\n * Keeping separate state for each view facilities view insertion / deletion, so we\n * don't have to edit the data array based on which views are present.\n */\nexport interface LView extends Array<any> {\n /**\n * Human readable representation of the `LView`.\n *\n * NOTE: This property only exists if `ngDevMode` is set to `true` and it is not present in\n * production. Its presence is purely to help debug issue in development, and should not be relied\n * on in production application.\n */\n debug?: LViewDebug;\n\n /**\n * The node into which this `LView` is inserted.\n */\n [HOST]: RElement|null;\n\n /**\n * The static data for this view. We need a reference to this so we can easily walk up the\n * node tree in DI and get the TView.data array associated with a node (where the\n * directive defs are stored).\n */\n readonly[TVIEW]: TView;\n\n /** Flags for this view. See LViewFlags for more info. */\n [FLAGS]: LViewFlags;\n\n /**\n * This may store an {@link LView} or {@link LContainer}.\n *\n * `LView` - The parent view. This is needed when we exit the view and must restore the previous\n * LView. Without this, the render method would have to keep a stack of\n * views as it is recursively rendering templates.\n *\n * `LContainer` - The current view is part of a container, and is an embedded view.\n */\n [PARENT]: LView|LContainer|null;\n\n /**\n *\n * The next sibling LView or LContainer.\n *\n * Allows us to propagate between sibling view states that aren't in the same\n * container. Embedded views already have a node.next, but it is only set for\n * views in the same container. We need a way to link component views and views\n * across containers as well.\n */\n [NEXT]: LView|LContainer|null;\n\n /** Queries active for this view - nodes from a view are reported to those queries. */\n [QUERIES]: LQueries|null;\n\n /**\n * Store the `TNode` of the location where the current `LView` is inserted into.\n *\n * Given:\n * ```\n * <div>\n * <ng-template><span></span></ng-template>\n * </div>\n * ```\n *\n * We end up with two `TView`s.\n * - `parent` `TView` which contains `<div><!-- anchor --></div>`\n * - `child` `TView` which contains `<span></span>`\n *\n * Typically the `child` is inserted into the declaration location of the `parent`, but it can be\n * inserted anywhere. Because it can be inserted anywhere it is not possible to store the\n * insertion information in the `TView` and instead we must store it in the `LView[T_HOST]`.\n *\n * So to determine where is our insertion parent we would execute:\n * ```\n * const parentLView = lView[PARENT];\n * const parentTNode = lView[T_HOST];\n * const insertionParent = parentLView[parentTNode.index];\n * ```\n *\n *\n * If `null`, this is the root view of an application (root component is in this view) and it has\n * no parents.\n */\n [T_HOST]: TNode|null;\n\n /**\n * When a view is destroyed, listeners need to be released and outputs need to be\n * unsubscribed. This context array stores both listener functions wrapped with\n * their context and output subscription instances for a particular view.\n *\n * These change per LView instance, so they cannot be stored on TView. Instead,\n * TView.cleanup saves an index to the necessary context in this array.\n *\n * After `LView` is created it is possible to attach additional instance specific functions at the\n * end of the `lView[CLENUP]` because we know that no more `T` level cleanup functions will be\n * addeded here.\n */\n [CLEANUP]: any[]|null;\n\n /**\n * - For dynamic views, this is the context with which to render the template (e.g.\n * `NgForContext`), or `{}` if not defined explicitly.\n * - For root view of the root component the context contains change detection data.\n * - For non-root components, the context is the component instance,\n * - For inline views, the context is null.\n */\n [CONTEXT]: {}|RootContext|null;\n\n /** An optional Module Injector to be used as fall back after Element Injectors are consulted. */\n readonly[INJECTOR]: Injector|null;\n\n /** Factory to be used for creating Renderer. */\n [RENDERER_FACTORY]: RendererFactory3;\n\n /** Renderer to be used for this view. */\n [RENDERER]: Renderer3;\n\n /** An optional custom sanitizer. */\n [SANITIZER]: Sanitizer|null;\n\n /**\n * Reference to the first LView or LContainer beneath this LView in\n * the hierarchy.\n *\n * Necessary to store this so views can traverse through their nested views\n * to remove listeners and call onDestroy callbacks.\n */\n [CHILD_HEAD]: LView|LContainer|null;\n\n /**\n * The last LView or LContainer beneath this LView in the hierarchy.\n *\n * The tail allows us to quickly add a new state to the end of the view list\n * without having to propagate starting from the first child.\n */\n [CHILD_TAIL]: LView|LContainer|null;\n\n /**\n * View where this view's template was declared.\n *\n * The template for a dynamically created view may be declared in a different view than\n * it is inserted. We already track the \"insertion view\" (view where the template was\n * inserted) in LView[PARENT], but we also need access to the \"declaration view\"\n * (view where the template was declared). Otherwise, we wouldn't be able to call the\n * view's template function with the proper contexts. Context should be inherited from\n * the declaration view tree, not the insertion view tree.\n *\n * Example (AppComponent template):\n *\n * <ng-template #foo></ng-template> <-- declared here -->\n * <some-comp [tpl]=\"foo\"></some-comp> <-- inserted inside this component -->\n *\n * The <ng-template> above is declared in the AppComponent template, but it will be passed into\n * SomeComp and inserted there. In this case, the declaration view would be the AppComponent,\n * but the insertion view would be SomeComp. When we are removing views, we would want to\n * traverse through the insertion view to clean up listeners. When we are calling the\n * template function during change detection, we need the declaration view to get inherited\n * context.\n */\n [DECLARATION_VIEW]: LView|null;\n\n\n /**\n * Points to the declaration component view, used to track transplanted `LView`s.\n *\n * See: `DECLARATION_VIEW` which points to the actual `LView` where it was declared, whereas\n * `DECLARATION_COMPONENT_VIEW` points to the component which may not be same as\n * `DECLARATION_VIEW`.\n *\n * Example:\n * ```\n * <#VIEW #myComp>\n * <div *ngIf=\"true\">\n * <ng-template #myTmpl>...</ng-template>\n * </div>\n * </#VIEW>\n * ```\n * In the above case `DECLARATION_VIEW` for `myTmpl` points to the `LView` of `ngIf` whereas\n * `DECLARATION_COMPONENT_VIEW` points to `LView` of the `myComp` which owns the template.\n *\n * The reason for this is that all embedded views are always check-always whereas the component\n * view can be check-always or on-push. When we have a transplanted view it is important to\n * determine if we have transplanted a view from check-always declaration to on-push insertion\n * point. In such a case the transplanted view needs to be added to the `LContainer` in the\n * declared `LView` and CD during the declared view CD (in addition to the CD at the insertion\n * point.) (Any transplanted views which are intra Component are of no interest because the CD\n * strategy of declaration and insertion will always be the same, because it is the same\n * component.)\n *\n * Queries already track moved views in `LView[DECLARATION_LCONTAINER]` and\n * `LContainer[MOVED_VIEWS]`. However the queries also track `LView`s which moved within the same\n * component `LView`. Transplanted views are a subset of moved views, and we use\n * `DECLARATION_COMPONENT_VIEW` to differentiate them. As in this example.\n *\n * Example showing intra component `LView` movement.\n * ```\n * <#VIEW #myComp>\n * <div *ngIf=\"condition; then thenBlock else elseBlock\"></div>\n * <ng-template #thenBlock>Content to render when condition is true.</ng-template>\n * <ng-template #elseBlock>Content to render when condition is false.</ng-template>\n * </#VIEW>\n * ```\n * The `thenBlock` and `elseBlock` is moved but not transplanted.\n *\n * Example showing inter component `LView` movement (transplanted view).\n * ```\n * <#VIEW #myComp>\n * <ng-template #myTmpl>...</ng-template>\n * <insertion-component [template]=\"myTmpl\"></insertion-component>\n * </#VIEW>\n * ```\n * In the above example `myTmpl` is passed into a different component. If `insertion-component`\n * instantiates `myTmpl` and `insertion-component` is on-push then the `LContainer` needs to be\n * marked as containing transplanted views and those views need to be CD as part of the\n * declaration CD.\n *\n *\n * When change detection runs, it iterates over `[MOVED_VIEWS]` and CDs any child `LView`s where\n * the `DECLARATION_COMPONENT_VIEW` of the current component and the child `LView` does not match\n * (it has been transplanted across components.)\n *\n * Note: `[DECLARATION_COMPONENT_VIEW]` points to itself if the LView is a component view (the\n * simplest / most common case).\n *\n * see also:\n * - https://hackmd.io/@mhevery/rJUJsvv9H write up of the problem\n * - `LContainer[HAS_TRANSPLANTED_VIEWS]` which marks which `LContainer` has transplanted views.\n * - `LContainer[TRANSPLANT_HEAD]` and `LContainer[TRANSPLANT_TAIL]` storage for transplanted\n * - `LView[DECLARATION_LCONTAINER]` similar problem for queries\n * - `LContainer[MOVED_VIEWS]` similar problem for queries\n */\n [DECLARATION_COMPONENT_VIEW]: LView;\n\n /**\n * A declaration point of embedded views (ones instantiated based on the content of a\n * <ng-template>), null for other types of views.\n *\n * We need to track all embedded views created from a given declaration point so we can prepare\n * query matches in a proper order (query matches are ordered based on their declaration point and\n * _not_ the insertion point).\n */\n [DECLARATION_LCONTAINER]: LContainer|null;\n\n /**\n * More flags for this view. See PreOrderHookFlags for more info.\n */\n [PREORDER_HOOK_FLAGS]: PreOrderHookFlags;\n\n /**\n * The number of direct transplanted views which need a refresh or have descendants themselves\n * that need a refresh but have not marked their ancestors as Dirty. This tells us that during\n * change detection we should still descend to find those children to refresh, even if the parents\n * are not `Dirty`/`CheckAlways`.\n */\n [TRANSPLANTED_VIEWS_TO_REFRESH]: number;\n}\n\n/** Flags associated with an LView (saved in LView[FLAGS]) */\nexport const enum LViewFlags {\n /** The state of the init phase on the first 2 bits */\n InitPhaseStateIncrementer = 0b00000000001,\n InitPhaseStateMask = 0b00000000011,\n\n /**\n * Whether or not the view is in creationMode.\n *\n * This must be stored in the view rather than using `data` as a marker so that\n * we can properly support embedded views. Otherwise, when exiting a child view\n * back into the parent view, `data` will be defined and `creationMode` will be\n * improperly reported as false.\n */\n CreationMode = 0b00000000100,\n\n /**\n * Whether or not this LView instance is on its first processing pass.\n *\n * An LView instance is considered to be on its \"first pass\" until it\n * has completed one creation mode run and one update mode run. At this\n * time, the flag is turned off.\n */\n FirstLViewPass = 0b00000001000,\n\n /** Whether this view has default change detection strategy (checks always) or onPush */\n CheckAlways = 0b00000010000,\n\n /**\n * Whether or not manual change detection is turned on for onPush components.\n *\n * This is a special mode that only marks components dirty in two cases:\n * 1) There has been a change to an @Input property\n * 2) `markDirty()` has been called manually by the user\n *\n * Note that in this mode, the firing of events does NOT mark components\n * dirty automatically.\n *\n * Manual mode is turned off by default for backwards compatibility, as events\n * automatically mark OnPush components dirty in View Engine.\n *\n * TODO: Add a public API to ChangeDetectionStrategy to turn this mode on\n */\n ManualOnPush = 0b00000100000,\n\n /** Whether or not this view is currently dirty (needing check) */\n Dirty = 0b000001000000,\n\n /** Whether or not this view is currently attached to change detection tree. */\n Attached = 0b000010000000,\n\n /** Whether or not this view is destroyed. */\n Destroyed = 0b000100000000,\n\n /** Whether or not this view is the root view */\n IsRoot = 0b001000000000,\n\n /**\n * Whether this moved LView was needs to be refreshed at the insertion location because the\n * declaration was dirty.\n */\n RefreshTransplantedView = 0b0010000000000,\n\n /**\n * Index of the current init phase on last 21 bits\n */\n IndexWithinInitPhaseIncrementer = 0b0100000000000,\n IndexWithinInitPhaseShift = 11,\n IndexWithinInitPhaseReset = 0b0011111111111,\n}\n\n/**\n * Possible states of the init phase:\n * - 00: OnInit hooks to be run.\n * - 01: AfterContentInit hooks to be run\n * - 10: AfterViewInit hooks to be run\n * - 11: All init hooks have been run\n */\nexport const enum InitPhaseState {\n OnInitHooksToBeRun = 0b00,\n AfterContentInitHooksToBeRun = 0b01,\n AfterViewInitHooksToBeRun = 0b10,\n InitPhaseCompleted = 0b11,\n}\n\n/** More flags associated with an LView (saved in LView[PREORDER_HOOK_FLAGS]) */\nexport const enum PreOrderHookFlags {\n /**\n The index of the next pre-order hook to be called in the hooks array, on the first 16\n bits\n */\n IndexOfTheNextPreOrderHookMaskMask = 0b01111111111111111,\n\n /**\n * The number of init hooks that have already been called, on the last 16 bits\n */\n NumberOfInitHooksCalledIncrementer = 0b010000000000000000,\n NumberOfInitHooksCalledShift = 16,\n NumberOfInitHooksCalledMask = 0b11111111111111110000000000000000,\n}\n\n/**\n * Stores a set of OpCodes to process `HostBindingsFunction` associated with a current view.\n *\n * In order to invoke `HostBindingsFunction` we need:\n * 1. 'elementIdx`: Index to the element associated with the `HostBindingsFunction`.\n * 2. 'directiveIdx`: Index to the directive associated with the `HostBindingsFunction`. (This will\n * become the context for the `HostBindingsFunction` invocation.)\n * 3. `bindingRootIdx`: Location where the bindings for the `HostBindingsFunction` start. Internally\n * `HostBindingsFunction` binding indexes start from `0` so we need to add `bindingRootIdx` to\n * it.\n * 4. `HostBindingsFunction`: A host binding function to execute.\n *\n * The above information needs to be encoded into the `HostBindingOpCodes` in an efficient manner.\n *\n * 1. `elementIdx` is encoded into the `HostBindingOpCodes` as `~elementIdx` (so a negative number);\n * 2. `directiveIdx`\n * 3. `bindingRootIdx`\n * 4. `HostBindingsFunction` is passed in as is.\n *\n * The `HostBindingOpCodes` array contains:\n * - negative number to select the element index.\n * - followed by 1 or more of:\n * - a number to select the directive index\n * - a number to select the bindingRoot index\n * - and a function to invoke.\n *\n * ## Example\n *\n * ```\n * const hostBindingOpCodes = [\n * ~30, // Select element 30\n * 40, 45, MyDir.ɵdir.hostBindings // Invoke host bindings on MyDir on element 30;\n * // directiveIdx = 40; bindingRootIdx = 45;\n * 50, 55, OtherDir.ɵdir.hostBindings // Invoke host bindings on OtherDire on element 30\n * // directiveIdx = 50; bindingRootIdx = 55;\n * ]\n * ```\n *\n * ## Pseudocode\n * ```\n * const hostBindingOpCodes = tView.hostBindingOpCodes;\n * if (hostBindingOpCodes === null) return;\n * for (let i = 0; i < hostBindingOpCodes.length; i++) {\n * const opCode = hostBindingOpCodes[i] as number;\n * if (opCode < 0) {\n * // Negative numbers are element indexes.\n * setSelectedIndex(~opCode);\n * } else {\n * // Positive numbers are NumberTuple which store bindingRootIndex and directiveIndex.\n * const directiveIdx = opCode;\n * const bindingRootIndx = hostBindingOpCodes[++i] as number;\n * const hostBindingFn = hostBindingOpCodes[++i] as HostBindingsFunction<any>;\n * setBindingRootForHostBindings(bindingRootIndx, directiveIdx);\n * const context = lView[directiveIdx];\n * hostBindingFn(RenderFlags.Update, context);\n * }\n * }\n * ```\n *\n */\nexport interface HostBindingOpCodes extends Array<number|HostBindingsFunction<any>> {\n __brand__: 'HostBindingOpCodes';\n debug?: string[];\n}\n\n/**\n * Explicitly marks `TView` as a specific type in `ngDevMode`\n *\n * It is useful to know conceptually what time of `TView` we are dealing with when\n * debugging an application (even if the runtime does not need it.) For this reason\n * we store this information in the `ngDevMode` `TView` and than use it for\n * better debugging experience.\n */\nexport const enum TViewType {\n /**\n * Root `TView` is the used to bootstrap components into. It is used in conjunction with\n * `LView` which takes an existing DOM node not owned by Angular and wraps it in `TView`/`LView`\n * so that other components can be loaded into it.\n */\n Root = 0,\n\n /**\n * `TView` associated with a Component. This would be the `TView` directly associated with the\n * component view (as opposed an `Embedded` `TView` which would be a child of `Component` `TView`)\n */\n Component = 1,\n\n /**\n * `TView` associated with a template. Such as `*ngIf`, `<ng-template>` etc... A `Component`\n * can have zero or more `Embedede` `TView`s.\n */\n Embedded = 2,\n}\n\n/**\n * Converts `TViewType` into human readable text.\n * Make sure this matches with `TViewType`\n */\nexport const TViewTypeAsString = [\n 'Root', // 0\n 'Component', // 1\n 'Embedded', // 2\n] as const;\n\n\n/**\n * The static data for an LView (shared between all templates of a\n * given type).\n *\n * Stored on the `ComponentDef.tView`.\n */\nexport interface TView {\n /**\n * Type of `TView` (`Root`|`Component`|`Embedded`).\n */\n type: TViewType;\n\n /**\n * This is a blueprint used to generate LView instances for this TView. Copying this\n * blueprint is faster than creating a new LView from scratch.\n */\n blueprint: LView;\n\n /**\n * The template function used to refresh the view of dynamically created views\n * and components. Will be null for inline views.\n */\n template: ComponentTemplate<{}>|null;\n\n /**\n * A function containing query-related instructions.\n */\n viewQuery: ViewQueriesFunction<{}>|null;\n\n /**\n * A `TNode` representing the declaration location of this `TView` (not part of this TView).\n */\n declTNode: TNode|null;\n\n // FIXME(misko): Why does `TView` not have `declarationTView` property?\n\n /** Whether or not this template has been processed in creation mode. */\n firstCreatePass: boolean;\n\n /**\n * Whether or not this template has been processed in update mode (e.g. change detected)\n *\n * `firstUpdatePass` is used by styling to set up `TData` to contain metadata about the styling\n * instructions. (Mainly to build up a linked list of styling priority order.)\n *\n * Typically this function gets cleared after first execution. If exception is thrown then this\n * flag can remain turned un until there is first successful (no exception) pass. This means that\n * individual styling instructions keep track of if they have already been added to the linked\n * list to prevent double adding.\n */\n firstUpdatePass: boolean;\n\n /** Static data equivalent of LView.data[]. Contains TNodes, PipeDefInternal or TI18n. */\n data: TData;\n\n /**\n * The binding start index is the index at which the data array\n * starts to store bindings only. Saving this value ensures that we\n * will begin reading bindings at the correct point in the array when\n * we are in update mode.\n *\n * -1 means that it has not been initialized.\n */\n bindingStartIndex: number;\n\n /**\n * The index where the \"expando\" section of `LView` begins. The expando\n * section contains injectors, directive instances, and host binding values.\n * Unlike the \"decls\" and \"vars\" sections of `LView`, the length of this\n * section cannot be calculated at compile-time because directives are matched\n * at runtime to preserve locality.\n *\n * We store this start index so we know where to start checking host bindings\n * in `setHostBindings`.\n */\n expandoStartIndex: number;\n\n /**\n * Whether or not there are any static view queries tracked on this view.\n *\n * We store this so we know whether or not we should do a view query\n * refresh after creation mode to collect static query results.\n */\n staticViewQueries: boolean;\n\n /**\n * Whether or not there are any static content queries tracked on this view.\n *\n * We store this so we know whether or not we should do a content query\n * refresh after creation mode to collect static query results.\n */\n staticContentQueries: boolean;\n\n /**\n * A reference to the first child node located in the view.\n */\n firstChild: TNode|null;\n\n /**\n * Stores the OpCodes to be replayed during change-detection to process the `HostBindings`\n *\n * See `HostBindingOpCodes` for encoding details.\n */\n hostBindingOpCodes: HostBindingOpCodes|null;\n\n /**\n * Full registry of directives and components that may be found in this view.\n *\n * It's necessary to keep a copy of the full def list on the TView so it's possible\n * to render template functions without a host component.\n */\n directiveRegistry: DirectiveDefList|null;\n\n /**\n * Full registry of pipes that may be found in this view.\n *\n * The property is either an array of `PipeDefs`s or a function which returns the array of\n * `PipeDefs`s. The function is necessary to be able to support forward declarations.\n *\n * It's necessary to keep a copy of the full def list on the TView so it's possible\n * to render template functions without a host component.\n */\n pipeRegistry: PipeDefList|null;\n\n /**\n * Array of ngOnInit, ngOnChanges and ngDoCheck hooks that should be executed for this view in\n * creation mode.\n *\n * This array has a flat structure and contains TNode indices, directive indices (where an\n * instance can be found in `LView`) and hook functions. TNode index is followed by the directive\n * index and a hook function. If there are multiple hooks for a given TNode, the TNode index is\n * not repeated and the next lifecycle hook information is stored right after the previous hook\n * function. This is done so that at runtime the system can efficiently iterate over all of the\n * functions to invoke without having to make any decisions/lookups.\n */\n preOrderHooks: HookData|null;\n\n /**\n * Array of ngOnChanges and ngDoCheck hooks that should be executed for this view in update mode.\n *\n * This array has the same structure as the `preOrderHooks` one.\n */\n preOrderCheckHooks: HookData|null;\n\n /**\n * Array of ngAfterContentInit and ngAfterContentChecked hooks that should be executed\n * for this view in creation mode.\n *\n * Even indices: Directive index\n * Odd indices: Hook function\n */\n contentHooks: HookData|null;\n\n /**\n * Array of ngAfterContentChecked hooks that should be executed for this view in update\n * mode.\n *\n * Even indices: Directive index\n * Odd indices: Hook function\n */\n contentCheckHooks: HookData|null;\n\n /**\n * Array of ngAfterViewInit and ngAfterViewChecked hooks that should be executed for\n * this view in creation mode.\n *\n * Even indices: Directive index\n * Odd indices: Hook function\n */\n viewHooks: HookData|null;\n\n /**\n * Array of ngAfterViewChecked hooks that should be executed for this view in\n * update mode.\n *\n * Even indices: Directive index\n * Odd indices: Hook function\n */\n viewCheckHooks: HookData|null;\n\n /**\n * Array of ngOnDestroy hooks that should be executed when this view is destroyed.\n *\n * Even indices: Directive index\n * Odd indices: Hook function\n */\n destroyHooks: DestroyHookData|null;\n\n /**\n * When a view is destroyed, listeners need to be released and outputs need to be\n * unsubscribed. This cleanup array stores both listener data (in chunks of 4)\n * and output data (in chunks of 2) for a particular view. Combining the arrays\n * saves on memory (70 bytes per array) and on a few bytes of code size (for two\n * separate for loops).\n *\n * If it's a native DOM listener or output subscription being stored:\n * 1st index is: event name `name = tView.cleanup[i+0]`\n * 2nd index is: index of native element or a function that retrieves global target (window,\n * document or body) reference based on the native element:\n * `typeof idxOrTargetGetter === 'function'`: global target getter function\n * `typeof idxOrTargetGetter === 'number'`: index of native element\n *\n * 3rd index is: index of listener function `listener = lView[CLEANUP][tView.cleanup[i+2]]`\n * 4th index is: `useCaptureOrIndx = tView.cleanup[i+3]`\n * `typeof useCaptureOrIndx == 'boolean' : useCapture boolean\n * `typeof useCaptureOrIndx == 'number':\n * `useCaptureOrIndx >= 0` `removeListener = LView[CLEANUP][useCaptureOrIndx]`\n * `useCaptureOrIndx < 0` `subscription = LView[CLEANUP][-useCaptureOrIndx]`\n *\n * If it's an output subscription or query list destroy hook:\n * 1st index is: output unsubscribe function / query list destroy function\n * 2nd index is: index of function context in LView.cleanupInstances[]\n * `tView.cleanup[i+0].call(lView[CLEANUP][tView.cleanup[i+1]])`\n */\n cleanup: any[]|null;\n\n /**\n * A list of element indices for child components that will need to be\n * refreshed when the current view has finished its check. These indices have\n * already been adjusted for the HEADER_OFFSET.\n *\n */\n components: number[]|null;\n\n /**\n * A collection of queries tracked in a given view.\n */\n queries: TQueries|null;\n\n /**\n * An array of indices pointing to directives with content queries alongside with the\n * corresponding query index. Each entry in this array is a tuple of:\n * - index of the first content query index declared by a given directive;\n * - index of a directive.\n *\n * We are storing those indexes so we can refresh content queries as part of a view refresh\n * process.\n */\n contentQueries: number[]|null;\n\n /**\n * Set of schemas that declare elements to be allowed inside the view.\n */\n schemas: SchemaMetadata[]|null;\n\n /**\n * Array of constants for the view. Includes attribute arrays, local definition arrays etc.\n * Used for directive matching, attribute bindings, local definitions and more.\n */\n consts: TConstants|null;\n\n /**\n * Indicates that there was an error before we managed to complete the first create pass of the\n * view. This means that the view is likely corrupted and we should try to recover it.\n */\n incompleteFirstPass: boolean;\n}\n\nexport const enum RootContextFlags {\n Empty = 0b00,\n DetectChanges = 0b01,\n FlushPlayers = 0b10\n}\n\n\n/**\n * RootContext contains information which is shared for all components which\n * were bootstrapped with {@link renderComponent}.\n */\nexport interface RootContext {\n /**\n * A function used for scheduling change detection in the future. Usually\n * this is `requestAnimationFrame`.\n */\n scheduler: (workFn: () => void) => void;\n\n /**\n * A promise which is resolved when all components are considered clean (not dirty).\n *\n * This promise is overwritten every time a first call to {@link markDirty} is invoked.\n */\n clean: Promise<null>;\n\n /**\n * RootComponents - The components that were instantiated by the call to\n * {@link renderComponent}.\n */\n components: {}[];\n\n /**\n * The player flushing handler to kick off all animations\n */\n playerHandler: PlayerHandler|null;\n\n /**\n * What render-related operations to run once a scheduler has been set\n */\n flags: RootContextFlags;\n}\n\n/** Single hook callback function. */\nexport type HookFn = () => void;\n\n/**\n * Information necessary to call a hook. E.g. the callback that\n * needs to invoked and the index at which to find its context.\n */\nexport type HookEntry = number|HookFn;\n\n/**\n * Array of hooks that should be executed for a view and their directive indices.\n *\n * For each node of the view, the following data is stored:\n * 1) Node index (optional)\n * 2) A series of number/function pairs where:\n * - even indices are directive indices\n * - odd indices are hook functions\n *\n * Special cases:\n * - a negative directive index flags an init hook (ngOnInit, ngAfterContentInit, ngAfterViewInit)\n */\nexport type HookData = HookEntry[];\n\n/**\n * Array of destroy hooks that should be executed for a view and their directive indices.\n *\n * The array is set up as a series of number/function or number/(number|function)[]:\n * - Even indices represent the context with which hooks should be called.\n * - Odd indices are the hook functions themselves. If a value at an odd index is an array,\n * it represents the destroy hooks of a `multi` provider where:\n * - Even indices represent the index of the provider for which we've registered a destroy hook,\n * inside of the `multi` provider array.\n * - Odd indices are the destroy hook functions.\n * For example:\n * LView: `[0, 1, 2, AService, 4, [BService, CService, DService]]`\n * destroyHooks: `[3, AService.ngOnDestroy, 5, [0, BService.ngOnDestroy, 2, DService.ngOnDestroy]]`\n *\n * In the example above `AService` is a type provider with an `ngOnDestroy`, whereas `BService`,\n * `CService` and `DService` are part of a `multi` provider where only `BService` and `DService`\n * have an `ngOnDestroy` hook.\n */\nexport type DestroyHookData = (HookEntry|HookData)[];\n\n/**\n * Static data that corresponds to the instance-specific data array on an LView.\n *\n * Each node's static data is stored in tData at the same index that it's stored\n * in the data array. Any nodes that do not have static data store a null value in\n * tData to avoid a sparse array.\n *\n * Each pipe's definition is stored here at the same index as its pipe instance in\n * the data array.\n *\n * Each host property's name is stored here at the same index as its value in the\n * data array.\n *\n * Each property binding name is stored here at the same index as its value in\n * the data array. If the binding is an interpolation, the static string values\n * are stored parallel to the dynamic values. Example:\n *\n * id=\"prefix {{ v0 }} a {{ v1 }} b {{ v2 }} suffix\"\n *\n * LView | TView.data\n *------------------------\n * v0 value | 'a'\n * v1 value | 'b'\n * v2 value | id � prefix � suffix\n *\n * Injector bloom filters are also stored here.\n */\nexport type TData = (TNode|PipeDef<any>|DirectiveDef<any>|ComponentDef<any>|number|TStylingRange|\n TStylingKey|ProviderToken<any>|TI18n|I18nUpdateOpCodes|TIcu|null|string)[];\n\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nexport const unusedValueExportToPlacateAjd = 1;\n\n/**\n * Human readable version of the `LView`.\n *\n * `LView` is a data structure used internally to keep track of views. The `LView` is designed for\n * efficiency and so at times it is difficult to read or write tests which assert on its values. For\n * this reason when `ngDevMode` is true we patch a `LView.debug` property which points to\n * `LViewDebug` for easier debugging and test writing. It is the intent of `LViewDebug` to be used\n * in tests.\n */\nexport interface LViewDebug {\n /**\n * Flags associated with the `LView` unpacked into a more readable state.\n *\n * See `LViewFlags` for the flag meanings.\n */\n readonly flags: {\n initPhaseState: number,\n creationMode: boolean,\n firstViewPass: boolean,\n checkAlways: boolean,\n dirty: boolean,\n attached: boolean,\n destroyed: boolean,\n isRoot: boolean,\n indexWithinInitPhase: number,\n };\n\n /**\n * Associated TView\n */\n readonly tView: TView;\n\n /**\n * Parent view (or container)\n */\n readonly parent: LViewDebug|LContainerDebug|null;\n\n /**\n * Next sibling to the `LView`.\n */\n readonly next: LViewDebug|LContainerDebug|null;\n\n /**\n * The context used for evaluation of the `LView`\n *\n * (Usually the component)\n */\n readonly context: {}|null;\n\n /**\n * Hierarchical tree of nodes.\n */\n readonly nodes: DebugNode[];\n\n /**\n * Template structure (no instance data).\n * (Shows how TNodes are connected)\n */\n readonly template: string;\n\n /**\n * HTML representation of the `LView`.\n *\n * This is only approximate to actual HTML as child `LView`s are removed.\n */\n readonly html: string;\n\n /**\n * The host element to which this `LView` is attached.\n */\n readonly hostHTML: string|null;\n\n /**\n * Child `LView`s\n */\n readonly childViews: Array<LViewDebug|LContainerDebug>;\n\n /**\n * Sub range of `LView` containing decls (DOM elements).\n */\n readonly decls: LViewDebugRange;\n\n /**\n * Sub range of `LView` containing vars (bindings).\n */\n readonly vars: LViewDebugRange;\n\n /**\n * Sub range of `LView` containing expando (used by DI).\n */\n readonly expando: LViewDebugRange;\n}\n\n/**\n * Human readable version of the `LContainer`\n *\n * `LContainer` is a data structure used internally to keep track of child views. The `LContainer`\n * is designed for efficiency and so at times it is difficult to read or write tests which assert on\n * its values. For this reason when `ngDevMode` is true we patch a `LContainer.debug` property which\n * points to `LContainerDebug` for easier debugging and test writing. It is the intent of\n * `LContainerDebug` to be used in tests.\n */\nexport interface LContainerDebug {\n readonly native: RComment;\n /**\n * Child `LView`s.\n */\n readonly views: LViewDebug[];\n readonly parent: LViewDebug|null;\n readonly movedViews: LView[]|null;\n readonly host: RElement|RComment|LView;\n readonly next: LViewDebug|LContainerDebug|null;\n readonly hasTransplantedViews: boolean;\n}\n\n\n\n/**\n * `LView` is subdivided to ranges where the actual data is stored. Some of these ranges such as\n * `decls` and `vars` are known at compile time. Other such as `i18n` and `expando` are runtime only\n * concepts.\n */\nexport interface LViewDebugRange {\n /**\n * The starting index in `LView` where the range begins. (Inclusive)\n */\n start: number;\n\n /**\n * The ending index in `LView` where the range ends. (Exclusive)\n */\n end: number;\n\n /**\n * The length of the range\n */\n length: number;\n\n /**\n * The merged content of the range. `t` contains data from `TView.data` and `l` contains `LView`\n * data at an index.\n */\n content: LViewDebugRangeContent[];\n}\n\n/**\n * For convenience the static and instance portions of `TView` and `LView` are merged into a single\n * object in `LViewRange`.\n */\nexport interface LViewDebugRangeContent {\n /**\n * Index into original `LView` or `TView.data`.\n */\n index: number;\n\n /**\n * Value from the `TView.data[index]` location.\n */\n t: any;\n\n /**\n * Value from the `LView[index]` location.\n */\n l: any;\n}\n\n\n/**\n * A logical node which comprise into `LView`s.\n *\n */\nexport interface DebugNode {\n /**\n * HTML representation of the node.\n */\n html: string|null;\n\n /**\n * Associated `TNode`\n */\n tNode: TNode;\n\n /**\n * Human readable node type.\n */\n type: string;\n\n /**\n * DOM native node.\n */\n native: Node;\n\n /**\n * Child nodes\n */\n children: DebugNode[];\n\n /**\n * A list of Component/Directive types which need to be instantiated an this location.\n */\n factories: Type<unknown>[];\n\n /**\n * A list of Component/Directive instances which were instantiated an this location.\n */\n instances: unknown[];\n\n /**\n * NodeInjector information.\n */\n injector: NodeInjectorDebug;\n\n /**\n * Injector resolution path.\n */\n injectorResolutionPath: any;\n}\n\nexport interface NodeInjectorDebug {\n /**\n * Instance bloom. Does the current injector have a provider with a given bloom mask.\n */\n bloom: string;\n\n\n /**\n * Cumulative bloom. Do any of the above injectors have a provider with a given bloom mask.\n */\n cumulativeBloom: string;\n\n /**\n * A list of providers associated with this injector.\n */\n providers: (Type<unknown>|DirectiveDef<unknown>|ComponentDef<unknown>)[];\n\n /**\n * A list of providers associated with this injector visible to the view of the component only.\n */\n viewProviders: Type<unknown>[];\n\n\n /**\n * Location of the parent `TNode`.\n */\n parentInjectorIndex: number;\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 {LContainer, TYPE} from './container';\nimport {ComponentDef, DirectiveDef} from './definition';\nimport {TNode, TNodeFlags} from './node';\nimport {RNode} from './renderer_dom';\nimport {FLAGS, LView, LViewFlags} from './view';\n\n\n/**\n * True if `value` is `LView`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nexport function isLView(value: RNode|LView|LContainer|{}|null): value is LView {\n return Array.isArray(value) && typeof value[TYPE] === 'object';\n}\n\n/**\n * True if `value` is `LContainer`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nexport function isLContainer(value: RNode|LView|LContainer|{}|null): value is LContainer {\n return Array.isArray(value) && value[TYPE] === true;\n}\n\nexport function isContentQueryHost(tNode: TNode): boolean {\n return (tNode.flags & TNodeFlags.hasContentQuery) !== 0;\n}\n\nexport function isComponentHost(tNode: TNode): boolean {\n return (tNode.flags & TNodeFlags.isComponentHost) === TNodeFlags.isComponentHost;\n}\n\nexport function isDirectiveHost(tNode: TNode): boolean {\n return (tNode.flags & TNodeFlags.isDirectiveHost) === TNodeFlags.isDirectiveHost;\n}\n\nexport function isComponentDef<T>(def: DirectiveDef<T>): def is ComponentDef<T> {\n return (def as ComponentDef<T>).template !== null;\n}\n\nexport function isRootView(target: LView): boolean {\n return (target[FLAGS] & LViewFlags.IsRoot) !== 0;\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 {assertDefined, assertEqual, assertNumber, throwError} from '../util/assert';\n\nimport {getComponentDef, getNgModuleDef} from './definition';\nimport {LContainer} from './interfaces/container';\nimport {DirectiveDef} from './interfaces/definition';\nimport {TIcu} from './interfaces/i18n';\nimport {NodeInjectorOffset} from './interfaces/injector';\nimport {TNode} from './interfaces/node';\nimport {isLContainer, isLView} from './interfaces/type_checks';\nimport {DECLARATION_COMPONENT_VIEW, HEADER_OFFSET, LView, T_HOST, TVIEW, TView} from './interfaces/view';\n\n// [Assert functions do not constraint type when they are guarded by a truthy\n// expression.](https://github.com/microsoft/TypeScript/issues/37295)\n\n\nexport function assertTNodeForLView(tNode: TNode, lView: LView) {\n assertTNodeForTView(tNode, lView[TVIEW]);\n}\n\nexport function assertTNodeForTView(tNode: TNode, tView: TView) {\n assertTNode(tNode);\n tNode.hasOwnProperty('tView_') &&\n assertEqual(\n (tNode as any as {tView_: TView}).tView_, tView,\n 'This TNode does not belong to this TView.');\n}\n\nexport function assertTNode(tNode: TNode) {\n assertDefined(tNode, 'TNode must be defined');\n if (!(tNode && typeof tNode === 'object' && tNode.hasOwnProperty('directiveStylingLast'))) {\n throwError('Not of type TNode, got: ' + tNode);\n }\n}\n\n\nexport function assertTIcu(tIcu: TIcu) {\n assertDefined(tIcu, 'Expected TIcu to be defined');\n if (!(typeof tIcu.currentCaseLViewIndex === 'number')) {\n throwError('Object is not of TIcu type.');\n }\n}\n\nexport function assertComponentType(\n actual: any,\n msg: string = 'Type passed in is not ComponentType, it does not have \\'ɵcmp\\' property.') {\n if (!getComponentDef(actual)) {\n throwError(msg);\n }\n}\n\nexport function assertNgModuleType(\n actual: any,\n msg: string = 'Type passed in is not NgModuleType, it does not have \\'ɵmod\\' property.') {\n if (!getNgModuleDef(actual)) {\n throwError(msg);\n }\n}\n\nexport function assertCurrentTNodeIsParent(isParent: boolean) {\n assertEqual(isParent, true, 'currentTNode should be a parent');\n}\n\nexport function assertHasParent(tNode: TNode|null) {\n assertDefined(tNode, 'currentTNode should exist!');\n assertDefined(tNode!.parent, 'currentTNode should have a parent');\n}\n\nexport function assertDataNext(lView: LView, index: number, arr?: any[]) {\n if (arr == null) arr = lView;\n assertEqual(\n arr.length, index, `index ${index} expected to be at the end of arr (length ${arr.length})`);\n}\n\nexport function assertLContainer(value: any): asserts value is LContainer {\n assertDefined(value, 'LContainer must be defined');\n assertEqual(isLContainer(value), true, 'Expecting LContainer');\n}\n\nexport function assertLViewOrUndefined(value: any): asserts value is LView|null|undefined {\n value && assertEqual(isLView(value), true, 'Expecting LView or undefined or null');\n}\n\nexport function assertLView(value: any): asserts value is LView {\n assertDefined(value, 'LView must be defined');\n assertEqual(isLView(value), true, 'Expecting LView');\n}\n\nexport function assertFirstCreatePass(tView: TView, errMessage?: string) {\n assertEqual(\n tView.firstCreatePass, true, errMessage || 'Should only be called in first create pass.');\n}\n\nexport function assertFirstUpdatePass(tView: TView, errMessage?: string) {\n assertEqual(\n tView.firstUpdatePass, true, errMessage || 'Should only be called in first update pass.');\n}\n\n/**\n * This is a basic sanity check that an object is probably a directive def. DirectiveDef is\n * an interface, so we can't do a direct instanceof check.\n */\nexport function assertDirectiveDef<T>(obj: any): asserts obj is DirectiveDef<T> {\n if (obj.type === undefined || obj.selectors == undefined || obj.inputs === undefined) {\n throwError(\n `Expected a DirectiveDef/ComponentDef and this object does not seem to have the expected shape.`);\n }\n}\n\nexport function assertIndexInDeclRange(lView: LView, index: number) {\n const tView = lView[1];\n assertBetween(HEADER_OFFSET, tView.bindingStartIndex, index);\n}\n\nexport function assertIndexInVarsRange(lView: LView, index: number) {\n const tView = lView[1];\n assertBetween(tView.bindingStartIndex, tView.expandoStartIndex, index);\n}\n\nexport function assertIndexInExpandoRange(lView: LView, index: number) {\n const tView = lView[1];\n assertBetween(tView.expandoStartIndex, lView.length, index);\n}\n\nexport function assertBetween(lower: number, upper: number, index: number) {\n if (!(lower <= index && index < upper)) {\n throwError(`Index out of range (expecting ${lower} <= ${index} < ${upper})`);\n }\n}\n\nexport function assertProjectionSlots(lView: LView, errMessage?: string) {\n assertDefined(lView[DECLARATION_COMPONENT_VIEW], 'Component views should exist.');\n assertDefined(\n lView[DECLARATION_COMPONENT_VIEW][T_HOST]!.projection,\n errMessage ||\n 'Components with projection nodes (<ng-content>) must have projection slots defined.');\n}\n\nexport function assertParentView(lView: LView|null, errMessage?: string) {\n assertDefined(\n lView,\n errMessage || 'Component views should always have a parent view (component\\'s host view)');\n}\n\n\n/**\n * This is a basic sanity check that the `injectorIndex` seems to point to what looks like a\n * NodeInjector data structure.\n *\n * @param lView `LView` which should be checked.\n * @param injectorIndex index into the `LView` where the `NodeInjector` is expected.\n */\nexport function assertNodeInjector(lView: LView, injectorIndex: number) {\n assertIndexInExpandoRange(lView, injectorIndex);\n assertIndexInExpandoRange(lView, injectorIndex + NodeInjectorOffset.PARENT);\n assertNumber(lView[injectorIndex + 0], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 1], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 2], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 3], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 4], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 5], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 6], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 7], 'injectorIndex should point to a bloom filter');\n assertNumber(\n lView[injectorIndex + NodeInjectorOffset.PARENT],\n 'injectorIndex should point to parent injector');\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {stringify} from '../util/stringify';\nimport {NG_FACTORY_DEF} from './fields';\n\n\n/**\n * Definition of what a factory function should look like.\n */\nexport type FactoryFn<T> = {\n /**\n * Subclasses without an explicit constructor call through to the factory of their base\n * definition, providing it with their own constructor to instantiate.\n */\n <U extends T>(t?: Type<U>): U;\n\n /**\n * If no constructor to instantiate is provided, an instance of type T itself is created.\n */\n (t?: undefined): T;\n};\n\n\nexport function getFactoryDef<T>(type: any, throwNotFound: true): FactoryFn<T>;\nexport function getFactoryDef<T>(type: any): FactoryFn<T>|null;\nexport function getFactoryDef<T>(type: any, throwNotFound?: boolean): FactoryFn<T>|null {\n const hasFactoryDef = type.hasOwnProperty(NG_FACTORY_DEF);\n if (!hasFactoryDef && throwNotFound === true && ngDevMode) {\n throw new Error(`Type ${stringify(type)} does not have 'ɵfac' property.`);\n }\n return hasFactoryDef ? type[NG_FACTORY_DEF] : null;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Represents a basic change from a previous to a new value for a single\n * property on a directive instance. Passed as a value in a\n * {@link SimpleChanges} object to the `ngOnChanges` hook.\n *\n * @see `OnChanges`\n *\n * @publicApi\n */\nexport class SimpleChange {\n constructor(public previousValue: any, public currentValue: any, public firstChange: boolean) {}\n /**\n * Check whether the new value is the first value assigned.\n */\n isFirstChange(): boolean {\n return this.firstChange;\n }\n}\n\n/**\n * A hashtable of changes represented by {@link SimpleChange} objects stored\n * at the declared property name they belong to on a Directive or Component. This is\n * the type passed to the `ngOnChanges` hook.\n *\n * @see `OnChanges`\n *\n * @publicApi\n */\nexport interface SimpleChanges {\n [propName: string]: SimpleChange;\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 {OnChanges} from '../../interface/lifecycle_hooks';\nimport {SimpleChange, SimpleChanges} from '../../interface/simple_change';\nimport {EMPTY_OBJ} from '../../util/empty';\nimport {DirectiveDef, DirectiveDefFeature} from '../interfaces/definition';\n\n/**\n * The NgOnChangesFeature decorates a component with support for the ngOnChanges\n * lifecycle hook, so it should be included in any component that implements\n * that hook.\n *\n * If the component or directive uses inheritance, the NgOnChangesFeature MUST\n * be included as a feature AFTER {@link InheritDefinitionFeature}, otherwise\n * inherited properties will not be propagated to the ngOnChanges lifecycle\n * hook.\n *\n * Example usage:\n *\n * ```\n * static ɵcmp = defineComponent({\n * ...\n * inputs: {name: 'publicName'},\n * features: [NgOnChangesFeature]\n * });\n * ```\n *\n * @codeGenApi\n */\nexport function ɵɵNgOnChangesFeature<T>(): DirectiveDefFeature {\n return NgOnChangesFeatureImpl;\n}\n\nexport function NgOnChangesFeatureImpl<T>(definition: DirectiveDef<T>) {\n if (definition.type.prototype.ngOnChanges) {\n definition.setInput = ngOnChangesSetInput;\n }\n return rememberChangeHistoryAndInvokeOnChangesHook;\n}\n\n// This option ensures that the ngOnChanges lifecycle hook will be inherited\n// from superclasses (in InheritDefinitionFeature).\n/** @nocollapse */\n// tslint:disable-next-line:no-toplevel-property-access\n(ɵɵNgOnChangesFeature as DirectiveDefFeature).ngInherit = true;\n\n/**\n * This is a synthetic lifecycle hook which gets inserted into `TView.preOrderHooks` to simulate\n * `ngOnChanges`.\n *\n * The hook reads the `NgSimpleChangesStore` data from the component instance and if changes are\n * found it invokes `ngOnChanges` on the component instance.\n *\n * @param this Component instance. Because this function gets inserted into `TView.preOrderHooks`,\n * it is guaranteed to be called with component instance.\n */\nfunction rememberChangeHistoryAndInvokeOnChangesHook(this: OnChanges) {\n const simpleChangesStore = getSimpleChangesStore(this);\n const current = simpleChangesStore?.current;\n\n if (current) {\n const previous = simpleChangesStore!.previous;\n if (previous === EMPTY_OBJ) {\n simpleChangesStore!.previous = current;\n } else {\n // New changes are copied to the previous store, so that we don't lose history for inputs\n // which were not changed this time\n for (let key in current) {\n previous[key] = current[key];\n }\n }\n simpleChangesStore!.current = null;\n this.ngOnChanges(current);\n }\n}\n\n\nfunction ngOnChangesSetInput<T>(\n this: DirectiveDef<T>, instance: T, value: any, publicName: string, privateName: string): void {\n const simpleChangesStore = getSimpleChangesStore(instance) ||\n setSimpleChangesStore(instance, {previous: EMPTY_OBJ, current: null});\n const current = simpleChangesStore.current || (simpleChangesStore.current = {});\n const previous = simpleChangesStore.previous;\n\n const declaredName = (this.declaredInputs as {[key: string]: string})[publicName];\n const previousChange = previous[declaredName];\n current[declaredName] = new SimpleChange(\n previousChange && previousChange.currentValue, value, previous === EMPTY_OBJ);\n\n (instance as any)[privateName] = value;\n}\n\nconst SIMPLE_CHANGES_STORE = '__ngSimpleChanges__';\n\nfunction getSimpleChangesStore(instance: any): null|NgSimpleChangesStore {\n return instance[SIMPLE_CHANGES_STORE] || null;\n}\n\nfunction setSimpleChangesStore(instance: any, store: NgSimpleChangesStore): NgSimpleChangesStore {\n return instance[SIMPLE_CHANGES_STORE] = store;\n}\n\n/**\n * Data structure which is monkey-patched on the component instance and used by `ngOnChanges`\n * life-cycle hook to track previous input values.\n */\ninterface NgSimpleChangesStore {\n previous: SimpleChanges;\n current: SimpleChanges|null;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Profiler events is an enum used by the profiler to distinguish between different calls of user\n * code invoked throughout the application lifecycle.\n */\nexport const enum ProfilerEvent {\n /**\n * Corresponds to the point in time before the runtime has called the template function of a\n * component with `RenderFlags.Create`.\n */\n TemplateCreateStart,\n\n /**\n * Corresponds to the point in time after the runtime has called the template function of a\n * component with `RenderFlags.Create`.\n */\n TemplateCreateEnd,\n\n /**\n * Corresponds to the point in time before the runtime has called the template function of a\n * component with `RenderFlags.Update`.\n */\n TemplateUpdateStart,\n\n /**\n * Corresponds to the point in time after the runtime has called the template function of a\n * component with `RenderFlags.Update`.\n */\n TemplateUpdateEnd,\n\n /**\n * Corresponds to the point in time before the runtime has called a lifecycle hook of a component\n * or directive.\n */\n LifecycleHookStart,\n\n /**\n * Corresponds to the point in time after the runtime has called a lifecycle hook of a component\n * or directive.\n */\n LifecycleHookEnd,\n\n /**\n * Corresponds to the point in time before the runtime has evaluated an expression associated with\n * an event or an output.\n */\n OutputStart,\n\n /**\n * Corresponds to the point in time after the runtime has evaluated an expression associated with\n * an event or an output.\n */\n OutputEnd,\n}\n\n/**\n * Profiler function which the runtime will invoke before and after user code.\n */\nexport interface Profiler {\n (event: ProfilerEvent, instance: {}|null, hookOrListener?: (e?: any) => any): void;\n}\n\n\nlet profilerCallback: Profiler|null = null;\n\n/**\n * Sets the callback function which will be invoked before and after performing certain actions at\n * runtime (for example, before and after running change detection).\n *\n * Warning: this function is *INTERNAL* and should not be relied upon in application's code.\n * The contract of the function might be changed in any release and/or the function can be removed\n * completely.\n *\n * @param profiler function provided by the caller or null value to disable profiling.\n */\nexport const setProfiler = (profiler: Profiler|null) => {\n profilerCallback = profiler;\n};\n\n/**\n * Profiler function which wraps user code executed by the runtime.\n *\n * @param event ProfilerEvent corresponding to the execution context\n * @param instance component instance\n * @param hookOrListener lifecycle hook function or output listener. The value depends on the\n * execution context\n * @returns\n */\nexport const profiler: Profiler = function(\n event: ProfilerEvent, instance: {}|null, hookOrListener?: (e?: any) => any) {\n if (profilerCallback != null /* both `null` and `undefined` */) {\n profilerCallback(event, instance, hookOrListener);\n }\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\nexport const MATH_ML_NAMESPACE = 'http://www.w3.org/1998/MathML/';\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 * Most of the use of `document` in Angular is from within the DI system so it is possible to simply\n * inject the `DOCUMENT` token and are done.\n *\n * Ivy is special because it does not rely upon the DI and must get hold of the document some other\n * way.\n *\n * The solution is to define `getDocument()` and `setDocument()` top-level functions for ivy.\n * Wherever ivy needs the global document, it calls `getDocument()` instead.\n *\n * When running ivy outside of a browser environment, it is necessary to call `setDocument()` to\n * tell ivy what the global `document` is.\n *\n * Angular does this for us in each of the standard platforms (`Browser`, `Server`, and `WebWorker`)\n * by calling `setDocument()` when providing the `DOCUMENT` token.\n */\nlet DOCUMENT: Document|undefined = undefined;\n\n/**\n * Tell ivy what the `document` is for this platform.\n *\n * It is only necessary to call this if the current platform is not a browser.\n *\n * @param document The object representing the global `document` in this environment.\n */\nexport function setDocument(document: Document|undefined): void {\n DOCUMENT = document;\n}\n\n/**\n * Access the object that represents the `document` for this platform.\n *\n * Ivy calls this whenever it needs to access the `document` object.\n * For example to create the renderer or to do sanitization.\n */\nexport function getDocument(): Document {\n if (DOCUMENT !== undefined) {\n return DOCUMENT;\n } else if (typeof document !== 'undefined') {\n return document;\n }\n // No \"document\" can be found. This should only happen if we are running ivy outside Angular and\n // the current platform is not a browser. Since this is not a supported scenario at the moment\n // this should not happen in Angular apps.\n // Once we support running ivy outside of Angular we will need to publish `setDocument()` as a\n // public API. Meanwhile we just return `undefined` and let the application fail.\n return undefined!;\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 * The goal here is to make sure that the browser DOM API is the Renderer.\n * We do this by defining a subset of DOM API to be the renderer and then\n * use that at runtime for rendering.\n *\n * At runtime we can then use the DOM api directly, in server or web-worker\n * it will be easy to implement such API.\n */\n\nimport {RendererStyleFlags2, RendererType2} from '../../render/api_flags';\nimport {TrustedHTML, TrustedScript, TrustedScriptURL} from '../../util/security/trusted_type_defs';\nimport {getDocument} from './document';\nimport {RComment, RElement, RNode, RText} from './renderer_dom';\n\n// TODO: cleanup once the code is merged in angular/angular\nexport enum RendererStyleFlags3 {\n Important = 1 << 0,\n DashCase = 1 << 1\n}\n\nexport type Renderer3 = ObjectOrientedRenderer3|ProceduralRenderer3;\n\nexport type GlobalTargetName = 'document'|'window'|'body';\n\nexport type GlobalTargetResolver = (element: any) => EventTarget;\n\n/**\n * Object Oriented style of API needed to create elements and text nodes.\n *\n * This is the native browser API style, e.g. operations are methods on individual objects\n * like HTMLElement. With this style, no additional code is needed as a facade\n * (reducing payload size).\n * */\nexport interface ObjectOrientedRenderer3 {\n createComment(data: string): RComment;\n createElement(tagName: string): RElement;\n createElementNS(namespace: string, tagName: string): RElement;\n createTextNode(data: string): RText;\n\n querySelector(selectors: string): RElement|null;\n}\n\n/** Returns whether the `renderer` is a `ProceduralRenderer3` */\nexport function isProceduralRenderer(renderer: ProceduralRenderer3|\n ObjectOrientedRenderer3): renderer is ProceduralRenderer3 {\n return !!((renderer as any).listen);\n}\n\n/**\n * Procedural style of API needed to create elements and text nodes.\n *\n * In non-native browser environments (e.g. platforms such as web-workers), this is the\n * facade that enables element manipulation. This also facilitates backwards compatibility\n * with Renderer2.\n */\nexport interface ProceduralRenderer3 {\n destroy(): void;\n createComment(value: string): RComment;\n createElement(name: string, namespace?: string|null): RElement;\n createText(value: string): RText;\n /**\n * This property is allowed to be null / undefined,\n * in which case the view engine won't call it.\n * This is used as a performance optimization for production mode.\n */\n destroyNode?: ((node: RNode) => void)|null;\n appendChild(parent: RElement, newChild: RNode): void;\n insertBefore(parent: RNode, newChild: RNode, refChild: RNode|null, isMove?: boolean): void;\n removeChild(parent: RElement, oldChild: RNode, isHostElement?: boolean): void;\n selectRootElement(selectorOrNode: string|any, preserveContent?: boolean): RElement;\n\n parentNode(node: RNode): RElement|null;\n nextSibling(node: RNode): RNode|null;\n\n setAttribute(\n el: RElement, name: string, value: string|TrustedHTML|TrustedScript|TrustedScriptURL,\n namespace?: string|null): void;\n removeAttribute(el: RElement, name: string, namespace?: string|null): void;\n addClass(el: RElement, name: string): void;\n removeClass(el: RElement, name: string): void;\n setStyle(\n el: RElement, style: string, value: any,\n flags?: RendererStyleFlags2|RendererStyleFlags3): void;\n removeStyle(el: RElement, style: string, flags?: RendererStyleFlags2|RendererStyleFlags3): void;\n setProperty(el: RElement, name: string, value: any): void;\n setValue(node: RText|RComment, value: string): void;\n\n // TODO(misko): Deprecate in favor of addEventListener/removeEventListener\n listen(\n target: GlobalTargetName|RNode, eventName: string,\n callback: (event: any) => boolean | void): () => void;\n}\n\nexport interface RendererFactory3 {\n createRenderer(hostElement: RElement|null, rendererType: RendererType2|null): Renderer3;\n begin?(): void;\n end?(): void;\n}\n\nexport const domRendererFactory3: RendererFactory3 = {\n createRenderer: (hostElement: RElement|null, rendererType: RendererType2|null): Renderer3 => {\n return getDocument();\n }\n};\n\n\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nexport const unusedValueExportToPlacateAjd = 1;\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 {assertDomNode, assertGreaterThan, assertGreaterThanOrEqual, assertIndexInRange, assertLessThan} from '../../util/assert';\nimport {assertTNode, assertTNodeForLView} from '../assert';\nimport {LContainer, TYPE} from '../interfaces/container';\nimport {TConstants, TNode} from '../interfaces/node';\nimport {isProceduralRenderer} from '../interfaces/renderer';\nimport {RNode} from '../interfaces/renderer_dom';\nimport {isLContainer, isLView} from '../interfaces/type_checks';\nimport {FLAGS, HEADER_OFFSET, HOST, LView, LViewFlags, PARENT, PREORDER_HOOK_FLAGS, RENDERER, TData, TRANSPLANTED_VIEWS_TO_REFRESH, TView} from '../interfaces/view';\n\n\n\n/**\n * For efficiency reasons we often put several different data types (`RNode`, `LView`, `LContainer`)\n * in same location in `LView`. This is because we don't want to pre-allocate space for it\n * because the storage is sparse. This file contains utilities for dealing with such data types.\n *\n * How do we know what is stored at a given location in `LView`.\n * - `Array.isArray(value) === false` => `RNode` (The normal storage value)\n * - `Array.isArray(value) === true` => then the `value[0]` represents the wrapped value.\n * - `typeof value[TYPE] === 'object'` => `LView`\n * - This happens when we have a component at a given location\n * - `typeof value[TYPE] === true` => `LContainer`\n * - This happens when we have `LContainer` binding at a given location.\n *\n *\n * NOTE: it is assumed that `Array.isArray` and `typeof` operations are very efficient.\n */\n\n/**\n * Returns `RNode`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nexport function unwrapRNode(value: RNode|LView|LContainer): RNode {\n while (Array.isArray(value)) {\n value = value[HOST] as any;\n }\n return value as RNode;\n}\n\n/**\n * Returns `LView` or `null` if not found.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nexport function unwrapLView(value: RNode|LView|LContainer): LView|null {\n while (Array.isArray(value)) {\n // This check is same as `isLView()` but we don't call at as we don't want to call\n // `Array.isArray()` twice and give JITer more work for inlining.\n if (typeof value[TYPE] === 'object') return value as LView;\n value = value[HOST] as any;\n }\n return null;\n}\n\n/**\n * Returns `LContainer` or `null` if not found.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nexport function unwrapLContainer(value: RNode|LView|LContainer): LContainer|null {\n while (Array.isArray(value)) {\n // This check is same as `isLContainer()` but we don't call at as we don't want to call\n // `Array.isArray()` twice and give JITer more work for inlining.\n if (value[TYPE] === true) return value as LContainer;\n value = value[HOST] as any;\n }\n return null;\n}\n\n/**\n * Retrieves an element value from the provided `viewData`, by unwrapping\n * from any containers, component views, or style contexts.\n */\nexport function getNativeByIndex(index: number, lView: LView): RNode {\n ngDevMode && assertIndexInRange(lView, index);\n ngDevMode && assertGreaterThanOrEqual(index, HEADER_OFFSET, 'Expected to be past HEADER_OFFSET');\n return unwrapRNode(lView[index]);\n}\n\n/**\n * Retrieve an `RNode` for a given `TNode` and `LView`.\n *\n * This function guarantees in dev mode to retrieve a non-null `RNode`.\n *\n * @param tNode\n * @param lView\n */\nexport function getNativeByTNode(tNode: TNode, lView: LView): RNode {\n ngDevMode && assertTNodeForLView(tNode, lView);\n ngDevMode && assertIndexInRange(lView, tNode.index);\n const node: RNode = unwrapRNode(lView[tNode.index]);\n ngDevMode && !isProceduralRenderer(lView[RENDERER]) && assertDomNode(node);\n return node;\n}\n\n/**\n * Retrieve an `RNode` or `null` for a given `TNode` and `LView`.\n *\n * Some `TNode`s don't have associated `RNode`s. For example `Projection`\n *\n * @param tNode\n * @param lView\n */\nexport function getNativeByTNodeOrNull(tNode: TNode|null, lView: LView): RNode|null {\n const index = tNode === null ? -1 : tNode.index;\n if (index !== -1) {\n ngDevMode && assertTNodeForLView(tNode!, lView);\n const node: RNode|null = unwrapRNode(lView[index]);\n ngDevMode && node !== null && !isProceduralRenderer(lView[RENDERER]) && assertDomNode(node);\n return node;\n }\n return null;\n}\n\n\n// fixme(misko): The return Type should be `TNode|null`\nexport function getTNode(tView: TView, index: number): TNode {\n ngDevMode && assertGreaterThan(index, -1, 'wrong index for TNode');\n ngDevMode && assertLessThan(index, tView.data.length, 'wrong index for TNode');\n const tNode = tView.data[index] as TNode;\n ngDevMode && tNode !== null && assertTNode(tNode);\n return tNode;\n}\n\n/** Retrieves a value from any `LView` or `TData`. */\nexport function load<T>(view: LView|TData, index: number): T {\n ngDevMode && assertIndexInRange(view, index);\n return view[index];\n}\n\nexport function getComponentLViewByIndex(nodeIndex: number, hostView: LView): LView {\n // Could be an LView or an LContainer. If LContainer, unwrap to find LView.\n ngDevMode && assertIndexInRange(hostView, nodeIndex);\n const slotValue = hostView[nodeIndex];\n const lView = isLView(slotValue) ? slotValue : slotValue[HOST];\n return lView;\n}\n\n/** Checks whether a given view is in creation mode */\nexport function isCreationMode(view: LView): boolean {\n return (view[FLAGS] & LViewFlags.CreationMode) === LViewFlags.CreationMode;\n}\n\n/**\n * Returns a boolean for whether the view is attached to the change detection tree.\n *\n * Note: This determines whether a view should be checked, not whether it's inserted\n * into a container. For that, you'll want `viewAttachedToContainer` below.\n */\nexport function viewAttachedToChangeDetector(view: LView): boolean {\n return (view[FLAGS] & LViewFlags.Attached) === LViewFlags.Attached;\n}\n\n/** Returns a boolean for whether the view is attached to a container. */\nexport function viewAttachedToContainer(view: LView): boolean {\n return isLContainer(view[PARENT]);\n}\n\n/** Returns a constant from `TConstants` instance. */\nexport function getConstant<T>(consts: TConstants|null, index: null|undefined): null;\nexport function getConstant<T>(consts: TConstants, index: number): T|null;\nexport function getConstant<T>(consts: TConstants|null, index: number|null|undefined): T|null;\nexport function getConstant<T>(consts: TConstants|null, index: number|null|undefined): T|null {\n if (index === null || index === undefined) return null;\n ngDevMode && assertIndexInRange(consts!, index);\n return consts![index] as unknown as T;\n}\n\n/**\n * Resets the pre-order hook flags of the view.\n * @param lView the LView on which the flags are reset\n */\nexport function resetPreOrderHookFlags(lView: LView) {\n lView[PREORDER_HOOK_FLAGS] = 0;\n}\n\n/**\n * Updates the `TRANSPLANTED_VIEWS_TO_REFRESH` counter on the `LContainer` as well as the parents\n * whose\n * 1. counter goes from 0 to 1, indicating that there is a new child that has a view to refresh\n * or\n * 2. counter goes from 1 to 0, indicating there are no more descendant views to refresh\n */\nexport function updateTransplantedViewCount(lContainer: LContainer, amount: 1|- 1) {\n lContainer[TRANSPLANTED_VIEWS_TO_REFRESH] += amount;\n let viewOrContainer: LView|LContainer = lContainer;\n let parent: LView|LContainer|null = lContainer[PARENT];\n while (parent !== null &&\n ((amount === 1 && viewOrContainer[TRANSPLANTED_VIEWS_TO_REFRESH] === 1) ||\n (amount === -1 && viewOrContainer[TRANSPLANTED_VIEWS_TO_REFRESH] === 0))) {\n parent[TRANSPLANTED_VIEWS_TO_REFRESH] += amount;\n viewOrContainer = parent;\n parent = parent[PARENT];\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 {InjectFlags} from '../di/interface/injector';\nimport {assertDefined, assertEqual, assertGreaterThanOrEqual, assertLessThan, assertNotEqual} from '../util/assert';\nimport {assertLViewOrUndefined, assertTNodeForLView, assertTNodeForTView} from './assert';\nimport {DirectiveDef} from './interfaces/definition';\nimport {TNode, TNodeType} from './interfaces/node';\nimport {CONTEXT, DECLARATION_VIEW, HEADER_OFFSET, LView, OpaqueViewState, T_HOST, TData, TVIEW, TView, TViewType} from './interfaces/view';\nimport {MATH_ML_NAMESPACE, SVG_NAMESPACE} from './namespaces';\nimport {getTNode} from './util/view_utils';\n\n\n/**\n *\n */\ninterface LFrame {\n /**\n * Parent LFrame.\n *\n * This is needed when `leaveView` is called to restore the previous state.\n */\n parent: LFrame;\n\n /**\n * Child LFrame.\n *\n * This is used to cache existing LFrames to relieve the memory pressure.\n */\n child: LFrame|null;\n\n /**\n * State of the current view being processed.\n *\n * An array of nodes (text, element, container, etc), pipes, their bindings, and\n * any local variables that need to be stored between invocations.\n */\n lView: LView;\n\n /**\n * Current `TView` associated with the `LFrame.lView`.\n *\n * One can get `TView` from `lFrame[TVIEW]` however because it is so common it makes sense to\n * store it in `LFrame` for perf reasons.\n */\n tView: TView;\n\n /**\n * Used to set the parent property when nodes are created and track query results.\n *\n * This is used in conjunction with `isParent`.\n */\n currentTNode: TNode|null;\n\n /**\n * If `isParent` is:\n * - `true`: then `currentTNode` points to a parent node.\n * - `false`: then `currentTNode` points to previous node (sibling).\n */\n isParent: boolean;\n\n /**\n * Index of currently selected element in LView.\n *\n * Used by binding instructions. Updated as part of advance instruction.\n */\n selectedIndex: number;\n\n /**\n * Current pointer to the binding index.\n */\n bindingIndex: number;\n\n /**\n * The last viewData retrieved by nextContext().\n * Allows building nextContext() and reference() calls.\n *\n * e.g. const inner = x().$implicit; const outer = x().$implicit;\n */\n contextLView: LView;\n\n /**\n * Store the element depth count. This is used to identify the root elements of the template\n * so that we can then attach patch data `LView` to only those elements. We know that those\n * are the only places where the patch data could change, this way we will save on number\n * of places where tha patching occurs.\n */\n elementDepthCount: number;\n\n /**\n * Current namespace to be used when creating elements\n */\n currentNamespace: string|null;\n\n\n /**\n * The root index from which pure function instructions should calculate their binding\n * indices. In component views, this is TView.bindingStartIndex. In a host binding\n * context, this is the TView.expandoStartIndex + any dirs/hostVars before the given dir.\n */\n bindingRootIndex: number;\n\n /**\n * Current index of a View or Content Query which needs to be processed next.\n * We iterate over the list of Queries and increment current query index at every step.\n */\n currentQueryIndex: number;\n\n /**\n * When host binding is executing this points to the directive index.\n * `TView.data[currentDirectiveIndex]` is `DirectiveDef`\n * `LView[currentDirectiveIndex]` is directive instance.\n */\n currentDirectiveIndex: number;\n\n /**\n * Are we currently in i18n block as denoted by `ɵɵelementStart` and `ɵɵelementEnd`.\n *\n * This information is needed because while we are in i18n block all elements must be pre-declared\n * in the translation. (i.e. `Hello �#2�World�/#2�!` pre-declares element at `�#2�` location.)\n * This allocates `TNodeType.Placeholder` element at location `2`. If translator removes `�#2�`\n * from translation than the runtime must also ensure tha element at `2` does not get inserted\n * into the DOM. The translation does not carry information about deleted elements. Therefor the\n * only way to know that an element is deleted is that it was not pre-declared in the translation.\n *\n * This flag works by ensuring that elements which are created without pre-declaration\n * (`TNodeType.Placeholder`) are not inserted into the DOM render tree. (It does mean that the\n * element still gets instantiated along with all of its behavior [directives])\n */\n inI18n: boolean;\n}\n\n/**\n * All implicit instruction state is stored here.\n *\n * It is useful to have a single object where all of the state is stored as a mental model\n * (rather it being spread across many different variables.)\n *\n * PERF NOTE: Turns out that writing to a true global variable is slower than\n * having an intermediate object with properties.\n */\ninterface InstructionState {\n /**\n * Current `LFrame`\n *\n * `null` if we have not called `enterView`\n */\n lFrame: LFrame;\n\n /**\n * Stores whether directives should be matched to elements.\n *\n * When template contains `ngNonBindable` then we need to prevent the runtime from matching\n * directives on children of that element.\n *\n * Example:\n * ```\n * <my-comp my-directive>\n * Should match component / directive.\n * </my-comp>\n * <div ngNonBindable>\n * <my-comp my-directive>\n * Should not match component / directive because we are in ngNonBindable.\n * </my-comp>\n * </div>\n * ```\n */\n bindingsEnabled: boolean;\n\n /**\n * In this mode, any changes in bindings will throw an ExpressionChangedAfterChecked error.\n *\n * Necessary to support ChangeDetectorRef.checkNoChanges().\n *\n * checkNoChanges Runs only in devmode=true and verifies that no unintended changes exist in\n * the change detector or its children.\n */\n isInCheckNoChangesMode: boolean;\n}\n\nconst instructionState: InstructionState = {\n lFrame: createLFrame(null),\n bindingsEnabled: true,\n isInCheckNoChangesMode: false,\n};\n\n/**\n * Returns true if the instruction state stack is empty.\n *\n * Intended to be called from tests only (tree shaken otherwise).\n */\nexport function specOnlyIsInstructionStateEmpty(): boolean {\n return instructionState.lFrame.parent === null;\n}\n\n\nexport function getElementDepthCount() {\n return instructionState.lFrame.elementDepthCount;\n}\n\nexport function increaseElementDepthCount() {\n instructionState.lFrame.elementDepthCount++;\n}\n\nexport function decreaseElementDepthCount() {\n instructionState.lFrame.elementDepthCount--;\n}\n\nexport function getBindingsEnabled(): boolean {\n return instructionState.bindingsEnabled;\n}\n\n\n/**\n * Enables directive matching on elements.\n *\n * * Example:\n * ```\n * <my-comp my-directive>\n * Should match component / directive.\n * </my-comp>\n * <div ngNonBindable>\n * <!-- ɵɵdisableBindings() -->\n * <my-comp my-directive>\n * Should not match component / directive because we are in ngNonBindable.\n * </my-comp>\n * <!-- ɵɵenableBindings() -->\n * </div>\n * ```\n *\n * @codeGenApi\n */\nexport function ɵɵenableBindings(): void {\n instructionState.bindingsEnabled = true;\n}\n\n/**\n * Disables directive matching on element.\n *\n * * Example:\n * ```\n * <my-comp my-directive>\n * Should match component / directive.\n * </my-comp>\n * <div ngNonBindable>\n * <!-- ɵɵdisableBindings() -->\n * <my-comp my-directive>\n * Should not match component / directive because we are in ngNonBindable.\n * </my-comp>\n * <!-- ɵɵenableBindings() -->\n * </div>\n * ```\n *\n * @codeGenApi\n */\nexport function ɵɵdisableBindings(): void {\n instructionState.bindingsEnabled = false;\n}\n\n/**\n * Return the current `LView`.\n */\nexport function getLView(): LView {\n return instructionState.lFrame.lView;\n}\n\n/**\n * Return the current `TView`.\n */\nexport function getTView(): TView {\n return instructionState.lFrame.tView;\n}\n\n/**\n * Restores `contextViewData` to the given OpaqueViewState instance.\n *\n * Used in conjunction with the getCurrentView() instruction to save a snapshot\n * of the current view and restore it when listeners are invoked. This allows\n * walking the declaration view tree in listeners to get vars from parent views.\n *\n * @param viewToRestore The OpaqueViewState instance to restore.\n * @returns Context of the restored OpaqueViewState instance.\n *\n * @codeGenApi\n */\nexport function ɵɵrestoreView<T = any>(viewToRestore: OpaqueViewState): T {\n instructionState.lFrame.contextLView = viewToRestore as any as LView;\n return (viewToRestore as any as LView)[CONTEXT] as T;\n}\n\n\nexport function getCurrentTNode(): TNode|null {\n let currentTNode = getCurrentTNodePlaceholderOk();\n while (currentTNode !== null && currentTNode.type === TNodeType.Placeholder) {\n currentTNode = currentTNode.parent;\n }\n return currentTNode;\n}\n\nexport function getCurrentTNodePlaceholderOk(): TNode|null {\n return instructionState.lFrame.currentTNode;\n}\n\nexport function getCurrentParentTNode(): TNode|null {\n const lFrame = instructionState.lFrame;\n const currentTNode = lFrame.currentTNode;\n return lFrame.isParent ? currentTNode : currentTNode!.parent;\n}\n\nexport function setCurrentTNode(tNode: TNode|null, isParent: boolean) {\n ngDevMode && tNode && assertTNodeForTView(tNode, instructionState.lFrame.tView);\n const lFrame = instructionState.lFrame;\n lFrame.currentTNode = tNode;\n lFrame.isParent = isParent;\n}\n\nexport function isCurrentTNodeParent(): boolean {\n return instructionState.lFrame.isParent;\n}\n\nexport function setCurrentTNodeAsNotParent(): void {\n instructionState.lFrame.isParent = false;\n}\nexport function setCurrentTNodeAsParent(): void {\n instructionState.lFrame.isParent = true;\n}\n\nexport function getContextLView(): LView {\n return instructionState.lFrame.contextLView;\n}\n\nexport function isInCheckNoChangesMode(): boolean {\n // TODO(misko): remove this from the LView since it is ngDevMode=true mode only.\n return instructionState.isInCheckNoChangesMode;\n}\n\nexport function setIsInCheckNoChangesMode(mode: boolean): void {\n instructionState.isInCheckNoChangesMode = mode;\n}\n\n// top level variables should not be exported for performance reasons (PERF_NOTES.md)\nexport function getBindingRoot() {\n const lFrame = instructionState.lFrame;\n let index = lFrame.bindingRootIndex;\n if (index === -1) {\n index = lFrame.bindingRootIndex = lFrame.tView.bindingStartIndex;\n }\n return index;\n}\n\nexport function getBindingIndex(): number {\n return instructionState.lFrame.bindingIndex;\n}\n\nexport function setBindingIndex(value: number): number {\n return instructionState.lFrame.bindingIndex = value;\n}\n\nexport function nextBindingIndex(): number {\n return instructionState.lFrame.bindingIndex++;\n}\n\nexport function incrementBindingIndex(count: number): number {\n const lFrame = instructionState.lFrame;\n const index = lFrame.bindingIndex;\n lFrame.bindingIndex = lFrame.bindingIndex + count;\n return index;\n}\n\nexport function isInI18nBlock() {\n return instructionState.lFrame.inI18n;\n}\n\nexport function setInI18nBlock(isInI18nBlock: boolean): void {\n instructionState.lFrame.inI18n = isInI18nBlock;\n}\n\n/**\n * Set a new binding root index so that host template functions can execute.\n *\n * Bindings inside the host template are 0 index. But because we don't know ahead of time\n * how many host bindings we have we can't pre-compute them. For this reason they are all\n * 0 index and we just shift the root so that they match next available location in the LView.\n *\n * @param bindingRootIndex Root index for `hostBindings`\n * @param currentDirectiveIndex `TData[currentDirectiveIndex]` will point to the current directive\n * whose `hostBindings` are being processed.\n */\nexport function setBindingRootForHostBindings(\n bindingRootIndex: number, currentDirectiveIndex: number) {\n const lFrame = instructionState.lFrame;\n lFrame.bindingIndex = lFrame.bindingRootIndex = bindingRootIndex;\n setCurrentDirectiveIndex(currentDirectiveIndex);\n}\n\n/**\n * When host binding is executing this points to the directive index.\n * `TView.data[getCurrentDirectiveIndex()]` is `DirectiveDef`\n * `LView[getCurrentDirectiveIndex()]` is directive instance.\n */\nexport function getCurrentDirectiveIndex(): number {\n return instructionState.lFrame.currentDirectiveIndex;\n}\n\n/**\n * Sets an index of a directive whose `hostBindings` are being processed.\n *\n * @param currentDirectiveIndex `TData` index where current directive instance can be found.\n */\nexport function setCurrentDirectiveIndex(currentDirectiveIndex: number): void {\n instructionState.lFrame.currentDirectiveIndex = currentDirectiveIndex;\n}\n\n/**\n * Retrieve the current `DirectiveDef` which is active when `hostBindings` instruction is being\n * executed.\n *\n * @param tData Current `TData` where the `DirectiveDef` will be looked up at.\n */\nexport function getCurrentDirectiveDef(tData: TData): DirectiveDef<any>|null {\n const currentDirectiveIndex = instructionState.lFrame.currentDirectiveIndex;\n return currentDirectiveIndex === -1 ? null : tData[currentDirectiveIndex] as DirectiveDef<any>;\n}\n\nexport function getCurrentQueryIndex(): number {\n return instructionState.lFrame.currentQueryIndex;\n}\n\nexport function setCurrentQueryIndex(value: number): void {\n instructionState.lFrame.currentQueryIndex = value;\n}\n\n/**\n * Returns a `TNode` of the location where the current `LView` is declared at.\n *\n * @param lView an `LView` that we want to find parent `TNode` for.\n */\nfunction getDeclarationTNode(lView: LView): TNode|null {\n const tView = lView[TVIEW];\n\n // Return the declaration parent for embedded views\n if (tView.type === TViewType.Embedded) {\n ngDevMode && assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');\n return tView.declTNode;\n }\n\n // Components don't have `TView.declTNode` because each instance of component could be\n // inserted in different location, hence `TView.declTNode` is meaningless.\n // Falling back to `T_HOST` in case we cross component boundary.\n if (tView.type === TViewType.Component) {\n return lView[T_HOST];\n }\n\n // Remaining TNode type is `TViewType.Root` which doesn't have a parent TNode.\n return null;\n}\n\n/**\n * This is a light weight version of the `enterView` which is needed by the DI system.\n *\n * @param lView `LView` location of the DI context.\n * @param tNode `TNode` for DI context\n * @param flags DI context flags. if `SkipSelf` flag is set than we walk up the declaration\n * tree from `tNode` until we find parent declared `TElementNode`.\n * @returns `true` if we have successfully entered DI associated with `tNode` (or with declared\n * `TNode` if `flags` has `SkipSelf`). Failing to enter DI implies that no associated\n * `NodeInjector` can be found and we should instead use `ModuleInjector`.\n * - If `true` than this call must be fallowed by `leaveDI`\n * - If `false` than this call failed and we should NOT call `leaveDI`\n */\nexport function enterDI(lView: LView, tNode: TNode, flags: InjectFlags) {\n ngDevMode && assertLViewOrUndefined(lView);\n\n if (flags & InjectFlags.SkipSelf) {\n ngDevMode && assertTNodeForTView(tNode, lView[TVIEW]);\n\n let parentTNode = tNode as TNode | null;\n let parentLView = lView;\n\n while (true) {\n ngDevMode && assertDefined(parentTNode, 'Parent TNode should be defined');\n parentTNode = parentTNode!.parent as TNode | null;\n if (parentTNode === null && !(flags & InjectFlags.Host)) {\n parentTNode = getDeclarationTNode(parentLView);\n if (parentTNode === null) break;\n\n // In this case, a parent exists and is definitely an element. So it will definitely\n // have an existing lView as the declaration view, which is why we can assume it's defined.\n ngDevMode && assertDefined(parentLView, 'Parent LView should be defined');\n parentLView = parentLView[DECLARATION_VIEW]!;\n\n // In Ivy there are Comment nodes that correspond to ngIf and NgFor embedded directives\n // We want to skip those and look only at Elements and ElementContainers to ensure\n // we're looking at true parent nodes, and not content or other types.\n if (parentTNode.type & (TNodeType.Element | TNodeType.ElementContainer)) {\n break;\n }\n } else {\n break;\n }\n }\n if (parentTNode === null) {\n // If we failed to find a parent TNode this means that we should use module injector.\n return false;\n } else {\n tNode = parentTNode;\n lView = parentLView;\n }\n }\n\n ngDevMode && assertTNodeForLView(tNode, lView);\n const lFrame = instructionState.lFrame = allocLFrame();\n lFrame.currentTNode = tNode;\n lFrame.lView = lView;\n\n return true;\n}\n\n/**\n * Swap the current lView with a new lView.\n *\n * For performance reasons we store the lView in the top level of the module.\n * This way we minimize the number of properties to read. Whenever a new view\n * is entered we have to store the lView for later, and when the view is\n * exited the state has to be restored\n *\n * @param newView New lView to become active\n * @returns the previously active lView;\n */\nexport function enterView(newView: LView): void {\n ngDevMode && assertNotEqual(newView[0], newView[1] as any, '????');\n ngDevMode && assertLViewOrUndefined(newView);\n const newLFrame = allocLFrame();\n if (ngDevMode) {\n assertEqual(newLFrame.isParent, true, 'Expected clean LFrame');\n assertEqual(newLFrame.lView, null, 'Expected clean LFrame');\n assertEqual(newLFrame.tView, null, 'Expected clean LFrame');\n assertEqual(newLFrame.selectedIndex, -1, 'Expected clean LFrame');\n assertEqual(newLFrame.elementDepthCount, 0, 'Expected clean LFrame');\n assertEqual(newLFrame.currentDirectiveIndex, -1, 'Expected clean LFrame');\n assertEqual(newLFrame.currentNamespace, null, 'Expected clean LFrame');\n assertEqual(newLFrame.bindingRootIndex, -1, 'Expected clean LFrame');\n assertEqual(newLFrame.currentQueryIndex, 0, 'Expected clean LFrame');\n }\n const tView = newView[TVIEW];\n instructionState.lFrame = newLFrame;\n ngDevMode && tView.firstChild && assertTNodeForTView(tView.firstChild, tView);\n newLFrame.currentTNode = tView.firstChild!;\n newLFrame.lView = newView;\n newLFrame.tView = tView;\n newLFrame.contextLView = newView!;\n newLFrame.bindingIndex = tView.bindingStartIndex;\n newLFrame.inI18n = false;\n}\n\n/**\n * Allocates next free LFrame. This function tries to reuse the `LFrame`s to lower memory pressure.\n */\nfunction allocLFrame() {\n const currentLFrame = instructionState.lFrame;\n const childLFrame = currentLFrame === null ? null : currentLFrame.child;\n const newLFrame = childLFrame === null ? createLFrame(currentLFrame) : childLFrame;\n return newLFrame;\n}\n\nfunction createLFrame(parent: LFrame|null): LFrame {\n const lFrame: LFrame = {\n currentTNode: null,\n isParent: true,\n lView: null!,\n tView: null!,\n selectedIndex: -1,\n contextLView: null!,\n elementDepthCount: 0,\n currentNamespace: null,\n currentDirectiveIndex: -1,\n bindingRootIndex: -1,\n bindingIndex: -1,\n currentQueryIndex: 0,\n parent: parent!,\n child: null,\n inI18n: false,\n };\n parent !== null && (parent.child = lFrame); // link the new LFrame for reuse.\n return lFrame;\n}\n\n/**\n * A lightweight version of leave which is used with DI.\n *\n * This function only resets `currentTNode` and `LView` as those are the only properties\n * used with DI (`enterDI()`).\n *\n * NOTE: This function is reexported as `leaveDI`. However `leaveDI` has return type of `void` where\n * as `leaveViewLight` has `LFrame`. This is so that `leaveViewLight` can be used in `leaveView`.\n */\nfunction leaveViewLight(): LFrame {\n const oldLFrame = instructionState.lFrame;\n instructionState.lFrame = oldLFrame.parent;\n oldLFrame.currentTNode = null!;\n oldLFrame.lView = null!;\n return oldLFrame;\n}\n\n/**\n * This is a lightweight version of the `leaveView` which is needed by the DI system.\n *\n * NOTE: this function is an alias so that we can change the type of the function to have `void`\n * return type.\n */\nexport const leaveDI: () => void = leaveViewLight;\n\n/**\n * Leave the current `LView`\n *\n * This pops the `LFrame` with the associated `LView` from the stack.\n *\n * IMPORTANT: We must zero out the `LFrame` values here otherwise they will be retained. This is\n * because for performance reasons we don't release `LFrame` but rather keep it for next use.\n */\nexport function leaveView() {\n const oldLFrame = leaveViewLight();\n oldLFrame.isParent = true;\n oldLFrame.tView = null!;\n oldLFrame.selectedIndex = -1;\n oldLFrame.contextLView = null!;\n oldLFrame.elementDepthCount = 0;\n oldLFrame.currentDirectiveIndex = -1;\n oldLFrame.currentNamespace = null;\n oldLFrame.bindingRootIndex = -1;\n oldLFrame.bindingIndex = -1;\n oldLFrame.currentQueryIndex = 0;\n}\n\nexport function nextContextImpl<T = any>(level: number): T {\n const contextLView = instructionState.lFrame.contextLView =\n walkUpViews(level, instructionState.lFrame.contextLView!);\n return contextLView[CONTEXT] as T;\n}\n\nfunction walkUpViews(nestingLevel: number, currentView: LView): LView {\n while (nestingLevel > 0) {\n ngDevMode &&\n assertDefined(\n currentView[DECLARATION_VIEW],\n 'Declaration view should be defined if nesting level is greater than 0.');\n currentView = currentView[DECLARATION_VIEW]!;\n nestingLevel--;\n }\n return currentView;\n}\n\n/**\n * Gets the currently selected element index.\n *\n * Used with {@link property} instruction (and more in the future) to identify the index in the\n * current `LView` to act on.\n */\nexport function getSelectedIndex() {\n return instructionState.lFrame.selectedIndex;\n}\n\n/**\n * Sets the most recent index passed to {@link select}\n *\n * Used with {@link property} instruction (and more in the future) to identify the index in the\n * current `LView` to act on.\n *\n * (Note that if an \"exit function\" was set earlier (via `setElementExitFn()`) then that will be\n * run if and when the provided `index` value is different from the current selected index value.)\n */\nexport function setSelectedIndex(index: number) {\n ngDevMode && index !== -1 &&\n assertGreaterThanOrEqual(index, HEADER_OFFSET, 'Index must be past HEADER_OFFSET (or -1).');\n ngDevMode &&\n assertLessThan(\n index, instructionState.lFrame.lView.length, 'Can\\'t set index passed end of LView');\n instructionState.lFrame.selectedIndex = index;\n}\n\n/**\n * Gets the `tNode` that represents currently selected element.\n */\nexport function getSelectedTNode() {\n const lFrame = instructionState.lFrame;\n return getTNode(lFrame.tView, lFrame.selectedIndex);\n}\n\n/**\n * Sets the namespace used to create elements to `'http://www.w3.org/2000/svg'` in global state.\n *\n * @codeGenApi\n */\nexport function ɵɵnamespaceSVG() {\n instructionState.lFrame.currentNamespace = SVG_NAMESPACE;\n}\n\n/**\n * Sets the namespace used to create elements to `'http://www.w3.org/1998/MathML/'` in global state.\n *\n * @codeGenApi\n */\nexport function ɵɵnamespaceMathML() {\n instructionState.lFrame.currentNamespace = MATH_ML_NAMESPACE;\n}\n\n/**\n * Sets the namespace used to create elements to `null`, which forces element creation to use\n * `createElement` rather than `createElementNS`.\n *\n * @codeGenApi\n */\nexport function ɵɵnamespaceHTML() {\n namespaceHTMLInternal();\n}\n\n/**\n * Sets the namespace used to create elements to `null`, which forces element creation to use\n * `createElement` rather than `createElementNS`.\n */\nexport function namespaceHTMLInternal() {\n instructionState.lFrame.currentNamespace = null;\n}\n\nexport function getNamespace(): string|null {\n return instructionState.lFrame.currentNamespace;\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 {AfterContentChecked, AfterContentInit, AfterViewChecked, AfterViewInit, DoCheck, OnChanges, OnDestroy, OnInit} from '../interface/lifecycle_hooks';\nimport {assertDefined, assertEqual, assertNotEqual} from '../util/assert';\nimport {assertFirstCreatePass} from './assert';\nimport {NgOnChangesFeatureImpl} from './features/ng_onchanges_feature';\nimport {DirectiveDef} from './interfaces/definition';\nimport {TNode} from './interfaces/node';\nimport {FLAGS, HookData, InitPhaseState, LView, LViewFlags, PREORDER_HOOK_FLAGS, PreOrderHookFlags, TView} from './interfaces/view';\nimport {profiler, ProfilerEvent} from './profiler';\nimport {isInCheckNoChangesMode} from './state';\n\n\n\n/**\n * Adds all directive lifecycle hooks from the given `DirectiveDef` to the given `TView`.\n *\n * Must be run *only* on the first template pass.\n *\n * Sets up the pre-order hooks on the provided `tView`,\n * see {@link HookData} for details about the data structure.\n *\n * @param directiveIndex The index of the directive in LView\n * @param directiveDef The definition containing the hooks to setup in tView\n * @param tView The current TView\n */\nexport function registerPreOrderHooks(\n directiveIndex: number, directiveDef: DirectiveDef<any>, tView: TView): void {\n ngDevMode && assertFirstCreatePass(tView);\n const {ngOnChanges, ngOnInit, ngDoCheck} =\n directiveDef.type.prototype as OnChanges & OnInit & DoCheck;\n\n if (ngOnChanges as Function | undefined) {\n const wrappedOnChanges = NgOnChangesFeatureImpl(directiveDef);\n (tView.preOrderHooks || (tView.preOrderHooks = [])).push(directiveIndex, wrappedOnChanges);\n (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = []))\n .push(directiveIndex, wrappedOnChanges);\n }\n\n if (ngOnInit) {\n (tView.preOrderHooks || (tView.preOrderHooks = [])).push(0 - directiveIndex, ngOnInit);\n }\n\n if (ngDoCheck) {\n (tView.preOrderHooks || (tView.preOrderHooks = [])).push(directiveIndex, ngDoCheck);\n (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(directiveIndex, ngDoCheck);\n }\n}\n\n/**\n *\n * Loops through the directives on the provided `tNode` and queues hooks to be\n * run that are not initialization hooks.\n *\n * Should be executed during `elementEnd()` and similar to\n * preserve hook execution order. Content, view, and destroy hooks for projected\n * components and directives must be called *before* their hosts.\n *\n * Sets up the content, view, and destroy hooks on the provided `tView`,\n * see {@link HookData} for details about the data structure.\n *\n * NOTE: This does not set up `onChanges`, `onInit` or `doCheck`, those are set up\n * separately at `elementStart`.\n *\n * @param tView The current TView\n * @param tNode The TNode whose directives are to be searched for hooks to queue\n */\nexport function registerPostOrderHooks(tView: TView, tNode: TNode): void {\n ngDevMode && assertFirstCreatePass(tView);\n // It's necessary to loop through the directives at elementEnd() (rather than processing in\n // directiveCreate) so we can preserve the current hook order. Content, view, and destroy\n // hooks for projected components and directives must be called *before* their hosts.\n for (let i = tNode.directiveStart, end = tNode.directiveEnd; i < end; i++) {\n const directiveDef = tView.data[i] as DirectiveDef<any>;\n ngDevMode && assertDefined(directiveDef, 'Expecting DirectiveDef');\n const lifecycleHooks: AfterContentInit&AfterContentChecked&AfterViewInit&AfterViewChecked&\n OnDestroy = directiveDef.type.prototype;\n const {\n ngAfterContentInit,\n ngAfterContentChecked,\n ngAfterViewInit,\n ngAfterViewChecked,\n ngOnDestroy\n } = lifecycleHooks;\n\n if (ngAfterContentInit) {\n (tView.contentHooks || (tView.contentHooks = [])).push(-i, ngAfterContentInit);\n }\n\n if (ngAfterContentChecked) {\n (tView.contentHooks || (tView.contentHooks = [])).push(i, ngAfterContentChecked);\n (tView.contentCheckHooks || (tView.contentCheckHooks = [])).push(i, ngAfterContentChecked);\n }\n\n if (ngAfterViewInit) {\n (tView.viewHooks || (tView.viewHooks = [])).push(-i, ngAfterViewInit);\n }\n\n if (ngAfterViewChecked) {\n (tView.viewHooks || (tView.viewHooks = [])).push(i, ngAfterViewChecked);\n (tView.viewCheckHooks || (tView.viewCheckHooks = [])).push(i, ngAfterViewChecked);\n }\n\n if (ngOnDestroy != null) {\n (tView.destroyHooks || (tView.destroyHooks = [])).push(i, ngOnDestroy);\n }\n }\n}\n\n/**\n * Executing hooks requires complex logic as we need to deal with 2 constraints.\n *\n * 1. Init hooks (ngOnInit, ngAfterContentInit, ngAfterViewInit) must all be executed once and only\n * once, across many change detection cycles. This must be true even if some hooks throw, or if\n * some recursively trigger a change detection cycle.\n * To solve that, it is required to track the state of the execution of these init hooks.\n * This is done by storing and maintaining flags in the view: the {@link InitPhaseState},\n * and the index within that phase. They can be seen as a cursor in the following structure:\n * [[onInit1, onInit2], [afterContentInit1], [afterViewInit1, afterViewInit2, afterViewInit3]]\n * They are are stored as flags in LView[FLAGS].\n *\n * 2. Pre-order hooks can be executed in batches, because of the select instruction.\n * To be able to pause and resume their execution, we also need some state about the hook's array\n * that is being processed:\n * - the index of the next hook to be executed\n * - the number of init hooks already found in the processed part of the array\n * They are are stored as flags in LView[PREORDER_HOOK_FLAGS].\n */\n\n\n/**\n * Executes pre-order check hooks ( OnChanges, DoChanges) given a view where all the init hooks were\n * executed once. This is a light version of executeInitAndCheckPreOrderHooks where we can skip read\n * / write of the init-hooks related flags.\n * @param lView The LView where hooks are defined\n * @param hooks Hooks to be run\n * @param nodeIndex 3 cases depending on the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nexport function executeCheckHooks(lView: LView, hooks: HookData, nodeIndex?: number|null) {\n callHooks(lView, hooks, InitPhaseState.InitPhaseCompleted, nodeIndex);\n}\n\n/**\n * Executes post-order init and check hooks (one of AfterContentInit, AfterContentChecked,\n * AfterViewInit, AfterViewChecked) given a view where there are pending init hooks to be executed.\n * @param lView The LView where hooks are defined\n * @param hooks Hooks to be run\n * @param initPhase A phase for which hooks should be run\n * @param nodeIndex 3 cases depending on the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nexport function executeInitAndCheckHooks(\n lView: LView, hooks: HookData, initPhase: InitPhaseState, nodeIndex?: number|null) {\n ngDevMode &&\n assertNotEqual(\n initPhase, InitPhaseState.InitPhaseCompleted,\n 'Init pre-order hooks should not be called more than once');\n if ((lView[FLAGS] & LViewFlags.InitPhaseStateMask) === initPhase) {\n callHooks(lView, hooks, initPhase, nodeIndex);\n }\n}\n\nexport function incrementInitPhaseFlags(lView: LView, initPhase: InitPhaseState): void {\n ngDevMode &&\n assertNotEqual(\n initPhase, InitPhaseState.InitPhaseCompleted,\n 'Init hooks phase should not be incremented after all init hooks have been run.');\n let flags = lView[FLAGS];\n if ((flags & LViewFlags.InitPhaseStateMask) === initPhase) {\n flags &= LViewFlags.IndexWithinInitPhaseReset;\n flags += LViewFlags.InitPhaseStateIncrementer;\n lView[FLAGS] = flags;\n }\n}\n\n/**\n * Calls lifecycle hooks with their contexts, skipping init hooks if it's not\n * the first LView pass\n *\n * @param currentView The current view\n * @param arr The array in which the hooks are found\n * @param initPhaseState the current state of the init phase\n * @param currentNodeIndex 3 cases depending on the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nfunction callHooks(\n currentView: LView, arr: HookData, initPhase: InitPhaseState,\n currentNodeIndex: number|null|undefined): void {\n ngDevMode &&\n assertEqual(\n isInCheckNoChangesMode(), false,\n 'Hooks should never be run when in check no changes mode.');\n const startIndex = currentNodeIndex !== undefined ?\n (currentView[PREORDER_HOOK_FLAGS] & PreOrderHookFlags.IndexOfTheNextPreOrderHookMaskMask) :\n 0;\n const nodeIndexLimit = currentNodeIndex != null ? currentNodeIndex : -1;\n const max = arr.length - 1; // Stop the loop at length - 1, because we look for the hook at i + 1\n let lastNodeIndexFound = 0;\n for (let i = startIndex; i < max; i++) {\n const hook = arr[i + 1] as number | (() => void);\n if (typeof hook === 'number') {\n lastNodeIndexFound = arr[i] as number;\n if (currentNodeIndex != null && lastNodeIndexFound >= currentNodeIndex) {\n break;\n }\n } else {\n const isInitHook = arr[i] < 0;\n if (isInitHook)\n currentView[PREORDER_HOOK_FLAGS] += PreOrderHookFlags.NumberOfInitHooksCalledIncrementer;\n if (lastNodeIndexFound < nodeIndexLimit || nodeIndexLimit == -1) {\n callHook(currentView, initPhase, arr, i);\n currentView[PREORDER_HOOK_FLAGS] =\n (currentView[PREORDER_HOOK_FLAGS] & PreOrderHookFlags.NumberOfInitHooksCalledMask) + i +\n 2;\n }\n i++;\n }\n }\n}\n\n/**\n * Execute one hook against the current `LView`.\n *\n * @param currentView The current view\n * @param initPhaseState the current state of the init phase\n * @param arr The array in which the hooks are found\n * @param i The current index within the hook data array\n */\nfunction callHook(currentView: LView, initPhase: InitPhaseState, arr: HookData, i: number) {\n const isInitHook = arr[i] < 0;\n const hook = arr[i + 1] as () => void;\n const directiveIndex = isInitHook ? -arr[i] : arr[i] as number;\n const directive = currentView[directiveIndex];\n if (isInitHook) {\n const indexWithintInitPhase = currentView[FLAGS] >> LViewFlags.IndexWithinInitPhaseShift;\n // The init phase state must be always checked here as it may have been recursively updated.\n if (indexWithintInitPhase <\n (currentView[PREORDER_HOOK_FLAGS] >> PreOrderHookFlags.NumberOfInitHooksCalledShift) &&\n (currentView[FLAGS] & LViewFlags.InitPhaseStateMask) === initPhase) {\n currentView[FLAGS] += LViewFlags.IndexWithinInitPhaseIncrementer;\n profiler(ProfilerEvent.LifecycleHookStart, directive, hook);\n try {\n hook.call(directive);\n } finally {\n profiler(ProfilerEvent.LifecycleHookEnd, directive, hook);\n }\n }\n } else {\n profiler(ProfilerEvent.LifecycleHookStart, directive, hook);\n try {\n hook.call(directive);\n } finally {\n profiler(ProfilerEvent.LifecycleHookEnd, directive, hook);\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 {InjectFlags} from '../../di/interface/injector';\nimport {ProviderToken} from '../../di/provider_token';\nimport {assertDefined, assertEqual} from '../../util/assert';\n\nimport {TDirectiveHostNode} from './node';\nimport {LView, TData} from './view';\n\n/**\n * Offsets of the `NodeInjector` data structure in the expando.\n *\n * `NodeInjector` is stored in both `LView` as well as `TView.data`. All storage requires 9 words.\n * First 8 are reserved for bloom filter and the 9th is reserved for the associated `TNode` as well\n * as parent `NodeInjector` pointer. All indexes are starting with `index` and have an offset as\n * shown.\n *\n * `LView` layout:\n * ```\n * index + 0: cumulative bloom filter\n * index + 1: cumulative bloom filter\n * index + 2: cumulative bloom filter\n * index + 3: cumulative bloom filter\n * index + 4: cumulative bloom filter\n * index + 5: cumulative bloom filter\n * index + 6: cumulative bloom filter\n * index + 7: cumulative bloom filter\n * index + 8: cumulative bloom filter\n * index + PARENT: Index to the parent injector. See `RelativeInjectorLocation`\n * `const parent = lView[index + NodeInjectorOffset.PARENT]`\n * ```\n *\n * `TViewData` layout:\n * ```\n * index + 0: cumulative bloom filter\n * index + 1: cumulative bloom filter\n * index + 2: cumulative bloom filter\n * index + 3: cumulative bloom filter\n * index + 4: cumulative bloom filter\n * index + 5: cumulative bloom filter\n * index + 6: cumulative bloom filter\n * index + 7: cumulative bloom filter\n * index + 8: cumulative bloom filter\n * index + TNODE: TNode associated with this `NodeInjector`\n * `canst tNode = tView.data[index + NodeInjectorOffset.TNODE]`\n * ```\n */\nexport const enum NodeInjectorOffset {\n TNODE = 8,\n PARENT = 8,\n BLOOM_SIZE = 8,\n SIZE = 9,\n}\n\n/**\n * Represents a relative location of parent injector.\n *\n * The interfaces encodes number of parents `LView`s to traverse and index in the `LView`\n * pointing to the parent injector.\n */\nexport interface RelativeInjectorLocation {\n __brand__: 'RelativeInjectorLocationFlags';\n}\n\nexport const enum RelativeInjectorLocationFlags {\n InjectorIndexMask = 0b111111111111111,\n ViewOffsetShift = 16,\n NO_PARENT = -1,\n}\n\nexport const NO_PARENT_INJECTOR: RelativeInjectorLocation = -1 as any;\n\n/**\n * Each injector is saved in 9 contiguous slots in `LView` and 9 contiguous slots in\n * `TView.data`. This allows us to store information about the current node's tokens (which\n * can be shared in `TView`) as well as the tokens of its ancestor nodes (which cannot be\n * shared, so they live in `LView`).\n *\n * Each of these slots (aside from the last slot) contains a bloom filter. This bloom filter\n * determines whether a directive is available on the associated node or not. This prevents us\n * from searching the directives array at this level unless it's probable the directive is in it.\n *\n * See: https://en.wikipedia.org/wiki/Bloom_filter for more about bloom filters.\n *\n * Because all injectors have been flattened into `LView` and `TViewData`, they cannot typed\n * using interfaces as they were previously. The start index of each `LInjector` and `TInjector`\n * will differ based on where it is flattened into the main array, so it's not possible to know\n * the indices ahead of time and save their types here. The interfaces are still included here\n * for documentation purposes.\n *\n * export interface LInjector extends Array<any> {\n *\n * // Cumulative bloom for directive IDs 0-31 (IDs are % BLOOM_SIZE)\n * [0]: number;\n *\n * // Cumulative bloom for directive IDs 32-63\n * [1]: number;\n *\n * // Cumulative bloom for directive IDs 64-95\n * [2]: number;\n *\n * // Cumulative bloom for directive IDs 96-127\n * [3]: number;\n *\n * // Cumulative bloom for directive IDs 128-159\n * [4]: number;\n *\n * // Cumulative bloom for directive IDs 160 - 191\n * [5]: number;\n *\n * // Cumulative bloom for directive IDs 192 - 223\n * [6]: number;\n *\n * // Cumulative bloom for directive IDs 224 - 255\n * [7]: number;\n *\n * // We need to store a reference to the injector's parent so DI can keep looking up\n * // the injector tree until it finds the dependency it's looking for.\n * [PARENT_INJECTOR]: number;\n * }\n *\n * export interface TInjector extends Array<any> {\n *\n * // Shared node bloom for directive IDs 0-31 (IDs are % BLOOM_SIZE)\n * [0]: number;\n *\n * // Shared node bloom for directive IDs 32-63\n * [1]: number;\n *\n * // Shared node bloom for directive IDs 64-95\n * [2]: number;\n *\n * // Shared node bloom for directive IDs 96-127\n * [3]: number;\n *\n * // Shared node bloom for directive IDs 128-159\n * [4]: number;\n *\n * // Shared node bloom for directive IDs 160 - 191\n * [5]: number;\n *\n * // Shared node bloom for directive IDs 192 - 223\n * [6]: number;\n *\n * // Shared node bloom for directive IDs 224 - 255\n * [7]: number;\n *\n * // Necessary to find directive indices for a particular node.\n * [TNODE]: TElementNode|TElementContainerNode|TContainerNode;\n * }\n */\n\n/**\n * Factory for creating instances of injectors in the NodeInjector.\n *\n * This factory is complicated by the fact that it can resolve `multi` factories as well.\n *\n * NOTE: Some of the fields are optional which means that this class has two hidden classes.\n * - One without `multi` support (most common)\n * - One with `multi` values, (rare).\n *\n * Since VMs can cache up to 4 inline hidden classes this is OK.\n *\n * - Single factory: Only `resolving` and `factory` is defined.\n * - `providers` factory: `componentProviders` is a number and `index = -1`.\n * - `viewProviders` factory: `componentProviders` is a number and `index` points to `providers`.\n */\nexport class NodeInjectorFactory {\n /**\n * The inject implementation to be activated when using the factory.\n */\n injectImpl: null|(<T>(token: ProviderToken<T>, flags?: InjectFlags) => T);\n\n /**\n * Marker set to true during factory invocation to see if we get into recursive loop.\n * Recursive loop causes an error to be displayed.\n */\n resolving = false;\n\n /**\n * Marks that the token can see other Tokens declared in `viewProviders` on the same node.\n */\n canSeeViewProviders: boolean;\n\n /**\n * An array of factories to use in case of `multi` provider.\n */\n multi?: Array<() => any>;\n\n /**\n * Number of `multi`-providers which belong to the component.\n *\n * This is needed because when multiple components and directives declare the `multi` provider\n * they have to be concatenated in the correct order.\n *\n * Example:\n *\n * If we have a component and directive active an a single element as declared here\n * ```\n * component:\n * provides: [ {provide: String, useValue: 'component', multi: true} ],\n * viewProvides: [ {provide: String, useValue: 'componentView', multi: true} ],\n *\n * directive:\n * provides: [ {provide: String, useValue: 'directive', multi: true} ],\n * ```\n *\n * Then the expected results are:\n *\n * ```\n * providers: ['component', 'directive']\n * viewProviders: ['component', 'componentView', 'directive']\n * ```\n *\n * The way to think about it is that the `viewProviders` have been inserted after the component\n * but before the directives, which is why we need to know how many `multi`s have been declared by\n * the component.\n */\n componentProviders?: number;\n\n /**\n * Current index of the Factory in the `data`. Needed for `viewProviders` and `providers` merging.\n * See `providerFactory`.\n */\n index?: number;\n\n /**\n * Because the same `multi` provider can be declared in `provides` and `viewProvides` it is\n * possible for `viewProvides` to shadow the `provides`. For this reason we store the\n * `provideFactory` of the `providers` so that `providers` can be extended with `viewProviders`.\n *\n * Example:\n *\n * Given:\n * ```\n * provides: [ {provide: String, useValue: 'all', multi: true} ],\n * viewProvides: [ {provide: String, useValue: 'viewOnly', multi: true} ],\n * ```\n *\n * We have to return `['all']` in case of content injection, but `['all', 'viewOnly']` in case\n * of view injection. We further have to make sure that the shared instances (in our case\n * `all`) are the exact same instance in both the content as well as the view injection. (We\n * have to make sure that we don't double instantiate.) For this reason the `viewProvides`\n * `Factory` has a pointer to the shadowed `provides` factory so that it can instantiate the\n * `providers` (`['all']`) and then extend it with `viewProviders` (`['all'] + ['viewOnly'] =\n * ['all', 'viewOnly']`).\n */\n providerFactory?: NodeInjectorFactory|null;\n\n\n constructor(\n /**\n * Factory to invoke in order to create a new instance.\n */\n public factory:\n (this: NodeInjectorFactory, _: undefined,\n /**\n * array where injectables tokens are stored. This is used in\n * case of an error reporting to produce friendlier errors.\n */\n tData: TData,\n /**\n * array where existing instances of injectables are stored. This is used in case\n * of multi shadow is needed. See `multi` field documentation.\n */\n lView: LView,\n /**\n * The TNode of the same element injector.\n */\n tNode: TDirectiveHostNode) => any,\n /**\n * Set to `true` if the token is declared in `viewProviders` (or if it is component).\n */\n isViewProvider: boolean,\n injectImplementation: null|(<T>(token: ProviderToken<T>, flags?: InjectFlags) => T)) {\n ngDevMode && assertDefined(factory, 'Factory not specified');\n ngDevMode && assertEqual(typeof factory, 'function', 'Expected factory function.');\n this.canSeeViewProviders = isViewProvider;\n this.injectImpl = injectImplementation;\n }\n}\n\nexport function isFactory(obj: any): obj is NodeInjectorFactory {\n return obj instanceof NodeInjectorFactory;\n}\n\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nexport const unusedValueExportToPlacateAjd = 1;\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 */\nimport {KeyValueArray} from '../../util/array_utils';\nimport {TStylingRange} from '../interfaces/styling';\nimport {TIcu} from './i18n';\nimport {CssSelector} from './projection';\nimport {RNode} from './renderer_dom';\nimport {LView, TView} from './view';\n\n\n/**\n * TNodeType corresponds to the {@link TNode} `type` property.\n *\n * NOTE: type IDs are such that we use each bit to denote a type. This is done so that we can easily\n * check if the `TNode` is of more than one type.\n *\n * `if (tNode.type === TNodeType.Text || tNode.type === TNode.Element)`\n * can be written as:\n * `if (tNode.type & (TNodeType.Text | TNodeType.Element))`\n *\n * However any given `TNode` can only be of one type.\n */\nexport const enum TNodeType {\n /**\n * The TNode contains information about a DOM element aka {@link RText}.\n */\n Text = 0b1,\n\n /**\n * The TNode contains information about a DOM element aka {@link RElement}.\n */\n Element = 0b10,\n\n /**\n * The TNode contains information about an {@link LContainer} for embedded views.\n */\n Container = 0b100,\n\n /**\n * The TNode contains information about an `<ng-container>` element {@link RNode}.\n */\n ElementContainer = 0b1000,\n\n /**\n * The TNode contains information about an `<ng-content>` projection\n */\n Projection = 0b10000,\n\n /**\n * The TNode contains information about an ICU comment used in `i18n`.\n */\n Icu = 0b100000,\n\n /**\n * Special node type representing a placeholder for future `TNode` at this location.\n *\n * I18n translation blocks are created before the element nodes which they contain. (I18n blocks\n * can span over many elements.) Because i18n `TNode`s (representing text) are created first they\n * often may need to point to element `TNode`s which are not yet created. In such a case we create\n * a `Placeholder` `TNode`. This allows the i18n to structurally link the `TNode`s together\n * without knowing any information about the future nodes which will be at that location.\n *\n * On `firstCreatePass` When element instruction executes it will try to create a `TNode` at that\n * location. Seeing a `Placeholder` `TNode` already there tells the system that it should reuse\n * existing `TNode` (rather than create a new one) and just update the missing information.\n */\n Placeholder = 0b1000000,\n\n // Combined Types These should never be used for `TNode.type` only as a useful way to check\n // if `TNode.type` is one of several choices.\n\n // See: https://github.com/microsoft/TypeScript/issues/35875 why we can't refer to existing enum.\n AnyRNode = 0b11, // Text | Element,\n AnyContainer = 0b1100, // Container | ElementContainer, // See:\n}\n\n/**\n * Converts `TNodeType` into human readable text.\n * Make sure this matches with `TNodeType`\n */\nexport function toTNodeTypeAsString(tNodeType: TNodeType): string {\n let text = '';\n (tNodeType & TNodeType.Text) && (text += '|Text');\n (tNodeType & TNodeType.Element) && (text += '|Element');\n (tNodeType & TNodeType.Container) && (text += '|Container');\n (tNodeType & TNodeType.ElementContainer) && (text += '|ElementContainer');\n (tNodeType & TNodeType.Projection) && (text += '|Projection');\n (tNodeType & TNodeType.Icu) && (text += '|IcuContainer');\n (tNodeType & TNodeType.Placeholder) && (text += '|Placeholder');\n return text.length > 0 ? text.substring(1) : text;\n}\n\n/**\n * Corresponds to the TNode.flags property.\n */\nexport const enum TNodeFlags {\n /** Bit #1 - This bit is set if the node is a host for any directive (including a component) */\n isDirectiveHost = 0x1,\n\n /**\n * Bit #2 - This bit is set if the node is a host for a component.\n *\n * Setting this bit implies that the `isDirectiveHost` bit is set as well.\n * */\n isComponentHost = 0x2,\n\n /** Bit #3 - This bit is set if the node has been projected */\n isProjected = 0x4,\n\n /** Bit #4 - This bit is set if any directive on this node has content queries */\n hasContentQuery = 0x8,\n\n /** Bit #5 - This bit is set if the node has any \"class\" inputs */\n hasClassInput = 0x10,\n\n /** Bit #6 - This bit is set if the node has any \"style\" inputs */\n hasStyleInput = 0x20,\n\n /** Bit #7 This bit is set if the node has been detached by i18n */\n isDetached = 0x40,\n\n /**\n * Bit #8 - This bit is set if the node has directives with host bindings.\n *\n * This flags allows us to guard host-binding logic and invoke it only on nodes\n * that actually have directives with host bindings.\n */\n hasHostBindings = 0x80,\n}\n\n/**\n * Corresponds to the TNode.providerIndexes property.\n */\nexport const enum TNodeProviderIndexes {\n /** The index of the first provider on this node is encoded on the least significant bits. */\n ProvidersStartIndexMask = 0b00000000000011111111111111111111,\n\n /**\n * The count of view providers from the component on this node is\n * encoded on the 20 most significant bits.\n */\n CptViewProvidersCountShift = 20,\n CptViewProvidersCountShifter = 0b00000000000100000000000000000000,\n}\n\n/**\n * A set of marker values to be used in the attributes arrays. These markers indicate that some\n * items are not regular attributes and the processing should be adapted accordingly.\n */\nexport const enum AttributeMarker {\n /**\n * An implicit marker which indicates that the value in the array are of `attributeKey`,\n * `attributeValue` format.\n *\n * NOTE: This is implicit as it is the type when no marker is present in array. We indicate that\n * it should not be present at runtime by the negative number.\n */\n ImplicitAttributes = -1,\n\n /**\n * Marker indicates that the following 3 values in the attributes array are:\n * namespaceUri, attributeName, attributeValue\n * in that order.\n */\n NamespaceURI = 0,\n\n /**\n * Signals class declaration.\n *\n * Each value following `Classes` designates a class name to include on the element.\n * ## Example:\n *\n * Given:\n * ```\n * <div class=\"foo bar baz\">...<d/vi>\n * ```\n *\n * the generated code is:\n * ```\n * var _c1 = [AttributeMarker.Classes, 'foo', 'bar', 'baz'];\n * ```\n */\n Classes = 1,\n\n /**\n * Signals style declaration.\n *\n * Each pair of values following `Styles` designates a style name and value to include on the\n * element.\n * ## Example:\n *\n * Given:\n * ```\n * <div style=\"width:100px; height:200px; color:red\">...</div>\n * ```\n *\n * the generated code is:\n * ```\n * var _c1 = [AttributeMarker.Styles, 'width', '100px', 'height'. '200px', 'color', 'red'];\n * ```\n */\n Styles = 2,\n\n /**\n * Signals that the following attribute names were extracted from input or output bindings.\n *\n * For example, given the following HTML:\n *\n * ```\n * <div moo=\"car\" [foo]=\"exp\" (bar)=\"doSth()\">\n * ```\n *\n * the generated code is:\n *\n * ```\n * var _c1 = ['moo', 'car', AttributeMarker.Bindings, 'foo', 'bar'];\n * ```\n */\n Bindings = 3,\n\n /**\n * Signals that the following attribute names were hoisted from an inline-template declaration.\n *\n * For example, given the following HTML:\n *\n * ```\n * <div *ngFor=\"let value of values; trackBy:trackBy\" dirA [dirB]=\"value\">\n * ```\n *\n * the generated code for the `template()` instruction would include:\n *\n * ```\n * ['dirA', '', AttributeMarker.Bindings, 'dirB', AttributeMarker.Template, 'ngFor', 'ngForOf',\n * 'ngForTrackBy', 'let-value']\n * ```\n *\n * while the generated code for the `element()` instruction inside the template function would\n * include:\n *\n * ```\n * ['dirA', '', AttributeMarker.Bindings, 'dirB']\n * ```\n */\n Template = 4,\n\n /**\n * Signals that the following attribute is `ngProjectAs` and its value is a parsed\n * `CssSelector`.\n *\n * For example, given the following HTML:\n *\n * ```\n * <h1 attr=\"value\" ngProjectAs=\"[title]\">\n * ```\n *\n * the generated code for the `element()` instruction would include:\n *\n * ```\n * ['attr', 'value', AttributeMarker.ProjectAs, ['', 'title', '']]\n * ```\n */\n ProjectAs = 5,\n\n /**\n * Signals that the following attribute will be translated by runtime i18n\n *\n * For example, given the following HTML:\n *\n * ```\n * <div moo=\"car\" foo=\"value\" i18n-foo [bar]=\"binding\" i18n-bar>\n * ```\n *\n * the generated code is:\n *\n * ```\n * var _c1 = ['moo', 'car', AttributeMarker.I18n, 'foo', 'bar'];\n */\n I18n = 6,\n}\n\n/**\n * A combination of:\n * - Attribute names and values.\n * - Special markers acting as flags to alter attributes processing.\n * - Parsed ngProjectAs selectors.\n */\nexport type TAttributes = (string|AttributeMarker|CssSelector)[];\n\n/**\n * Constants that are associated with a view. Includes:\n * - Attribute arrays.\n * - Local definition arrays.\n * - Translated messages (i18n).\n */\nexport type TConstants = (TAttributes|string)[];\n\n/**\n * Factory function that returns an array of consts. Consts can be represented as a function in\n * case any additional statements are required to define consts in the list. An example is i18n\n * where additional i18n calls are generated, which should be executed when consts are requested\n * for the first time.\n */\nexport type TConstantsFactory = () => TConstants;\n\n/**\n * TConstants type that describes how the `consts` field is generated on ComponentDef: it can be\n * either an array or a factory function that returns that array.\n */\nexport type TConstantsOrFactory = TConstants|TConstantsFactory;\n\n/**\n * Binding data (flyweight) for a particular node that is shared between all templates\n * of a specific type.\n *\n * If a property is:\n * - PropertyAliases: that property's data was generated and this is it\n * - Null: that property's data was already generated and nothing was found.\n * - Undefined: that property's data has not yet been generated\n *\n * see: https://en.wikipedia.org/wiki/Flyweight_pattern for more on the Flyweight pattern\n */\nexport interface TNode {\n /** The type of the TNode. See TNodeType. */\n type: TNodeType;\n\n /**\n * Index of the TNode in TView.data and corresponding native element in LView.\n *\n * This is necessary to get from any TNode to its corresponding native element when\n * traversing the node tree.\n *\n * If index is -1, this is a dynamically created container node or embedded view node.\n */\n index: number;\n\n /**\n * Insert before existing DOM node index.\n *\n * When DOM nodes are being inserted, normally they are being appended as they are created.\n * Under i18n case, the translated text nodes are created ahead of time as part of the\n * `ɵɵi18nStart` instruction which means that this `TNode` can't just be appended and instead\n * needs to be inserted using `insertBeforeIndex` semantics.\n *\n * Additionally sometimes it is necessary to insert new text nodes as a child of this `TNode`. In\n * such a case the value stores an array of text nodes to insert.\n *\n * Example:\n * ```\n * <div i18n>\n * Hello <span>World</span>!\n * </div>\n * ```\n * In the above example the `ɵɵi18nStart` instruction can create `Hello `, `World` and `!` text\n * nodes. It can also insert `Hello ` and `!` text node as a child of `<div>`, but it can't\n * insert `World` because the `<span>` node has not yet been created. In such a case the\n * `<span>` `TNode` will have an array which will direct the `<span>` to not only insert\n * itself in front of `!` but also to insert the `World` (created by `ɵɵi18nStart`) into\n * `<span>` itself.\n *\n * Pseudo code:\n * ```\n * if (insertBeforeIndex === null) {\n * // append as normal\n * } else if (Array.isArray(insertBeforeIndex)) {\n * // First insert current `TNode` at correct location\n * const currentNode = lView[this.index];\n * parentNode.insertBefore(currentNode, lView[this.insertBeforeIndex[0]]);\n * // Now append all of the children\n * for(let i=1; i<this.insertBeforeIndex; i++) {\n * currentNode.appendChild(lView[this.insertBeforeIndex[i]]);\n * }\n * } else {\n * parentNode.insertBefore(lView[this.index], lView[this.insertBeforeIndex])\n * }\n * ```\n * - null: Append as normal using `parentNode.appendChild`\n * - `number`: Append using\n * `parentNode.insertBefore(lView[this.index], lView[this.insertBeforeIndex])`\n *\n * *Initialization*\n *\n * Because `ɵɵi18nStart` executes before nodes are created, on `TView.firstCreatePass` it is not\n * possible for `ɵɵi18nStart` to set the `insertBeforeIndex` value as the corresponding `TNode`\n * has not yet been created. For this reason the `ɵɵi18nStart` creates a `TNodeType.Placeholder`\n * `TNode` at that location. See `TNodeType.Placeholder` for more information.\n */\n insertBeforeIndex: InsertBeforeIndex;\n\n /**\n * The index of the closest injector in this node's LView.\n *\n * If the index === -1, there is no injector on this node or any ancestor node in this view.\n *\n * If the index !== -1, it is the index of this node's injector OR the index of a parent\n * injector in the same view. We pass the parent injector index down the node tree of a view so\n * it's possible to find the parent injector without walking a potentially deep node tree.\n * Injector indices are not set across view boundaries because there could be multiple component\n * hosts.\n *\n * If tNode.injectorIndex === tNode.parent.injectorIndex, then the index belongs to a parent\n * injector.\n */\n injectorIndex: number;\n\n /**\n * Stores starting index of the directives.\n *\n * NOTE: The first directive is always component (if present).\n */\n directiveStart: number;\n\n /**\n * Stores final exclusive index of the directives.\n *\n * The area right behind the `directiveStart-directiveEnd` range is used to allocate the\n * `HostBindingFunction` `vars` (or null if no bindings.) Therefore `directiveEnd` is used to set\n * `LFrame.bindingRootIndex` before `HostBindingFunction` is executed.\n */\n directiveEnd: number;\n\n /**\n * Stores the last directive which had a styling instruction.\n *\n * Initial value of this is `-1` which means that no `hostBindings` styling instruction has\n * executed. As `hostBindings` instructions execute they set the value to the index of the\n * `DirectiveDef` which contained the last `hostBindings` styling instruction.\n *\n * Valid values are:\n * - `-1` No `hostBindings` instruction has executed.\n * - `directiveStart <= directiveStylingLast < directiveEnd`: Points to the `DirectiveDef` of\n * the last styling instruction which executed in the `hostBindings`.\n *\n * This data is needed so that styling instructions know which static styling data needs to be\n * collected from the `DirectiveDef.hostAttrs`. A styling instruction needs to collect all data\n * since last styling instruction.\n */\n directiveStylingLast: number;\n\n /**\n * Stores indexes of property bindings. This field is only set in the ngDevMode and holds\n * indexes of property bindings so TestBed can get bound property metadata for a given node.\n */\n propertyBindings: number[]|null;\n\n /**\n * Stores if Node isComponent, isProjected, hasContentQuery, hasClassInput and hasStyleInput\n * etc.\n */\n flags: TNodeFlags;\n\n /**\n * This number stores two values using its bits:\n *\n * - the index of the first provider on that node (first 16 bits)\n * - the count of view providers from the component on this node (last 16 bits)\n */\n // TODO(misko): break this into actual vars.\n providerIndexes: TNodeProviderIndexes;\n\n /**\n * The value name associated with this node.\n * if type:\n * `TNodeType.Text`: text value\n * `TNodeType.Element`: tag name\n * `TNodeType.ICUContainer`: `TIcu`\n */\n value: any;\n\n /**\n * Attributes associated with an element. We need to store attributes to support various\n * use-cases (attribute injection, content projection with selectors, directives matching).\n * Attributes are stored statically because reading them from the DOM would be way too slow for\n * content projection and queries.\n *\n * Since attrs will always be calculated first, they will never need to be marked undefined by\n * other instructions.\n *\n * For regular attributes a name of an attribute and its value alternate in the array.\n * e.g. ['role', 'checkbox']\n * This array can contain flags that will indicate \"special attributes\" (attributes with\n * namespaces, attributes extracted from bindings and outputs).\n */\n attrs: TAttributes|null;\n\n /**\n * Same as `TNode.attrs` but contains merged data across all directive host bindings.\n *\n * We need to keep `attrs` as unmerged so that it can be used for attribute selectors.\n * We merge attrs here so that it can be used in a performant way for initial rendering.\n *\n * The `attrs` are merged in first pass in following order:\n * - Component's `hostAttrs`\n * - Directives' `hostAttrs`\n * - Template `TNode.attrs` associated with the current `TNode`.\n */\n mergedAttrs: TAttributes|null;\n\n /**\n * A set of local names under which a given element is exported in a template and\n * visible to queries. An entry in this array can be created for different reasons:\n * - an element itself is referenced, ex.: `<div #foo>`\n * - a component is referenced, ex.: `<my-cmpt #foo>`\n * - a directive is referenced, ex.: `<my-cmpt #foo=\"directiveExportAs\">`.\n *\n * A given element might have different local names and those names can be associated\n * with a directive. We store local names at even indexes while odd indexes are reserved\n * for directive index in a view (or `-1` if there is no associated directive).\n *\n * Some examples:\n * - `<div #foo>` => `[\"foo\", -1]`\n * - `<my-cmpt #foo>` => `[\"foo\", myCmptIdx]`\n * - `<my-cmpt #foo #bar=\"directiveExportAs\">` => `[\"foo\", myCmptIdx, \"bar\", directiveIdx]`\n * - `<div #foo #bar=\"directiveExportAs\">` => `[\"foo\", -1, \"bar\", directiveIdx]`\n */\n localNames: (string|number)[]|null;\n\n /** Information about input properties that need to be set once from attribute data. */\n initialInputs: InitialInputData|null|undefined;\n\n /**\n * Input data for all directives on this node. `null` means that there are no directives with\n * inputs on this node.\n */\n inputs: PropertyAliases|null;\n\n /**\n * Output data for all directives on this node. `null` means that there are no directives with\n * outputs on this node.\n */\n outputs: PropertyAliases|null;\n\n /**\n * The TView or TViews attached to this node.\n *\n * If this TNode corresponds to an LContainer with inline views, the container will\n * need to store separate static data for each of its view blocks (TView[]). Otherwise,\n * nodes in inline views with the same index as nodes in their parent views will overwrite\n * each other, as they are in the same template.\n *\n * Each index in this array corresponds to the static data for a certain\n * view. So if you had V(0) and V(1) in a container, you might have:\n *\n * [\n * [{tagName: 'div', attrs: ...}, null], // V(0) TView\n * [{tagName: 'button', attrs ...}, null] // V(1) TView\n *\n * If this TNode corresponds to an LContainer with a template (e.g. structural\n * directive), the template's TView will be stored here.\n *\n * If this TNode corresponds to an element, tViews will be null .\n */\n tViews: TView|TView[]|null;\n\n /**\n * The next sibling node. Necessary so we can propagate through the root nodes of a view\n * to insert them or remove them from the DOM.\n */\n next: TNode|null;\n\n /**\n * The next projected sibling. Since in Angular content projection works on the node-by-node\n * basis the act of projecting nodes might change nodes relationship at the insertion point\n * (target view). At the same time we need to keep initial relationship between nodes as\n * expressed in content view.\n */\n projectionNext: TNode|null;\n\n /**\n * First child of the current node.\n *\n * For component nodes, the child will always be a ContentChild (in same view).\n * For embedded view nodes, the child will be in their child view.\n */\n child: TNode|null;\n\n /**\n * Parent node (in the same view only).\n *\n * We need a reference to a node's parent so we can append the node to its parent's native\n * element at the appropriate time.\n *\n * If the parent would be in a different view (e.g. component host), this property will be null.\n * It's important that we don't try to cross component boundaries when retrieving the parent\n * because the parent will change (e.g. index, attrs) depending on where the component was\n * used (and thus shouldn't be stored on TNode). In these cases, we retrieve the parent through\n * LView.node instead (which will be instance-specific).\n *\n * If this is an inline view node (V), the parent will be its container.\n */\n parent: TElementNode|TContainerNode|null;\n\n /**\n * List of projected TNodes for a given component host element OR index into the said nodes.\n *\n * For easier discussion assume this example:\n * `<parent>`'s view definition:\n * ```\n * <child id=\"c1\">content1</child>\n * <child id=\"c2\"><span>content2</span></child>\n * ```\n * `<child>`'s view definition:\n * ```\n * <ng-content id=\"cont1\"></ng-content>\n * ```\n *\n * If `Array.isArray(projection)` then `TNode` is a host element:\n * - `projection` stores the content nodes which are to be projected.\n * - The nodes represent categories defined by the selector: For example:\n * `<ng-content/><ng-content select=\"abc\"/>` would represent the heads for `<ng-content/>`\n * and `<ng-content select=\"abc\"/>` respectively.\n * - The nodes we store in `projection` are heads only, we used `.next` to get their\n * siblings.\n * - The nodes `.next` is sorted/rewritten as part of the projection setup.\n * - `projection` size is equal to the number of projections `<ng-content>`. The size of\n * `c1` will be `1` because `<child>` has only one `<ng-content>`.\n * - we store `projection` with the host (`c1`, `c2`) rather than the `<ng-content>` (`cont1`)\n * because the same component (`<child>`) can be used in multiple locations (`c1`, `c2`) and\n * as a result have different set of nodes to project.\n * - without `projection` it would be difficult to efficiently traverse nodes to be projected.\n *\n * If `typeof projection == 'number'` then `TNode` is a `<ng-content>` element:\n * - `projection` is an index of the host's `projection`Nodes.\n * - This would return the first head node to project:\n * `getHost(currentTNode).projection[currentTNode.projection]`.\n * - When projecting nodes the parent node retrieved may be a `<ng-content>` node, in which case\n * the process is recursive in nature.\n *\n * If `projection` is of type `RNode[][]` than we have a collection of native nodes passed as\n * projectable nodes during dynamic component creation.\n */\n projection: (TNode|RNode[])[]|number|null;\n\n /**\n * A collection of all `style` static values for an element (including from host).\n *\n * This field will be populated if and when:\n *\n * - There are one or more initial `style`s on an element (e.g. `<div style=\"width:200px;\">`)\n * - There are one or more initial `style`s on a directive/component host\n * (e.g. `@Directive({host: {style: \"width:200px;\" } }`)\n */\n styles: string|null;\n\n\n /**\n * A collection of all `style` static values for an element excluding host sources.\n *\n * Populated when there are one or more initial `style`s on an element\n * (e.g. `<div style=\"width:200px;\">`)\n * Must be stored separately from `tNode.styles` to facilitate setting directive\n * inputs that shadow the `style` property. If we used `tNode.styles` as is for shadowed inputs,\n * we would feed host styles back into directives as \"inputs\". If we used `tNode.attrs`, we\n * would have to concatenate the attributes on every template pass. Instead, we process once on\n * first create pass and store here.\n */\n stylesWithoutHost: string|null;\n\n /**\n * A `KeyValueArray` version of residual `styles`.\n *\n * When there are styling instructions than each instruction stores the static styling\n * which is of lower priority than itself. This means that there may be a higher priority\n * styling than the instruction.\n *\n * Imagine:\n * ```\n * <div style=\"color: highest;\" my-dir>\n *\n * @Directive({\n * host: {\n * style: 'color: lowest; ',\n * '[styles.color]': 'exp' // ɵɵstyleProp('color', ctx.exp);\n * }\n * })\n * ```\n *\n * In the above case:\n * - `color: lowest` is stored with `ɵɵstyleProp('color', ctx.exp);` instruction\n * - `color: highest` is the residual and is stored here.\n *\n * - `undefined': not initialized.\n * - `null`: initialized but `styles` is `null`\n * - `KeyValueArray`: parsed version of `styles`.\n */\n residualStyles: KeyValueArray<any>|undefined|null;\n\n /**\n * A collection of all class static values for an element (including from host).\n *\n * This field will be populated if and when:\n *\n * - There are one or more initial classes on an element (e.g. `<div class=\"one two three\">`)\n * - There are one or more initial classes on an directive/component host\n * (e.g. `@Directive({host: {class: \"SOME_CLASS\" } }`)\n */\n classes: string|null;\n\n /**\n * A collection of all class static values for an element excluding host sources.\n *\n * Populated when there are one or more initial classes on an element\n * (e.g. `<div class=\"SOME_CLASS\">`)\n * Must be stored separately from `tNode.classes` to facilitate setting directive\n * inputs that shadow the `class` property. If we used `tNode.classes` as is for shadowed\n * inputs, we would feed host classes back into directives as \"inputs\". If we used\n * `tNode.attrs`, we would have to concatenate the attributes on every template pass. Instead,\n * we process once on first create pass and store here.\n */\n classesWithoutHost: string|null;\n\n /**\n * A `KeyValueArray` version of residual `classes`.\n *\n * Same as `TNode.residualStyles` but for classes.\n *\n * - `undefined': not initialized.\n * - `null`: initialized but `classes` is `null`\n * - `KeyValueArray`: parsed version of `classes`.\n */\n residualClasses: KeyValueArray<any>|undefined|null;\n\n /**\n * Stores the head/tail index of the class bindings.\n *\n * - If no bindings, the head and tail will both be 0.\n * - If there are template bindings, stores the head/tail of the class bindings in the template.\n * - If no template bindings but there are host bindings, the head value will point to the last\n * host binding for \"class\" (not the head of the linked list), tail will be 0.\n *\n * See: `style_binding_list.ts` for details.\n *\n * This is used by `insertTStylingBinding` to know where the next styling binding should be\n * inserted so that they can be sorted in priority order.\n */\n classBindings: TStylingRange;\n\n /**\n * Stores the head/tail index of the class bindings.\n *\n * - If no bindings, the head and tail will both be 0.\n * - If there are template bindings, stores the head/tail of the style bindings in the template.\n * - If no template bindings but there are host bindings, the head value will point to the last\n * host binding for \"style\" (not the head of the linked list), tail will be 0.\n *\n * See: `style_binding_list.ts` for details.\n *\n * This is used by `insertTStylingBinding` to know where the next styling binding should be\n * inserted so that they can be sorted in priority order.\n */\n styleBindings: TStylingRange;\n}\n\n/**\n * See `TNode.insertBeforeIndex`\n */\nexport type InsertBeforeIndex = null|number|number[];\n\n/** Static data for an element */\nexport interface TElementNode extends TNode {\n /** Index in the data[] array */\n index: number;\n child: TElementNode|TTextNode|TElementContainerNode|TContainerNode|TProjectionNode|null;\n /**\n * Element nodes will have parents unless they are the first node of a component or\n * embedded view (which means their parent is in a different view and must be\n * retrieved using viewData[HOST_NODE]).\n */\n parent: TElementNode|TElementContainerNode|null;\n tViews: null;\n\n /**\n * If this is a component TNode with projection, this will be an array of projected\n * TNodes or native nodes (see TNode.projection for more info). If it's a regular element node\n * or a component without projection, it will be null.\n */\n projection: (TNode|RNode[])[]|null;\n\n /**\n * Stores TagName\n */\n value: string;\n}\n\n/** Static data for a text node */\nexport interface TTextNode extends TNode {\n /** Index in the data[] array */\n index: number;\n child: null;\n /**\n * Text nodes will have parents unless they are the first node of a component or\n * embedded view (which means their parent is in a different view and must be\n * retrieved using LView.node).\n */\n parent: TElementNode|TElementContainerNode|null;\n tViews: null;\n projection: null;\n}\n\n/** Static data for an LContainer */\nexport interface TContainerNode extends TNode {\n /**\n * Index in the data[] array.\n *\n * If it's -1, this is a dynamically created container node that isn't stored in\n * data[] (e.g. when you inject ViewContainerRef) .\n */\n index: number;\n child: null;\n\n /**\n * Container nodes will have parents unless:\n *\n * - They are the first node of a component or embedded view\n * - They are dynamically created\n */\n parent: TElementNode|TElementContainerNode|null;\n tViews: TView|TView[]|null;\n projection: null;\n value: null;\n}\n\n/** Static data for an <ng-container> */\nexport interface TElementContainerNode extends TNode {\n /** Index in the LView[] array. */\n index: number;\n child: TElementNode|TTextNode|TContainerNode|TElementContainerNode|TProjectionNode|null;\n parent: TElementNode|TElementContainerNode|null;\n tViews: null;\n projection: null;\n}\n\n/** Static data for an ICU expression */\nexport interface TIcuContainerNode extends TNode {\n /** Index in the LView[] array. */\n index: number;\n child: null;\n parent: TElementNode|TElementContainerNode|null;\n tViews: null;\n projection: null;\n value: TIcu;\n}\n\n/** Static data for an LProjectionNode */\nexport interface TProjectionNode extends TNode {\n /** Index in the data[] array */\n child: null;\n /**\n * Projection nodes will have parents unless they are the first node of a component\n * or embedded view (which means their parent is in a different view and must be\n * retrieved using LView.node).\n */\n parent: TElementNode|TElementContainerNode|null;\n tViews: null;\n\n /** Index of the projection node. (See TNode.projection for more info.) */\n projection: number;\n value: null;\n}\n\n/**\n * A union type representing all TNode types that can host a directive.\n */\nexport type TDirectiveHostNode = TElementNode|TContainerNode|TElementContainerNode;\n\n/**\n * This mapping is necessary so we can set input properties and output listeners\n * properly at runtime when property names are minified or aliased.\n *\n * Key: unminified / public input or output name\n * Value: array containing minified / internal name and related directive index\n *\n * The value must be an array to support inputs and outputs with the same name\n * on the same node.\n */\nexport type PropertyAliases = {\n // This uses an object map because using the Map type would be too slow\n [key: string]: PropertyAliasValue\n};\n\n/**\n * Store the runtime input or output names for all the directives.\n *\n * i+0: directive instance index\n * i+1: privateName\n *\n * e.g. [0, 'change-minified']\n */\nexport type PropertyAliasValue = (number|string)[];\n\n/**\n * This array contains information about input properties that\n * need to be set once from attribute data. It's ordered by\n * directive index (relative to element) so it's simple to\n * look up a specific directive's initial input data.\n *\n * Within each sub-array:\n *\n * i+0: attribute name\n * i+1: minified/internal input name\n * i+2: initial value\n *\n * If a directive on a node does not have any input properties\n * that should be set from attributes, its index is set to null\n * to avoid a sparse array.\n *\n * e.g. [null, ['role-min', 'minified-input', 'button']]\n */\nexport type InitialInputData = (InitialInputs|null)[];\n\n/**\n * Used by InitialInputData to store input properties\n * that should be set once from attributes.\n *\n * i+0: attribute name\n * i+1: minified/internal input name\n * i+2: initial value\n *\n * e.g. ['role-min', 'minified-input', 'button']\n */\nexport type InitialInputs = string[];\n\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nexport const unusedValueExportToPlacateAjd = 1;\n\n/**\n * Type representing a set of TNodes that can have local refs (`#foo`) placed on them.\n */\nexport type TNodeWithLocalRefs = TContainerNode|TElementNode|TElementContainerNode;\n\n/**\n * Type for a function that extracts a value for a local refs.\n * Example:\n * - `<div #nativeDivEl>` - `nativeDivEl` should point to the native `<div>` element;\n * - `<ng-template #tplRef>` - `tplRef` should point to the `TemplateRef` instance;\n */\nexport type LocalRefExtractor = (tNode: TNodeWithLocalRefs, currentView: LView) => any;\n\n/**\n * Returns `true` if the `TNode` has a directive which has `@Input()` for `class` binding.\n *\n * ```\n * <div my-dir [class]=\"exp\"></div>\n * ```\n * and\n * ```\n * @Directive({\n * })\n * class MyDirective {\n * @Input()\n * class: string;\n * }\n * ```\n *\n * In the above case it is necessary to write the reconciled styling information into the\n * directive's input.\n *\n * @param tNode\n */\nexport function hasClassInput(tNode: TNode) {\n return (tNode.flags & TNodeFlags.hasClassInput) !== 0;\n}\n\n/**\n * Returns `true` if the `TNode` has a directive which has `@Input()` for `style` binding.\n *\n * ```\n * <div my-dir [style]=\"exp\"></div>\n * ```\n * and\n * ```\n * @Directive({\n * })\n * class MyDirective {\n * @Input()\n * class: string;\n * }\n * ```\n *\n * In the above case it is necessary to write the reconciled styling information into the\n * directive's input.\n *\n * @param tNode\n */\nexport function hasStyleInput(tNode: TNode) {\n return (tNode.flags & TNodeFlags.hasStyleInput) !== 0;\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 {assertDefined, throwError} from '../util/assert';\nimport {TNode, TNodeType, toTNodeTypeAsString} from './interfaces/node';\n\nexport function assertTNodeType(\n tNode: TNode|null, expectedTypes: TNodeType, message?: string): void {\n assertDefined(tNode, 'should be called with a TNode');\n if ((tNode.type & expectedTypes) === 0) {\n throwError(\n message ||\n `Expected [${toTNodeTypeAsString(expectedTypes)}] but got ${\n toTNodeTypeAsString(tNode.type)}.`);\n }\n}\n\nexport function assertPureTNodeType(type: TNodeType) {\n if (!(type === TNodeType.Element || //\n type === TNodeType.Text || //\n type === TNodeType.Container || //\n type === TNodeType.ElementContainer || //\n type === TNodeType.Icu || //\n type === TNodeType.Projection || //\n type === TNodeType.Placeholder)) {\n throwError(`Expected TNodeType to have only a single type selected, but got ${\n toTNodeTypeAsString(type)}.`);\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 */\nimport {CharCode} from '../../util/char_code';\nimport {AttributeMarker, TAttributes} from '../interfaces/node';\nimport {CssSelector} from '../interfaces/projection';\nimport {isProceduralRenderer, ProceduralRenderer3, Renderer3} from '../interfaces/renderer';\nimport {RElement} from '../interfaces/renderer_dom';\n\n\n\n/**\n * Assigns all attribute values to the provided element via the inferred renderer.\n *\n * This function accepts two forms of attribute entries:\n *\n * default: (key, value):\n * attrs = [key1, value1, key2, value2]\n *\n * namespaced: (NAMESPACE_MARKER, uri, name, value)\n * attrs = [NAMESPACE_MARKER, uri, name, value, NAMESPACE_MARKER, uri, name, value]\n *\n * The `attrs` array can contain a mix of both the default and namespaced entries.\n * The \"default\" values are set without a marker, but if the function comes across\n * a marker value then it will attempt to set a namespaced value. If the marker is\n * not of a namespaced value then the function will quit and return the index value\n * where it stopped during the iteration of the attrs array.\n *\n * See [AttributeMarker] to understand what the namespace marker value is.\n *\n * Note that this instruction does not support assigning style and class values to\n * an element. See `elementStart` and `elementHostAttrs` to learn how styling values\n * are applied to an element.\n * @param renderer The renderer to be used\n * @param native The element that the attributes will be assigned to\n * @param attrs The attribute array of values that will be assigned to the element\n * @returns the index value that was last accessed in the attributes array\n */\nexport function setUpAttributes(renderer: Renderer3, native: RElement, attrs: TAttributes): number {\n const isProc = isProceduralRenderer(renderer);\n\n let i = 0;\n while (i < attrs.length) {\n const value = attrs[i];\n if (typeof value === 'number') {\n // only namespaces are supported. Other value types (such as style/class\n // entries) are not supported in this function.\n if (value !== AttributeMarker.NamespaceURI) {\n break;\n }\n\n // we just landed on the marker value ... therefore\n // we should skip to the next entry\n i++;\n\n const namespaceURI = attrs[i++] as string;\n const attrName = attrs[i++] as string;\n const attrVal = attrs[i++] as string;\n ngDevMode && ngDevMode.rendererSetAttribute++;\n isProc ?\n (renderer as ProceduralRenderer3).setAttribute(native, attrName, attrVal, namespaceURI) :\n native.setAttributeNS(namespaceURI, attrName, attrVal);\n } else {\n // attrName is string;\n const attrName = value as string;\n const attrVal = attrs[++i];\n // Standard attributes\n ngDevMode && ngDevMode.rendererSetAttribute++;\n if (isAnimationProp(attrName)) {\n if (isProc) {\n (renderer as ProceduralRenderer3).setProperty(native, attrName, attrVal);\n }\n } else {\n isProc ?\n (renderer as ProceduralRenderer3).setAttribute(native, attrName, attrVal as string) :\n native.setAttribute(attrName, attrVal as string);\n }\n i++;\n }\n }\n\n // another piece of code may iterate over the same attributes array. Therefore\n // it may be helpful to return the exact spot where the attributes array exited\n // whether by running into an unsupported marker or if all the static values were\n // iterated over.\n return i;\n}\n\n/**\n * Test whether the given value is a marker that indicates that the following\n * attribute values in a `TAttributes` array are only the names of attributes,\n * and not name-value pairs.\n * @param marker The attribute marker to test.\n * @returns true if the marker is a \"name-only\" marker (e.g. `Bindings`, `Template` or `I18n`).\n */\nexport function isNameOnlyAttributeMarker(marker: string|AttributeMarker|CssSelector) {\n return marker === AttributeMarker.Bindings || marker === AttributeMarker.Template ||\n marker === AttributeMarker.I18n;\n}\n\nexport function isAnimationProp(name: string): boolean {\n // Perf note: accessing charCodeAt to check for the first character of a string is faster as\n // compared to accessing a character at index 0 (ex. name[0]). The main reason for this is that\n // charCodeAt doesn't allocate memory to return a substring.\n return name.charCodeAt(0) === CharCode.AT_SIGN;\n}\n\n/**\n * Merges `src` `TAttributes` into `dst` `TAttributes` removing any duplicates in the process.\n *\n * This merge function keeps the order of attrs same.\n *\n * @param dst Location of where the merged `TAttributes` should end up.\n * @param src `TAttributes` which should be appended to `dst`\n */\nexport function mergeHostAttrs(dst: TAttributes|null, src: TAttributes|null): TAttributes|null {\n if (src === null || src.length === 0) {\n // do nothing\n } else if (dst === null || dst.length === 0) {\n // We have source, but dst is empty, just make a copy.\n dst = src.slice();\n } else {\n let srcMarker: AttributeMarker = AttributeMarker.ImplicitAttributes;\n for (let i = 0; i < src.length; i++) {\n const item = src[i];\n if (typeof item === 'number') {\n srcMarker = item;\n } else {\n if (srcMarker === AttributeMarker.NamespaceURI) {\n // Case where we need to consume `key1`, `key2`, `value` items.\n } else if (\n srcMarker === AttributeMarker.ImplicitAttributes ||\n srcMarker === AttributeMarker.Styles) {\n // Case where we have to consume `key1` and `value` only.\n mergeHostAttribute(dst, srcMarker, item as string, null, src[++i] as string);\n } else {\n // Case where we have to consume `key1` only.\n mergeHostAttribute(dst, srcMarker, item as string, null, null);\n }\n }\n }\n }\n return dst;\n}\n\n/**\n * Append `key`/`value` to existing `TAttributes` taking region marker and duplicates into account.\n *\n * @param dst `TAttributes` to append to.\n * @param marker Region where the `key`/`value` should be added.\n * @param key1 Key to add to `TAttributes`\n * @param key2 Key to add to `TAttributes` (in case of `AttributeMarker.NamespaceURI`)\n * @param value Value to add or to overwrite to `TAttributes` Only used if `marker` is not Class.\n */\nexport function mergeHostAttribute(\n dst: TAttributes, marker: AttributeMarker, key1: string, key2: string|null,\n value: string|null): void {\n let i = 0;\n // Assume that new markers will be inserted at the end.\n let markerInsertPosition = dst.length;\n // scan until correct type.\n if (marker === AttributeMarker.ImplicitAttributes) {\n markerInsertPosition = -1;\n } else {\n while (i < dst.length) {\n const dstValue = dst[i++];\n if (typeof dstValue === 'number') {\n if (dstValue === marker) {\n markerInsertPosition = -1;\n break;\n } else if (dstValue > marker) {\n // We need to save this as we want the markers to be inserted in specific order.\n markerInsertPosition = i - 1;\n break;\n }\n }\n }\n }\n\n // search until you find place of insertion\n while (i < dst.length) {\n const item = dst[i];\n if (typeof item === 'number') {\n // since `i` started as the index after the marker, we did not find it if we are at the next\n // marker\n break;\n } else if (item === key1) {\n // We already have same token\n if (key2 === null) {\n if (value !== null) {\n dst[i + 1] = value;\n }\n return;\n } else if (key2 === dst[i + 1]) {\n dst[i + 2] = value!;\n return;\n }\n }\n // Increment counter.\n i++;\n if (key2 !== null) i++;\n if (value !== null) i++;\n }\n\n // insert at location.\n if (markerInsertPosition !== -1) {\n dst.splice(markerInsertPosition, 0, marker);\n i = markerInsertPosition + 1;\n }\n dst.splice(i++, 0, key1);\n if (key2 !== null) {\n dst.splice(i++, 0, key2);\n }\n if (value !== null) {\n dst.splice(i++, 0, 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 {assertGreaterThan, assertNotEqual, assertNumber} from '../../util/assert';\nimport {NO_PARENT_INJECTOR, RelativeInjectorLocation, RelativeInjectorLocationFlags} from '../interfaces/injector';\nimport {DECLARATION_VIEW, HEADER_OFFSET, LView} from '../interfaces/view';\n\n\n/// Parent Injector Utils ///////////////////////////////////////////////////////////////\nexport function hasParentInjector(parentLocation: RelativeInjectorLocation): boolean {\n return parentLocation !== NO_PARENT_INJECTOR;\n}\n\nexport function getParentInjectorIndex(parentLocation: RelativeInjectorLocation): number {\n ngDevMode && assertNumber(parentLocation, 'Number expected');\n ngDevMode && assertNotEqual(parentLocation as any, -1, 'Not a valid state.');\n const parentInjectorIndex =\n (parentLocation as any as number) & RelativeInjectorLocationFlags.InjectorIndexMask;\n ngDevMode &&\n assertGreaterThan(\n parentInjectorIndex, HEADER_OFFSET,\n 'Parent injector must be pointing past HEADER_OFFSET.');\n return (parentLocation as any as number) & RelativeInjectorLocationFlags.InjectorIndexMask;\n}\n\nexport function getParentInjectorViewOffset(parentLocation: RelativeInjectorLocation): number {\n return (parentLocation as any as number) >> RelativeInjectorLocationFlags.ViewOffsetShift;\n}\n\n/**\n * Unwraps a parent injector location number to find the view offset from the current injector,\n * then walks up the declaration view tree until the view is found that contains the parent\n * injector.\n *\n * @param location The location of the parent injector, which contains the view offset\n * @param startView The LView instance from which to start walking up the view tree\n * @returns The LView instance that contains the parent injector\n */\nexport function getParentInjectorView(location: RelativeInjectorLocation, startView: LView): LView {\n let viewOffset = getParentInjectorViewOffset(location);\n let parentView = startView;\n // For most cases, the parent injector can be found on the host node (e.g. for component\n // or container), but we must keep the loop here to support the rarer case of deeply nested\n // <ng-template> tags or inline views, where the parent injector might live many views\n // above the child injector.\n while (viewOffset > 0) {\n parentView = parentView[DECLARATION_VIEW]!;\n viewOffset--;\n }\n return parentView;\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 {isForwardRef, resolveForwardRef} from '../di/forward_ref';\nimport {injectRootLimpMode, setInjectImplementation} from '../di/inject_switch';\nimport {Injector} from '../di/injector';\nimport {InjectorMarkers} from '../di/injector_marker';\nimport {InjectFlags} from '../di/interface/injector';\nimport {ProviderToken} from '../di/provider_token';\nimport {Type} from '../interface/type';\nimport {assertDefined, assertEqual, assertIndexInRange} from '../util/assert';\nimport {noSideEffects} from '../util/closure';\n\nimport {assertDirectiveDef, assertNodeInjector, assertTNodeForLView} from './assert';\nimport {FactoryFn, getFactoryDef} from './definition_factory';\nimport {throwCyclicDependencyError, throwProviderNotFoundError} from './errors_di';\nimport {NG_ELEMENT_ID, NG_FACTORY_DEF} from './fields';\nimport {registerPreOrderHooks} from './hooks';\nimport {DirectiveDef} from './interfaces/definition';\nimport {isFactory, NO_PARENT_INJECTOR, NodeInjectorFactory, NodeInjectorOffset, RelativeInjectorLocation, RelativeInjectorLocationFlags} from './interfaces/injector';\nimport {AttributeMarker, TContainerNode, TDirectiveHostNode, TElementContainerNode, TElementNode, TNode, TNodeProviderIndexes, TNodeType} from './interfaces/node';\nimport {isComponentDef, isComponentHost} from './interfaces/type_checks';\nimport {DECLARATION_COMPONENT_VIEW, DECLARATION_VIEW, INJECTOR, LView, T_HOST, TData, TVIEW, TView, TViewType} from './interfaces/view';\nimport {assertTNodeType} from './node_assert';\nimport {enterDI, getCurrentTNode, getLView, leaveDI} from './state';\nimport {isNameOnlyAttributeMarker} from './util/attrs_utils';\nimport {getParentInjectorIndex, getParentInjectorView, hasParentInjector} from './util/injector_utils';\nimport {stringifyForError} from './util/stringify_utils';\n\n\n\n/**\n * Defines if the call to `inject` should include `viewProviders` in its resolution.\n *\n * This is set to true when we try to instantiate a component. This value is reset in\n * `getNodeInjectable` to a value which matches the declaration location of the token about to be\n * instantiated. This is done so that if we are injecting a token which was declared outside of\n * `viewProviders` we don't accidentally pull `viewProviders` in.\n *\n * Example:\n *\n * ```\n * @Injectable()\n * class MyService {\n * constructor(public value: String) {}\n * }\n *\n * @Component({\n * providers: [\n * MyService,\n * {provide: String, value: 'providers' }\n * ]\n * viewProviders: [\n * {provide: String, value: 'viewProviders'}\n * ]\n * })\n * class MyComponent {\n * constructor(myService: MyService, value: String) {\n * // We expect that Component can see into `viewProviders`.\n * expect(value).toEqual('viewProviders');\n * // `MyService` was not declared in `viewProviders` hence it can't see it.\n * expect(myService.value).toEqual('providers');\n * }\n * }\n *\n * ```\n */\nlet includeViewProviders = true;\n\nexport function setIncludeViewProviders(v: boolean): boolean {\n const oldValue = includeViewProviders;\n includeViewProviders = v;\n return oldValue;\n}\n\n/**\n * The number of slots in each bloom filter (used by DI). The larger this number, the fewer\n * directives that will share slots, and thus, the fewer false positives when checking for\n * the existence of a directive.\n */\nconst BLOOM_SIZE = 256;\nconst BLOOM_MASK = BLOOM_SIZE - 1;\n\n/**\n * The number of bits that is represented by a single bloom bucket. JS bit operations are 32 bits,\n * so each bucket represents 32 distinct tokens which accounts for log2(32) = 5 bits of a bloom hash\n * number.\n */\nconst BLOOM_BUCKET_BITS = 5;\n\n/** Counter used to generate unique IDs for directives. */\nlet nextNgElementId = 0;\n\n/**\n * Registers this directive as present in its node's injector by flipping the directive's\n * corresponding bit in the injector's bloom filter.\n *\n * @param injectorIndex The index of the node injector where this token should be registered\n * @param tView The TView for the injector's bloom filters\n * @param type The directive token to register\n */\nexport function bloomAdd(\n injectorIndex: number, tView: TView, type: ProviderToken<any>|string): void {\n ngDevMode && assertEqual(tView.firstCreatePass, true, 'expected firstCreatePass to be true');\n let id: number|undefined;\n if (typeof type === 'string') {\n id = type.charCodeAt(0) || 0;\n } else if (type.hasOwnProperty(NG_ELEMENT_ID)) {\n id = (type as any)[NG_ELEMENT_ID];\n }\n\n // Set a unique ID on the directive type, so if something tries to inject the directive,\n // we can easily retrieve the ID and hash it into the bloom bit that should be checked.\n if (id == null) {\n id = (type as any)[NG_ELEMENT_ID] = nextNgElementId++;\n }\n\n // We only have BLOOM_SIZE (256) slots in our bloom filter (8 buckets * 32 bits each),\n // so all unique IDs must be modulo-ed into a number from 0 - 255 to fit into the filter.\n const bloomHash = id & BLOOM_MASK;\n\n // Create a mask that targets the specific bit associated with the directive.\n // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding\n // to bit positions 0 - 31 in a 32 bit integer.\n const mask = 1 << bloomHash;\n\n // Each bloom bucket in `tData` represents `BLOOM_BUCKET_BITS` number of bits of `bloomHash`.\n // Any bits in `bloomHash` beyond `BLOOM_BUCKET_BITS` indicate the bucket offset that the mask\n // should be written to.\n (tView.data as number[])[injectorIndex + (bloomHash >> BLOOM_BUCKET_BITS)] |= mask;\n}\n\n/**\n * Creates (or gets an existing) injector for a given element or container.\n *\n * @param tNode for which an injector should be retrieved / created.\n * @param lView View where the node is stored\n * @returns Node injector\n */\nexport function getOrCreateNodeInjectorForNode(\n tNode: TElementNode|TContainerNode|TElementContainerNode, lView: LView): number {\n const existingInjectorIndex = getInjectorIndex(tNode, lView);\n if (existingInjectorIndex !== -1) {\n return existingInjectorIndex;\n }\n\n const tView = lView[TVIEW];\n if (tView.firstCreatePass) {\n tNode.injectorIndex = lView.length;\n insertBloom(tView.data, tNode); // foundation for node bloom\n insertBloom(lView, null); // foundation for cumulative bloom\n insertBloom(tView.blueprint, null);\n }\n\n const parentLoc = getParentInjectorLocation(tNode, lView);\n const injectorIndex = tNode.injectorIndex;\n\n // If a parent injector can't be found, its location is set to -1.\n // In that case, we don't need to set up a cumulative bloom\n if (hasParentInjector(parentLoc)) {\n const parentIndex = getParentInjectorIndex(parentLoc);\n const parentLView = getParentInjectorView(parentLoc, lView);\n const parentData = parentLView[TVIEW].data as any;\n // Creates a cumulative bloom filter that merges the parent's bloom filter\n // and its own cumulative bloom (which contains tokens for all ancestors)\n for (let i = 0; i < NodeInjectorOffset.BLOOM_SIZE; i++) {\n lView[injectorIndex + i] = parentLView[parentIndex + i] | parentData[parentIndex + i];\n }\n }\n\n lView[injectorIndex + NodeInjectorOffset.PARENT] = parentLoc;\n return injectorIndex;\n}\n\nfunction insertBloom(arr: any[], footer: TNode|null): void {\n arr.push(0, 0, 0, 0, 0, 0, 0, 0, footer);\n}\n\n\nexport function getInjectorIndex(tNode: TNode, lView: LView): number {\n if (tNode.injectorIndex === -1 ||\n // If the injector index is the same as its parent's injector index, then the index has been\n // copied down from the parent node. No injector has been created yet on this node.\n (tNode.parent && tNode.parent.injectorIndex === tNode.injectorIndex) ||\n // After the first template pass, the injector index might exist but the parent values\n // might not have been calculated yet for this instance\n lView[tNode.injectorIndex + NodeInjectorOffset.PARENT] === null) {\n return -1;\n } else {\n ngDevMode && assertIndexInRange(lView, tNode.injectorIndex);\n return tNode.injectorIndex;\n }\n}\n\n/**\n * Finds the index of the parent injector, with a view offset if applicable. Used to set the\n * parent injector initially.\n *\n * @returns Returns a number that is the combination of the number of LViews that we have to go up\n * to find the LView containing the parent inject AND the index of the injector within that LView.\n */\nexport function getParentInjectorLocation(tNode: TNode, lView: LView): RelativeInjectorLocation {\n if (tNode.parent && tNode.parent.injectorIndex !== -1) {\n // If we have a parent `TNode` and there is an injector associated with it we are done, because\n // the parent injector is within the current `LView`.\n return tNode.parent.injectorIndex as any; // ViewOffset is 0\n }\n\n // When parent injector location is computed it may be outside of the current view. (ie it could\n // be pointing to a declared parent location). This variable stores number of declaration parents\n // we need to walk up in order to find the parent injector location.\n let declarationViewOffset = 0;\n let parentTNode: TNode|null = null;\n let lViewCursor: LView|null = lView;\n\n // The parent injector is not in the current `LView`. We will have to walk the declared parent\n // `LView` hierarchy and look for it. If we walk of the top, that means that there is no parent\n // `NodeInjector`.\n while (lViewCursor !== null) {\n // First determine the `parentTNode` location. The parent pointer differs based on `TView.type`.\n const tView = lViewCursor[TVIEW];\n const tViewType = tView.type;\n if (tViewType === TViewType.Embedded) {\n ngDevMode &&\n assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');\n parentTNode = tView.declTNode;\n } else if (tViewType === TViewType.Component) {\n // Components don't have `TView.declTNode` because each instance of component could be\n // inserted in different location, hence `TView.declTNode` is meaningless.\n parentTNode = lViewCursor[T_HOST];\n } else {\n ngDevMode && assertEqual(tView.type, TViewType.Root, 'Root type expected');\n parentTNode = null;\n }\n if (parentTNode === null) {\n // If we have no parent, than we are done.\n return NO_PARENT_INJECTOR;\n }\n\n ngDevMode && parentTNode && assertTNodeForLView(parentTNode!, lViewCursor[DECLARATION_VIEW]!);\n // Every iteration of the loop requires that we go to the declared parent.\n declarationViewOffset++;\n lViewCursor = lViewCursor[DECLARATION_VIEW];\n\n if (parentTNode.injectorIndex !== -1) {\n // We found a NodeInjector which points to something.\n return (parentTNode.injectorIndex |\n (declarationViewOffset << RelativeInjectorLocationFlags.ViewOffsetShift)) as any;\n }\n }\n return NO_PARENT_INJECTOR;\n}\n/**\n * Makes a type or an injection token public to the DI system by adding it to an\n * injector's bloom filter.\n *\n * @param di The node injector in which a directive will be added\n * @param token The type or the injection token to be made public\n */\nexport function diPublicInInjector(\n injectorIndex: number, tView: TView, token: ProviderToken<any>): void {\n bloomAdd(injectorIndex, tView, token);\n}\n\n/**\n * Inject static attribute value into directive constructor.\n *\n * This method is used with `factory` functions which are generated as part of\n * `defineDirective` or `defineComponent`. The method retrieves the static value\n * of an attribute. (Dynamic attributes are not supported since they are not resolved\n * at the time of injection and can change over time.)\n *\n * # Example\n * Given:\n * ```\n * @Component(...)\n * class MyComponent {\n * constructor(@Attribute('title') title: string) { ... }\n * }\n * ```\n * When instantiated with\n * ```\n * <my-component title=\"Hello\"></my-component>\n * ```\n *\n * Then factory method generated is:\n * ```\n * MyComponent.ɵcmp = defineComponent({\n * factory: () => new MyComponent(injectAttribute('title'))\n * ...\n * })\n * ```\n *\n * @publicApi\n */\nexport function injectAttributeImpl(tNode: TNode, attrNameToInject: string): string|null {\n ngDevMode && assertTNodeType(tNode, TNodeType.AnyContainer | TNodeType.AnyRNode);\n ngDevMode && assertDefined(tNode, 'expecting tNode');\n if (attrNameToInject === 'class') {\n return tNode.classes;\n }\n if (attrNameToInject === 'style') {\n return tNode.styles;\n }\n\n const attrs = tNode.attrs;\n if (attrs) {\n const attrsLength = attrs.length;\n let i = 0;\n while (i < attrsLength) {\n const value = attrs[i];\n\n // If we hit a `Bindings` or `Template` marker then we are done.\n if (isNameOnlyAttributeMarker(value)) break;\n\n // Skip namespaced attributes\n if (value === AttributeMarker.NamespaceURI) {\n // we skip the next two values\n // as namespaced attributes looks like\n // [..., AttributeMarker.NamespaceURI, 'http://someuri.com/test', 'test:exist',\n // 'existValue', ...]\n i = i + 2;\n } else if (typeof value === 'number') {\n // Skip to the first value of the marked attribute.\n i++;\n while (i < attrsLength && typeof attrs[i] === 'string') {\n i++;\n }\n } else if (value === attrNameToInject) {\n return attrs[i + 1] as string;\n } else {\n i = i + 2;\n }\n }\n }\n return null;\n}\n\n\nfunction notFoundValueOrThrow<T>(\n notFoundValue: T|null, token: ProviderToken<T>, flags: InjectFlags): T|null {\n if (flags & InjectFlags.Optional) {\n return notFoundValue;\n } else {\n throwProviderNotFoundError(token, 'NodeInjector');\n }\n}\n\n/**\n * Returns the value associated to the given token from the ModuleInjector or throws exception\n *\n * @param lView The `LView` that contains the `tNode`\n * @param token The token to look for\n * @param flags Injection flags\n * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`\n * @returns the value from the injector or throws an exception\n */\nfunction lookupTokenUsingModuleInjector<T>(\n lView: LView, token: ProviderToken<T>, flags: InjectFlags, notFoundValue?: any): T|null {\n if (flags & InjectFlags.Optional && notFoundValue === undefined) {\n // This must be set or the NullInjector will throw for optional deps\n notFoundValue = null;\n }\n\n if ((flags & (InjectFlags.Self | InjectFlags.Host)) === 0) {\n const moduleInjector = lView[INJECTOR];\n // switch to `injectInjectorOnly` implementation for module injector, since module injector\n // should not have access to Component/Directive DI scope (that may happen through\n // `directiveInject` implementation)\n const previousInjectImplementation = setInjectImplementation(undefined);\n try {\n if (moduleInjector) {\n return moduleInjector.get(token, notFoundValue, flags & InjectFlags.Optional);\n } else {\n return injectRootLimpMode(token, notFoundValue, flags & InjectFlags.Optional);\n }\n } finally {\n setInjectImplementation(previousInjectImplementation);\n }\n }\n return notFoundValueOrThrow<T>(notFoundValue, token, flags);\n}\n\n/**\n * Returns the value associated to the given token from the NodeInjectors => ModuleInjector.\n *\n * Look for the injector providing the token by walking up the node injector tree and then\n * the module injector tree.\n *\n * This function patches `token` with `__NG_ELEMENT_ID__` which contains the id for the bloom\n * filter. `-1` is reserved for injecting `Injector` (implemented by `NodeInjector`)\n *\n * @param tNode The Node where the search for the injector should start\n * @param lView The `LView` that contains the `tNode`\n * @param token The token to look for\n * @param flags Injection flags\n * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`\n * @returns the value from the injector, `null` when not found, or `notFoundValue` if provided\n */\nexport function getOrCreateInjectable<T>(\n tNode: TDirectiveHostNode|null, lView: LView, token: ProviderToken<T>,\n flags: InjectFlags = InjectFlags.Default, notFoundValue?: any): T|null {\n if (tNode !== null) {\n const bloomHash = bloomHashBitOrFactory(token);\n // If the ID stored here is a function, this is a special object like ElementRef or TemplateRef\n // so just call the factory function to create it.\n if (typeof bloomHash === 'function') {\n if (!enterDI(lView, tNode, flags)) {\n // Failed to enter DI, try module injector instead. If a token is injected with the @Host\n // flag, the module injector is not searched for that token in Ivy.\n return (flags & InjectFlags.Host) ?\n notFoundValueOrThrow<T>(notFoundValue, token, flags) :\n lookupTokenUsingModuleInjector<T>(lView, token, flags, notFoundValue);\n }\n try {\n const value = bloomHash(flags);\n if (value == null && !(flags & InjectFlags.Optional)) {\n throwProviderNotFoundError(token);\n } else {\n return value;\n }\n } finally {\n leaveDI();\n }\n } else if (typeof bloomHash === 'number') {\n // A reference to the previous injector TView that was found while climbing the element\n // injector tree. This is used to know if viewProviders can be accessed on the current\n // injector.\n let previousTView: TView|null = null;\n let injectorIndex = getInjectorIndex(tNode, lView);\n let parentLocation: RelativeInjectorLocation = NO_PARENT_INJECTOR;\n let hostTElementNode: TNode|null =\n flags & InjectFlags.Host ? lView[DECLARATION_COMPONENT_VIEW][T_HOST] : null;\n\n // If we should skip this injector, or if there is no injector on this node, start by\n // searching the parent injector.\n if (injectorIndex === -1 || flags & InjectFlags.SkipSelf) {\n parentLocation = injectorIndex === -1 ? getParentInjectorLocation(tNode, lView) :\n lView[injectorIndex + NodeInjectorOffset.PARENT];\n\n if (parentLocation === NO_PARENT_INJECTOR || !shouldSearchParent(flags, false)) {\n injectorIndex = -1;\n } else {\n previousTView = lView[TVIEW];\n injectorIndex = getParentInjectorIndex(parentLocation);\n lView = getParentInjectorView(parentLocation, lView);\n }\n }\n\n // Traverse up the injector tree until we find a potential match or until we know there\n // *isn't* a match.\n while (injectorIndex !== -1) {\n ngDevMode && assertNodeInjector(lView, injectorIndex);\n\n // Check the current injector. If it matches, see if it contains token.\n const tView = lView[TVIEW];\n ngDevMode &&\n assertTNodeForLView(\n tView.data[injectorIndex + NodeInjectorOffset.TNODE] as TNode, lView);\n if (bloomHasToken(bloomHash, injectorIndex, tView.data)) {\n // At this point, we have an injector which *may* contain the token, so we step through\n // the providers and directives associated with the injector's corresponding node to get\n // the instance.\n const instance: T|null = searchTokensOnInjector<T>(\n injectorIndex, lView, token, previousTView, flags, hostTElementNode);\n if (instance !== NOT_FOUND) {\n return instance;\n }\n }\n parentLocation = lView[injectorIndex + NodeInjectorOffset.PARENT];\n if (parentLocation !== NO_PARENT_INJECTOR &&\n shouldSearchParent(\n flags,\n lView[TVIEW].data[injectorIndex + NodeInjectorOffset.TNODE] === hostTElementNode) &&\n bloomHasToken(bloomHash, injectorIndex, lView)) {\n // The def wasn't found anywhere on this node, so it was a false positive.\n // Traverse up the tree and continue searching.\n previousTView = tView;\n injectorIndex = getParentInjectorIndex(parentLocation);\n lView = getParentInjectorView(parentLocation, lView);\n } else {\n // If we should not search parent OR If the ancestor bloom filter value does not have the\n // bit corresponding to the directive we can give up on traversing up to find the specific\n // injector.\n injectorIndex = -1;\n }\n }\n }\n }\n\n return lookupTokenUsingModuleInjector<T>(lView, token, flags, notFoundValue);\n}\n\nconst NOT_FOUND = {};\n\nexport function createNodeInjector(): Injector {\n return new NodeInjector(getCurrentTNode()! as TDirectiveHostNode, getLView()) as any;\n}\n\nfunction searchTokensOnInjector<T>(\n injectorIndex: number, lView: LView, token: ProviderToken<T>, previousTView: TView|null,\n flags: InjectFlags, hostTElementNode: TNode|null) {\n const currentTView = lView[TVIEW];\n const tNode = currentTView.data[injectorIndex + NodeInjectorOffset.TNODE] as TNode;\n // First, we need to determine if view providers can be accessed by the starting element.\n // There are two possibilities\n const canAccessViewProviders = previousTView == null ?\n // 1) This is the first invocation `previousTView == null` which means that we are at the\n // `TNode` of where injector is starting to look. In such a case the only time we are allowed\n // to look into the ViewProviders is if:\n // - we are on a component\n // - AND the injector set `includeViewProviders` to true (implying that the token can see\n // ViewProviders because it is the Component or a Service which itself was declared in\n // ViewProviders)\n (isComponentHost(tNode) && includeViewProviders) :\n // 2) `previousTView != null` which means that we are now walking across the parent nodes.\n // In such a case we are only allowed to look into the ViewProviders if:\n // - We just crossed from child View to Parent View `previousTView != currentTView`\n // - AND the parent TNode is an Element.\n // This means that we just came from the Component's View and therefore are allowed to see\n // into the ViewProviders.\n (previousTView != currentTView && ((tNode.type & TNodeType.AnyRNode) !== 0));\n\n // This special case happens when there is a @host on the inject and when we are searching\n // on the host element node.\n const isHostSpecialCase = (flags & InjectFlags.Host) && hostTElementNode === tNode;\n\n const injectableIdx = locateDirectiveOrProvider(\n tNode, currentTView, token, canAccessViewProviders, isHostSpecialCase);\n if (injectableIdx !== null) {\n return getNodeInjectable(lView, currentTView, injectableIdx, tNode as TElementNode);\n } else {\n return NOT_FOUND;\n }\n}\n\n/**\n * Searches for the given token among the node's directives and providers.\n *\n * @param tNode TNode on which directives are present.\n * @param tView The tView we are currently processing\n * @param token Provider token or type of a directive to look for.\n * @param canAccessViewProviders Whether view providers should be considered.\n * @param isHostSpecialCase Whether the host special case applies.\n * @returns Index of a found directive or provider, or null when none found.\n */\nexport function locateDirectiveOrProvider<T>(\n tNode: TNode, tView: TView, token: ProviderToken<T>|string, canAccessViewProviders: boolean,\n isHostSpecialCase: boolean|number): number|null {\n const nodeProviderIndexes = tNode.providerIndexes;\n const tInjectables = tView.data;\n\n const injectablesStart = nodeProviderIndexes & TNodeProviderIndexes.ProvidersStartIndexMask;\n const directivesStart = tNode.directiveStart;\n const directiveEnd = tNode.directiveEnd;\n const cptViewProvidersCount =\n nodeProviderIndexes >> TNodeProviderIndexes.CptViewProvidersCountShift;\n const startingIndex =\n canAccessViewProviders ? injectablesStart : injectablesStart + cptViewProvidersCount;\n // When the host special case applies, only the viewProviders and the component are visible\n const endIndex = isHostSpecialCase ? injectablesStart + cptViewProvidersCount : directiveEnd;\n for (let i = startingIndex; i < endIndex; i++) {\n const providerTokenOrDef = tInjectables[i] as ProviderToken<any>| DirectiveDef<any>| string;\n if (i < directivesStart && token === providerTokenOrDef ||\n i >= directivesStart && (providerTokenOrDef as DirectiveDef<any>).type === token) {\n return i;\n }\n }\n if (isHostSpecialCase) {\n const dirDef = tInjectables[directivesStart] as DirectiveDef<any>;\n if (dirDef && isComponentDef(dirDef) && dirDef.type === token) {\n return directivesStart;\n }\n }\n return null;\n}\n\n/**\n * Retrieve or instantiate the injectable from the `LView` at particular `index`.\n *\n * This function checks to see if the value has already been instantiated and if so returns the\n * cached `injectable`. Otherwise if it detects that the value is still a factory it\n * instantiates the `injectable` and caches the value.\n */\nexport function getNodeInjectable(\n lView: LView, tView: TView, index: number, tNode: TDirectiveHostNode): any {\n let value = lView[index];\n const tData = tView.data;\n if (isFactory(value)) {\n const factory: NodeInjectorFactory = value;\n if (factory.resolving) {\n throwCyclicDependencyError(stringifyForError(tData[index]));\n }\n const previousIncludeViewProviders = setIncludeViewProviders(factory.canSeeViewProviders);\n factory.resolving = true;\n const previousInjectImplementation =\n factory.injectImpl ? setInjectImplementation(factory.injectImpl) : null;\n const success = enterDI(lView, tNode, InjectFlags.Default);\n ngDevMode &&\n assertEqual(\n success, true,\n 'Because flags do not contain \\`SkipSelf\\' we expect this to always succeed.');\n try {\n value = lView[index] = factory.factory(undefined, tData, lView, tNode);\n // This code path is hit for both directives and providers.\n // For perf reasons, we want to avoid searching for hooks on providers.\n // It does no harm to try (the hooks just won't exist), but the extra\n // checks are unnecessary and this is a hot path. So we check to see\n // if the index of the dependency is in the directive range for this\n // tNode. If it's not, we know it's a provider and skip hook registration.\n if (tView.firstCreatePass && index >= tNode.directiveStart) {\n ngDevMode && assertDirectiveDef(tData[index]);\n registerPreOrderHooks(index, tData[index] as DirectiveDef<any>, tView);\n }\n } finally {\n previousInjectImplementation !== null &&\n setInjectImplementation(previousInjectImplementation);\n setIncludeViewProviders(previousIncludeViewProviders);\n factory.resolving = false;\n leaveDI();\n }\n }\n return value;\n}\n\n/**\n * Returns the bit in an injector's bloom filter that should be used to determine whether or not\n * the directive might be provided by the injector.\n *\n * When a directive is public, it is added to the bloom filter and given a unique ID that can be\n * retrieved on the Type. When the directive isn't public or the token is not a directive `null`\n * is returned as the node injector can not possibly provide that token.\n *\n * @param token the injection token\n * @returns the matching bit to check in the bloom filter or `null` if the token is not known.\n * When the returned value is negative then it represents special values such as `Injector`.\n */\nexport function bloomHashBitOrFactory(token: ProviderToken<any>|string): number|Function|undefined {\n ngDevMode && assertDefined(token, 'token must be defined');\n if (typeof token === 'string') {\n return token.charCodeAt(0) || 0;\n }\n const tokenId: number|undefined =\n // First check with `hasOwnProperty` so we don't get an inherited ID.\n token.hasOwnProperty(NG_ELEMENT_ID) ? (token as any)[NG_ELEMENT_ID] : undefined;\n // Negative token IDs are used for special objects such as `Injector`\n if (typeof tokenId === 'number') {\n if (tokenId >= 0) {\n return tokenId & BLOOM_MASK;\n } else {\n ngDevMode &&\n assertEqual(tokenId, InjectorMarkers.Injector, 'Expecting to get Special Injector Id');\n return createNodeInjector;\n }\n } else {\n return tokenId;\n }\n}\n\nexport function bloomHasToken(bloomHash: number, injectorIndex: number, injectorView: LView|TData) {\n // Create a mask that targets the specific bit associated with the directive we're looking for.\n // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding\n // to bit positions 0 - 31 in a 32 bit integer.\n const mask = 1 << bloomHash;\n\n // Each bloom bucket in `injectorView` represents `BLOOM_BUCKET_BITS` number of bits of\n // `bloomHash`. Any bits in `bloomHash` beyond `BLOOM_BUCKET_BITS` indicate the bucket offset\n // that should be used.\n const value = injectorView[injectorIndex + (bloomHash >> BLOOM_BUCKET_BITS)];\n\n // If the bloom filter value has the bit corresponding to the directive's bloomBit flipped on,\n // this injector is a potential match.\n return !!(value & mask);\n}\n\n/** Returns true if flags prevent parent injector from being searched for tokens */\nfunction shouldSearchParent(flags: InjectFlags, isFirstHostTNode: boolean): boolean|number {\n return !(flags & InjectFlags.Self) && !(flags & InjectFlags.Host && isFirstHostTNode);\n}\n\nexport class NodeInjector implements Injector {\n constructor(\n private _tNode: TElementNode|TContainerNode|TElementContainerNode|null,\n private _lView: LView) {}\n\n get(token: any, notFoundValue?: any): any {\n return getOrCreateInjectable(this._tNode, this._lView, token, undefined, notFoundValue);\n }\n}\n\n/**\n * @codeGenApi\n */\nexport function ɵɵgetInheritedFactory<T>(type: Type<any>): (type: Type<T>) => T {\n return noSideEffects(() => {\n const ownConstructor = type.prototype.constructor;\n const ownFactory = ownConstructor[NG_FACTORY_DEF] || getFactoryOf(ownConstructor);\n const objectPrototype = Object.prototype;\n let parent = Object.getPrototypeOf(type.prototype).constructor;\n\n // Go up the prototype until we hit `Object`.\n while (parent && parent !== objectPrototype) {\n const factory = parent[NG_FACTORY_DEF] || getFactoryOf(parent);\n\n // If we hit something that has a factory and the factory isn't the same as the type,\n // we've found the inherited factory. Note the check that the factory isn't the type's\n // own factory is redundant in most cases, but if the user has custom decorators on the\n // class, this lookup will start one level down in the prototype chain, causing us to\n // find the own factory first and potentially triggering an infinite loop downstream.\n if (factory && factory !== ownFactory) {\n return factory;\n }\n\n parent = Object.getPrototypeOf(parent);\n }\n\n // There is no factory defined. Either this was improper usage of inheritance\n // (no Angular decorator on the superclass) or there is no constructor at all\n // in the inheritance chain. Since the two cases cannot be distinguished, the\n // latter has to be assumed.\n return t => new t();\n });\n}\n\nfunction getFactoryOf<T>(type: Type<any>): ((type?: Type<T>) => T | null)|null {\n if (isForwardRef(type)) {\n return () => {\n const factory = getFactoryOf<T>(resolveForwardRef(type));\n return factory && factory();\n };\n }\n return getFactoryDef<T>(type);\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 */\nimport {injectAttributeImpl} from '../di';\nimport {getCurrentTNode} from '../state';\n\n/**\n * Facade for the attribute injection from DI.\n *\n * @codeGenApi\n */\nexport function ɵɵinjectAttribute(attrNameToInject: string): string|null {\n return injectAttributeImpl(getCurrentTNode()!, attrNameToInject);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\n\nimport {noSideEffects} from './closure';\n\n\n\n/**\n * An interface implemented by all Angular type decorators, which allows them to be used as\n * decorators as well as Angular syntax.\n *\n * ```\n * @ng.Component({...})\n * class MyClass {...}\n * ```\n *\n * @publicApi\n */\nexport interface TypeDecorator {\n /**\n * Invoke as decorator.\n */\n <T extends Type<any>>(type: T): T;\n\n // Make TypeDecorator assignable to built-in ParameterDecorator type.\n // ParameterDecorator is declared in lib.d.ts as a `declare type`\n // so we cannot declare this interface as a subtype.\n // see https://github.com/angular/angular/issues/3379#issuecomment-126169417\n (target: Object, propertyKey?: string|symbol, parameterIndex?: number): void;\n}\n\nexport const ANNOTATIONS = '__annotations__';\nexport const PARAMETERS = '__parameters__';\nexport const PROP_METADATA = '__prop__metadata__';\n\n/**\n * @suppress {globalThis}\n */\nexport function makeDecorator<T>(\n name: string, props?: (...args: any[]) => any, parentClass?: any,\n additionalProcessing?: (type: Type<T>) => void,\n typeFn?: (type: Type<T>, ...args: any[]) => void):\n {new (...args: any[]): any; (...args: any[]): any; (...args: any[]): (cls: any) => any;} {\n return noSideEffects(() => {\n const metaCtor = makeMetadataCtor(props);\n\n function DecoratorFactory(\n this: unknown|typeof DecoratorFactory, ...args: any[]): (cls: Type<T>) => any {\n if (this instanceof DecoratorFactory) {\n metaCtor.call(this, ...args);\n return this as typeof DecoratorFactory;\n }\n\n const annotationInstance = new (DecoratorFactory as any)(...args);\n return function TypeDecorator(cls: Type<T>) {\n if (typeFn) typeFn(cls, ...args);\n // Use of Object.defineProperty is important since it creates non-enumerable property which\n // prevents the property is copied during subclassing.\n const annotations = cls.hasOwnProperty(ANNOTATIONS) ?\n (cls as any)[ANNOTATIONS] :\n (Object.defineProperty(cls, ANNOTATIONS, {value: []}) as any)[ANNOTATIONS];\n annotations.push(annotationInstance);\n\n\n if (additionalProcessing) additionalProcessing(cls);\n\n return cls;\n };\n }\n\n if (parentClass) {\n DecoratorFactory.prototype = Object.create(parentClass.prototype);\n }\n\n DecoratorFactory.prototype.ngMetadataName = name;\n (DecoratorFactory as any).annotationCls = DecoratorFactory;\n return DecoratorFactory as any;\n });\n}\n\nfunction makeMetadataCtor(props?: (...args: any[]) => any): any {\n return function ctor(this: any, ...args: any[]) {\n if (props) {\n const values = props(...args);\n for (const propName in values) {\n this[propName] = values[propName];\n }\n }\n };\n}\n\nexport function makeParamDecorator(\n name: string, props?: (...args: any[]) => any, parentClass?: any): any {\n return noSideEffects(() => {\n const metaCtor = makeMetadataCtor(props);\n function ParamDecoratorFactory(\n this: unknown|typeof ParamDecoratorFactory, ...args: any[]): any {\n if (this instanceof ParamDecoratorFactory) {\n metaCtor.apply(this, args);\n return this;\n }\n const annotationInstance = new (<any>ParamDecoratorFactory)(...args);\n\n (<any>ParamDecorator).annotation = annotationInstance;\n return ParamDecorator;\n\n function ParamDecorator(cls: any, unusedKey: any, index: number): any {\n // Use of Object.defineProperty is important since it creates non-enumerable property which\n // prevents the property is copied during subclassing.\n const parameters = cls.hasOwnProperty(PARAMETERS) ?\n (cls as any)[PARAMETERS] :\n Object.defineProperty(cls, PARAMETERS, {value: []})[PARAMETERS];\n\n // there might be gaps if some in between parameters do not have annotations.\n // we pad with nulls.\n while (parameters.length <= index) {\n parameters.push(null);\n }\n\n (parameters[index] = parameters[index] || []).push(annotationInstance);\n return cls;\n }\n }\n if (parentClass) {\n ParamDecoratorFactory.prototype = Object.create(parentClass.prototype);\n }\n ParamDecoratorFactory.prototype.ngMetadataName = name;\n (<any>ParamDecoratorFactory).annotationCls = ParamDecoratorFactory;\n return ParamDecoratorFactory;\n });\n}\n\nexport function makePropDecorator(\n name: string, props?: (...args: any[]) => any, parentClass?: any,\n additionalProcessing?: (target: any, name: string, ...args: any[]) => void): any {\n return noSideEffects(() => {\n const metaCtor = makeMetadataCtor(props);\n\n function PropDecoratorFactory(this: unknown|typeof PropDecoratorFactory, ...args: any[]): any {\n if (this instanceof PropDecoratorFactory) {\n metaCtor.apply(this, args);\n return this;\n }\n\n const decoratorInstance = new (<any>PropDecoratorFactory)(...args);\n\n function PropDecorator(target: any, name: string) {\n const constructor = target.constructor;\n // Use of Object.defineProperty is important because it creates a non-enumerable property\n // which prevents the property from being copied during subclassing.\n const meta = constructor.hasOwnProperty(PROP_METADATA) ?\n (constructor as any)[PROP_METADATA] :\n Object.defineProperty(constructor, PROP_METADATA, {value: {}})[PROP_METADATA];\n meta[name] = meta.hasOwnProperty(name) && meta[name] || [];\n meta[name].unshift(decoratorInstance);\n\n if (additionalProcessing) additionalProcessing(target, name, ...args);\n }\n\n return PropDecorator;\n }\n\n if (parentClass) {\n PropDecoratorFactory.prototype = Object.create(parentClass.prototype);\n }\n\n PropDecoratorFactory.prototype.ngMetadataName = name;\n (<any>PropDecoratorFactory).annotationCls = PropDecoratorFactory;\n return PropDecoratorFactory;\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 {ɵɵinjectAttribute} from '../render3/instructions/di_attr';\nimport {makeParamDecorator} from '../util/decorators';\n\n\n/**\n * Type of the Attribute decorator / constructor function.\n *\n * @publicApi\n */\nexport interface AttributeDecorator {\n /**\n * Parameter decorator for a directive constructor that designates\n * a host-element attribute whose value is injected as a constant string literal.\n *\n * @usageNotes\n *\n * Suppose we have an `<input>` element and want to know its `type`.\n *\n * ```html\n * <input type=\"text\">\n * ```\n *\n * The following example uses the decorator to inject the string literal `text` in a directive.\n *\n * {@example core/ts/metadata/metadata.ts region='attributeMetadata'}\n *\n * The following example uses the decorator in a component constructor.\n *\n * {@example core/ts/metadata/metadata.ts region='attributeFactory'}\n *\n */\n (name: string): any;\n new(name: string): Attribute;\n}\n\n/**\n * Type of the Attribute metadata.\n *\n * @publicApi\n */\nexport interface Attribute {\n /**\n * The name of the attribute whose value can be injected.\n */\n attributeName: string;\n}\n\nfunction CREATE_ATTRIBUTE_DECORATOR__PRE_R3__(): AttributeDecorator {\n return makeParamDecorator('Attribute', (attributeName?: string) => ({attributeName}));\n}\n\nexport function CREATE_ATTRIBUTE_DECORATOR__POST_R3__(): AttributeDecorator {\n return makeParamDecorator(\n 'Attribute',\n (attributeName?: string) =>\n ({attributeName, __NG_ELEMENT_ID__: () => ɵɵinjectAttribute(attributeName!)}));\n}\n\nconst CREATE_ATTRIBUTE_DECORATOR_IMPL = CREATE_ATTRIBUTE_DECORATOR__PRE_R3__;\n\n/**\n * Attribute decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Attribute: AttributeDecorator = CREATE_ATTRIBUTE_DECORATOR_IMPL();\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {assertLessThan} from '../util/assert';\n\nimport {ɵɵdefineInjectable} from './interface/defs';\n\n/**\n * Creates a token that can be used in a DI Provider.\n *\n * Use an `InjectionToken` whenever the type you are injecting is not reified (does not have a\n * runtime representation) such as when injecting an interface, callable type, array or\n * parameterized type.\n *\n * `InjectionToken` is parameterized on `T` which is the type of object which will be returned by\n * the `Injector`. This provides additional level of type safety.\n *\n * ```\n * interface MyInterface {...}\n * var myInterface = injector.get(new InjectionToken<MyInterface>('SomeToken'));\n * // myInterface is inferred to be MyInterface.\n * ```\n *\n * When creating an `InjectionToken`, you can optionally specify a factory function which returns\n * (possibly by creating) a default value of the parameterized type `T`. This sets up the\n * `InjectionToken` using this factory as a provider as if it was defined explicitly in the\n * application's root injector. If the factory function, which takes zero arguments, needs to inject\n * dependencies, it can do so using the `inject` function. See below for an example.\n *\n * Additionally, if a `factory` is specified you can also specify the `providedIn` option, which\n * overrides the above behavior and marks the token as belonging to a particular `@NgModule`. As\n * mentioned above, `'root'` is the default value for `providedIn`.\n *\n * @usageNotes\n * ### Basic Example\n *\n * ### Plain InjectionToken\n *\n * {@example core/di/ts/injector_spec.ts region='InjectionToken'}\n *\n * ### Tree-shakable InjectionToken\n *\n * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}\n *\n *\n * @publicApi\n */\nexport class InjectionToken<T> {\n /** @internal */\n readonly ngMetadataName = 'InjectionToken';\n\n readonly ɵprov: unknown;\n\n constructor(protected _desc: string, options?: {\n providedIn?: Type<any>|'root'|'platform'|'any'|null, factory: () => T\n }) {\n this.ɵprov = undefined;\n if (typeof options == 'number') {\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n assertLessThan(options, 0, 'Only negative numbers are supported here');\n // This is a special hack to assign __NG_ELEMENT_ID__ to this instance.\n // See `InjectorMarkers`\n (this as any).__NG_ELEMENT_ID__ = options;\n } else if (options !== undefined) {\n this.ɵprov = ɵɵdefineInjectable({\n token: this,\n providedIn: options.providedIn || 'root',\n factory: options.factory,\n });\n }\n }\n\n toString(): string {\n return `InjectionToken ${this._desc}`;\n }\n}\n\nexport interface InjectableDefToken<T> extends InjectionToken<T> {\n ɵprov: unknown;\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 {InjectionToken} from '../di/injection_token';\nimport {ProviderToken} from '../di/provider_token';\nimport {makePropDecorator} from '../util/decorators';\n\n/**\n * A DI token that you can use to create a virtual [provider](guide/glossary#provider)\n * that will populate the `entryComponents` field of components and NgModules\n * based on its `useValue` property value.\n * All components that are referenced in the `useValue` value (either directly\n * or in a nested array or map) are added to the `entryComponents` property.\n *\n * @usageNotes\n *\n * The following example shows how the router can populate the `entryComponents`\n * field of an NgModule based on a router configuration that refers\n * to components.\n *\n * ```typescript\n * // helper function inside the router\n * function provideRoutes(routes) {\n * return [\n * {provide: ROUTES, useValue: routes},\n * {provide: ANALYZE_FOR_ENTRY_COMPONENTS, useValue: routes, multi: true}\n * ];\n * }\n *\n * // user code\n * let routes = [\n * {path: '/root', component: RootComp},\n * {path: '/teams', component: TeamsComp}\n * ];\n *\n * @NgModule({\n * providers: [provideRoutes(routes)]\n * })\n * class ModuleWithRoutes {}\n * ```\n *\n * @publicApi\n * @deprecated Since 9.0.0. With Ivy, this property is no longer necessary.\n */\nexport const ANALYZE_FOR_ENTRY_COMPONENTS = new InjectionToken<any>('AnalyzeForEntryComponents');\n\n/**\n * Type of the `Attribute` decorator / constructor function.\n *\n * @publicApi\n */\nexport interface AttributeDecorator {\n /**\n * Specifies that a constant attribute value should be injected.\n *\n * The directive can inject constant string literals of host element attributes.\n *\n * @usageNotes\n *\n * Suppose we have an `<input>` element and want to know its `type`.\n *\n * ```html\n * <input type=\"text\">\n * ```\n *\n * A decorator can inject string literal `text` as in the following example.\n *\n * {@example core/ts/metadata/metadata.ts region='attributeMetadata'}\n *\n * @publicApi\n */\n (name: string): any;\n new(name: string): Attribute;\n}\n\n\n/**\n * Type of the Attribute metadata.\n *\n * @publicApi\n */\nexport interface Attribute {\n /**\n * The name of the attribute to be injected into the constructor.\n */\n attributeName?: string;\n}\n\n/**\n * Type of the Query metadata.\n *\n * @publicApi\n */\nexport interface Query {\n descendants: boolean;\n emitDistinctChangesOnly: boolean;\n first: boolean;\n read: any;\n isViewQuery: boolean;\n selector: any;\n static?: boolean;\n}\n\n// Stores the default value of `emitDistinctChangesOnly` when the `emitDistinctChangesOnly` is not\n// explicitly set.\nexport const emitDistinctChangesOnlyDefaultValue = true;\n\n\n/**\n * Base class for query metadata.\n *\n * @see `ContentChildren`.\n * @see `ContentChild`.\n * @see `ViewChildren`.\n * @see `ViewChild`.\n *\n * @publicApi\n */\nexport abstract class Query {}\n\n/**\n * Type of the ContentChildren decorator / constructor function.\n *\n * @see `ContentChildren`.\n * @publicApi\n */\nexport interface ContentChildrenDecorator {\n /**\n * @description\n * Property decorator that configures a content query.\n *\n * Use to get the `QueryList` of elements or directives from the content DOM.\n * Any time a child element is added, removed, or moved, the query list will be\n * updated, and the changes observable of the query list will emit a new value.\n *\n * Content queries are set before the `ngAfterContentInit` callback is called.\n *\n * Does not retrieve elements or directives that are in other components' templates,\n * since a component's template is always a black box to its ancestors.\n *\n * **Metadata Properties**:\n *\n * * **selector** - The directive type or the name used for querying.\n * * **descendants** - If `true` include all descendants of the element. If `false` then only\n * query direct children of the element.\n * * **emitDistinctChangesOnly** - The ` QueryList#changes` observable will emit new values only\n * if the QueryList result has changed. When `false` the `changes` observable might emit even\n * if the QueryList has not changed.\n * ** Note: *** This config option is **deprecated**, it will be permanently set to `true` and\n * removed in future versions of Angular.\n * * **read** - Used to read a different token from the queried elements.\n *\n * The following selectors are supported.\n * * Any class with the `@Component` or `@Directive` decorator\n * * A template reference variable as a string (e.g. query `<my-component #cmp></my-component>`\n * with `@ContentChildren('cmp')`)\n * * Any provider defined in the child component tree of the current component (e.g.\n * `@ContentChildren(SomeService) someService: SomeService`)\n * * Any provider defined through a string token (e.g. `@ContentChildren('someToken')\n * someTokenVal: any`)\n * * A `TemplateRef` (e.g. query `<ng-template></ng-template>` with\n * `@ContentChildren(TemplateRef) template;`)\n *\n * In addition, multiple string selectors can be separated with a comma (e.g.\n * `@ContentChildren('cmp1,cmp2')`)\n *\n * The following values are supported by `read`:\n * * Any class with the `@Component` or `@Directive` decorator\n * * Any provider defined on the injector of the component that is matched by the `selector` of\n * this query\n * * Any provider defined through a string token (e.g. `{provide: 'token', useValue: 'val'}`)\n * * `TemplateRef`, `ElementRef`, and `ViewContainerRef`\n *\n * @usageNotes\n *\n * Here is a simple demonstration of how the `ContentChildren` decorator can be used.\n *\n * {@example core/di/ts/contentChildren/content_children_howto.ts region='HowTo'}\n *\n * ### Tab-pane example\n *\n * Here is a slightly more realistic example that shows how `ContentChildren` decorators\n * can be used to implement a tab pane component.\n *\n * {@example core/di/ts/contentChildren/content_children_example.ts region='Component'}\n *\n * @Annotation\n */\n (selector: ProviderToken<unknown>|Function|string, opts?: {\n descendants?: boolean,\n emitDistinctChangesOnly?: boolean,\n read?: any,\n }): any;\n new(selector: ProviderToken<unknown>|Function|string,\n opts?: {descendants?: boolean, emitDistinctChangesOnly?: boolean, read?: any}): Query;\n}\n\n/**\n * Type of the ContentChildren metadata.\n *\n *\n * @Annotation\n * @publicApi\n */\nexport type ContentChildren = Query;\n\n/**\n * ContentChildren decorator and metadata.\n *\n *\n * @Annotation\n * @publicApi\n */\nexport const ContentChildren: ContentChildrenDecorator = makePropDecorator(\n 'ContentChildren', (selector?: any, data: any = {}) => ({\n selector,\n first: false,\n isViewQuery: false,\n descendants: false,\n emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue,\n ...data\n }),\n Query);\n\n/**\n * Type of the ContentChild decorator / constructor function.\n *\n * @publicApi\n */\nexport interface ContentChildDecorator {\n /**\n * @description\n * Property decorator that configures a content query.\n *\n * Use to get the first element or the directive matching the selector from the content DOM.\n * If the content DOM changes, and a new child matches the selector,\n * the property will be updated.\n *\n * Content queries are set before the `ngAfterContentInit` callback is called.\n *\n * Does not retrieve elements or directives that are in other components' templates,\n * since a component's template is always a black box to its ancestors.\n *\n * **Metadata Properties**:\n *\n * * **selector** - The directive type or the name used for querying.\n * * **read** - Used to read a different token from the queried element.\n * * **static** - True to resolve query results before change detection runs,\n * false to resolve after change detection. Defaults to false.\n *\n * The following selectors are supported.\n * * Any class with the `@Component` or `@Directive` decorator\n * * A template reference variable as a string (e.g. query `<my-component #cmp></my-component>`\n * with `@ContentChild('cmp')`)\n * * Any provider defined in the child component tree of the current component (e.g.\n * `@ContentChild(SomeService) someService: SomeService`)\n * * Any provider defined through a string token (e.g. `@ContentChild('someToken') someTokenVal:\n * any`)\n * * A `TemplateRef` (e.g. query `<ng-template></ng-template>` with `@ContentChild(TemplateRef)\n * template;`)\n *\n * The following values are supported by `read`:\n * * Any class with the `@Component` or `@Directive` decorator\n * * Any provider defined on the injector of the component that is matched by the `selector` of\n * this query\n * * Any provider defined through a string token (e.g. `{provide: 'token', useValue: 'val'}`)\n * * `TemplateRef`, `ElementRef`, and `ViewContainerRef`\n *\n * @usageNotes\n *\n * {@example core/di/ts/contentChild/content_child_howto.ts region='HowTo'}\n *\n * ### Example\n *\n * {@example core/di/ts/contentChild/content_child_example.ts region='Component'}\n *\n * @Annotation\n */\n (selector: ProviderToken<unknown>|Function|string, opts?: {read?: any, static?: boolean}): any;\n new(selector: ProviderToken<unknown>|Function|string,\n opts?: {read?: any, static?: boolean}): ContentChild;\n}\n\n/**\n * Type of the ContentChild metadata.\n *\n * @publicApi\n */\nexport type ContentChild = Query;\n\n/**\n * ContentChild decorator and metadata.\n *\n *\n * @Annotation\n *\n * @publicApi\n */\nexport const ContentChild: ContentChildDecorator = makePropDecorator(\n 'ContentChild',\n (selector?: any, data: any = {}) =>\n ({selector, first: true, isViewQuery: false, descendants: true, ...data}),\n Query);\n\n/**\n * Type of the ViewChildren decorator / constructor function.\n *\n * @see `ViewChildren`.\n *\n * @publicApi\n */\nexport interface ViewChildrenDecorator {\n /**\n * @description\n * Property decorator that configures a view query.\n *\n * Use to get the `QueryList` of elements or directives from the view DOM.\n * Any time a child element is added, removed, or moved, the query list will be updated,\n * and the changes observable of the query list will emit a new value.\n *\n * View queries are set before the `ngAfterViewInit` callback is called.\n *\n * **Metadata Properties**:\n *\n * * **selector** - The directive type or the name used for querying.\n * * **read** - Used to read a different token from the queried elements.\n * * **emitDistinctChangesOnly** - The ` QueryList#changes` observable will emit new values only\n * if the QueryList result has changed. When `false` the `changes` observable might emit even\n * if the QueryList has not changed.\n * ** Note: *** This config option is **deprecated**, it will be permanently set to `true` and\n * removed in future versions of Angular.\n *\n * The following selectors are supported.\n * * Any class with the `@Component` or `@Directive` decorator\n * * A template reference variable as a string (e.g. query `<my-component #cmp></my-component>`\n * with `@ViewChildren('cmp')`)\n * * Any provider defined in the child component tree of the current component (e.g.\n * `@ViewChildren(SomeService) someService!: SomeService`)\n * * Any provider defined through a string token (e.g. `@ViewChildren('someToken')\n * someTokenVal!: any`)\n * * A `TemplateRef` (e.g. query `<ng-template></ng-template>` with `@ViewChildren(TemplateRef)\n * template;`)\n *\n * In addition, multiple string selectors can be separated with a comma (e.g.\n * `@ViewChildren('cmp1,cmp2')`)\n *\n * The following values are supported by `read`:\n * * Any class with the `@Component` or `@Directive` decorator\n * * Any provider defined on the injector of the component that is matched by the `selector` of\n * this query\n * * Any provider defined through a string token (e.g. `{provide: 'token', useValue: 'val'}`)\n * * `TemplateRef`, `ElementRef`, and `ViewContainerRef`\n *\n * @usageNotes\n *\n * {@example core/di/ts/viewChildren/view_children_howto.ts region='HowTo'}\n *\n * ### Another example\n *\n * {@example core/di/ts/viewChildren/view_children_example.ts region='Component'}\n *\n * @Annotation\n */\n (selector: ProviderToken<unknown>|Function|string,\n opts?: {read?: any, emitDistinctChangesOnly?: boolean}): any;\n new(selector: ProviderToken<unknown>|Function|string,\n opts?: {read?: any, emitDistinctChangesOnly?: boolean}): ViewChildren;\n}\n\n/**\n * Type of the ViewChildren metadata.\n *\n * @publicApi\n */\nexport type ViewChildren = Query;\n\n/**\n * ViewChildren decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const ViewChildren: ViewChildrenDecorator = makePropDecorator(\n 'ViewChildren', (selector?: any, data: any = {}) => ({\n selector,\n first: false,\n isViewQuery: true,\n descendants: true,\n emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue,\n ...data\n }),\n Query);\n\n/**\n * Type of the ViewChild decorator / constructor function.\n *\n * @see `ViewChild`.\n * @publicApi\n */\nexport interface ViewChildDecorator {\n /**\n * @description\n * Property decorator that configures a view query.\n * The change detector looks for the first element or the directive matching the selector\n * in the view DOM. If the view DOM changes, and a new child matches the selector,\n * the property is updated.\n *\n * View queries are set before the `ngAfterViewInit` callback is called.\n *\n * **Metadata Properties**:\n *\n * * **selector** - The directive type or the name used for querying.\n * * **read** - Used to read a different token from the queried elements.\n * * **static** - True to resolve query results before change detection runs,\n * false to resolve after change detection. Defaults to false.\n *\n *\n * The following selectors are supported.\n * * Any class with the `@Component` or `@Directive` decorator\n * * A template reference variable as a string (e.g. query `<my-component #cmp></my-component>`\n * with `@ViewChild('cmp')`)\n * * Any provider defined in the child component tree of the current component (e.g.\n * `@ViewChild(SomeService) someService: SomeService`)\n * * Any provider defined through a string token (e.g. `@ViewChild('someToken') someTokenVal:\n * any`)\n * * A `TemplateRef` (e.g. query `<ng-template></ng-template>` with `@ViewChild(TemplateRef)\n * template;`)\n *\n * The following values are supported by `read`:\n * * Any class with the `@Component` or `@Directive` decorator\n * * Any provider defined on the injector of the component that is matched by the `selector` of\n * this query\n * * Any provider defined through a string token (e.g. `{provide: 'token', useValue: 'val'}`)\n * * `TemplateRef`, `ElementRef`, and `ViewContainerRef`\n *\n * @usageNotes\n *\n * {@example core/di/ts/viewChild/view_child_example.ts region='Component'}\n *\n * ### Example 2\n *\n * {@example core/di/ts/viewChild/view_child_howto.ts region='HowTo'}\n *\n * @Annotation\n */\n (selector: ProviderToken<unknown>|Function|string, opts?: {read?: any, static?: boolean}): any;\n new(selector: ProviderToken<unknown>|Function|string,\n opts?: {read?: any, static?: boolean}): ViewChild;\n}\n\n/**\n * Type of the ViewChild metadata.\n *\n * @publicApi\n */\nexport type ViewChild = Query;\n\n/**\n * ViewChild decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const ViewChild: ViewChildDecorator = makePropDecorator(\n 'ViewChild',\n (selector: any, data: any) =>\n ({selector, first: true, isViewQuery: true, descendants: true, ...data}),\n Query);\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/**\n * A set of interfaces which are shared between `@angular/core` and `@angular/compiler` to allow\n * for late binding of `@angular/compiler` for JIT purposes.\n *\n * This file has two copies. Please ensure that they are in sync:\n * - packages/compiler/src/compiler_facade_interface.ts (main)\n * - packages/core/src/compiler/compiler_facade_interface.ts (replica)\n *\n * Please ensure that the two files are in sync using this command:\n * ```\n * cp packages/compiler/src/compiler_facade_interface.ts \\\n * packages/core/src/compiler/compiler_facade_interface.ts\n * ```\n */\n\nexport interface ExportedCompilerFacade {\n ɵcompilerFacade: CompilerFacade;\n}\n\nexport interface CompilerFacade {\n compilePipe(angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3PipeMetadataFacade):\n any;\n compilePipeDeclaration(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string, declaration: R3DeclarePipeFacade): any;\n compileInjectable(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3InjectableMetadataFacade): any;\n compileInjectableDeclaration(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3DeclareInjectableFacade): any;\n compileInjector(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3InjectorMetadataFacade): any;\n compileInjectorDeclaration(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string,\n declaration: R3DeclareInjectorFacade): any;\n compileNgModule(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3NgModuleMetadataFacade): any;\n compileNgModuleDeclaration(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string,\n declaration: R3DeclareNgModuleFacade): any;\n compileDirective(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3DirectiveMetadataFacade): any;\n compileDirectiveDeclaration(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string,\n declaration: R3DeclareDirectiveFacade): any;\n compileComponent(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3ComponentMetadataFacade): any;\n compileComponentDeclaration(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string,\n declaration: R3DeclareComponentFacade): any;\n compileFactory(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3FactoryDefMetadataFacade): any;\n compileFactoryDeclaration(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3DeclareFactoryFacade): any;\n\n createParseSourceSpan(kind: string, typeName: string, sourceUrl: string): ParseSourceSpan;\n\n FactoryTarget: typeof FactoryTarget;\n // Note that we do not use `{new(): ResourceLoader}` here because\n // the resource loader class is abstract and not constructable.\n ResourceLoader: Function&{prototype: ResourceLoader};\n}\n\nexport interface CoreEnvironment {\n [name: string]: Function;\n}\n\nexport type ResourceLoader = {\n get(url: string): Promise<string>|string;\n};\n\nexport type StringMap = {\n [key: string]: string;\n};\n\nexport type StringMapWithRename = {\n [key: string]: string|[string, string];\n};\n\nexport type Provider = unknown;\nexport type Type = Function;\nexport type OpaqueValue = unknown;\n\nexport enum FactoryTarget {\n Directive = 0,\n Component = 1,\n Injectable = 2,\n Pipe = 3,\n NgModule = 4,\n}\n\nexport interface R3DependencyMetadataFacade {\n token: OpaqueValue;\n attribute: string|null;\n host: boolean;\n optional: boolean;\n self: boolean;\n skipSelf: boolean;\n}\n\nexport interface R3DeclareDependencyMetadataFacade {\n token: OpaqueValue;\n attribute?: boolean;\n host?: boolean;\n optional?: boolean;\n self?: boolean;\n skipSelf?: boolean;\n}\n\nexport interface R3PipeMetadataFacade {\n name: string;\n type: Type;\n pipeName: string;\n pure: boolean;\n}\n\nexport interface R3InjectableMetadataFacade {\n name: string;\n type: Type;\n typeArgumentCount: number;\n providedIn?: Type|'root'|'platform'|'any'|null;\n useClass?: OpaqueValue;\n useFactory?: OpaqueValue;\n useExisting?: OpaqueValue;\n useValue?: OpaqueValue;\n deps?: R3DependencyMetadataFacade[];\n}\n\nexport interface R3NgModuleMetadataFacade {\n type: Type;\n bootstrap: Function[];\n declarations: Function[];\n imports: Function[];\n exports: Function[];\n schemas: {name: string}[]|null;\n id: string|null;\n}\n\nexport interface R3InjectorMetadataFacade {\n name: string;\n type: Type;\n providers: Provider[];\n imports: OpaqueValue[];\n}\n\nexport interface R3DirectiveMetadataFacade {\n name: string;\n type: Type;\n typeSourceSpan: ParseSourceSpan;\n selector: string|null;\n queries: R3QueryMetadataFacade[];\n host: {[key: string]: string};\n propMetadata: {[key: string]: OpaqueValue[]};\n lifecycle: {usesOnChanges: boolean;};\n inputs: string[];\n outputs: string[];\n usesInheritance: boolean;\n exportAs: string[]|null;\n providers: Provider[]|null;\n viewQueries: R3QueryMetadataFacade[];\n}\n\nexport interface R3ComponentMetadataFacade extends R3DirectiveMetadataFacade {\n template: string;\n preserveWhitespaces: boolean;\n animations: OpaqueValue[]|undefined;\n pipes: Map<string, any>;\n directives: R3UsedDirectiveMetadata[];\n styles: string[];\n encapsulation: ViewEncapsulation;\n viewProviders: Provider[]|null;\n interpolation?: [string, string];\n changeDetection?: ChangeDetectionStrategy;\n}\n\nexport interface R3DeclareDirectiveFacade {\n selector?: string;\n type: Type;\n inputs?: {[classPropertyName: string]: string|[string, string]};\n outputs?: {[classPropertyName: string]: string};\n host?: {\n attributes?: {[key: string]: OpaqueValue};\n listeners?: {[key: string]: string};\n properties?: {[key: string]: string};\n classAttribute?: string;\n styleAttribute?: string;\n };\n queries?: R3DeclareQueryMetadataFacade[];\n viewQueries?: R3DeclareQueryMetadataFacade[];\n providers?: OpaqueValue;\n exportAs?: string[];\n usesInheritance?: boolean;\n usesOnChanges?: boolean;\n}\n\nexport interface R3DeclareComponentFacade extends R3DeclareDirectiveFacade {\n template: string;\n isInline?: boolean;\n styles?: string[];\n components?: R3DeclareUsedDirectiveFacade[];\n directives?: R3DeclareUsedDirectiveFacade[];\n pipes?: {[pipeName: string]: OpaqueValue|(() => OpaqueValue)};\n viewProviders?: OpaqueValue;\n animations?: OpaqueValue;\n changeDetection?: ChangeDetectionStrategy;\n encapsulation?: ViewEncapsulation;\n interpolation?: [string, string];\n preserveWhitespaces?: boolean;\n}\n\nexport interface R3DeclareUsedDirectiveFacade {\n selector: string;\n type: OpaqueValue|(() => OpaqueValue);\n inputs?: string[];\n outputs?: string[];\n exportAs?: string[];\n}\n\nexport interface R3UsedDirectiveMetadata {\n selector: string;\n inputs: string[];\n outputs: string[];\n exportAs: string[]|null;\n type: any;\n}\n\nexport interface R3FactoryDefMetadataFacade {\n name: string;\n type: Type;\n typeArgumentCount: number;\n deps: R3DependencyMetadataFacade[]|null;\n target: FactoryTarget;\n}\n\nexport interface R3DeclareFactoryFacade {\n type: Type;\n deps: R3DeclareDependencyMetadataFacade[]|'invalid'|null;\n target: FactoryTarget;\n}\n\nexport interface R3DeclareInjectableFacade {\n type: Type;\n providedIn?: Type|'root'|'platform'|'any'|null;\n useClass?: OpaqueValue;\n useFactory?: OpaqueValue;\n useExisting?: OpaqueValue;\n useValue?: OpaqueValue;\n deps?: R3DeclareDependencyMetadataFacade[];\n}\n\nexport enum ViewEncapsulation {\n Emulated = 0,\n // Historically the 1 value was for `Native` encapsulation which has been removed as of v11.\n None = 2,\n ShadowDom = 3\n}\n\nexport type ChangeDetectionStrategy = number;\n\nexport interface R3QueryMetadataFacade {\n propertyName: string;\n first: boolean;\n predicate: OpaqueValue|string[];\n descendants: boolean;\n emitDistinctChangesOnly: boolean;\n read: OpaqueValue|null;\n static: boolean;\n}\n\nexport interface R3DeclareQueryMetadataFacade {\n propertyName: string;\n first?: boolean;\n predicate: OpaqueValue|string[];\n descendants?: boolean;\n read?: OpaqueValue;\n static?: boolean;\n emitDistinctChangesOnly?: boolean;\n}\n\nexport interface R3DeclareInjectorFacade {\n type: Type;\n imports?: OpaqueValue[];\n providers?: OpaqueValue[];\n}\n\nexport interface R3DeclareNgModuleFacade {\n type: Type;\n bootstrap?: OpaqueValue[]|(() => OpaqueValue[]);\n declarations?: OpaqueValue[]|(() => OpaqueValue[]);\n imports?: OpaqueValue[]|(() => OpaqueValue[]);\n exports?: OpaqueValue[]|(() => OpaqueValue[]);\n schemas?: OpaqueValue[];\n id?: OpaqueValue;\n}\n\nexport interface R3DeclarePipeFacade {\n type: Type;\n name: string;\n pure?: boolean;\n}\n\nexport interface ParseSourceSpan {\n start: any;\n end: any;\n details: any;\n fullStart: any;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {global} from '../util/global';\nimport {CompilerFacade, ExportedCompilerFacade, Type} from './compiler_facade_interface';\nexport * from './compiler_facade_interface';\n\nexport const enum JitCompilerUsage {\n Decorator,\n PartialDeclaration,\n}\n\ninterface JitCompilerUsageRequest {\n usage: JitCompilerUsage;\n kind: 'directive'|'component'|'pipe'|'injectable'|'NgModule';\n type: Type;\n}\n\nexport function getCompilerFacade(request: JitCompilerUsageRequest): CompilerFacade {\n const globalNg: ExportedCompilerFacade = global['ng'];\n if (globalNg && globalNg.ɵcompilerFacade) {\n return globalNg.ɵcompilerFacade;\n }\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n // Log the type as an error so that a developer can easily navigate to the type from the\n // console.\n console.error(`JIT compilation failed for ${request.kind}`, request.type);\n\n let message = `The ${request.kind} '${\n request\n .type.name}' needs to be compiled using the JIT compiler, but '@angular/compiler' is not available.\\n\\n`;\n if (request.usage === JitCompilerUsage.PartialDeclaration) {\n message += `The ${request.kind} is part of a library that has been partially compiled.\\n`;\n message +=\n `However, the Angular Linker has not processed the library such that JIT compilation is used as fallback.\\n`;\n message += '\\n';\n message +=\n `Ideally, the library is processed using the Angular Linker to become fully AOT compiled.\\n`;\n } else {\n message +=\n `JIT compilation is discouraged for production use-cases! Consider using AOT mode instead.\\n`;\n }\n message +=\n `Alternatively, the JIT compiler should be loaded by bootstrapping using '@angular/platform-browser-dynamic' or '@angular/platform-server',\\n`;\n message +=\n `or manually provide the compiler with 'import \"@angular/compiler\";' before bootstrapping.`;\n throw new Error(message);\n } else {\n throw new Error('JIT compiler unavailable');\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 * @description\n *\n * Represents a type that a Component or other object is instances of.\n *\n * An example of a `Type` is `MyCustomComponent` class, which in JavaScript is represented by\n * the `MyCustomComponent` constructor function.\n *\n * @publicApi\n */\nexport const Type = Function;\n\nexport function isType(v: any): v is Type<any> {\n return typeof v === 'function';\n}\n\n/**\n * @description\n *\n * Represents an abstract class `T`, if applied to a concrete class it would stop being\n * instantiable.\n *\n * @publicApi\n */\nexport interface AbstractType<T> extends Function {\n prototype: T;\n}\n\nexport interface Type<T> extends Function {\n new(...args: any[]): T;\n}\n\nexport type Mutable<T extends {[x: string]: any}, K extends string> = {\n [P in K]: T[P];\n};\n\n/**\n * Returns a writable type version of type.\n *\n * USAGE:\n * Given:\n * ```\n * interface Person {readonly name: string}\n * ```\n *\n * We would like to get a read/write version of `Person`.\n * ```\n * const WritablePerson = Writable<Person>;\n * ```\n *\n * The result is that you can do:\n *\n * ```\n * const readonlyPerson: Person = {name: 'Marry'};\n * readonlyPerson.name = 'John'; // TypeError\n * (readonlyPerson as WritablePerson).name = 'John'; // OK\n *\n * // Error: Correctly detects that `Person` did not have `age` property.\n * (readonlyPerson as WritablePerson).age = 30;\n * ```\n */\nexport type Writable<T> = {\n -readonly[K in keyof T]: T[K];\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 {assertEqual, assertLessThanOrEqual} from './assert';\n\n/**\n * Equivalent to ES6 spread, add each item to an array.\n *\n * @param items The items to add\n * @param arr The array to which you want to add the items\n */\nexport function addAllToArray(items: any[], arr: any[]) {\n for (let i = 0; i < items.length; i++) {\n arr.push(items[i]);\n }\n}\n\n/**\n * Determines if the contents of two arrays is identical\n *\n * @param a first array\n * @param b second array\n * @param identityAccessor Optional function for extracting stable object identity from a value in\n * the array.\n */\nexport function arrayEquals<T>(a: T[], b: T[], identityAccessor?: (value: T) => unknown): boolean {\n if (a.length !== b.length) return false;\n for (let i = 0; i < a.length; i++) {\n let valueA = a[i];\n let valueB = b[i];\n if (identityAccessor) {\n valueA = identityAccessor(valueA) as any;\n valueB = identityAccessor(valueB) as any;\n }\n if (valueB !== valueA) {\n return false;\n }\n }\n return true;\n}\n\n\n/**\n * Flattens an array.\n */\nexport function flatten(list: any[], dst?: any[]): any[] {\n if (dst === undefined) dst = list;\n for (let i = 0; i < list.length; i++) {\n let item = list[i];\n if (Array.isArray(item)) {\n // we need to inline it.\n if (dst === list) {\n // Our assumption that the list was already flat was wrong and\n // we need to clone flat since we need to write to it.\n dst = list.slice(0, i);\n }\n flatten(item, dst);\n } else if (dst !== list) {\n dst.push(item);\n }\n }\n return dst;\n}\n\nexport function deepForEach<T>(input: (T|any[])[], fn: (value: T) => void): void {\n input.forEach(value => Array.isArray(value) ? deepForEach(value, fn) : fn(value));\n}\n\nexport function addToArray(arr: any[], index: number, value: any): void {\n // perf: array.push is faster than array.splice!\n if (index >= arr.length) {\n arr.push(value);\n } else {\n arr.splice(index, 0, value);\n }\n}\n\nexport function removeFromArray(arr: any[], index: number): any {\n // perf: array.pop is faster than array.splice!\n if (index >= arr.length - 1) {\n return arr.pop();\n } else {\n return arr.splice(index, 1)[0];\n }\n}\n\nexport function newArray<T = any>(size: number): T[];\nexport function newArray<T>(size: number, value: T): T[];\nexport function newArray<T>(size: number, value?: T): T[] {\n const list: T[] = [];\n for (let i = 0; i < size; i++) {\n list.push(value!);\n }\n return list;\n}\n\n/**\n * Remove item from array (Same as `Array.splice()` but faster.)\n *\n * `Array.splice()` is not as fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * https://jsperf.com/fast-array-splice (About 20x faster)\n *\n * @param array Array to splice\n * @param index Index of element in array to remove.\n * @param count Number of items to remove.\n */\nexport function arraySplice(array: any[], index: number, count: number): void {\n const length = array.length - count;\n while (index < length) {\n array[index] = array[index + count];\n index++;\n }\n while (count--) {\n array.pop(); // shrink the array\n }\n}\n\n/**\n * Same as `Array.splice(index, 0, value)` but faster.\n *\n * `Array.splice()` is not fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * @param array Array to splice.\n * @param index Index in array where the `value` should be added.\n * @param value Value to add to array.\n */\nexport function arrayInsert(array: any[], index: number, value: any): void {\n ngDevMode && assertLessThanOrEqual(index, array.length, 'Can\\'t insert past array end.');\n let end = array.length;\n while (end > index) {\n const previousEnd = end - 1;\n array[end] = array[previousEnd];\n end = previousEnd;\n }\n array[index] = value;\n}\n\n/**\n * Same as `Array.splice2(index, 0, value1, value2)` but faster.\n *\n * `Array.splice()` is not fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * @param array Array to splice.\n * @param index Index in array where the `value` should be added.\n * @param value1 Value to add to array.\n * @param value2 Value to add to array.\n */\nexport function arrayInsert2(array: any[], index: number, value1: any, value2: any): void {\n ngDevMode && assertLessThanOrEqual(index, array.length, 'Can\\'t insert past array end.');\n let end = array.length;\n if (end == index) {\n // inserting at the end.\n array.push(value1, value2);\n } else if (end === 1) {\n // corner case when we have less items in array than we have items to insert.\n array.push(value2, array[0]);\n array[0] = value1;\n } else {\n end--;\n array.push(array[end - 1], array[end]);\n while (end > index) {\n const previousEnd = end - 2;\n array[end] = array[previousEnd];\n end--;\n }\n array[index] = value1;\n array[index + 1] = value2;\n }\n}\n\n/**\n * Insert a `value` into an `array` so that the array remains sorted.\n *\n * NOTE:\n * - Duplicates are not allowed, and are ignored.\n * - This uses binary search algorithm for fast inserts.\n *\n * @param array A sorted array to insert into.\n * @param value The value to insert.\n * @returns index of the inserted value.\n */\nexport function arrayInsertSorted(array: string[], value: string): number {\n let index = arrayIndexOfSorted(array, value);\n if (index < 0) {\n // if we did not find it insert it.\n index = ~index;\n arrayInsert(array, index, value);\n }\n return index;\n}\n\n/**\n * Remove `value` from a sorted `array`.\n *\n * NOTE:\n * - This uses binary search algorithm for fast removals.\n *\n * @param array A sorted array to remove from.\n * @param value The value to remove.\n * @returns index of the removed value.\n * - positive index if value found and removed.\n * - negative index if value not found. (`~index` to get the value where it should have been\n * inserted)\n */\nexport function arrayRemoveSorted(array: string[], value: string): number {\n const index = arrayIndexOfSorted(array, value);\n if (index >= 0) {\n arraySplice(array, index, 1);\n }\n return index;\n}\n\n\n/**\n * Get an index of an `value` in a sorted `array`.\n *\n * NOTE:\n * - This uses binary search algorithm for fast removals.\n *\n * @param array A sorted array to binary search.\n * @param value The value to look for.\n * @returns index of the value.\n * - positive index if value found.\n * - negative index if value not found. (`~index` to get the value where it should have been\n * located)\n */\nexport function arrayIndexOfSorted(array: string[], value: string): number {\n return _arrayIndexOfSorted(array, value, 0);\n}\n\n\n/**\n * `KeyValueArray` is an array where even positions contain keys and odd positions contain values.\n *\n * `KeyValueArray` provides a very efficient way of iterating over its contents. For small\n * sets (~10) the cost of binary searching an `KeyValueArray` has about the same performance\n * characteristics that of a `Map` with significantly better memory footprint.\n *\n * If used as a `Map` the keys are stored in alphabetical order so that they can be binary searched\n * for retrieval.\n *\n * See: `keyValueArraySet`, `keyValueArrayGet`, `keyValueArrayIndexOf`, `keyValueArrayDelete`.\n */\nexport interface KeyValueArray<VALUE> extends Array<VALUE|string> {\n __brand__: 'array-map';\n}\n\n/**\n * Set a `value` for a `key`.\n *\n * @param keyValueArray to modify.\n * @param key The key to locate or create.\n * @param value The value to set for a `key`.\n * @returns index (always even) of where the value vas set.\n */\nexport function keyValueArraySet<V>(\n keyValueArray: KeyValueArray<V>, key: string, value: V): number {\n let index = keyValueArrayIndexOf(keyValueArray, key);\n if (index >= 0) {\n // if we found it set it.\n keyValueArray[index | 1] = value;\n } else {\n index = ~index;\n arrayInsert2(keyValueArray, index, key, value);\n }\n return index;\n}\n\n/**\n * Retrieve a `value` for a `key` (on `undefined` if not found.)\n *\n * @param keyValueArray to search.\n * @param key The key to locate.\n * @return The `value` stored at the `key` location or `undefined if not found.\n */\nexport function keyValueArrayGet<V>(keyValueArray: KeyValueArray<V>, key: string): V|undefined {\n const index = keyValueArrayIndexOf(keyValueArray, key);\n if (index >= 0) {\n // if we found it retrieve it.\n return keyValueArray[index | 1] as V;\n }\n return undefined;\n}\n\n/**\n * Retrieve a `key` index value in the array or `-1` if not found.\n *\n * @param keyValueArray to search.\n * @param key The key to locate.\n * @returns index of where the key is (or should have been.)\n * - positive (even) index if key found.\n * - negative index if key not found. (`~index` (even) to get the index where it should have\n * been inserted.)\n */\nexport function keyValueArrayIndexOf<V>(keyValueArray: KeyValueArray<V>, key: string): number {\n return _arrayIndexOfSorted(keyValueArray as string[], key, 1);\n}\n\n/**\n * Delete a `key` (and `value`) from the `KeyValueArray`.\n *\n * @param keyValueArray to modify.\n * @param key The key to locate or delete (if exist).\n * @returns index of where the key was (or should have been.)\n * - positive (even) index if key found and deleted.\n * - negative index if key not found. (`~index` (even) to get the index where it should have\n * been.)\n */\nexport function keyValueArrayDelete<V>(keyValueArray: KeyValueArray<V>, key: string): number {\n const index = keyValueArrayIndexOf(keyValueArray, key);\n if (index >= 0) {\n // if we found it remove it.\n arraySplice(keyValueArray, index, 2);\n }\n return index;\n}\n\n\n/**\n * INTERNAL: Get an index of an `value` in a sorted `array` by grouping search by `shift`.\n *\n * NOTE:\n * - This uses binary search algorithm for fast removals.\n *\n * @param array A sorted array to binary search.\n * @param value The value to look for.\n * @param shift grouping shift.\n * - `0` means look at every location\n * - `1` means only look at every other (even) location (the odd locations are to be ignored as\n * they are values.)\n * @returns index of the value.\n * - positive index if value found.\n * - negative index if value not found. (`~index` to get the value where it should have been\n * inserted)\n */\nfunction _arrayIndexOfSorted(array: string[], value: string, shift: number): number {\n ngDevMode && assertEqual(Array.isArray(array), true, 'Expecting an array');\n let start = 0;\n let end = array.length >> shift;\n while (end !== start) {\n const middle = start + ((end - start) >> 1); // find the middle.\n const current = array[middle << shift];\n if (value === current) {\n return (middle << shift);\n } else if (current > value) {\n end = middle;\n } else {\n start = middle + 1; // We already searched middle so make it non-inclusive by adding 1\n }\n }\n return ~(end << shift);\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 {isType, Type} from '../interface/type';\nimport {newArray} from '../util/array_utils';\nimport {ANNOTATIONS, PARAMETERS, PROP_METADATA} from '../util/decorators';\nimport {global} from '../util/global';\nimport {stringify} from '../util/stringify';\n\nimport {PlatformReflectionCapabilities} from './platform_reflection_capabilities';\nimport {GetterFn, MethodFn, SetterFn} from './types';\n\n\n\n/*\n * #########################\n * Attention: These Regular expressions have to hold even if the code is minified!\n * ##########################\n */\n\n/**\n * Regular expression that detects pass-through constructors for ES5 output. This Regex\n * intends to capture the common delegation pattern emitted by TypeScript and Babel. Also\n * it intends to capture the pattern where existing constructors have been downleveled from\n * ES2015 to ES5 using TypeScript w/ downlevel iteration. e.g.\n *\n * ```\n * function MyClass() {\n * var _this = _super.apply(this, arguments) || this;\n * ```\n *\n * downleveled to ES5 with `downlevelIteration` for TypeScript < 4.2:\n * ```\n * function MyClass() {\n * var _this = _super.apply(this, __spread(arguments)) || this;\n * ```\n *\n * or downleveled to ES5 with `downlevelIteration` for TypeScript >= 4.2:\n * ```\n * function MyClass() {\n * var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;\n * ```\n *\n * More details can be found in: https://github.com/angular/angular/issues/38453.\n */\nexport const ES5_DELEGATE_CTOR =\n /^function\\s+\\S+\\(\\)\\s*{[\\s\\S]+\\.apply\\(this,\\s*(arguments|(?:[^()]+\\(\\[\\],)?[^()]+\\(arguments\\))\\)/;\n/** Regular expression that detects ES2015 classes which extend from other classes. */\nexport const ES2015_INHERITED_CLASS = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{/;\n/**\n * Regular expression that detects ES2015 classes which extend from other classes and\n * have an explicit constructor defined.\n */\nexport const ES2015_INHERITED_CLASS_WITH_CTOR =\n /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{[\\s\\S]*constructor\\s*\\(/;\n/**\n * Regular expression that detects ES2015 classes which extend from other classes\n * and inherit a constructor.\n */\nexport const ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR =\n /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{[\\s\\S]*constructor\\s*\\(\\)\\s*{\\s*super\\(\\.\\.\\.arguments\\)/;\n\n/**\n * Determine whether a stringified type is a class which delegates its constructor\n * to its parent.\n *\n * This is not trivial since compiled code can actually contain a constructor function\n * even if the original source code did not. For instance, when the child class contains\n * an initialized instance property.\n */\nexport function isDelegateCtor(typeStr: string): boolean {\n return ES5_DELEGATE_CTOR.test(typeStr) ||\n ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR.test(typeStr) ||\n (ES2015_INHERITED_CLASS.test(typeStr) && !ES2015_INHERITED_CLASS_WITH_CTOR.test(typeStr));\n}\n\nexport class ReflectionCapabilities implements PlatformReflectionCapabilities {\n private _reflect: any;\n\n constructor(reflect?: any) {\n this._reflect = reflect || global['Reflect'];\n }\n\n isReflectionEnabled(): boolean {\n return true;\n }\n\n factory<T>(t: Type<T>): (args: any[]) => T {\n return (...args: any[]) => new t(...args);\n }\n\n /** @internal */\n _zipTypesAndAnnotations(paramTypes: any[], paramAnnotations: any[]): any[][] {\n let result: any[][];\n\n if (typeof paramTypes === 'undefined') {\n result = newArray(paramAnnotations.length);\n } else {\n result = newArray(paramTypes.length);\n }\n\n for (let i = 0; i < result.length; i++) {\n // TS outputs Object for parameters without types, while Traceur omits\n // the annotations. For now we preserve the Traceur behavior to aid\n // migration, but this can be revisited.\n if (typeof paramTypes === 'undefined') {\n result[i] = [];\n } else if (paramTypes[i] && paramTypes[i] != Object) {\n result[i] = [paramTypes[i]];\n } else {\n result[i] = [];\n }\n if (paramAnnotations && paramAnnotations[i] != null) {\n result[i] = result[i].concat(paramAnnotations[i]);\n }\n }\n return result;\n }\n\n private _ownParameters(type: Type<any>, parentCtor: any): any[][]|null {\n const typeStr = type.toString();\n // If we have no decorators, we only have function.length as metadata.\n // In that case, to detect whether a child class declared an own constructor or not,\n // we need to look inside of that constructor to check whether it is\n // just calling the parent.\n // This also helps to work around for https://github.com/Microsoft/TypeScript/issues/12439\n // that sets 'design:paramtypes' to []\n // if a class inherits from another class but has no ctor declared itself.\n if (isDelegateCtor(typeStr)) {\n return null;\n }\n\n // Prefer the direct API.\n if ((<any>type).parameters && (<any>type).parameters !== parentCtor.parameters) {\n return (<any>type).parameters;\n }\n\n // API of tsickle for lowering decorators to properties on the class.\n const tsickleCtorParams = (<any>type).ctorParameters;\n if (tsickleCtorParams && tsickleCtorParams !== parentCtor.ctorParameters) {\n // Newer tsickle uses a function closure\n // Retain the non-function case for compatibility with older tsickle\n const ctorParameters =\n typeof tsickleCtorParams === 'function' ? tsickleCtorParams() : tsickleCtorParams;\n const paramTypes = ctorParameters.map((ctorParam: any) => ctorParam && ctorParam.type);\n const paramAnnotations = ctorParameters.map(\n (ctorParam: any) =>\n ctorParam && convertTsickleDecoratorIntoMetadata(ctorParam.decorators));\n return this._zipTypesAndAnnotations(paramTypes, paramAnnotations);\n }\n\n // API for metadata created by invoking the decorators.\n const paramAnnotations = type.hasOwnProperty(PARAMETERS) && (type as any)[PARAMETERS];\n const paramTypes = this._reflect && this._reflect.getOwnMetadata &&\n this._reflect.getOwnMetadata('design:paramtypes', type);\n if (paramTypes || paramAnnotations) {\n return this._zipTypesAndAnnotations(paramTypes, paramAnnotations);\n }\n\n // If a class has no decorators, at least create metadata\n // based on function.length.\n // Note: We know that this is a real constructor as we checked\n // the content of the constructor above.\n return newArray<any[]>(type.length);\n }\n\n parameters(type: Type<any>): any[][] {\n // Note: only report metadata if we have at least one class decorator\n // to stay in sync with the static reflector.\n if (!isType(type)) {\n return [];\n }\n const parentCtor = getParentCtor(type);\n let parameters = this._ownParameters(type, parentCtor);\n if (!parameters && parentCtor !== Object) {\n parameters = this.parameters(parentCtor);\n }\n return parameters || [];\n }\n\n private _ownAnnotations(typeOrFunc: Type<any>, parentCtor: any): any[]|null {\n // Prefer the direct API.\n if ((<any>typeOrFunc).annotations && (<any>typeOrFunc).annotations !== parentCtor.annotations) {\n let annotations = (<any>typeOrFunc).annotations;\n if (typeof annotations === 'function' && annotations.annotations) {\n annotations = annotations.annotations;\n }\n return annotations;\n }\n\n // API of tsickle for lowering decorators to properties on the class.\n if ((<any>typeOrFunc).decorators && (<any>typeOrFunc).decorators !== parentCtor.decorators) {\n return convertTsickleDecoratorIntoMetadata((<any>typeOrFunc).decorators);\n }\n\n // API for metadata created by invoking the decorators.\n if (typeOrFunc.hasOwnProperty(ANNOTATIONS)) {\n return (typeOrFunc as any)[ANNOTATIONS];\n }\n return null;\n }\n\n annotations(typeOrFunc: Type<any>): any[] {\n if (!isType(typeOrFunc)) {\n return [];\n }\n const parentCtor = getParentCtor(typeOrFunc);\n const ownAnnotations = this._ownAnnotations(typeOrFunc, parentCtor) || [];\n const parentAnnotations = parentCtor !== Object ? this.annotations(parentCtor) : [];\n return parentAnnotations.concat(ownAnnotations);\n }\n\n private _ownPropMetadata(typeOrFunc: any, parentCtor: any): {[key: string]: any[]}|null {\n // Prefer the direct API.\n if ((<any>typeOrFunc).propMetadata &&\n (<any>typeOrFunc).propMetadata !== parentCtor.propMetadata) {\n let propMetadata = (<any>typeOrFunc).propMetadata;\n if (typeof propMetadata === 'function' && propMetadata.propMetadata) {\n propMetadata = propMetadata.propMetadata;\n }\n return propMetadata;\n }\n\n // API of tsickle for lowering decorators to properties on the class.\n if ((<any>typeOrFunc).propDecorators &&\n (<any>typeOrFunc).propDecorators !== parentCtor.propDecorators) {\n const propDecorators = (<any>typeOrFunc).propDecorators;\n const propMetadata = <{[key: string]: any[]}>{};\n Object.keys(propDecorators).forEach(prop => {\n propMetadata[prop] = convertTsickleDecoratorIntoMetadata(propDecorators[prop]);\n });\n return propMetadata;\n }\n\n // API for metadata created by invoking the decorators.\n if (typeOrFunc.hasOwnProperty(PROP_METADATA)) {\n return (typeOrFunc as any)[PROP_METADATA];\n }\n return null;\n }\n\n propMetadata(typeOrFunc: any): {[key: string]: any[]} {\n if (!isType(typeOrFunc)) {\n return {};\n }\n const parentCtor = getParentCtor(typeOrFunc);\n const propMetadata: {[key: string]: any[]} = {};\n if (parentCtor !== Object) {\n const parentPropMetadata = this.propMetadata(parentCtor);\n Object.keys(parentPropMetadata).forEach((propName) => {\n propMetadata[propName] = parentPropMetadata[propName];\n });\n }\n const ownPropMetadata = this._ownPropMetadata(typeOrFunc, parentCtor);\n if (ownPropMetadata) {\n Object.keys(ownPropMetadata).forEach((propName) => {\n const decorators: any[] = [];\n if (propMetadata.hasOwnProperty(propName)) {\n decorators.push(...propMetadata[propName]);\n }\n decorators.push(...ownPropMetadata[propName]);\n propMetadata[propName] = decorators;\n });\n }\n return propMetadata;\n }\n\n ownPropMetadata(typeOrFunc: any): {[key: string]: any[]} {\n if (!isType(typeOrFunc)) {\n return {};\n }\n return this._ownPropMetadata(typeOrFunc, getParentCtor(typeOrFunc)) || {};\n }\n\n hasLifecycleHook(type: any, lcProperty: string): boolean {\n return type instanceof Type && lcProperty in type.prototype;\n }\n\n guards(type: any): {[key: string]: any} {\n return {};\n }\n\n getter(name: string): GetterFn {\n return <GetterFn>new Function('o', 'return o.' + name + ';');\n }\n\n setter(name: string): SetterFn {\n return <SetterFn>new Function('o', 'v', 'return o.' + name + ' = v;');\n }\n\n method(name: string): MethodFn {\n const functionBody = `if (!o.${name}) throw new Error('\"${name}\" is undefined');\n return o.${name}.apply(o, args);`;\n return <MethodFn>new Function('o', 'args', functionBody);\n }\n\n // There is not a concept of import uri in Js, but this is useful in developing Dart applications.\n importUri(type: any): string {\n // StaticSymbol\n if (typeof type === 'object' && type['filePath']) {\n return type['filePath'];\n }\n // Runtime type\n return `./${stringify(type)}`;\n }\n\n resourceUri(type: any): string {\n return `./${stringify(type)}`;\n }\n\n resolveIdentifier(name: string, moduleUrl: string, members: string[], runtime: any): any {\n return runtime;\n }\n resolveEnum(enumIdentifier: any, name: string): any {\n return enumIdentifier[name];\n }\n}\n\nfunction convertTsickleDecoratorIntoMetadata(decoratorInvocations: any[]): any[] {\n if (!decoratorInvocations) {\n return [];\n }\n return decoratorInvocations.map(decoratorInvocation => {\n const decoratorType = decoratorInvocation.type;\n const annotationCls = decoratorType.annotationCls;\n const annotationArgs = decoratorInvocation.args ? decoratorInvocation.args : [];\n return new annotationCls(...annotationArgs);\n });\n}\n\nfunction getParentCtor(ctor: Function): Type<any> {\n const parentProto = ctor.prototype ? Object.getPrototypeOf(ctor.prototype) : null;\n const parentCtor = parentProto ? parentProto.constructor : null;\n // Note: We always use `Object` as the null value\n // to simplify checking later on.\n return parentCtor || Object;\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 '../util/ng_dev_mode';\n\nimport {Type} from '../interface/type';\nimport {getClosureSafeProperty} from '../util/property';\nimport {stringify} from '../util/stringify';\n\nimport {resolveForwardRef} from './forward_ref';\nimport {getInjectImplementation, injectRootLimpMode} from './inject_switch';\nimport {Injector} from './injector';\nimport {DecoratorFlags, InjectFlags, InternalInjectFlags} from './interface/injector';\nimport {ValueProvider} from './interface/provider';\nimport {ProviderToken} from './provider_token';\n\n\nconst _THROW_IF_NOT_FOUND = {};\nexport const THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;\n\n/*\n * Name of a property (that we patch onto DI decorator), which is used as an annotation of which\n * InjectFlag this decorator represents. This allows to avoid direct references to the DI decorators\n * in the code, thus making them tree-shakable.\n */\nconst DI_DECORATOR_FLAG = '__NG_DI_FLAG__';\n\nexport const NG_TEMP_TOKEN_PATH = 'ngTempTokenPath';\nconst NG_TOKEN_PATH = 'ngTokenPath';\nconst NEW_LINE = /\\n/gm;\nconst NO_NEW_LINE = 'ɵ';\nexport const SOURCE = '__source';\n\nexport const USE_VALUE =\n getClosureSafeProperty<ValueProvider>({provide: String, useValue: getClosureSafeProperty});\n\n/**\n * Current injector value used by `inject`.\n * - `undefined`: it is an error to call `inject`\n * - `null`: `inject` can be called but there is no injector (limp-mode).\n * - Injector instance: Use the injector for resolution.\n */\nlet _currentInjector: Injector|undefined|null = undefined;\n\nexport function setCurrentInjector(injector: Injector|null|undefined): Injector|undefined|null {\n const former = _currentInjector;\n _currentInjector = injector;\n return former;\n}\n\nexport function injectInjectorOnly<T>(token: ProviderToken<T>): T;\nexport function injectInjectorOnly<T>(token: ProviderToken<T>, flags?: InjectFlags): T|null;\nexport function injectInjectorOnly<T>(token: ProviderToken<T>, flags = InjectFlags.Default): T|\n null {\n if (_currentInjector === undefined) {\n throw new Error(`inject() must be called from an injection context`);\n } else if (_currentInjector === null) {\n return injectRootLimpMode(token, undefined, flags);\n } else {\n return _currentInjector.get(token, flags & InjectFlags.Optional ? null : undefined, flags);\n }\n}\n\n/**\n * Generated instruction: Injects a token from the currently active injector.\n *\n * Must be used in the context of a factory function such as one defined for an\n * `InjectionToken`. Throws an error if not called from such a context.\n *\n * (Additional documentation moved to `inject`, as it is the public API, and an alias for this\n * instruction)\n *\n * @see inject\n * @codeGenApi\n * @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm.\n */\nexport function ɵɵinject<T>(token: ProviderToken<T>): T;\nexport function ɵɵinject<T>(token: ProviderToken<T>, flags?: InjectFlags): T|null;\nexport function ɵɵinject<T>(token: ProviderToken<T>, flags = InjectFlags.Default): T|null {\n return (getInjectImplementation() || injectInjectorOnly)(resolveForwardRef(token), flags);\n}\n\n/**\n * Throws an error indicating that a factory function could not be generated by the compiler for a\n * particular class.\n *\n * This instruction allows the actual error message to be optimized away when ngDevMode is turned\n * off, saving bytes of generated code while still providing a good experience in dev mode.\n *\n * The name of the class is not mentioned here, but will be in the generated factory function name\n * and thus in the stack trace.\n *\n * @codeGenApi\n */\nexport function ɵɵinvalidFactoryDep(index: number): never {\n const msg = ngDevMode ?\n `This constructor is not compatible with Angular Dependency Injection because its dependency at index ${\n index} of the parameter list is invalid.\nThis can happen if the dependency type is a primitive like a string or if an ancestor of this class is missing an Angular decorator.\n\nPlease check that 1) the type for the parameter at index ${\n index} is correct and 2) the correct Angular decorators are defined for this class and its ancestors.` :\n 'invalid';\n throw new Error(msg);\n}\n\n/**\n * Injects a token from the currently active injector.\n *\n * Must be used in the context of a factory function such as one defined for an\n * `InjectionToken`. Throws an error if not called from such a context.\n *\n * Within such a factory function, using this function to request injection of a dependency\n * is faster and more type-safe than providing an additional array of dependencies\n * (as has been common with `useFactory` providers).\n *\n * @param token The injection token for the dependency to be injected.\n * @param flags Optional flags that control how injection is executed.\n * The flags correspond to injection strategies that can be specified with\n * parameter decorators `@Host`, `@Self`, `@SkipSef`, and `@Optional`.\n * @returns the injected value if injection is successful, `null` otherwise.\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}\n *\n * @publicApi\n */\nexport const inject = ɵɵinject;\n\nexport function injectArgs(types: (ProviderToken<any>|any[])[]): any[] {\n const args: any[] = [];\n for (let i = 0; i < types.length; i++) {\n const arg = resolveForwardRef(types[i]);\n if (Array.isArray(arg)) {\n if (arg.length === 0) {\n throw new Error('Arguments array must have arguments.');\n }\n let type: Type<any>|undefined = undefined;\n let flags: InjectFlags = InjectFlags.Default;\n\n for (let j = 0; j < arg.length; j++) {\n const meta = arg[j];\n const flag = getInjectFlag(meta);\n if (typeof flag === 'number') {\n // Special case when we handle @Inject decorator.\n if (flag === DecoratorFlags.Inject) {\n type = meta.token;\n } else {\n flags |= flag;\n }\n } else {\n type = meta;\n }\n }\n\n args.push(ɵɵinject(type!, flags));\n } else {\n args.push(ɵɵinject(arg));\n }\n }\n return args;\n}\n\n/**\n * Attaches a given InjectFlag to a given decorator using monkey-patching.\n * Since DI decorators can be used in providers `deps` array (when provider is configured using\n * `useFactory`) without initialization (e.g. `Host`) and as an instance (e.g. `new Host()`), we\n * attach the flag to make it available both as a static property and as a field on decorator\n * instance.\n *\n * @param decorator Provided DI decorator.\n * @param flag InjectFlag that should be applied.\n */\nexport function attachInjectFlag(decorator: any, flag: InternalInjectFlags|DecoratorFlags): any {\n decorator[DI_DECORATOR_FLAG] = flag;\n decorator.prototype[DI_DECORATOR_FLAG] = flag;\n return decorator;\n}\n\n/**\n * Reads monkey-patched property that contains InjectFlag attached to a decorator.\n *\n * @param token Token that may contain monkey-patched DI flags property.\n */\nexport function getInjectFlag(token: any): number|undefined {\n return token[DI_DECORATOR_FLAG];\n}\n\nexport function catchInjectorError(\n e: any, token: any, injectorErrorName: string, source: string|null): never {\n const tokenPath: any[] = e[NG_TEMP_TOKEN_PATH];\n if (token[SOURCE]) {\n tokenPath.unshift(token[SOURCE]);\n }\n e.message = formatError('\\n' + e.message, tokenPath, injectorErrorName, source);\n e[NG_TOKEN_PATH] = tokenPath;\n e[NG_TEMP_TOKEN_PATH] = null;\n throw e;\n}\n\nexport function formatError(\n text: string, obj: any, injectorErrorName: string, source: string|null = null): string {\n text = text && text.charAt(0) === '\\n' && text.charAt(1) == NO_NEW_LINE ? text.substr(2) : text;\n let context = stringify(obj);\n if (Array.isArray(obj)) {\n context = obj.map(stringify).join(' -> ');\n } else if (typeof obj === 'object') {\n let parts = <string[]>[];\n for (let key in obj) {\n if (obj.hasOwnProperty(key)) {\n let value = obj[key];\n parts.push(\n key + ':' + (typeof value === 'string' ? JSON.stringify(value) : stringify(value)));\n }\n }\n context = `{${parts.join(', ')}}`;\n }\n return `${injectorErrorName}${source ? '(' + source + ')' : ''}[${context}]: ${\n text.replace(NEW_LINE, '\\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 {makeParamDecorator} from '../util/decorators';\n\nimport {attachInjectFlag} from './injector_compatibility';\nimport {DecoratorFlags, InternalInjectFlags} from './interface/injector';\n\n\n/**\n * Type of the Inject decorator / constructor function.\n *\n * @publicApi\n */\nexport interface InjectDecorator {\n /**\n * Parameter decorator on a dependency parameter of a class constructor\n * that specifies a custom provider of the dependency.\n *\n * @usageNotes\n * The following example shows a class constructor that specifies a\n * custom provider of a dependency using the parameter decorator.\n *\n * When `@Inject()` is not present, the injector uses the type annotation of the\n * parameter as the provider.\n *\n * <code-example path=\"core/di/ts/metadata_spec.ts\" region=\"InjectWithoutDecorator\">\n * </code-example>\n *\n * @see [\"Dependency Injection Guide\"](guide/dependency-injection)\n *\n */\n (token: any): any;\n new(token: any): Inject;\n}\n\n/**\n * Type of the Inject metadata.\n *\n * @publicApi\n */\nexport interface Inject {\n /**\n * A [DI token](guide/glossary#di-token) that maps to the dependency to be injected.\n */\n token: any;\n}\n\n/**\n * Inject decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Inject: InjectDecorator = attachInjectFlag(\n // Disable tslint because `DecoratorFlags` is a const enum which gets inlined.\n // tslint:disable-next-line: no-toplevel-property-access\n makeParamDecorator('Inject', (token: any) => ({token})), DecoratorFlags.Inject);\n\n/**\n * Type of the Optional decorator / constructor function.\n *\n * @publicApi\n */\nexport interface OptionalDecorator {\n /**\n * Parameter decorator to be used on constructor parameters,\n * which marks the parameter as being an optional dependency.\n * The DI framework provides `null` if the dependency is not found.\n *\n * Can be used together with other parameter decorators\n * that modify how dependency injection operates.\n *\n * @usageNotes\n *\n * The following code allows the possibility of a `null` result:\n *\n * <code-example path=\"core/di/ts/metadata_spec.ts\" region=\"Optional\">\n * </code-example>\n *\n * @see [\"Dependency Injection Guide\"](guide/dependency-injection).\n */\n (): any;\n new(): Optional;\n}\n\n/**\n * Type of the Optional metadata.\n *\n * @publicApi\n */\nexport interface Optional {}\n\n/**\n * Optional decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Optional: OptionalDecorator =\n // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n // tslint:disable-next-line: no-toplevel-property-access\n attachInjectFlag(makeParamDecorator('Optional'), InternalInjectFlags.Optional);\n\n/**\n * Type of the Self decorator / constructor function.\n *\n * @publicApi\n */\nexport interface SelfDecorator {\n /**\n * Parameter decorator to be used on constructor parameters,\n * which tells the DI framework to start dependency resolution from the local injector.\n *\n * Resolution works upward through the injector hierarchy, so the children\n * of this class must configure their own providers or be prepared for a `null` result.\n *\n * @usageNotes\n *\n * In the following example, the dependency can be resolved\n * by the local injector when instantiating the class itself, but not\n * when instantiating a child.\n *\n * <code-example path=\"core/di/ts/metadata_spec.ts\" region=\"Self\">\n * </code-example>\n *\n * @see `SkipSelf`\n * @see `Optional`\n *\n */\n (): any;\n new(): Self;\n}\n\n/**\n * Type of the Self metadata.\n *\n * @publicApi\n */\nexport interface Self {}\n\n/**\n * Self decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Self: SelfDecorator =\n // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n // tslint:disable-next-line: no-toplevel-property-access\n attachInjectFlag(makeParamDecorator('Self'), InternalInjectFlags.Self);\n\n\n/**\n * Type of the `SkipSelf` decorator / constructor function.\n *\n * @publicApi\n */\nexport interface SkipSelfDecorator {\n /**\n * Parameter decorator to be used on constructor parameters,\n * which tells the DI framework to start dependency resolution from the parent injector.\n * Resolution works upward through the injector hierarchy, so the local injector\n * is not checked for a provider.\n *\n * @usageNotes\n *\n * In the following example, the dependency can be resolved when\n * instantiating a child, but not when instantiating the class itself.\n *\n * <code-example path=\"core/di/ts/metadata_spec.ts\" region=\"SkipSelf\">\n * </code-example>\n *\n * @see [Dependency Injection guide](guide/dependency-injection-in-action#skip).\n * @see `Self`\n * @see `Optional`\n *\n */\n (): any;\n new(): SkipSelf;\n}\n\n/**\n * Type of the `SkipSelf` metadata.\n *\n * @publicApi\n */\nexport interface SkipSelf {}\n\n/**\n * `SkipSelf` decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const SkipSelf: SkipSelfDecorator =\n // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n // tslint:disable-next-line: no-toplevel-property-access\n attachInjectFlag(makeParamDecorator('SkipSelf'), InternalInjectFlags.SkipSelf);\n\n/**\n * Type of the `Host` decorator / constructor function.\n *\n * @publicApi\n */\nexport interface HostDecorator {\n /**\n * Parameter decorator on a view-provider parameter of a class constructor\n * that tells the DI framework to resolve the view by checking injectors of child\n * elements, and stop when reaching the host element of the current component.\n *\n * @usageNotes\n *\n * The following shows use with the `@Optional` decorator, and allows for a `null` result.\n *\n * <code-example path=\"core/di/ts/metadata_spec.ts\" region=\"Host\">\n * </code-example>\n *\n * For an extended example, see [\"Dependency Injection\n * Guide\"](guide/dependency-injection-in-action#optional).\n */\n (): any;\n new(): Host;\n}\n\n/**\n * Type of the Host metadata.\n *\n * @publicApi\n */\nexport interface Host {}\n\n/**\n * Host decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Host: HostDecorator =\n // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n // tslint:disable-next-line: no-toplevel-property-access\n attachInjectFlag(makeParamDecorator('Host'), InternalInjectFlags.Host);\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 {R3DependencyMetadataFacade} from '../../compiler/compiler_facade';\nimport {Type} from '../../interface/type';\nimport {ReflectionCapabilities} from '../../reflection/reflection_capabilities';\nimport {Host, Inject, Optional, Self, SkipSelf} from '../metadata';\nimport {Attribute} from '../metadata_attr';\n\nlet _reflect: ReflectionCapabilities|null = null;\n\nexport function getReflect(): ReflectionCapabilities {\n return (_reflect = _reflect || new ReflectionCapabilities());\n}\n\nexport function reflectDependencies(type: Type<any>): R3DependencyMetadataFacade[] {\n return convertDependencies(getReflect().parameters(type));\n}\n\nexport function convertDependencies(deps: any[]): R3DependencyMetadataFacade[] {\n return deps.map(dep => reflectDependency(dep));\n}\n\nfunction reflectDependency(dep: any|any[]): R3DependencyMetadataFacade {\n const meta: R3DependencyMetadataFacade = {\n token: null,\n attribute: null,\n host: false,\n optional: false,\n self: false,\n skipSelf: false,\n };\n\n if (Array.isArray(dep) && dep.length > 0) {\n for (let j = 0; j < dep.length; j++) {\n const param = dep[j];\n if (param === undefined) {\n // param may be undefined if type of dep is not set by ngtsc\n continue;\n }\n\n const proto = Object.getPrototypeOf(param);\n\n if (param instanceof Optional || proto.ngMetadataName === 'Optional') {\n meta.optional = true;\n } else if (param instanceof SkipSelf || proto.ngMetadataName === 'SkipSelf') {\n meta.skipSelf = true;\n } else if (param instanceof Self || proto.ngMetadataName === 'Self') {\n meta.self = true;\n } else if (param instanceof Host || proto.ngMetadataName === 'Host') {\n meta.host = true;\n } else if (param instanceof Inject) {\n meta.token = param.token;\n } else if (param instanceof Attribute) {\n if (param.attributeName === undefined) {\n throw new Error(`Attribute name must be defined.`);\n }\n meta.attribute = param.attributeName;\n } else {\n meta.token = param;\n }\n }\n } else if (dep === undefined || (Array.isArray(dep) && dep.length === 0)) {\n meta.token = null;\n } else {\n meta.token = dep;\n }\n return meta;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {Component} from './directives';\n\n\n/**\n * Used to resolve resource URLs on `@Component` when used with JIT compilation.\n *\n * Example:\n * ```\n * @Component({\n * selector: 'my-comp',\n * templateUrl: 'my-comp.html', // This requires asynchronous resolution\n * })\n * class MyComponent{\n * }\n *\n * // Calling `renderComponent` will fail because `renderComponent` is a synchronous process\n * // and `MyComponent`'s `@Component.templateUrl` needs to be resolved asynchronously.\n *\n * // Calling `resolveComponentResources()` will resolve `@Component.templateUrl` into\n * // `@Component.template`, which allows `renderComponent` to proceed in a synchronous manner.\n *\n * // Use browser's `fetch()` function as the default resource resolution strategy.\n * resolveComponentResources(fetch).then(() => {\n * // After resolution all URLs have been converted into `template` strings.\n * renderComponent(MyComponent);\n * });\n *\n * ```\n *\n * NOTE: In AOT the resolution happens during compilation, and so there should be no need\n * to call this method outside JIT mode.\n *\n * @param resourceResolver a function which is responsible for returning a `Promise` to the\n * contents of the resolved URL. Browser's `fetch()` method is a good default implementation.\n */\nexport function resolveComponentResources(\n resourceResolver: (url: string) => (Promise<string|{text(): Promise<string>}>)): Promise<void> {\n // Store all promises which are fetching the resources.\n const componentResolved: Promise<void>[] = [];\n\n // Cache so that we don't fetch the same resource more than once.\n const urlMap = new Map<string, Promise<string>>();\n function cachedResourceResolve(url: string): Promise<string> {\n let promise = urlMap.get(url);\n if (!promise) {\n const resp = resourceResolver(url);\n urlMap.set(url, promise = resp.then(unwrapResponse));\n }\n return promise;\n }\n\n componentResourceResolutionQueue.forEach((component: Component, type: Type<any>) => {\n const promises: Promise<void>[] = [];\n if (component.templateUrl) {\n promises.push(cachedResourceResolve(component.templateUrl).then((template) => {\n component.template = template;\n }));\n }\n const styleUrls = component.styleUrls;\n const styles = component.styles || (component.styles = []);\n const styleOffset = component.styles.length;\n styleUrls && styleUrls.forEach((styleUrl, index) => {\n styles.push(''); // pre-allocate array.\n promises.push(cachedResourceResolve(styleUrl).then((style) => {\n styles[styleOffset + index] = style;\n styleUrls.splice(styleUrls.indexOf(styleUrl), 1);\n if (styleUrls.length == 0) {\n component.styleUrls = undefined;\n }\n }));\n });\n const fullyResolved = Promise.all(promises).then(() => componentDefResolved(type));\n componentResolved.push(fullyResolved);\n });\n clearResolutionOfComponentResourcesQueue();\n return Promise.all(componentResolved).then(() => undefined);\n}\n\nlet componentResourceResolutionQueue = new Map<Type<any>, Component>();\n\n// Track when existing ɵcmp for a Type is waiting on resources.\nconst componentDefPendingResolution = new Set<Type<any>>();\n\nexport function maybeQueueResolutionOfComponentResources(type: Type<any>, metadata: Component) {\n if (componentNeedsResolution(metadata)) {\n componentResourceResolutionQueue.set(type, metadata);\n componentDefPendingResolution.add(type);\n }\n}\n\nexport function isComponentDefPendingResolution(type: Type<any>): boolean {\n return componentDefPendingResolution.has(type);\n}\n\nexport function componentNeedsResolution(component: Component): boolean {\n return !!(\n (component.templateUrl && !component.hasOwnProperty('template')) ||\n component.styleUrls && component.styleUrls.length);\n}\nexport function clearResolutionOfComponentResourcesQueue(): Map<Type<any>, Component> {\n const old = componentResourceResolutionQueue;\n componentResourceResolutionQueue = new Map();\n return old;\n}\n\nexport function restoreComponentResolutionQueue(queue: Map<Type<any>, Component>): void {\n componentDefPendingResolution.clear();\n queue.forEach((_, type) => componentDefPendingResolution.add(type));\n componentResourceResolutionQueue = queue;\n}\n\nexport function isComponentResourceResolutionQueueEmpty() {\n return componentResourceResolutionQueue.size === 0;\n}\n\nfunction unwrapResponse(response: string|{text(): Promise<string>}): string|Promise<string> {\n return typeof response == 'string' ? response : response.text();\n}\n\nfunction componentDefResolved(type: Type<any>): void {\n componentDefPendingResolution.delete(type);\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 * @fileoverview\n * A module to facilitate use of a Trusted Types policy internally within\n * Angular. It lazily constructs the Trusted Types policy, providing helper\n * utilities for promoting strings to Trusted Types. When Trusted Types are not\n * available, strings are used as a fallback.\n * @security All use of this module is security-sensitive and should go through\n * security review.\n */\n\nimport {global} from '../global';\nimport {TrustedHTML, TrustedScript, TrustedScriptURL, TrustedTypePolicy, TrustedTypePolicyFactory} from './trusted_type_defs';\n\n/**\n * The Trusted Types policy, or null if Trusted Types are not\n * enabled/supported, or undefined if the policy has not been created yet.\n */\nlet policy: TrustedTypePolicy|null|undefined;\n\n/**\n * Returns the Trusted Types policy, or null if Trusted Types are not\n * enabled/supported. The first call to this function will create the policy.\n */\nfunction getPolicy(): TrustedTypePolicy|null {\n if (policy === undefined) {\n policy = null;\n if (global.trustedTypes) {\n try {\n policy = (global.trustedTypes as TrustedTypePolicyFactory).createPolicy('angular', {\n createHTML: (s: string) => s,\n createScript: (s: string) => s,\n createScriptURL: (s: string) => s,\n });\n } catch {\n // trustedTypes.createPolicy throws if called with a name that is\n // already registered, even in report-only mode. Until the API changes,\n // catch the error not to break the applications functionally. In such\n // cases, the code will fall back to using strings.\n }\n }\n }\n return policy;\n}\n\n/**\n * Unsafely promote a string to a TrustedHTML, falling back to strings when\n * Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that the\n * provided string will never cause an XSS vulnerability if used in a context\n * that will be interpreted as HTML by a browser, e.g. when assigning to\n * element.innerHTML.\n */\nexport function trustedHTMLFromString(html: string): TrustedHTML|string {\n return getPolicy()?.createHTML(html) || html;\n}\n\n/**\n * Unsafely promote a string to a TrustedScript, falling back to strings when\n * Trusted Types are not available.\n * @security In particular, it must be assured that the provided string will\n * never cause an XSS vulnerability if used in a context that will be\n * interpreted and executed as a script by a browser, e.g. when calling eval.\n */\nexport function trustedScriptFromString(script: string): TrustedScript|string {\n return getPolicy()?.createScript(script) || script;\n}\n\n/**\n * Unsafely promote a string to a TrustedScriptURL, falling back to strings\n * when Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that the\n * provided string will never cause an XSS vulnerability if used in a context\n * that will cause a browser to load and execute a resource, e.g. when\n * assigning to script.src.\n */\nexport function trustedScriptURLFromString(url: string): TrustedScriptURL|string {\n return getPolicy()?.createScriptURL(url) || url;\n}\n\n/**\n * Unsafely call the Function constructor with the given string arguments. It\n * is only available in development mode, and should be stripped out of\n * production code.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that it\n * is only called from development code, as use in production code can lead to\n * XSS vulnerabilities.\n */\nexport function newTrustedFunctionForDev(...args: string[]): Function {\n if (typeof ngDevMode === 'undefined') {\n throw new Error('newTrustedFunctionForDev should never be called in production');\n }\n if (!global.trustedTypes) {\n // In environments that don't support Trusted Types, fall back to the most\n // straightforward implementation:\n return new Function(...args);\n }\n\n // Chrome currently does not support passing TrustedScript to the Function\n // constructor. The following implements the workaround proposed on the page\n // below, where the Chromium bug is also referenced:\n // https://github.com/w3c/webappsec-trusted-types/wiki/Trusted-Types-for-function-constructor\n const fnArgs = args.slice(0, -1).join(',');\n const fnBody = args[args.length - 1];\n const body = `(function anonymous(${fnArgs}\n) { ${fnBody}\n})`;\n\n // Using eval directly confuses the compiler and prevents this module from\n // being stripped out of JS binaries even if not used. The global['eval']\n // indirection fixes that.\n const fn = global['eval'](trustedScriptFromString(body) as string) as Function;\n if (fn.bind === undefined) {\n // Workaround for a browser bug that only exists in Chrome 83, where passing\n // a TrustedScript to eval just returns the TrustedScript back without\n // evaluating it. In that case, fall back to the most straightforward\n // implementation:\n return new Function(...args);\n }\n\n // To completely mimic the behavior of calling \"new Function\", two more\n // things need to happen:\n // 1. Stringifying the resulting function should return its source code\n fn.toString = () => body;\n // 2. When calling the resulting function, `this` should refer to `global`\n return fn.bind(global);\n\n // When Trusted Types support in Function constructors is widely available,\n // the implementation of this function can be simplified to:\n // return new Function(...args.map(a => trustedScriptFromString(a)));\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 * @fileoverview\n * A module to facilitate use of a Trusted Types policy internally within\n * Angular specifically for bypassSecurityTrust* and custom sanitizers. It\n * lazily constructs the Trusted Types policy, providing helper utilities for\n * promoting strings to Trusted Types. When Trusted Types are not available,\n * strings are used as a fallback.\n * @security All use of this module is security-sensitive and should go through\n * security review.\n */\n\nimport {global} from '../global';\nimport {TrustedHTML, TrustedScript, TrustedScriptURL, TrustedTypePolicy, TrustedTypePolicyFactory} from './trusted_type_defs';\n\n/**\n * The Trusted Types policy, or null if Trusted Types are not\n * enabled/supported, or undefined if the policy has not been created yet.\n */\nlet policy: TrustedTypePolicy|null|undefined;\n\n/**\n * Returns the Trusted Types policy, or null if Trusted Types are not\n * enabled/supported. The first call to this function will create the policy.\n */\nfunction getPolicy(): TrustedTypePolicy|null {\n if (policy === undefined) {\n policy = null;\n if (global.trustedTypes) {\n try {\n policy = (global.trustedTypes as TrustedTypePolicyFactory)\n .createPolicy('angular#unsafe-bypass', {\n createHTML: (s: string) => s,\n createScript: (s: string) => s,\n createScriptURL: (s: string) => s,\n });\n } catch {\n // trustedTypes.createPolicy throws if called with a name that is\n // already registered, even in report-only mode. Until the API changes,\n // catch the error not to break the applications functionally. In such\n // cases, the code will fall back to using strings.\n }\n }\n }\n return policy;\n}\n\n/**\n * Unsafely promote a string to a TrustedHTML, falling back to strings when\n * Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that it\n * is only passed strings that come directly from custom sanitizers or the\n * bypassSecurityTrust* functions.\n */\nexport function trustedHTMLFromStringBypass(html: string): TrustedHTML|string {\n return getPolicy()?.createHTML(html) || html;\n}\n\n/**\n * Unsafely promote a string to a TrustedScript, falling back to strings when\n * Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that it\n * is only passed strings that come directly from custom sanitizers or the\n * bypassSecurityTrust* functions.\n */\nexport function trustedScriptFromStringBypass(script: string): TrustedScript|string {\n return getPolicy()?.createScript(script) || script;\n}\n\n/**\n * Unsafely promote a string to a TrustedScriptURL, falling back to strings\n * when Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that it\n * is only passed strings that come directly from custom sanitizers or the\n * bypassSecurityTrust* functions.\n */\nexport function trustedScriptURLFromStringBypass(url: string): TrustedScriptURL|string {\n return getPolicy()?.createScriptURL(url) || url;\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\nexport const enum BypassType {\n Url = 'URL',\n Html = 'HTML',\n ResourceUrl = 'ResourceURL',\n Script = 'Script',\n Style = 'Style',\n}\n\n/**\n * Marker interface for a value that's safe to use in a particular context.\n *\n * @publicApi\n */\nexport interface SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as HTML.\n *\n * @publicApi\n */\nexport interface SafeHtml extends SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as style (CSS).\n *\n * @publicApi\n */\nexport interface SafeStyle extends SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as JavaScript.\n *\n * @publicApi\n */\nexport interface SafeScript extends SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as a URL linking to a document.\n *\n * @publicApi\n */\nexport interface SafeUrl extends SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as a URL to load executable code from.\n *\n * @publicApi\n */\nexport interface SafeResourceUrl extends SafeValue {}\n\n\nabstract class SafeValueImpl implements SafeValue {\n constructor(public changingThisBreaksApplicationSecurity: string) {}\n\n abstract getTypeName(): string;\n\n toString() {\n return `SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity}` +\n ` (see https://g.co/ng/security#xss)`;\n }\n}\n\nclass SafeHtmlImpl extends SafeValueImpl implements SafeHtml {\n override getTypeName() {\n return BypassType.Html;\n }\n}\nclass SafeStyleImpl extends SafeValueImpl implements SafeStyle {\n override getTypeName() {\n return BypassType.Style;\n }\n}\nclass SafeScriptImpl extends SafeValueImpl implements SafeScript {\n override getTypeName() {\n return BypassType.Script;\n }\n}\nclass SafeUrlImpl extends SafeValueImpl implements SafeUrl {\n override getTypeName() {\n return BypassType.Url;\n }\n}\nclass SafeResourceUrlImpl extends SafeValueImpl implements SafeResourceUrl {\n override getTypeName() {\n return BypassType.ResourceUrl;\n }\n}\n\nexport function unwrapSafeValue(value: SafeValue): string;\nexport function unwrapSafeValue<T>(value: T): T;\nexport function unwrapSafeValue<T>(value: T|SafeValue): T {\n return value instanceof SafeValueImpl ? value.changingThisBreaksApplicationSecurity as any as T :\n value as any as T;\n}\n\n\nexport function allowSanitizationBypassAndThrow(\n value: any, type: BypassType.Html): value is SafeHtml;\nexport function allowSanitizationBypassAndThrow(\n value: any, type: BypassType.ResourceUrl): value is SafeResourceUrl;\nexport function allowSanitizationBypassAndThrow(\n value: any, type: BypassType.Script): value is SafeScript;\nexport function allowSanitizationBypassAndThrow(\n value: any, type: BypassType.Style): value is SafeStyle;\nexport function allowSanitizationBypassAndThrow(value: any, type: BypassType.Url): value is SafeUrl;\nexport function allowSanitizationBypassAndThrow(value: any, type: BypassType): boolean;\nexport function allowSanitizationBypassAndThrow(value: any, type: BypassType): boolean {\n const actualType = getSanitizationBypassType(value);\n if (actualType != null && actualType !== type) {\n // Allow ResourceURLs in URL contexts, they are strictly more trusted.\n if (actualType === BypassType.ResourceUrl && type === BypassType.Url) return true;\n throw new Error(\n `Required a safe ${type}, got a ${actualType} (see https://g.co/ng/security#xss)`);\n }\n return actualType === type;\n}\n\nexport function getSanitizationBypassType(value: any): BypassType|null {\n return value instanceof SafeValueImpl && value.getTypeName() as BypassType || null;\n}\n\n/**\n * Mark `html` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link htmlSanitizer} to be trusted implicitly.\n *\n * @param trustedHtml `html` string which needs to be implicitly trusted.\n * @returns a `html` which has been branded to be implicitly trusted.\n */\nexport function bypassSanitizationTrustHtml(trustedHtml: string): SafeHtml {\n return new SafeHtmlImpl(trustedHtml);\n}\n/**\n * Mark `style` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link styleSanitizer} to be trusted implicitly.\n *\n * @param trustedStyle `style` string which needs to be implicitly trusted.\n * @returns a `style` hich has been branded to be implicitly trusted.\n */\nexport function bypassSanitizationTrustStyle(trustedStyle: string): SafeStyle {\n return new SafeStyleImpl(trustedStyle);\n}\n/**\n * Mark `script` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link scriptSanitizer} to be trusted implicitly.\n *\n * @param trustedScript `script` string which needs to be implicitly trusted.\n * @returns a `script` which has been branded to be implicitly trusted.\n */\nexport function bypassSanitizationTrustScript(trustedScript: string): SafeScript {\n return new SafeScriptImpl(trustedScript);\n}\n/**\n * Mark `url` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link urlSanitizer} to be trusted implicitly.\n *\n * @param trustedUrl `url` string which needs to be implicitly trusted.\n * @returns a `url` which has been branded to be implicitly trusted.\n */\nexport function bypassSanitizationTrustUrl(trustedUrl: string): SafeUrl {\n return new SafeUrlImpl(trustedUrl);\n}\n/**\n * Mark `url` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link resourceUrlSanitizer} to be trusted implicitly.\n *\n * @param trustedResourceUrl `url` string which needs to be implicitly trusted.\n * @returns a `url` which has been branded to be implicitly trusted.\n */\nexport function bypassSanitizationTrustResourceUrl(trustedResourceUrl: string): SafeResourceUrl {\n return new SafeResourceUrlImpl(trustedResourceUrl);\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 {trustedHTMLFromString} from '../util/security/trusted_types';\n\n/**\n * This helper is used to get hold of an inert tree of DOM elements containing dirty HTML\n * that needs sanitizing.\n * Depending upon browser support we use one of two strategies for doing this.\n * Default: DOMParser strategy\n * Fallback: InertDocument strategy\n */\nexport function getInertBodyHelper(defaultDoc: Document): InertBodyHelper {\n const inertDocumentHelper = new InertDocumentHelper(defaultDoc);\n return isDOMParserAvailable() ? new DOMParserHelper(inertDocumentHelper) : inertDocumentHelper;\n}\n\nexport interface InertBodyHelper {\n /**\n * Get an inert DOM element containing DOM created from the dirty HTML string provided.\n */\n getInertBodyElement: (html: string) => HTMLElement | null;\n}\n\n/**\n * Uses DOMParser to create and fill an inert body element.\n * This is the default strategy used in browsers that support it.\n */\nclass DOMParserHelper implements InertBodyHelper {\n constructor(private inertDocumentHelper: InertBodyHelper) {}\n\n getInertBodyElement(html: string): HTMLElement|null {\n // We add these extra elements to ensure that the rest of the content is parsed as expected\n // e.g. leading whitespace is maintained and tags like `<meta>` do not get hoisted to the\n // `<head>` tag. Note that the `<body>` tag is closed implicitly to prevent unclosed tags\n // in `html` from consuming the otherwise explicit `</body>` tag.\n html = '<body><remove></remove>' + html;\n try {\n const body = new window.DOMParser()\n .parseFromString(trustedHTMLFromString(html) as string, 'text/html')\n .body as HTMLBodyElement;\n if (body === null) {\n // In some browsers (e.g. Mozilla/5.0 iPad AppleWebKit Mobile) the `body` property only\n // becomes available in the following tick of the JS engine. In that case we fall back to\n // the `inertDocumentHelper` instead.\n return this.inertDocumentHelper.getInertBodyElement(html);\n }\n body.removeChild(body.firstChild!);\n return body;\n } catch {\n return null;\n }\n }\n}\n\n/**\n * Use an HTML5 `template` element, if supported, or an inert body element created via\n * `createHtmlDocument` to create and fill an inert DOM element.\n * This is the fallback strategy if the browser does not support DOMParser.\n */\nclass InertDocumentHelper implements InertBodyHelper {\n private inertDocument: Document;\n\n constructor(private defaultDoc: Document) {\n this.inertDocument = this.defaultDoc.implementation.createHTMLDocument('sanitization-inert');\n\n if (this.inertDocument.body == null) {\n // usually there should be only one body element in the document, but IE doesn't have any, so\n // we need to create one.\n const inertHtml = this.inertDocument.createElement('html');\n this.inertDocument.appendChild(inertHtml);\n const inertBodyElement = this.inertDocument.createElement('body');\n inertHtml.appendChild(inertBodyElement);\n }\n }\n\n getInertBodyElement(html: string): HTMLElement|null {\n // Prefer using <template> element if supported.\n const templateEl = this.inertDocument.createElement('template');\n if ('content' in templateEl) {\n templateEl.innerHTML = trustedHTMLFromString(html) as string;\n return templateEl;\n }\n\n // Note that previously we used to do something like `this.inertDocument.body.innerHTML = html`\n // and we returned the inert `body` node. This was changed, because IE seems to treat setting\n // `innerHTML` on an inserted element differently, compared to one that hasn't been inserted\n // yet. In particular, IE appears to split some of the text into multiple text nodes rather\n // than keeping them in a single one which ends up messing with Ivy's i18n parsing further\n // down the line. This has been worked around by creating a new inert `body` and using it as\n // the root node in which we insert the HTML.\n const inertBody = this.inertDocument.createElement('body');\n inertBody.innerHTML = trustedHTMLFromString(html) as string;\n\n // Support: IE 11 only\n // strip custom-namespaced attributes on IE<=11\n if ((this.defaultDoc as any).documentMode) {\n this.stripCustomNsAttrs(inertBody);\n }\n\n return inertBody;\n }\n\n /**\n * When IE11 comes across an unknown namespaced attribute e.g. 'xlink:foo' it adds 'xmlns:ns1'\n * attribute to declare ns1 namespace and prefixes the attribute with 'ns1' (e.g.\n * 'ns1:xlink:foo').\n *\n * This is undesirable since we don't want to allow any of these custom attributes. This method\n * strips them all.\n */\n private stripCustomNsAttrs(el: Element) {\n const elAttrs = el.attributes;\n // loop backwards so that we can support removals.\n for (let i = elAttrs.length - 1; 0 < i; i--) {\n const attrib = elAttrs.item(i);\n const attrName = attrib!.name;\n if (attrName === 'xmlns:ns1' || attrName.indexOf('ns1:') === 0) {\n el.removeAttribute(attrName);\n }\n }\n let childNode = el.firstChild as Node | null;\n while (childNode) {\n if (childNode.nodeType === Node.ELEMENT_NODE) this.stripCustomNsAttrs(childNode as Element);\n childNode = childNode.nextSibling;\n }\n }\n}\n\n/**\n * We need to determine whether the DOMParser exists in the global context and\n * supports parsing HTML; HTML parsing support is not as wide as other formats, see\n * https://developer.mozilla.org/en-US/docs/Web/API/DOMParser#Browser_compatibility.\n *\n * @suppress {uselessCode}\n */\nexport function isDOMParserAvailable() {\n try {\n return !!new window.DOMParser().parseFromString(\n trustedHTMLFromString('') as string, 'text/html');\n } catch {\n return false;\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/**\n * A pattern that recognizes a commonly useful subset of URLs that are safe.\n *\n * This regular expression matches a subset of URLs that will not cause script\n * execution if used in URL context within a HTML document. Specifically, this\n * regular expression matches if (comment from here on and regex copied from\n * Soy's EscapingConventions):\n * (1) Either an allowed protocol (http, https, mailto or ftp).\n * (2) or no protocol. A protocol must be followed by a colon. The below\n * allows that by allowing colons only after one of the characters [/?#].\n * A colon after a hash (#) must be in the fragment.\n * Otherwise, a colon after a (?) must be in a query.\n * Otherwise, a colon after a single solidus (/) must be in a path.\n * Otherwise, a colon after a double solidus (//) must be in the authority\n * (before port).\n *\n * The pattern disallows &, used in HTML entity declarations before\n * one of the characters in [/?#]. This disallows HTML entities used in the\n * protocol name, which should never happen, e.g. \"http\" for \"http\".\n * It also disallows HTML entities in the first path part of a relative path,\n * e.g. \"foo<bar/baz\". Our existing escaping functions should not produce\n * that. More importantly, it disallows masking of a colon,\n * e.g. \"javascript:...\".\n *\n * This regular expression was taken from the Closure sanitization library.\n */\nconst SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi;\n\n/* A pattern that matches safe srcset values */\nconst SAFE_SRCSET_PATTERN = /^(?:(?:https?|file):|[^&:/?#]*(?:[/?#]|$))/gi;\n\n/** A pattern that matches safe data URLs. Only matches image, video and audio types. */\nconst DATA_URL_PATTERN =\n /^data:(?:image\\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\\/(?:mpeg|mp4|ogg|webm)|audio\\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\\/]+=*$/i;\n\nexport function _sanitizeUrl(url: string): string {\n url = String(url);\n if (url.match(SAFE_URL_PATTERN) || url.match(DATA_URL_PATTERN)) return url;\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n console.warn(`WARNING: sanitizing unsafe URL value ${url} (see https://g.co/ng/security#xss)`);\n }\n\n return 'unsafe:' + url;\n}\n\nexport function sanitizeSrcset(srcset: string): string {\n srcset = String(srcset);\n return srcset.split(',').map((srcset) => _sanitizeUrl(srcset.trim())).join(', ');\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 {TrustedHTML} from '../util/security/trusted_type_defs';\nimport {trustedHTMLFromString} from '../util/security/trusted_types';\nimport {getInertBodyHelper, InertBodyHelper} from './inert_body';\nimport {_sanitizeUrl, sanitizeSrcset} from './url_sanitizer';\n\nfunction tagSet(tags: string): {[k: string]: boolean} {\n const res: {[k: string]: boolean} = {};\n for (const t of tags.split(',')) res[t] = true;\n return res;\n}\n\nfunction merge(...sets: {[k: string]: boolean}[]): {[k: string]: boolean} {\n const res: {[k: string]: boolean} = {};\n for (const s of sets) {\n for (const v in s) {\n if (s.hasOwnProperty(v)) res[v] = true;\n }\n }\n return res;\n}\n\n// Good source of info about elements and attributes\n// https://html.spec.whatwg.org/#semantics\n// https://simon.html5.org/html-elements\n\n// Safe Void Elements - HTML5\n// https://html.spec.whatwg.org/#void-elements\nconst VOID_ELEMENTS = tagSet('area,br,col,hr,img,wbr');\n\n// Elements that you can, intentionally, leave open (and which close themselves)\n// https://html.spec.whatwg.org/#optional-tags\nconst OPTIONAL_END_TAG_BLOCK_ELEMENTS = tagSet('colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr');\nconst OPTIONAL_END_TAG_INLINE_ELEMENTS = tagSet('rp,rt');\nconst OPTIONAL_END_TAG_ELEMENTS =\n merge(OPTIONAL_END_TAG_INLINE_ELEMENTS, OPTIONAL_END_TAG_BLOCK_ELEMENTS);\n\n// Safe Block Elements - HTML5\nconst BLOCK_ELEMENTS = merge(\n OPTIONAL_END_TAG_BLOCK_ELEMENTS,\n tagSet(\n 'address,article,' +\n 'aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,' +\n 'h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul'));\n\n// Inline Elements - HTML5\nconst INLINE_ELEMENTS = merge(\n OPTIONAL_END_TAG_INLINE_ELEMENTS,\n tagSet(\n 'a,abbr,acronym,audio,b,' +\n 'bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,' +\n 'samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video'));\n\nexport const VALID_ELEMENTS =\n merge(VOID_ELEMENTS, BLOCK_ELEMENTS, INLINE_ELEMENTS, OPTIONAL_END_TAG_ELEMENTS);\n\n// Attributes that have href and hence need to be sanitized\nexport const URI_ATTRS = tagSet('background,cite,href,itemtype,longdesc,poster,src,xlink:href');\n\n// Attributes that have special href set hence need to be sanitized\nexport const SRCSET_ATTRS = tagSet('srcset');\n\nconst HTML_ATTRS = tagSet(\n 'abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,' +\n 'compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,' +\n 'ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,' +\n 'scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,' +\n 'valign,value,vspace,width');\n\n// Accessibility attributes as per WAI-ARIA 1.1 (W3C Working Draft 14 December 2018)\nconst ARIA_ATTRS = tagSet(\n 'aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,' +\n 'aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,' +\n 'aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,' +\n 'aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,' +\n 'aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,' +\n 'aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,' +\n 'aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext');\n\n// NB: This currently consciously doesn't support SVG. SVG sanitization has had several security\n// issues in the past, so it seems safer to leave it out if possible. If support for binding SVG via\n// innerHTML is required, SVG attributes should be added here.\n\n// NB: Sanitization does not allow <form> elements or other active elements (<button> etc). Those\n// can be sanitized, but they increase security surface area without a legitimate use case, so they\n// are left out here.\n\nexport const VALID_ATTRS = merge(URI_ATTRS, SRCSET_ATTRS, HTML_ATTRS, ARIA_ATTRS);\n\n// Elements whose content should not be traversed/preserved, if the elements themselves are invalid.\n//\n// Typically, `<invalid>Some content</invalid>` would traverse (and in this case preserve)\n// `Some content`, but strip `invalid-element` opening/closing tags. For some elements, though, we\n// don't want to preserve the content, if the elements themselves are going to be removed.\nconst SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS = tagSet('script,style,template');\n\n/**\n * SanitizingHtmlSerializer serializes a DOM fragment, stripping out any unsafe elements and unsafe\n * attributes.\n */\nclass SanitizingHtmlSerializer {\n // Explicitly track if something was stripped, to avoid accidentally warning of sanitization just\n // because characters were re-encoded.\n public sanitizedSomething = false;\n private buf: string[] = [];\n\n sanitizeChildren(el: Element): string {\n // This cannot use a TreeWalker, as it has to run on Angular's various DOM adapters.\n // However this code never accesses properties off of `document` before deleting its contents\n // again, so it shouldn't be vulnerable to DOM clobbering.\n let current: Node = el.firstChild!;\n let traverseContent = true;\n while (current) {\n if (current.nodeType === Node.ELEMENT_NODE) {\n traverseContent = this.startElement(current as Element);\n } else if (current.nodeType === Node.TEXT_NODE) {\n this.chars(current.nodeValue!);\n } else {\n // Strip non-element, non-text nodes.\n this.sanitizedSomething = true;\n }\n if (traverseContent && current.firstChild) {\n current = current.firstChild!;\n continue;\n }\n while (current) {\n // Leaving the element. Walk up and to the right, closing tags as we go.\n if (current.nodeType === Node.ELEMENT_NODE) {\n this.endElement(current as Element);\n }\n\n let next = this.checkClobberedElement(current, current.nextSibling!);\n\n if (next) {\n current = next;\n break;\n }\n\n current = this.checkClobberedElement(current, current.parentNode!);\n }\n }\n return this.buf.join('');\n }\n\n /**\n * Sanitizes an opening element tag (if valid) and returns whether the element's contents should\n * be traversed. Element content must always be traversed (even if the element itself is not\n * valid/safe), unless the element is one of `SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS`.\n *\n * @param element The element to sanitize.\n * @return True if the element's contents should be traversed.\n */\n private startElement(element: Element): boolean {\n const tagName = element.nodeName.toLowerCase();\n if (!VALID_ELEMENTS.hasOwnProperty(tagName)) {\n this.sanitizedSomething = true;\n return !SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS.hasOwnProperty(tagName);\n }\n this.buf.push('<');\n this.buf.push(tagName);\n const elAttrs = element.attributes;\n for (let i = 0; i < elAttrs.length; i++) {\n const elAttr = elAttrs.item(i);\n const attrName = elAttr!.name;\n const lower = attrName.toLowerCase();\n if (!VALID_ATTRS.hasOwnProperty(lower)) {\n this.sanitizedSomething = true;\n continue;\n }\n let value = elAttr!.value;\n // TODO(martinprobst): Special case image URIs for data:image/...\n if (URI_ATTRS[lower]) value = _sanitizeUrl(value);\n if (SRCSET_ATTRS[lower]) value = sanitizeSrcset(value);\n this.buf.push(' ', attrName, '=\"', encodeEntities(value), '\"');\n }\n this.buf.push('>');\n return true;\n }\n\n private endElement(current: Element) {\n const tagName = current.nodeName.toLowerCase();\n if (VALID_ELEMENTS.hasOwnProperty(tagName) && !VOID_ELEMENTS.hasOwnProperty(tagName)) {\n this.buf.push('</');\n this.buf.push(tagName);\n this.buf.push('>');\n }\n }\n\n private chars(chars: string) {\n this.buf.push(encodeEntities(chars));\n }\n\n checkClobberedElement(node: Node, nextNode: Node): Node {\n if (nextNode &&\n (node.compareDocumentPosition(nextNode) &\n Node.DOCUMENT_POSITION_CONTAINED_BY) === Node.DOCUMENT_POSITION_CONTAINED_BY) {\n throw new Error(`Failed to sanitize html because the element is clobbered: ${\n (node as Element).outerHTML}`);\n }\n return nextNode;\n }\n}\n\n// Regular Expressions for parsing tags and attributes\nconst SURROGATE_PAIR_REGEXP = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n// ! to ~ is the ASCII range.\nconst NON_ALPHANUMERIC_REGEXP = /([^\\#-~ |!])/g;\n\n/**\n * Escapes all potentially dangerous characters, so that the\n * resulting string can be safely inserted into attribute or\n * element text.\n * @param value\n */\nfunction encodeEntities(value: string) {\n return value.replace(/&/g, '&')\n .replace(\n SURROGATE_PAIR_REGEXP,\n function(match: string) {\n const hi = match.charCodeAt(0);\n const low = match.charCodeAt(1);\n return '&#' + (((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000) + ';';\n })\n .replace(\n NON_ALPHANUMERIC_REGEXP,\n function(match: string) {\n return '&#' + match.charCodeAt(0) + ';';\n })\n .replace(/</g, '<')\n .replace(/>/g, '>');\n}\n\nlet inertBodyHelper: InertBodyHelper;\n\n/**\n * Sanitizes the given unsafe, untrusted HTML fragment, and returns HTML text that is safe to add to\n * the DOM in a browser environment.\n */\nexport function _sanitizeHtml(defaultDoc: any, unsafeHtmlInput: string): TrustedHTML|string {\n let inertBodyElement: HTMLElement|null = null;\n try {\n inertBodyHelper = inertBodyHelper || getInertBodyHelper(defaultDoc);\n // Make sure unsafeHtml is actually a string (TypeScript types are not enforced at runtime).\n let unsafeHtml = unsafeHtmlInput ? String(unsafeHtmlInput) : '';\n inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);\n\n // mXSS protection. Repeatedly parse the document to make sure it stabilizes, so that a browser\n // trying to auto-correct incorrect HTML cannot cause formerly inert HTML to become dangerous.\n let mXSSAttempts = 5;\n let parsedHtml = unsafeHtml;\n\n do {\n if (mXSSAttempts === 0) {\n throw new Error('Failed to sanitize html because the input is unstable');\n }\n mXSSAttempts--;\n\n unsafeHtml = parsedHtml;\n parsedHtml = inertBodyElement!.innerHTML;\n inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);\n } while (unsafeHtml !== parsedHtml);\n\n const sanitizer = new SanitizingHtmlSerializer();\n const safeHtml = sanitizer.sanitizeChildren(\n getTemplateContent(inertBodyElement!) as Element || inertBodyElement);\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && sanitizer.sanitizedSomething) {\n console.warn(\n 'WARNING: sanitizing HTML stripped some content, see https://g.co/ng/security#xss');\n }\n\n return trustedHTMLFromString(safeHtml);\n } finally {\n // In case anything goes wrong, clear out inertElement to reset the entire DOM structure.\n if (inertBodyElement) {\n const parent = getTemplateContent(inertBodyElement) || inertBodyElement;\n while (parent.firstChild) {\n parent.removeChild(parent.firstChild);\n }\n }\n }\n}\n\nexport function getTemplateContent(el: Node): Node|null {\n return 'content' in (el as any /** Microsoft/TypeScript#21517 */) && isTemplateElement(el) ?\n el.content :\n null;\n}\nfunction isTemplateElement(el: Node): el is HTMLTemplateElement {\n return el.nodeType === Node.ELEMENT_NODE && el.nodeName === 'TEMPLATE';\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 * A SecurityContext marks a location that has dangerous security implications, e.g. a DOM property\n * like `innerHTML` that could cause Cross Site Scripting (XSS) security bugs when improperly\n * handled.\n *\n * See DomSanitizer for more details on security in Angular applications.\n *\n * @publicApi\n */\nexport enum SecurityContext {\n NONE = 0,\n HTML = 1,\n STYLE = 2,\n SCRIPT = 3,\n URL = 4,\n RESOURCE_URL = 5,\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 {getDocument} from '../render3/interfaces/document';\nimport {SANITIZER} from '../render3/interfaces/view';\nimport {getLView} from '../render3/state';\nimport {renderStringify} from '../render3/util/stringify_utils';\nimport {TrustedHTML, TrustedScript, TrustedScriptURL} from '../util/security/trusted_type_defs';\nimport {trustedHTMLFromString, trustedScriptURLFromString} from '../util/security/trusted_types';\nimport {trustedHTMLFromStringBypass, trustedScriptFromStringBypass, trustedScriptURLFromStringBypass} from '../util/security/trusted_types_bypass';\n\nimport {allowSanitizationBypassAndThrow, BypassType, unwrapSafeValue} from './bypass';\nimport {_sanitizeHtml as _sanitizeHtml} from './html_sanitizer';\nimport {Sanitizer} from './sanitizer';\nimport {SecurityContext} from './security';\nimport {_sanitizeUrl as _sanitizeUrl} from './url_sanitizer';\n\n\n\n/**\n * An `html` sanitizer which converts untrusted `html` **string** into trusted string by removing\n * dangerous content.\n *\n * This method parses the `html` and locates potentially dangerous content (such as urls and\n * javascript) and removes it.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustHtml}.\n *\n * @param unsafeHtml untrusted `html`, typically from the user.\n * @returns `html` string which is safe to display to user, because all of the dangerous javascript\n * and urls have been removed.\n *\n * @codeGenApi\n */\nexport function ɵɵsanitizeHtml(unsafeHtml: any): TrustedHTML|string {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return trustedHTMLFromStringBypass(sanitizer.sanitize(SecurityContext.HTML, unsafeHtml) || '');\n }\n if (allowSanitizationBypassAndThrow(unsafeHtml, BypassType.Html)) {\n return trustedHTMLFromStringBypass(unwrapSafeValue(unsafeHtml));\n }\n return _sanitizeHtml(getDocument(), renderStringify(unsafeHtml));\n}\n\n/**\n * A `style` sanitizer which converts untrusted `style` **string** into trusted string by removing\n * dangerous content.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustStyle}.\n *\n * @param unsafeStyle untrusted `style`, typically from the user.\n * @returns `style` string which is safe to bind to the `style` properties.\n *\n * @codeGenApi\n */\nexport function ɵɵsanitizeStyle(unsafeStyle: any): string {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return sanitizer.sanitize(SecurityContext.STYLE, unsafeStyle) || '';\n }\n if (allowSanitizationBypassAndThrow(unsafeStyle, BypassType.Style)) {\n return unwrapSafeValue(unsafeStyle);\n }\n return renderStringify(unsafeStyle);\n}\n\n/**\n * A `url` sanitizer which converts untrusted `url` **string** into trusted string by removing\n * dangerous\n * content.\n *\n * This method parses the `url` and locates potentially dangerous content (such as javascript) and\n * removes it.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustUrl}.\n *\n * @param unsafeUrl untrusted `url`, typically from the user.\n * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because\n * all of the dangerous javascript has been removed.\n *\n * @codeGenApi\n */\nexport function ɵɵsanitizeUrl(unsafeUrl: any): string {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return sanitizer.sanitize(SecurityContext.URL, unsafeUrl) || '';\n }\n if (allowSanitizationBypassAndThrow(unsafeUrl, BypassType.Url)) {\n return unwrapSafeValue(unsafeUrl);\n }\n return _sanitizeUrl(renderStringify(unsafeUrl));\n}\n\n/**\n * A `url` sanitizer which only lets trusted `url`s through.\n *\n * This passes only `url`s marked trusted by calling {@link bypassSanitizationTrustResourceUrl}.\n *\n * @param unsafeResourceUrl untrusted `url`, typically from the user.\n * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because\n * only trusted `url`s have been allowed to pass.\n *\n * @codeGenApi\n */\nexport function ɵɵsanitizeResourceUrl(unsafeResourceUrl: any): TrustedScriptURL|string {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return trustedScriptURLFromStringBypass(\n sanitizer.sanitize(SecurityContext.RESOURCE_URL, unsafeResourceUrl) || '');\n }\n if (allowSanitizationBypassAndThrow(unsafeResourceUrl, BypassType.ResourceUrl)) {\n return trustedScriptURLFromStringBypass(unwrapSafeValue(unsafeResourceUrl));\n }\n throw new Error('unsafe value used in a resource URL context (see https://g.co/ng/security#xss)');\n}\n\n/**\n * A `script` sanitizer which only lets trusted javascript through.\n *\n * This passes only `script`s marked trusted by calling {@link\n * bypassSanitizationTrustScript}.\n *\n * @param unsafeScript untrusted `script`, typically from the user.\n * @returns `url` string which is safe to bind to the `<script>` element such as `<img src>`,\n * because only trusted `scripts` have been allowed to pass.\n *\n * @codeGenApi\n */\nexport function ɵɵsanitizeScript(unsafeScript: any): TrustedScript|string {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return trustedScriptFromStringBypass(\n sanitizer.sanitize(SecurityContext.SCRIPT, unsafeScript) || '');\n }\n if (allowSanitizationBypassAndThrow(unsafeScript, BypassType.Script)) {\n return trustedScriptFromStringBypass(unwrapSafeValue(unsafeScript));\n }\n throw new Error('unsafe value used in a script context');\n}\n\n/**\n * A template tag function for promoting the associated constant literal to a\n * TrustedHTML. Interpolation is explicitly not allowed.\n *\n * @param html constant template literal containing trusted HTML.\n * @returns TrustedHTML wrapping `html`.\n *\n * @security This is a security-sensitive function and should only be used to\n * convert constant values of attributes and properties found in\n * application-provided Angular templates to TrustedHTML.\n *\n * @codeGenApi\n */\nexport function ɵɵtrustConstantHtml(html: TemplateStringsArray): TrustedHTML|string {\n // The following runtime check ensures that the function was called as a\n // template tag (e.g. ɵɵtrustConstantHtml`content`), without any interpolation\n // (e.g. not ɵɵtrustConstantHtml`content ${variable}`). A TemplateStringsArray\n // is an array with a `raw` property that is also an array. The associated\n // template literal has no interpolation if and only if the length of the\n // TemplateStringsArray is 1.\n if (ngDevMode && (!Array.isArray(html) || !Array.isArray(html.raw) || html.length !== 1)) {\n throw new Error(`Unexpected interpolation in trusted HTML constant: ${html.join('?')}`);\n }\n return trustedHTMLFromString(html[0]);\n}\n\n/**\n * A template tag function for promoting the associated constant literal to a\n * TrustedScriptURL. Interpolation is explicitly not allowed.\n *\n * @param url constant template literal containing a trusted script URL.\n * @returns TrustedScriptURL wrapping `url`.\n *\n * @security This is a security-sensitive function and should only be used to\n * convert constant values of attributes and properties found in\n * application-provided Angular templates to TrustedScriptURL.\n *\n * @codeGenApi\n */\nexport function ɵɵtrustConstantResourceUrl(url: TemplateStringsArray): TrustedScriptURL|string {\n // The following runtime check ensures that the function was called as a\n // template tag (e.g. ɵɵtrustConstantResourceUrl`content`), without any\n // interpolation (e.g. not ɵɵtrustConstantResourceUrl`content ${variable}`). A\n // TemplateStringsArray is an array with a `raw` property that is also an\n // array. The associated template literal has no interpolation if and only if\n // the length of the TemplateStringsArray is 1.\n if (ngDevMode && (!Array.isArray(url) || !Array.isArray(url.raw) || url.length !== 1)) {\n throw new Error(`Unexpected interpolation in trusted URL constant: ${url.join('?')}`);\n }\n return trustedScriptURLFromString(url[0]);\n}\n\n/**\n * Detects which sanitizer to use for URL property, based on tag name and prop name.\n *\n * The rules are based on the RESOURCE_URL context config from\n * `packages/compiler/src/schema/dom_security_schema.ts`.\n * If tag and prop names don't match Resource URL schema, use URL sanitizer.\n */\nexport function getUrlSanitizer(tag: string, prop: string) {\n if ((prop === 'src' &&\n (tag === 'embed' || tag === 'frame' || tag === 'iframe' || tag === 'media' ||\n tag === 'script')) ||\n (prop === 'href' && (tag === 'base' || tag === 'link'))) {\n return ɵɵsanitizeResourceUrl;\n }\n return ɵɵsanitizeUrl;\n}\n\n/**\n * Sanitizes URL, selecting sanitizer function based on tag and property names.\n *\n * This function is used in case we can't define security context at compile time, when only prop\n * name is available. This happens when we generate host bindings for Directives/Components. The\n * host element is unknown at compile time, so we defer calculation of specific sanitizer to\n * runtime.\n *\n * @param unsafeUrl untrusted `url`, typically from the user.\n * @param tag target element tag name.\n * @param prop name of the property that contains the value.\n * @returns `url` string which is safe to bind.\n *\n * @codeGenApi\n */\nexport function ɵɵsanitizeUrlOrResourceUrl(unsafeUrl: any, tag: string, prop: string): any {\n return getUrlSanitizer(tag, prop)(unsafeUrl);\n}\n\nexport function validateAgainstEventProperties(name: string) {\n if (name.toLowerCase().startsWith('on')) {\n const msg = `Binding to event property '${name}' is disallowed for security reasons, ` +\n `please use (${name.slice(2)})=...` +\n `\\nIf '${name}' is a directive input, make sure the directive is imported by the` +\n ` current module.`;\n throw new Error(msg);\n }\n}\n\nexport function validateAgainstEventAttributes(name: string) {\n if (name.toLowerCase().startsWith('on')) {\n const msg = `Binding to event attribute '${name}' is disallowed for security reasons, ` +\n `please use (${name.slice(2)})=...`;\n throw new Error(msg);\n }\n}\n\nfunction getSanitizer(): Sanitizer|null {\n const lView = getLView();\n return lView && lView[SANITIZER];\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 */\nimport '../util/ng_dev_mode';\n\nimport {assertDefined, assertDomNode} from '../util/assert';\n\nimport {EMPTY_ARRAY} from '../util/empty';\nimport {LContext} from './interfaces/context';\nimport {TNode, TNodeFlags} from './interfaces/node';\nimport {RElement, RNode} from './interfaces/renderer_dom';\nimport {CONTEXT, HEADER_OFFSET, HOST, LView, TVIEW} from './interfaces/view';\nimport {getComponentLViewByIndex, unwrapRNode} from './util/view_utils';\n\n\n\n/**\n * Returns the matching `LContext` data for a given DOM node, directive or component instance.\n *\n * This function will examine the provided DOM element, component, or directive instance\\'s\n * monkey-patched property to derive the `LContext` data. Once called then the monkey-patched\n * value will be that of the newly created `LContext`.\n *\n * If the monkey-patched value is the `LView` instance then the context value for that\n * target will be created and the monkey-patch reference will be updated. Therefore when this\n * function is called it may mutate the provided element\\'s, component\\'s or any of the associated\n * directive\\'s monkey-patch values.\n *\n * If the monkey-patch value is not detected then the code will walk up the DOM until an element\n * is found which contains a monkey-patch reference. When that occurs then the provided element\n * will be updated with a new context (which is then returned). If the monkey-patch value is not\n * detected for a component/directive instance then it will throw an error (all components and\n * directives should be automatically monkey-patched by ivy).\n *\n * @param target Component, Directive or DOM Node.\n */\nexport function getLContext(target: any): LContext|null {\n let mpValue = readPatchedData(target);\n if (mpValue) {\n // only when it's an array is it considered an LView instance\n // ... otherwise it's an already constructed LContext instance\n if (Array.isArray(mpValue)) {\n const lView: LView = mpValue!;\n let nodeIndex: number;\n let component: any = undefined;\n let directives: any[]|null|undefined = undefined;\n\n if (isComponentInstance(target)) {\n nodeIndex = findViaComponent(lView, target);\n if (nodeIndex == -1) {\n throw new Error('The provided component was not found in the application');\n }\n component = target;\n } else if (isDirectiveInstance(target)) {\n nodeIndex = findViaDirective(lView, target);\n if (nodeIndex == -1) {\n throw new Error('The provided directive was not found in the application');\n }\n directives = getDirectivesAtNodeIndex(nodeIndex, lView, false);\n } else {\n nodeIndex = findViaNativeElement(lView, target as RElement);\n if (nodeIndex == -1) {\n return null;\n }\n }\n\n // the goal is not to fill the entire context full of data because the lookups\n // are expensive. Instead, only the target data (the element, component, container, ICU\n // expression or directive details) are filled into the context. If called multiple times\n // with different target values then the missing target data will be filled in.\n const native = unwrapRNode(lView[nodeIndex]);\n const existingCtx = readPatchedData(native);\n const context: LContext = (existingCtx && !Array.isArray(existingCtx)) ?\n existingCtx :\n createLContext(lView, nodeIndex, native);\n\n // only when the component has been discovered then update the monkey-patch\n if (component && context.component === undefined) {\n context.component = component;\n attachPatchData(context.component, context);\n }\n\n // only when the directives have been discovered then update the monkey-patch\n if (directives && context.directives === undefined) {\n context.directives = directives;\n for (let i = 0; i < directives.length; i++) {\n attachPatchData(directives[i], context);\n }\n }\n\n attachPatchData(context.native, context);\n mpValue = context;\n }\n } else {\n const rElement = target as RElement;\n ngDevMode && assertDomNode(rElement);\n\n // if the context is not found then we need to traverse upwards up the DOM\n // to find the nearest element that has already been monkey patched with data\n let parent = rElement as any;\n while (parent = parent.parentNode) {\n const parentContext = readPatchedData(parent);\n if (parentContext) {\n let lView: LView|null;\n if (Array.isArray(parentContext)) {\n lView = parentContext as LView;\n } else {\n lView = parentContext.lView;\n }\n\n // the edge of the app was also reached here through another means\n // (maybe because the DOM was changed manually).\n if (!lView) {\n return null;\n }\n\n const index = findViaNativeElement(lView, rElement);\n if (index >= 0) {\n const native = unwrapRNode(lView[index]);\n const context = createLContext(lView, index, native);\n attachPatchData(native, context);\n mpValue = context;\n break;\n }\n }\n }\n }\n return (mpValue as LContext) || null;\n}\n\n/**\n * Creates an empty instance of a `LContext` context\n */\nfunction createLContext(lView: LView, nodeIndex: number, native: RNode): LContext {\n return {\n lView,\n nodeIndex,\n native,\n component: undefined,\n directives: undefined,\n localRefs: undefined,\n };\n}\n\n/**\n * Takes a component instance and returns the view for that component.\n *\n * @param componentInstance\n * @returns The component's view\n */\nexport function getComponentViewByInstance(componentInstance: {}): LView {\n let lView = readPatchedData(componentInstance);\n let view: LView;\n\n if (Array.isArray(lView)) {\n const nodeIndex = findViaComponent(lView, componentInstance);\n view = getComponentLViewByIndex(nodeIndex, lView);\n const context = createLContext(lView, nodeIndex, view[HOST] as RElement);\n context.component = componentInstance;\n attachPatchData(componentInstance, context);\n attachPatchData(context.native, context);\n } else {\n const context = lView as any as LContext;\n view = getComponentLViewByIndex(context.nodeIndex, context.lView);\n }\n return view;\n}\n\n/**\n * This property will be monkey-patched on elements, components and directives.\n */\nconst MONKEY_PATCH_KEY_NAME = '__ngContext__';\n\n/**\n * Assigns the given data to the given target (which could be a component,\n * directive or DOM node instance) using monkey-patching.\n */\nexport function attachPatchData(target: any, data: LView|LContext) {\n ngDevMode && assertDefined(target, 'Target expected');\n target[MONKEY_PATCH_KEY_NAME] = data;\n}\n\n/**\n * Returns the monkey-patch value data present on the target (which could be\n * a component, directive or a DOM node).\n */\nexport function readPatchedData(target: any): LView|LContext|null {\n ngDevMode && assertDefined(target, 'Target expected');\n return target[MONKEY_PATCH_KEY_NAME] || null;\n}\n\nexport function readPatchedLView(target: any): LView|null {\n const value = readPatchedData(target);\n if (value) {\n return Array.isArray(value) ? value : (value as LContext).lView;\n }\n return null;\n}\n\nexport function isComponentInstance(instance: any): boolean {\n return instance && instance.constructor && instance.constructor.ɵcmp;\n}\n\nexport function isDirectiveInstance(instance: any): boolean {\n return instance && instance.constructor && instance.constructor.ɵdir;\n}\n\n/**\n * Locates the element within the given LView and returns the matching index\n */\nfunction findViaNativeElement(lView: LView, target: RElement): number {\n const tView = lView[TVIEW];\n for (let i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) {\n if (unwrapRNode(lView[i]) === target) {\n return i;\n }\n }\n\n return -1;\n}\n\n/**\n * Locates the next tNode (child, sibling or parent).\n */\nfunction traverseNextElement(tNode: TNode): TNode|null {\n if (tNode.child) {\n return tNode.child;\n } else if (tNode.next) {\n return tNode.next;\n } else {\n // Let's take the following template: <div><span>text</span></div><component/>\n // After checking the text node, we need to find the next parent that has a \"next\" TNode,\n // in this case the parent `div`, so that we can find the component.\n while (tNode.parent && !tNode.parent.next) {\n tNode = tNode.parent;\n }\n return tNode.parent && tNode.parent.next;\n }\n}\n\n/**\n * Locates the component within the given LView and returns the matching index\n */\nfunction findViaComponent(lView: LView, componentInstance: {}): number {\n const componentIndices = lView[TVIEW].components;\n if (componentIndices) {\n for (let i = 0; i < componentIndices.length; i++) {\n const elementComponentIndex = componentIndices[i];\n const componentView = getComponentLViewByIndex(elementComponentIndex, lView);\n if (componentView[CONTEXT] === componentInstance) {\n return elementComponentIndex;\n }\n }\n } else {\n const rootComponentView = getComponentLViewByIndex(HEADER_OFFSET, lView);\n const rootComponent = rootComponentView[CONTEXT];\n if (rootComponent === componentInstance) {\n // we are dealing with the root element here therefore we know that the\n // element is the very first element after the HEADER data in the lView\n return HEADER_OFFSET;\n }\n }\n return -1;\n}\n\n/**\n * Locates the directive within the given LView and returns the matching index\n */\nfunction findViaDirective(lView: LView, directiveInstance: {}): number {\n // if a directive is monkey patched then it will (by default)\n // have a reference to the LView of the current view. The\n // element bound to the directive being search lives somewhere\n // in the view data. We loop through the nodes and check their\n // list of directives for the instance.\n let tNode = lView[TVIEW].firstChild;\n while (tNode) {\n const directiveIndexStart = tNode.directiveStart;\n const directiveIndexEnd = tNode.directiveEnd;\n for (let i = directiveIndexStart; i < directiveIndexEnd; i++) {\n if (lView[i] === directiveInstance) {\n return tNode.index;\n }\n }\n tNode = traverseNextElement(tNode);\n }\n return -1;\n}\n\n/**\n * Returns a list of directives extracted from the given view based on the\n * provided list of directive index values.\n *\n * @param nodeIndex The node index\n * @param lView The target view data\n * @param includeComponents Whether or not to include components in returned directives\n */\nexport function getDirectivesAtNodeIndex(\n nodeIndex: number, lView: LView, includeComponents: boolean): any[]|null {\n const tNode = lView[TVIEW].data[nodeIndex] as TNode;\n let directiveStartIndex = tNode.directiveStart;\n if (directiveStartIndex == 0) return EMPTY_ARRAY;\n const directiveEndIndex = tNode.directiveEnd;\n if (!includeComponents && tNode.flags & TNodeFlags.isComponentHost) directiveStartIndex++;\n return lView.slice(directiveStartIndex, directiveEndIndex);\n}\n\nexport function getComponentAtNodeIndex(nodeIndex: number, lView: LView): {}|null {\n const tNode = lView[TVIEW].data[nodeIndex] as TNode;\n let directiveStartIndex = tNode.directiveStart;\n return tNode.flags & TNodeFlags.isComponentHost ? lView[directiveStartIndex] : null;\n}\n\n/**\n * Returns a map of local references (local reference name => element or directive instance) that\n * exist on a given element.\n */\nexport function discoverLocalRefs(lView: LView, nodeIndex: number): {[key: string]: any}|null {\n const tNode = lView[TVIEW].data[nodeIndex] as TNode;\n if (tNode && tNode.localNames) {\n const result: {[key: string]: any} = {};\n let localIndex = tNode.index + 1;\n for (let i = 0; i < tNode.localNames.length; i += 2) {\n result[tNode.localNames[i]] = lView[localIndex];\n localIndex++;\n }\n return result;\n }\n\n return null;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport const ERROR_TYPE = 'ngType';\nexport const ERROR_DEBUG_CONTEXT = 'ngDebugContext';\nexport const ERROR_ORIGINAL_ERROR = 'ngOriginalError';\nexport const ERROR_LOGGER = 'ngErrorLogger';\n\n\nexport function wrappedError(message: string, originalError: any): Error {\n const msg = `${message} caused by: ${\n originalError instanceof Error ? originalError.message : originalError}`;\n const error = Error(msg);\n (error as any)[ERROR_ORIGINAL_ERROR] = originalError;\n return error;\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 {ERROR_DEBUG_CONTEXT, ERROR_LOGGER, ERROR_ORIGINAL_ERROR, ERROR_TYPE} from './util/errors';\nimport {DebugContext} from './view/types';\n\nexport function getType(error: Error): Function {\n return (error as any)[ERROR_TYPE];\n}\n\nexport function getDebugContext(error: Error): DebugContext {\n return (error as any)[ERROR_DEBUG_CONTEXT];\n}\n\nexport function getOriginalError(error: Error): Error {\n return (error as any)[ERROR_ORIGINAL_ERROR];\n}\n\nexport function getErrorLogger(error: unknown): (console: Console, ...values: any[]) => void {\n return error && (error as any)[ERROR_LOGGER] || defaultErrorLogger;\n}\n\n\nfunction defaultErrorLogger(console: Console, ...values: any[]) {\n (<any>console.error)(...values);\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 {getDebugContext, getErrorLogger, getOriginalError} from './errors';\nimport {DebugContext} from './view/types';\n\n\n\n/**\n * Provides a hook for centralized exception handling.\n *\n * The default implementation of `ErrorHandler` prints error messages to the `console`. To\n * intercept error handling, write a custom exception handler that replaces this default as\n * appropriate for your app.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * class MyErrorHandler implements ErrorHandler {\n * handleError(error) {\n * // do something with the exception\n * }\n * }\n *\n * @NgModule({\n * providers: [{provide: ErrorHandler, useClass: MyErrorHandler}]\n * })\n * class MyModule {}\n * ```\n *\n * @publicApi\n */\nexport class ErrorHandler {\n /**\n * @internal\n */\n _console: Console = console;\n\n handleError(error: any): void {\n const originalError = this._findOriginalError(error);\n const context = this._findContext(error);\n // Note: Browser consoles show the place from where console.error was called.\n // We can use this to give users additional information about the error.\n const errorLogger = getErrorLogger(error);\n\n errorLogger(this._console, `ERROR`, error);\n if (originalError) {\n errorLogger(this._console, `ORIGINAL ERROR`, originalError);\n }\n if (context) {\n errorLogger(this._console, 'ERROR CONTEXT', context);\n }\n }\n\n /** @internal */\n _findContext(error: any): DebugContext|null {\n return error ? (getDebugContext(error) || this._findContext(getOriginalError(error))) : null;\n }\n\n /** @internal */\n _findOriginalError(error: any): Error|null {\n let e = error && getOriginalError(error);\n while (e && getOriginalError(e)) {\n e = getOriginalError(e);\n }\n\n return e || null;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\n/**\n * A schema definition associated with an NgModule.\n *\n * @see `@NgModule`, `CUSTOM_ELEMENTS_SCHEMA`, `NO_ERRORS_SCHEMA`\n *\n * @param name The name of a defined schema.\n *\n * @publicApi\n */\nexport interface SchemaMetadata {\n name: string;\n}\n\n/**\n * Defines a schema that allows an NgModule to contain the following:\n * - Non-Angular elements named with dash case (`-`).\n * - Element properties named with dash case (`-`).\n * Dash case is the naming convention for custom elements.\n *\n * @publicApi\n */\nexport const CUSTOM_ELEMENTS_SCHEMA: SchemaMetadata = {\n name: 'custom-elements'\n};\n\n/**\n * Defines a schema that allows any property on any element.\n *\n * This schema allows you to ignore the errors related to any unknown elements or properties in a\n * template. The usage of this schema is generally discouraged because it prevents useful validation\n * and may hide real errors in your template. Consider using the `CUSTOM_ELEMENTS_SCHEMA` instead.\n *\n * @publicApi\n */\nexport const NO_ERRORS_SCHEMA: SchemaMetadata = {\n name: 'no-errors-schema'\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 * Disallowed strings in the comment.\n *\n * see: https://html.spec.whatwg.org/multipage/syntax.html#comments\n */\nconst COMMENT_DISALLOWED = /^>|^->|<!--|-->|--!>|<!-$/g;\n/**\n * Delimiter in the disallowed strings which needs to be wrapped with zero with character.\n */\nconst COMMENT_DELIMITER = /(<|>)/;\nconst COMMENT_DELIMITER_ESCAPED = '\\u200B$1\\u200B';\n\n/**\n * Escape the content of comment strings so that it can be safely inserted into a comment node.\n *\n * The issue is that HTML does not specify any way to escape comment end text inside the comment.\n * Consider: `<!-- The way you close a comment is with \">\", and \"->\" at the beginning or by \"-->\" or\n * \"--!>\" at the end. -->`. Above the `\"-->\"` is meant to be text not an end to the comment. This\n * can be created programmatically through DOM APIs. (`<!--` are also disallowed.)\n *\n * see: https://html.spec.whatwg.org/multipage/syntax.html#comments\n *\n * ```\n * div.innerHTML = div.innerHTML\n * ```\n *\n * One would expect that the above code would be safe to do, but it turns out that because comment\n * text is not escaped, the comment may contain text which will prematurely close the comment\n * opening up the application for XSS attack. (In SSR we programmatically create comment nodes which\n * may contain such text and expect them to be safe.)\n *\n * This function escapes the comment text by looking for comment delimiters (`<` and `>`) and\n * surrounding them with `_>_` where the `_` is a zero width space `\\u200B`. The result is that if a\n * comment contains any of the comment start/end delimiters (such as `<!--`, `-->` or `--!>`) the\n * text it will render normally but it will not cause the HTML parser to close/open the comment.\n *\n * @param value text to make safe for comment node by escaping the comment open/close character\n * sequence.\n */\nexport function escapeCommentText(value: string): string {\n return value.replace(\n COMMENT_DISALLOWED, (text) => text.replace(COMMENT_DELIMITER, COMMENT_DELIMITER_ESCAPED));\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 './ng_dev_mode';\nimport {newTrustedFunctionForDev} from './security/trusted_types';\n\n/**\n * THIS FILE CONTAINS CODE WHICH SHOULD BE TREE SHAKEN AND NEVER CALLED FROM PRODUCTION CODE!!!\n */\n\n\n/**\n * Creates an `Array` construction with a given name. This is useful when\n * looking for memory consumption to see what time of array it is.\n *\n *\n * @param name Name to give to the constructor\n * @returns A subclass of `Array` if possible. This can only be done in\n * environments which support `class` construct.\n */\nexport function createNamedArrayType(name: string): typeof Array {\n // This should never be called in prod mode, so let's verify that is the case.\n if (ngDevMode) {\n try {\n // If this function were compromised the following could lead to arbitrary\n // script execution. We bless it with Trusted Types anyway since this\n // function is stripped out of production binaries.\n return (newTrustedFunctionForDev('Array', `return class ${name} extends Array{}`))(Array);\n } catch (e) {\n // If it does not work just give up and fall back to regular Array.\n return Array;\n }\n } else {\n throw new Error(\n 'Looks like we are in \\'prod mode\\', but we are creating a named Array type, which is wrong! Check your code');\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport function normalizeDebugBindingName(name: string) {\n // Attribute names with `$` (eg `x-y$`) are valid per spec, but unsupported by some browsers\n name = camelCaseToDashCase(name.replace(/[$@]/g, '_'));\n return `ng-reflect-${name}`;\n}\n\nconst CAMEL_CASE_REGEXP = /([A-Z])/g;\n\nfunction camelCaseToDashCase(input: string): string {\n return input.replace(CAMEL_CASE_REGEXP, (...m: any[]) => '-' + m[1].toLowerCase());\n}\n\nexport function normalizeDebugBindingValue(value: any): string {\n try {\n // Limit the size of the value as otherwise the DOM just gets polluted.\n return value != null ? value.toString().slice(0, 30) : value;\n } catch (e) {\n return '[ERROR] Exception while trying to serialize the 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 {global} from '../../util/global';\nimport {RElement} from '../interfaces/renderer_dom';\n\n\nexport const defaultScheduler =\n (() => (\n typeof requestAnimationFrame !== 'undefined' &&\n requestAnimationFrame || // browser only\n setTimeout // everything else\n )\n .bind(global))();\n\n/**\n *\n * @codeGenApi\n */\nexport function ɵɵresolveWindow(element: RElement&{ownerDocument: Document}) {\n return element.ownerDocument.defaultView;\n}\n\n/**\n *\n * @codeGenApi\n */\nexport function ɵɵresolveDocument(element: RElement&{ownerDocument: Document}) {\n return element.ownerDocument;\n}\n\n/**\n *\n * @codeGenApi\n */\nexport function ɵɵresolveBody(element: RElement&{ownerDocument: Document}) {\n return element.ownerDocument.body;\n}\n\n/**\n * The special delimiter we use to separate property names, prefixes, and suffixes\n * in property binding metadata. See storeBindingMetadata().\n *\n * We intentionally use the Unicode \"REPLACEMENT CHARACTER\" (U+FFFD) as a delimiter\n * because it is a very uncommon character that is unlikely to be part of a user's\n * property names or interpolation strings. If it is in fact used in a property\n * binding, DebugElement.properties will not return the correct value for that\n * binding. However, there should be no runtime effect for real applications.\n *\n * This character is typically rendered as a question mark inside of a diamond.\n * See https://en.wikipedia.org/wiki/Specials_(Unicode_block)\n *\n */\nexport const INTERPOLATION_DELIMITER = `�`;\n\n/**\n * Unwrap a value which might be behind a closure (for forward declaration reasons).\n */\nexport function maybeUnwrapFn<T>(value: T|(() => T)): T {\n if (value instanceof Function) {\n return value();\n } else {\n return value;\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 */\nimport {RuntimeError, RuntimeErrorCode} from './error_code';\nimport {TNode} from './interfaces/node';\nimport {LView, TVIEW} from './interfaces/view';\nimport {INTERPOLATION_DELIMITER} from './util/misc_utils';\n\n\n\n/** Called when there are multiple component selectors that match a given node */\nexport function throwMultipleComponentError(tNode: TNode): never {\n throw new RuntimeError(\n RuntimeErrorCode.MULTIPLE_COMPONENTS_MATCH,\n `Multiple components match node with tagname ${tNode.value}`);\n}\n\n/** Throws an ExpressionChangedAfterChecked error if checkNoChanges mode is on. */\nexport function throwErrorIfNoChangesMode(\n creationMode: boolean, oldValue: any, currValue: any, propName?: string): never {\n const field = propName ? ` for '${propName}'` : '';\n let msg =\n `ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value${\n field}: '${oldValue}'. Current value: '${currValue}'.`;\n if (creationMode) {\n msg +=\n ` It seems like the view has been created after its parent and its children have been dirty checked.` +\n ` Has it been created in a change detection hook?`;\n }\n // TODO: include debug context, see `viewDebugError` function in\n // `packages/core/src/view/errors.ts` for reference.\n throw new RuntimeError(RuntimeErrorCode.EXPRESSION_CHANGED_AFTER_CHECKED, msg);\n}\n\nfunction constructDetailsForInterpolation(\n lView: LView, rootIndex: number, expressionIndex: number, meta: string, changedValue: any) {\n const [propName, prefix, ...chunks] = meta.split(INTERPOLATION_DELIMITER);\n let oldValue = prefix, newValue = prefix;\n for (let i = 0; i < chunks.length; i++) {\n const slotIdx = rootIndex + i;\n oldValue += `${lView[slotIdx]}${chunks[i]}`;\n newValue += `${slotIdx === expressionIndex ? changedValue : lView[slotIdx]}${chunks[i]}`;\n }\n return {propName, oldValue, newValue};\n}\n\n/**\n * Constructs an object that contains details for the ExpressionChangedAfterItHasBeenCheckedError:\n * - property name (for property bindings or interpolations)\n * - old and new values, enriched using information from metadata\n *\n * More information on the metadata storage format can be found in `storePropertyBindingMetadata`\n * function description.\n */\nexport function getExpressionChangedErrorDetails(\n lView: LView, bindingIndex: number, oldValue: any,\n newValue: any): {propName?: string, oldValue: any, newValue: any} {\n const tData = lView[TVIEW].data;\n const metadata = tData[bindingIndex];\n\n if (typeof metadata === 'string') {\n // metadata for property interpolation\n if (metadata.indexOf(INTERPOLATION_DELIMITER) > -1) {\n return constructDetailsForInterpolation(\n lView, bindingIndex, bindingIndex, metadata, newValue);\n }\n // metadata for property binding\n return {propName: metadata, oldValue, newValue};\n }\n\n // metadata is not available for this expression, check if this expression is a part of the\n // property interpolation by going from the current binding index left and look for a string that\n // contains INTERPOLATION_DELIMITER, the layout in tView.data for this case will look like this:\n // [..., 'id�Prefix � and � suffix', null, null, null, ...]\n if (metadata === null) {\n let idx = bindingIndex - 1;\n while (typeof tData[idx] !== 'string' && tData[idx + 1] === null) {\n idx--;\n }\n const meta = tData[idx];\n if (typeof meta === 'string') {\n const matches = meta.match(new RegExp(INTERPOLATION_DELIMITER, 'g'));\n // first interpolation delimiter separates property name from interpolation parts (in case of\n // property interpolations), so we subtract one from total number of found delimiters\n if (matches && (matches.length - 1) > bindingIndex - idx) {\n return constructDetailsForInterpolation(lView, idx, bindingIndex, meta, newValue);\n }\n }\n }\n return {propName: undefined, oldValue, newValue};\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 {ViewEncapsulation} from '../metadata/view';\n\n\n/**\n * Used by `RendererFactory2` to associate custom rendering data and styles\n * with a rendering implementation.\n * @publicApi\n */\nexport interface RendererType2 {\n /**\n * A unique identifying string for the new renderer, used when creating\n * unique styles for encapsulation.\n */\n id: string;\n /**\n * The view encapsulation type, which determines how styles are applied to\n * DOM elements. One of\n * - `Emulated` (default): Emulate native scoping of styles.\n * - `Native`: Use the native encapsulation mechanism of the renderer.\n * - `ShadowDom`: Use modern [Shadow\n * DOM](https://w3c.github.io/webcomponents/spec/shadow/) and\n * create a ShadowRoot for component's host element.\n * - `None`: Do not provide any template or style encapsulation.\n */\n encapsulation: ViewEncapsulation;\n /**\n * Defines CSS styles to be stored on a renderer instance.\n */\n styles: (string|any[])[];\n /**\n * Defines arbitrary developer-defined data to be stored on a renderer instance.\n * This is useful for renderers that delegate to other renderers.\n */\n data: {[kind: string]: any};\n}\n\n\n/**\n * Flags for renderer-specific style modifiers.\n * @publicApi\n */\nexport enum RendererStyleFlags2 {\n // TODO(misko): This needs to be refactored into a separate file so that it can be imported from\n // `node_manipulation.ts` Currently doing the import cause resolution order to change and fails\n // the tests. The work around is to have hard coded value in `node_manipulation.ts` for now.\n /**\n * Marks a style as important.\n */\n Important = 1 << 0,\n /**\n * Marks a style as using dash case naming (this-is-dash-case).\n */\n DashCase = 1 << 1\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 * @fileoverview\n *\n * This file provides mechanism by which code relevant to the `TIcuContainerNode` is only loaded if\n * ICU is present in the template.\n */\n\nimport {TIcuContainerNode} from '../interfaces/node';\nimport {RNode} from '../interfaces/renderer_dom';\nimport {LView} from '../interfaces/view';\n\n\nlet _icuContainerIterate: (tIcuContainerNode: TIcuContainerNode, lView: LView) =>\n (() => RNode | null);\n\n/**\n * Iterator which provides ability to visit all of the `TIcuContainerNode` root `RNode`s.\n */\nexport function icuContainerIterate(tIcuContainerNode: TIcuContainerNode, lView: LView): () =>\n RNode | null {\n return _icuContainerIterate(tIcuContainerNode, lView);\n}\n\n/**\n * Ensures that `IcuContainerVisitor`'s implementation is present.\n *\n * This function is invoked when i18n instruction comes across an ICU. The purpose is to allow the\n * bundler to tree shake ICU logic and only load it if ICU instruction is executed.\n */\nexport function ensureIcuContainerVisitorLoaded(\n loader: () => ((tIcuContainerNode: TIcuContainerNode, lView: LView) => (() => RNode | null))) {\n if (_icuContainerIterate === undefined) {\n // Do not inline this function. We want to keep `ensureIcuContainerVisitorLoaded` light, so it\n // can be inlined into call-site.\n _icuContainerIterate = loader();\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\n\n/**\n * Expresses a single CSS Selector.\n *\n * Beginning of array\n * - First index: element name\n * - Subsequent odd indices: attr keys\n * - Subsequent even indices: attr values\n *\n * After SelectorFlags.CLASS flag\n * - Class name values\n *\n * SelectorFlags.NOT flag\n * - Changes the mode to NOT\n * - Can be combined with other flags to set the element / attr / class mode\n *\n * e.g. SelectorFlags.NOT | SelectorFlags.ELEMENT\n *\n * Example:\n * Original: `div.foo.bar[attr1=val1][attr2]`\n * Parsed: ['div', 'attr1', 'val1', 'attr2', '', SelectorFlags.CLASS, 'foo', 'bar']\n *\n * Original: 'div[attr1]:not(.foo[attr2])\n * Parsed: [\n * 'div', 'attr1', '',\n * SelectorFlags.NOT | SelectorFlags.ATTRIBUTE 'attr2', '', SelectorFlags.CLASS, 'foo'\n * ]\n *\n * See more examples in node_selector_matcher_spec.ts\n */\nexport type CssSelector = (string|SelectorFlags)[];\n\n/**\n * A list of CssSelectors.\n *\n * A directive or component can have multiple selectors. This type is used for\n * directive defs so any of the selectors in the list will match that directive.\n *\n * Original: 'form, [ngForm]'\n * Parsed: [['form'], ['', 'ngForm', '']]\n */\nexport type CssSelectorList = CssSelector[];\n\n/**\n * List of slots for a projection. A slot can be either based on a parsed CSS selector\n * which will be used to determine nodes which are projected into that slot.\n *\n * When set to \"*\", the slot is reserved and can be used for multi-slot projection\n * using {@link ViewContainerRef#createComponent}. The last slot that specifies the\n * wildcard selector will retrieve all projectable nodes which do not match any selector.\n */\nexport type ProjectionSlots = (CssSelectorList|'*')[];\n\n/** Flags used to build up CssSelectors */\nexport const enum SelectorFlags {\n /** Indicates this is the beginning of a new negative selector */\n NOT = 0b0001,\n\n /** Mode for matching attributes */\n ATTRIBUTE = 0b0010,\n\n /** Mode for matching tag names */\n ELEMENT = 0b0100,\n\n /** Mode for matching class names */\n CLASS = 0b1000,\n}\n\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nexport const unusedValueExportToPlacateAjd = 1;\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 {assertDefined} from '../../util/assert';\nimport {assertLView} from '../assert';\nimport {readPatchedLView} from '../context_discovery';\nimport {LContainer} from '../interfaces/container';\nimport {isLContainer, isLView} from '../interfaces/type_checks';\nimport {CHILD_HEAD, CONTEXT, FLAGS, LView, LViewFlags, NEXT, PARENT, RootContext} from '../interfaces/view';\n\n\n/**\n * Gets the parent LView of the passed LView, if the PARENT is an LContainer, will get the parent of\n * that LContainer, which is an LView\n * @param lView the lView whose parent to get\n */\nexport function getLViewParent(lView: LView): LView|null {\n ngDevMode && assertLView(lView);\n const parent = lView[PARENT];\n return isLContainer(parent) ? parent[PARENT]! : parent;\n}\n\n/**\n * Retrieve the root view from any component or `LView` by walking the parent `LView` until\n * reaching the root `LView`.\n *\n * @param componentOrLView any component or `LView`\n */\nexport function getRootView(componentOrLView: LView|{}): LView {\n ngDevMode && assertDefined(componentOrLView, 'component');\n let lView = isLView(componentOrLView) ? componentOrLView : readPatchedLView(componentOrLView)!;\n while (lView && !(lView[FLAGS] & LViewFlags.IsRoot)) {\n lView = getLViewParent(lView)!;\n }\n ngDevMode && assertLView(lView);\n return lView;\n}\n\n/**\n * Returns the `RootContext` instance that is associated with\n * the application where the target is situated. It does this by walking the parent views until it\n * gets to the root view, then getting the context off of that.\n *\n * @param viewOrComponent the `LView` or component to get the root context for.\n */\nexport function getRootContext(viewOrComponent: LView|{}): RootContext {\n const rootView = getRootView(viewOrComponent);\n ngDevMode &&\n assertDefined(rootView[CONTEXT], 'RootView has no context. Perhaps it is disconnected?');\n return rootView[CONTEXT] as RootContext;\n}\n\n\n/**\n * Gets the first `LContainer` in the LView or `null` if none exists.\n */\nexport function getFirstLContainer(lView: LView): LContainer|null {\n return getNearestLContainer(lView[CHILD_HEAD]);\n}\n\n/**\n * Gets the next `LContainer` that is a sibling of the given container.\n */\nexport function getNextLContainer(container: LContainer): LContainer|null {\n return getNearestLContainer(container[NEXT]);\n}\n\nfunction getNearestLContainer(viewOrContainer: LContainer|LView|null) {\n while (viewOrContainer !== null && !isLContainer(viewOrContainer)) {\n viewOrContainer = viewOrContainer[NEXT];\n }\n return viewOrContainer;\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 {ViewEncapsulation} from '../metadata/view';\nimport {Renderer2} from '../render/api';\nimport {RendererStyleFlags2} from '../render/api_flags';\nimport {addToArray, removeFromArray} from '../util/array_utils';\nimport {assertDefined, assertDomNode, assertEqual, assertFunction, assertString} from '../util/assert';\nimport {escapeCommentText} from '../util/dom';\n\nimport {assertLContainer, assertLView, assertParentView, assertProjectionSlots, assertTNodeForLView} from './assert';\nimport {attachPatchData} from './context_discovery';\nimport {icuContainerIterate} from './i18n/i18n_tree_shaking';\nimport {CONTAINER_HEADER_OFFSET, HAS_TRANSPLANTED_VIEWS, LContainer, MOVED_VIEWS, NATIVE, unusedValueExportToPlacateAjd as unused1} from './interfaces/container';\nimport {ComponentDef} from './interfaces/definition';\nimport {NodeInjectorFactory} from './interfaces/injector';\nimport {TElementNode, TIcuContainerNode, TNode, TNodeFlags, TNodeType, TProjectionNode, unusedValueExportToPlacateAjd as unused2} from './interfaces/node';\nimport {unusedValueExportToPlacateAjd as unused3} from './interfaces/projection';\nimport {isProceduralRenderer, ProceduralRenderer3, Renderer3, unusedValueExportToPlacateAjd as unused4} from './interfaces/renderer';\nimport {RComment, RElement, RNode, RText} from './interfaces/renderer_dom';\nimport {isLContainer, isLView} from './interfaces/type_checks';\nimport {CHILD_HEAD, CLEANUP, DECLARATION_COMPONENT_VIEW, DECLARATION_LCONTAINER, DestroyHookData, FLAGS, HookData, HookFn, HOST, LView, LViewFlags, NEXT, PARENT, QUERIES, RENDERER, T_HOST, TVIEW, TView, TViewType, unusedValueExportToPlacateAjd as unused5} from './interfaces/view';\nimport {assertTNodeType} from './node_assert';\nimport {profiler, ProfilerEvent} from './profiler';\nimport {getLViewParent} from './util/view_traversal_utils';\nimport {getNativeByTNode, unwrapRNode, updateTransplantedViewCount} from './util/view_utils';\n\n\n\nconst unusedValueToPlacateAjd = unused1 + unused2 + unused3 + unused4 + unused5;\n\nconst enum WalkTNodeTreeAction {\n /** node create in the native environment. Run on initial creation. */\n Create = 0,\n\n /**\n * node insert in the native environment.\n * Run when existing node has been detached and needs to be re-attached.\n */\n Insert = 1,\n\n /** node detach from the native environment */\n Detach = 2,\n\n /** node destruction using the renderer's API */\n Destroy = 3,\n}\n\n\n\n/**\n * NOTE: for performance reasons, the possible actions are inlined within the function instead of\n * being passed as an argument.\n */\nfunction applyToElementOrContainer(\n action: WalkTNodeTreeAction, renderer: Renderer3, parent: RElement|null,\n lNodeToHandle: RNode|LContainer|LView, beforeNode?: RNode|null) {\n // If this slot was allocated for a text node dynamically created by i18n, the text node itself\n // won't be created until i18nApply() in the update block, so this node should be skipped.\n // For more info, see \"ICU expressions should work inside an ngTemplateOutlet inside an ngFor\"\n // in `i18n_spec.ts`.\n if (lNodeToHandle != null) {\n let lContainer: LContainer|undefined;\n let isComponent = false;\n // We are expecting an RNode, but in the case of a component or LContainer the `RNode` is\n // wrapped in an array which needs to be unwrapped. We need to know if it is a component and if\n // it has LContainer so that we can process all of those cases appropriately.\n if (isLContainer(lNodeToHandle)) {\n lContainer = lNodeToHandle;\n } else if (isLView(lNodeToHandle)) {\n isComponent = true;\n ngDevMode && assertDefined(lNodeToHandle[HOST], 'HOST must be defined for a component LView');\n lNodeToHandle = lNodeToHandle[HOST]!;\n }\n const rNode: RNode = unwrapRNode(lNodeToHandle);\n ngDevMode && !isProceduralRenderer(renderer) && assertDomNode(rNode);\n\n if (action === WalkTNodeTreeAction.Create && parent !== null) {\n if (beforeNode == null) {\n nativeAppendChild(renderer, parent, rNode);\n } else {\n nativeInsertBefore(renderer, parent, rNode, beforeNode || null, true);\n }\n } else if (action === WalkTNodeTreeAction.Insert && parent !== null) {\n nativeInsertBefore(renderer, parent, rNode, beforeNode || null, true);\n } else if (action === WalkTNodeTreeAction.Detach) {\n nativeRemoveNode(renderer, rNode, isComponent);\n } else if (action === WalkTNodeTreeAction.Destroy) {\n ngDevMode && ngDevMode.rendererDestroyNode++;\n (renderer as ProceduralRenderer3).destroyNode!(rNode);\n }\n if (lContainer != null) {\n applyContainer(renderer, action, lContainer, parent, beforeNode);\n }\n }\n}\n\nexport function createTextNode(renderer: Renderer3, value: string): RText {\n ngDevMode && ngDevMode.rendererCreateTextNode++;\n ngDevMode && ngDevMode.rendererSetText++;\n return isProceduralRenderer(renderer) ? renderer.createText(value) :\n renderer.createTextNode(value);\n}\n\nexport function updateTextNode(renderer: Renderer3, rNode: RText, value: string): void {\n ngDevMode && ngDevMode.rendererSetText++;\n isProceduralRenderer(renderer) ? renderer.setValue(rNode, value) : rNode.textContent = value;\n}\n\nexport function createCommentNode(renderer: Renderer3, value: string): RComment {\n ngDevMode && ngDevMode.rendererCreateComment++;\n // isProceduralRenderer check is not needed because both `Renderer2` and `Renderer3` have the same\n // method name.\n return renderer.createComment(escapeCommentText(value));\n}\n\n/**\n * Creates a native element from a tag name, using a renderer.\n * @param renderer A renderer to use\n * @param name the tag name\n * @param namespace Optional namespace for element.\n * @returns the element created\n */\nexport function createElementNode(\n renderer: Renderer3, name: string, namespace: string|null): RElement {\n ngDevMode && ngDevMode.rendererCreateElement++;\n if (isProceduralRenderer(renderer)) {\n return renderer.createElement(name, namespace);\n } else {\n return namespace === null ? renderer.createElement(name) :\n renderer.createElementNS(namespace, name);\n }\n}\n\n\n/**\n * Removes all DOM elements associated with a view.\n *\n * Because some root nodes of the view may be containers, we sometimes need\n * to propagate deeply into the nested containers to remove all elements in the\n * views beneath it.\n *\n * @param tView The `TView' of the `LView` from which elements should be added or removed\n * @param lView The view from which elements should be added or removed\n */\nexport function removeViewFromContainer(tView: TView, lView: LView): void {\n const renderer = lView[RENDERER];\n applyView(tView, lView, renderer, WalkTNodeTreeAction.Detach, null, null);\n lView[HOST] = null;\n lView[T_HOST] = null;\n}\n\n/**\n * Adds all DOM elements associated with a view.\n *\n * Because some root nodes of the view may be containers, we sometimes need\n * to propagate deeply into the nested containers to add all elements in the\n * views beneath it.\n *\n * @param tView The `TView' of the `LView` from which elements should be added or removed\n * @param parentTNode The `TNode` where the `LView` should be attached to.\n * @param renderer Current renderer to use for DOM manipulations.\n * @param lView The view from which elements should be added or removed\n * @param parentNativeNode The parent `RElement` where it should be inserted into.\n * @param beforeNode The node before which elements should be added, if insert mode\n */\nexport function addViewToContainer(\n tView: TView, parentTNode: TNode, renderer: Renderer3, lView: LView, parentNativeNode: RElement,\n beforeNode: RNode|null): void {\n lView[HOST] = parentNativeNode;\n lView[T_HOST] = parentTNode;\n applyView(tView, lView, renderer, WalkTNodeTreeAction.Insert, parentNativeNode, beforeNode);\n}\n\n\n/**\n * Detach a `LView` from the DOM by detaching its nodes.\n *\n * @param tView The `TView' of the `LView` to be detached\n * @param lView the `LView` to be detached.\n */\nexport function renderDetachView(tView: TView, lView: LView) {\n applyView(tView, lView, lView[RENDERER], WalkTNodeTreeAction.Detach, null, null);\n}\n\n/**\n * Traverses down and up the tree of views and containers to remove listeners and\n * call onDestroy callbacks.\n *\n * Notes:\n * - Because it's used for onDestroy calls, it needs to be bottom-up.\n * - Must process containers instead of their views to avoid splicing\n * when views are destroyed and re-added.\n * - Using a while loop because it's faster than recursion\n * - Destroy only called on movement to sibling or movement to parent (laterally or up)\n *\n * @param rootView The view to destroy\n */\nexport function destroyViewTree(rootView: LView): void {\n // If the view has no children, we can clean it up and return early.\n let lViewOrLContainer = rootView[CHILD_HEAD];\n if (!lViewOrLContainer) {\n return cleanUpView(rootView[TVIEW], rootView);\n }\n\n while (lViewOrLContainer) {\n let next: LView|LContainer|null = null;\n\n if (isLView(lViewOrLContainer)) {\n // If LView, traverse down to child.\n next = lViewOrLContainer[CHILD_HEAD];\n } else {\n ngDevMode && assertLContainer(lViewOrLContainer);\n // If container, traverse down to its first LView.\n const firstView: LView|undefined = lViewOrLContainer[CONTAINER_HEADER_OFFSET];\n if (firstView) next = firstView;\n }\n\n if (!next) {\n // Only clean up view when moving to the side or up, as destroy hooks\n // should be called in order from the bottom up.\n while (lViewOrLContainer && !lViewOrLContainer![NEXT] && lViewOrLContainer !== rootView) {\n if (isLView(lViewOrLContainer)) {\n cleanUpView(lViewOrLContainer[TVIEW], lViewOrLContainer);\n }\n lViewOrLContainer = lViewOrLContainer[PARENT];\n }\n if (lViewOrLContainer === null) lViewOrLContainer = rootView;\n if (isLView(lViewOrLContainer)) {\n cleanUpView(lViewOrLContainer[TVIEW], lViewOrLContainer);\n }\n next = lViewOrLContainer && lViewOrLContainer![NEXT];\n }\n lViewOrLContainer = next;\n }\n}\n\n/**\n * Inserts a view into a container.\n *\n * This adds the view to the container's array of active views in the correct\n * position. It also adds the view's elements to the DOM if the container isn't a\n * root node of another view (in that case, the view's elements will be added when\n * the container's parent view is added later).\n *\n * @param tView The `TView' of the `LView` to insert\n * @param lView The view to insert\n * @param lContainer The container into which the view should be inserted\n * @param index Which index in the container to insert the child view into\n */\nexport function insertView(tView: TView, lView: LView, lContainer: LContainer, index: number) {\n ngDevMode && assertLView(lView);\n ngDevMode && assertLContainer(lContainer);\n const indexInContainer = CONTAINER_HEADER_OFFSET + index;\n const containerLength = lContainer.length;\n\n if (index > 0) {\n // This is a new view, we need to add it to the children.\n lContainer[indexInContainer - 1][NEXT] = lView;\n }\n if (index < containerLength - CONTAINER_HEADER_OFFSET) {\n lView[NEXT] = lContainer[indexInContainer];\n addToArray(lContainer, CONTAINER_HEADER_OFFSET + index, lView);\n } else {\n lContainer.push(lView);\n lView[NEXT] = null;\n }\n\n lView[PARENT] = lContainer;\n\n // track views where declaration and insertion points are different\n const declarationLContainer = lView[DECLARATION_LCONTAINER];\n if (declarationLContainer !== null && lContainer !== declarationLContainer) {\n trackMovedView(declarationLContainer, lView);\n }\n\n // notify query that a new view has been added\n const lQueries = lView[QUERIES];\n if (lQueries !== null) {\n lQueries.insertView(tView);\n }\n\n // Sets the attached flag\n lView[FLAGS] |= LViewFlags.Attached;\n}\n\n/**\n * Track views created from the declaration container (TemplateRef) and inserted into a\n * different LContainer.\n */\nfunction trackMovedView(declarationContainer: LContainer, lView: LView) {\n ngDevMode && assertDefined(lView, 'LView required');\n ngDevMode && assertLContainer(declarationContainer);\n const movedViews = declarationContainer[MOVED_VIEWS];\n const insertedLContainer = lView[PARENT] as LContainer;\n ngDevMode && assertLContainer(insertedLContainer);\n const insertedComponentLView = insertedLContainer[PARENT]![DECLARATION_COMPONENT_VIEW];\n ngDevMode && assertDefined(insertedComponentLView, 'Missing insertedComponentLView');\n const declaredComponentLView = lView[DECLARATION_COMPONENT_VIEW];\n ngDevMode && assertDefined(declaredComponentLView, 'Missing declaredComponentLView');\n if (declaredComponentLView !== insertedComponentLView) {\n // At this point the declaration-component is not same as insertion-component; this means that\n // this is a transplanted view. Mark the declared lView as having transplanted views so that\n // those views can participate in CD.\n declarationContainer[HAS_TRANSPLANTED_VIEWS] = true;\n }\n if (movedViews === null) {\n declarationContainer[MOVED_VIEWS] = [lView];\n } else {\n movedViews.push(lView);\n }\n}\n\nfunction detachMovedView(declarationContainer: LContainer, lView: LView) {\n ngDevMode && assertLContainer(declarationContainer);\n ngDevMode &&\n assertDefined(\n declarationContainer[MOVED_VIEWS],\n 'A projected view should belong to a non-empty projected views collection');\n const movedViews = declarationContainer[MOVED_VIEWS]!;\n const declarationViewIndex = movedViews.indexOf(lView);\n const insertionLContainer = lView[PARENT] as LContainer;\n ngDevMode && assertLContainer(insertionLContainer);\n\n // If the view was marked for refresh but then detached before it was checked (where the flag\n // would be cleared and the counter decremented), we need to decrement the view counter here\n // instead.\n if (lView[FLAGS] & LViewFlags.RefreshTransplantedView) {\n lView[FLAGS] &= ~LViewFlags.RefreshTransplantedView;\n updateTransplantedViewCount(insertionLContainer, -1);\n }\n\n movedViews.splice(declarationViewIndex, 1);\n}\n\n/**\n * Detaches a view from a container.\n *\n * This method removes the view from the container's array of active views. It also\n * removes the view's elements from the DOM.\n *\n * @param lContainer The container from which to detach a view\n * @param removeIndex The index of the view to detach\n * @returns Detached LView instance.\n */\nexport function detachView(lContainer: LContainer, removeIndex: number): LView|undefined {\n if (lContainer.length <= CONTAINER_HEADER_OFFSET) return;\n\n const indexInContainer = CONTAINER_HEADER_OFFSET + removeIndex;\n const viewToDetach = lContainer[indexInContainer];\n\n if (viewToDetach) {\n const declarationLContainer = viewToDetach[DECLARATION_LCONTAINER];\n if (declarationLContainer !== null && declarationLContainer !== lContainer) {\n detachMovedView(declarationLContainer, viewToDetach);\n }\n\n\n if (removeIndex > 0) {\n lContainer[indexInContainer - 1][NEXT] = viewToDetach[NEXT] as LView;\n }\n const removedLView = removeFromArray(lContainer, CONTAINER_HEADER_OFFSET + removeIndex);\n removeViewFromContainer(viewToDetach[TVIEW], viewToDetach);\n\n // notify query that a view has been removed\n const lQueries = removedLView[QUERIES];\n if (lQueries !== null) {\n lQueries.detachView(removedLView[TVIEW]);\n }\n\n viewToDetach[PARENT] = null;\n viewToDetach[NEXT] = null;\n // Unsets the attached flag\n viewToDetach[FLAGS] &= ~LViewFlags.Attached;\n }\n return viewToDetach;\n}\n\n/**\n * A standalone function which destroys an LView,\n * conducting clean up (e.g. removing listeners, calling onDestroys).\n *\n * @param tView The `TView' of the `LView` to be destroyed\n * @param lView The view to be destroyed.\n */\nexport function destroyLView(tView: TView, lView: LView) {\n if (!(lView[FLAGS] & LViewFlags.Destroyed)) {\n const renderer = lView[RENDERER];\n if (isProceduralRenderer(renderer) && renderer.destroyNode) {\n applyView(tView, lView, renderer, WalkTNodeTreeAction.Destroy, null, null);\n }\n\n destroyViewTree(lView);\n }\n}\n\n/**\n * Calls onDestroys hooks for all directives and pipes in a given view and then removes all\n * listeners. Listeners are removed as the last step so events delivered in the onDestroys hooks\n * can be propagated to @Output listeners.\n *\n * @param tView `TView` for the `LView` to clean up.\n * @param lView The LView to clean up\n */\nfunction cleanUpView(tView: TView, lView: LView): void {\n if (!(lView[FLAGS] & LViewFlags.Destroyed)) {\n // Usually the Attached flag is removed when the view is detached from its parent, however\n // if it's a root view, the flag won't be unset hence why we're also removing on destroy.\n lView[FLAGS] &= ~LViewFlags.Attached;\n\n // Mark the LView as destroyed *before* executing the onDestroy hooks. An onDestroy hook\n // runs arbitrary user code, which could include its own `viewRef.destroy()` (or similar). If\n // We don't flag the view as destroyed before the hooks, this could lead to an infinite loop.\n // This also aligns with the ViewEngine behavior. It also means that the onDestroy hook is\n // really more of an \"afterDestroy\" hook if you think about it.\n lView[FLAGS] |= LViewFlags.Destroyed;\n\n executeOnDestroys(tView, lView);\n processCleanups(tView, lView);\n // For component views only, the local renderer is destroyed at clean up time.\n if (lView[TVIEW].type === TViewType.Component && isProceduralRenderer(lView[RENDERER])) {\n ngDevMode && ngDevMode.rendererDestroy++;\n (lView[RENDERER] as ProceduralRenderer3).destroy();\n }\n\n const declarationContainer = lView[DECLARATION_LCONTAINER];\n // we are dealing with an embedded view that is still inserted into a container\n if (declarationContainer !== null && isLContainer(lView[PARENT])) {\n // and this is a projected view\n if (declarationContainer !== lView[PARENT]) {\n detachMovedView(declarationContainer, lView);\n }\n\n // For embedded views still attached to a container: remove query result from this view.\n const lQueries = lView[QUERIES];\n if (lQueries !== null) {\n lQueries.detachView(tView);\n }\n }\n }\n}\n\n/** Removes listeners and unsubscribes from output subscriptions */\nfunction processCleanups(tView: TView, lView: LView): void {\n const tCleanup = tView.cleanup;\n const lCleanup = lView[CLEANUP]!;\n // `LCleanup` contains both share information with `TCleanup` as well as instance specific\n // information appended at the end. We need to know where the end of the `TCleanup` information\n // is, and we track this with `lastLCleanupIndex`.\n let lastLCleanupIndex = -1;\n if (tCleanup !== null) {\n for (let i = 0; i < tCleanup.length - 1; i += 2) {\n if (typeof tCleanup[i] === 'string') {\n // This is a native DOM listener\n const idxOrTargetGetter = tCleanup[i + 1];\n const target = typeof idxOrTargetGetter === 'function' ?\n idxOrTargetGetter(lView) :\n unwrapRNode(lView[idxOrTargetGetter]);\n const listener = lCleanup[lastLCleanupIndex = tCleanup[i + 2]];\n const useCaptureOrSubIdx = tCleanup[i + 3];\n if (typeof useCaptureOrSubIdx === 'boolean') {\n // native DOM listener registered with Renderer3\n target.removeEventListener(tCleanup[i], listener, useCaptureOrSubIdx);\n } else {\n if (useCaptureOrSubIdx >= 0) {\n // unregister\n lCleanup[lastLCleanupIndex = useCaptureOrSubIdx]();\n } else {\n // Subscription\n lCleanup[lastLCleanupIndex = -useCaptureOrSubIdx].unsubscribe();\n }\n }\n i += 2;\n } else {\n // This is a cleanup function that is grouped with the index of its context\n const context = lCleanup[lastLCleanupIndex = tCleanup[i + 1]];\n tCleanup[i].call(context);\n }\n }\n }\n if (lCleanup !== null) {\n for (let i = lastLCleanupIndex + 1; i < lCleanup.length; i++) {\n const instanceCleanupFn = lCleanup[i];\n ngDevMode && assertFunction(instanceCleanupFn, 'Expecting instance cleanup function.');\n instanceCleanupFn();\n }\n lView[CLEANUP] = null;\n }\n}\n\n/** Calls onDestroy hooks for this view */\nfunction executeOnDestroys(tView: TView, lView: LView): void {\n let destroyHooks: DestroyHookData|null;\n\n if (tView != null && (destroyHooks = tView.destroyHooks) != null) {\n for (let i = 0; i < destroyHooks.length; i += 2) {\n const context = lView[destroyHooks[i] as number];\n\n // Only call the destroy hook if the context has been requested.\n if (!(context instanceof NodeInjectorFactory)) {\n const toCall = destroyHooks[i + 1] as HookFn | HookData;\n\n if (Array.isArray(toCall)) {\n for (let j = 0; j < toCall.length; j += 2) {\n const callContext = context[toCall[j] as number];\n const hook = toCall[j + 1] as HookFn;\n profiler(ProfilerEvent.LifecycleHookStart, callContext, hook);\n try {\n hook.call(callContext);\n } finally {\n profiler(ProfilerEvent.LifecycleHookEnd, callContext, hook);\n }\n }\n } else {\n profiler(ProfilerEvent.LifecycleHookStart, context, toCall);\n try {\n toCall.call(context);\n } finally {\n profiler(ProfilerEvent.LifecycleHookEnd, context, toCall);\n }\n }\n }\n }\n }\n}\n\n/**\n * Returns a native element if a node can be inserted into the given parent.\n *\n * There are two reasons why we may not be able to insert a element immediately.\n * - Projection: When creating a child content element of a component, we have to skip the\n * insertion because the content of a component will be projected.\n * `<component><content>delayed due to projection</content></component>`\n * - Parent container is disconnected: This can happen when we are inserting a view into\n * parent container, which itself is disconnected. For example the parent container is part\n * of a View which has not be inserted or is made for projection but has not been inserted\n * into destination.\n *\n * @param tView: Current `TView`.\n * @param tNode: `TNode` for which we wish to retrieve render parent.\n * @param lView: Current `LView`.\n */\nexport function getParentRElement(tView: TView, tNode: TNode, lView: LView): RElement|null {\n return getClosestRElement(tView, tNode.parent, lView);\n}\n\n/**\n * Get closest `RElement` or `null` if it can't be found.\n *\n * If `TNode` is `TNodeType.Element` => return `RElement` at `LView[tNode.index]` location.\n * If `TNode` is `TNodeType.ElementContainer|IcuContain` => return the parent (recursively).\n * If `TNode` is `null` then return host `RElement`:\n * - return `null` if projection\n * - return `null` if parent container is disconnected (we have no parent.)\n *\n * @param tView: Current `TView`.\n * @param tNode: `TNode` for which we wish to retrieve `RElement` (or `null` if host element is\n * needed).\n * @param lView: Current `LView`.\n * @returns `null` if the `RElement` can't be determined at this time (no parent / projection)\n */\nexport function getClosestRElement(tView: TView, tNode: TNode|null, lView: LView): RElement|null {\n let parentTNode: TNode|null = tNode;\n // Skip over element and ICU containers as those are represented by a comment node and\n // can't be used as a render parent.\n while (parentTNode !== null &&\n (parentTNode.type & (TNodeType.ElementContainer | TNodeType.Icu))) {\n tNode = parentTNode;\n parentTNode = tNode.parent;\n }\n\n // If the parent tNode is null, then we are inserting across views: either into an embedded view\n // or a component view.\n if (parentTNode === null) {\n // We are inserting a root element of the component view into the component host element and\n // it should always be eager.\n return lView[HOST];\n } else {\n ngDevMode && assertTNodeType(parentTNode, TNodeType.AnyRNode | TNodeType.Container);\n if (parentTNode.flags & TNodeFlags.isComponentHost) {\n ngDevMode && assertTNodeForLView(parentTNode, lView);\n const encapsulation =\n (tView.data[parentTNode.directiveStart] as ComponentDef<unknown>).encapsulation;\n // We've got a parent which is an element in the current view. We just need to verify if the\n // parent element is not a component. Component's content nodes are not inserted immediately\n // because they will be projected, and so doing insert at this point would be wasteful.\n // Since the projection would then move it to its final destination. Note that we can't\n // make this assumption when using the Shadow DOM, because the native projection placeholders\n // (<content> or <slot>) have to be in place as elements are being inserted.\n if (encapsulation === ViewEncapsulation.None ||\n encapsulation === ViewEncapsulation.Emulated) {\n return null;\n }\n }\n\n return getNativeByTNode(parentTNode, lView) as RElement;\n }\n}\n\n/**\n * Inserts a native node before another native node for a given parent using {@link Renderer3}.\n * This is a utility function that can be used when native nodes were determined - it abstracts an\n * actual renderer being used.\n */\nexport function nativeInsertBefore(\n renderer: Renderer3, parent: RElement, child: RNode, beforeNode: RNode|null,\n isMove: boolean): void {\n ngDevMode && ngDevMode.rendererInsertBefore++;\n if (isProceduralRenderer(renderer)) {\n renderer.insertBefore(parent, child, beforeNode, isMove);\n } else {\n parent.insertBefore(child, beforeNode, isMove);\n }\n}\n\nfunction nativeAppendChild(renderer: Renderer3, parent: RElement, child: RNode): void {\n ngDevMode && ngDevMode.rendererAppendChild++;\n ngDevMode && assertDefined(parent, 'parent node must be defined');\n if (isProceduralRenderer(renderer)) {\n renderer.appendChild(parent, child);\n } else {\n parent.appendChild(child);\n }\n}\n\nfunction nativeAppendOrInsertBefore(\n renderer: Renderer3, parent: RElement, child: RNode, beforeNode: RNode|null, isMove: boolean) {\n if (beforeNode !== null) {\n nativeInsertBefore(renderer, parent, child, beforeNode, isMove);\n } else {\n nativeAppendChild(renderer, parent, child);\n }\n}\n\n/** Removes a node from the DOM given its native parent. */\nfunction nativeRemoveChild(\n renderer: Renderer3, parent: RElement, child: RNode, isHostElement?: boolean): void {\n if (isProceduralRenderer(renderer)) {\n renderer.removeChild(parent, child, isHostElement);\n } else {\n parent.removeChild(child);\n }\n}\n\n/**\n * Returns a native parent of a given native node.\n */\nexport function nativeParentNode(renderer: Renderer3, node: RNode): RElement|null {\n return (isProceduralRenderer(renderer) ? renderer.parentNode(node) : node.parentNode) as RElement;\n}\n\n/**\n * Returns a native sibling of a given native node.\n */\nexport function nativeNextSibling(renderer: Renderer3, node: RNode): RNode|null {\n return isProceduralRenderer(renderer) ? renderer.nextSibling(node) : node.nextSibling;\n}\n\n/**\n * Find a node in front of which `currentTNode` should be inserted.\n *\n * This method determines the `RNode` in front of which we should insert the `currentRNode`. This\n * takes `TNode.insertBeforeIndex` into account if i18n code has been invoked.\n *\n * @param parentTNode parent `TNode`\n * @param currentTNode current `TNode` (The node which we would like to insert into the DOM)\n * @param lView current `LView`\n */\nfunction getInsertInFrontOfRNode(parentTNode: TNode, currentTNode: TNode, lView: LView): RNode|\n null {\n return _getInsertInFrontOfRNodeWithI18n(parentTNode, currentTNode, lView);\n}\n\n\n/**\n * Find a node in front of which `currentTNode` should be inserted. (Does not take i18n into\n * account)\n *\n * This method determines the `RNode` in front of which we should insert the `currentRNode`. This\n * does not take `TNode.insertBeforeIndex` into account.\n *\n * @param parentTNode parent `TNode`\n * @param currentTNode current `TNode` (The node which we would like to insert into the DOM)\n * @param lView current `LView`\n */\nexport function getInsertInFrontOfRNodeWithNoI18n(\n parentTNode: TNode, currentTNode: TNode, lView: LView): RNode|null {\n if (parentTNode.type & (TNodeType.ElementContainer | TNodeType.Icu)) {\n return getNativeByTNode(parentTNode, lView);\n }\n return null;\n}\n\n/**\n * Tree shakable boundary for `getInsertInFrontOfRNodeWithI18n` function.\n *\n * This function will only be set if i18n code runs.\n */\nlet _getInsertInFrontOfRNodeWithI18n: (parentTNode: TNode, currentTNode: TNode, lView: LView) =>\n RNode | null = getInsertInFrontOfRNodeWithNoI18n;\n\n/**\n * Tree shakable boundary for `processI18nInsertBefore` function.\n *\n * This function will only be set if i18n code runs.\n */\nlet _processI18nInsertBefore: (\n renderer: Renderer3, childTNode: TNode, lView: LView, childRNode: RNode|RNode[],\n parentRElement: RElement|null) => void;\n\nexport function setI18nHandling(\n getInsertInFrontOfRNodeWithI18n: (parentTNode: TNode, currentTNode: TNode, lView: LView) =>\n RNode | null,\n processI18nInsertBefore: (\n renderer: Renderer3, childTNode: TNode, lView: LView, childRNode: RNode|RNode[],\n parentRElement: RElement|null) => void) {\n _getInsertInFrontOfRNodeWithI18n = getInsertInFrontOfRNodeWithI18n;\n _processI18nInsertBefore = processI18nInsertBefore;\n}\n\n/**\n * Appends the `child` native node (or a collection of nodes) to the `parent`.\n *\n * @param tView The `TView' to be appended\n * @param lView The current LView\n * @param childRNode The native child (or children) that should be appended\n * @param childTNode The TNode of the child element\n */\nexport function appendChild(\n tView: TView, lView: LView, childRNode: RNode|RNode[], childTNode: TNode): void {\n const parentRNode = getParentRElement(tView, childTNode, lView);\n const renderer = lView[RENDERER];\n const parentTNode: TNode = childTNode.parent || lView[T_HOST]!;\n const anchorNode = getInsertInFrontOfRNode(parentTNode, childTNode, lView);\n if (parentRNode != null) {\n if (Array.isArray(childRNode)) {\n for (let i = 0; i < childRNode.length; i++) {\n nativeAppendOrInsertBefore(renderer, parentRNode, childRNode[i], anchorNode, false);\n }\n } else {\n nativeAppendOrInsertBefore(renderer, parentRNode, childRNode, anchorNode, false);\n }\n }\n\n _processI18nInsertBefore !== undefined &&\n _processI18nInsertBefore(renderer, childTNode, lView, childRNode, parentRNode);\n}\n\n/**\n * Returns the first native node for a given LView, starting from the provided TNode.\n *\n * Native nodes are returned in the order in which those appear in the native tree (DOM).\n */\nfunction getFirstNativeNode(lView: LView, tNode: TNode|null): RNode|null {\n if (tNode !== null) {\n ngDevMode &&\n assertTNodeType(\n tNode,\n TNodeType.AnyRNode | TNodeType.AnyContainer | TNodeType.Icu | TNodeType.Projection);\n\n const tNodeType = tNode.type;\n if (tNodeType & TNodeType.AnyRNode) {\n return getNativeByTNode(tNode, lView);\n } else if (tNodeType & TNodeType.Container) {\n return getBeforeNodeForView(-1, lView[tNode.index]);\n } else if (tNodeType & TNodeType.ElementContainer) {\n const elIcuContainerChild = tNode.child;\n if (elIcuContainerChild !== null) {\n return getFirstNativeNode(lView, elIcuContainerChild);\n } else {\n const rNodeOrLContainer = lView[tNode.index];\n if (isLContainer(rNodeOrLContainer)) {\n return getBeforeNodeForView(-1, rNodeOrLContainer);\n } else {\n return unwrapRNode(rNodeOrLContainer);\n }\n }\n } else if (tNodeType & TNodeType.Icu) {\n let nextRNode = icuContainerIterate(tNode as TIcuContainerNode, lView);\n let rNode: RNode|null = nextRNode();\n // If the ICU container has no nodes, than we use the ICU anchor as the node.\n return rNode || unwrapRNode(lView[tNode.index]);\n } else {\n const projectionNodes = getProjectionNodes(lView, tNode);\n if (projectionNodes !== null) {\n if (Array.isArray(projectionNodes)) {\n return projectionNodes[0];\n }\n const parentView = getLViewParent(lView[DECLARATION_COMPONENT_VIEW]);\n ngDevMode && assertParentView(parentView);\n return getFirstNativeNode(parentView!, projectionNodes);\n } else {\n return getFirstNativeNode(lView, tNode.next);\n }\n }\n }\n\n return null;\n}\n\nexport function getProjectionNodes(lView: LView, tNode: TNode|null): TNode|RNode[]|null {\n if (tNode !== null) {\n const componentView = lView[DECLARATION_COMPONENT_VIEW];\n const componentHost = componentView[T_HOST] as TElementNode;\n const slotIdx = tNode.projection as number;\n ngDevMode && assertProjectionSlots(lView);\n return componentHost.projection![slotIdx];\n }\n return null;\n}\n\nexport function getBeforeNodeForView(viewIndexInContainer: number, lContainer: LContainer): RNode|\n null {\n const nextViewIndex = CONTAINER_HEADER_OFFSET + viewIndexInContainer + 1;\n if (nextViewIndex < lContainer.length) {\n const lView = lContainer[nextViewIndex] as LView;\n const firstTNodeOfView = lView[TVIEW].firstChild;\n if (firstTNodeOfView !== null) {\n return getFirstNativeNode(lView, firstTNodeOfView);\n }\n }\n\n return lContainer[NATIVE];\n}\n\n/**\n * Removes a native node itself using a given renderer. To remove the node we are looking up its\n * parent from the native tree as not all platforms / browsers support the equivalent of\n * node.remove().\n *\n * @param renderer A renderer to be used\n * @param rNode The native node that should be removed\n * @param isHostElement A flag indicating if a node to be removed is a host of a component.\n */\nexport function nativeRemoveNode(renderer: Renderer3, rNode: RNode, isHostElement?: boolean): void {\n ngDevMode && ngDevMode.rendererRemoveNode++;\n const nativeParent = nativeParentNode(renderer, rNode);\n if (nativeParent) {\n nativeRemoveChild(renderer, nativeParent, rNode, isHostElement);\n }\n}\n\n\n/**\n * Performs the operation of `action` on the node. Typically this involves inserting or removing\n * nodes on the LView or projection boundary.\n */\nfunction applyNodes(\n renderer: Renderer3, action: WalkTNodeTreeAction, tNode: TNode|null, lView: LView,\n parentRElement: RElement|null, beforeNode: RNode|null, isProjection: boolean) {\n while (tNode != null) {\n ngDevMode && assertTNodeForLView(tNode, lView);\n ngDevMode &&\n assertTNodeType(\n tNode,\n TNodeType.AnyRNode | TNodeType.AnyContainer | TNodeType.Projection | TNodeType.Icu);\n const rawSlotValue = lView[tNode.index];\n const tNodeType = tNode.type;\n if (isProjection) {\n if (action === WalkTNodeTreeAction.Create) {\n rawSlotValue && attachPatchData(unwrapRNode(rawSlotValue), lView);\n tNode.flags |= TNodeFlags.isProjected;\n }\n }\n if ((tNode.flags & TNodeFlags.isDetached) !== TNodeFlags.isDetached) {\n if (tNodeType & TNodeType.ElementContainer) {\n applyNodes(renderer, action, tNode.child, lView, parentRElement, beforeNode, false);\n applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode);\n } else if (tNodeType & TNodeType.Icu) {\n const nextRNode = icuContainerIterate(tNode as TIcuContainerNode, lView);\n let rNode: RNode|null;\n while (rNode = nextRNode()) {\n applyToElementOrContainer(action, renderer, parentRElement, rNode, beforeNode);\n }\n applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode);\n } else if (tNodeType & TNodeType.Projection) {\n applyProjectionRecursive(\n renderer, action, lView, tNode as TProjectionNode, parentRElement, beforeNode);\n } else {\n ngDevMode && assertTNodeType(tNode, TNodeType.AnyRNode | TNodeType.Container);\n applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode);\n }\n }\n tNode = isProjection ? tNode.projectionNext : tNode.next;\n }\n}\n\n\n/**\n * `applyView` performs operation on the view as specified in `action` (insert, detach, destroy)\n *\n * Inserting a view without projection or containers at top level is simple. Just iterate over the\n * root nodes of the View, and for each node perform the `action`.\n *\n * Things get more complicated with containers and projections. That is because coming across:\n * - Container: implies that we have to insert/remove/destroy the views of that container as well\n * which in turn can have their own Containers at the View roots.\n * - Projection: implies that we have to insert/remove/destroy the nodes of the projection. The\n * complication is that the nodes we are projecting can themselves have Containers\n * or other Projections.\n *\n * As you can see this is a very recursive problem. Yes recursion is not most efficient but the\n * code is complicated enough that trying to implemented with recursion becomes unmaintainable.\n *\n * @param tView The `TView' which needs to be inserted, detached, destroyed\n * @param lView The LView which needs to be inserted, detached, destroyed.\n * @param renderer Renderer to use\n * @param action action to perform (insert, detach, destroy)\n * @param parentRElement parent DOM element for insertion (Removal does not need it).\n * @param beforeNode Before which node the insertions should happen.\n */\nfunction applyView(\n tView: TView, lView: LView, renderer: Renderer3, action: WalkTNodeTreeAction.Destroy,\n parentRElement: null, beforeNode: null): void;\nfunction applyView(\n tView: TView, lView: LView, renderer: Renderer3, action: WalkTNodeTreeAction,\n parentRElement: RElement|null, beforeNode: RNode|null): void;\nfunction applyView(\n tView: TView, lView: LView, renderer: Renderer3, action: WalkTNodeTreeAction,\n parentRElement: RElement|null, beforeNode: RNode|null): void {\n applyNodes(renderer, action, tView.firstChild, lView, parentRElement, beforeNode, false);\n}\n\n/**\n * `applyProjection` performs operation on the projection.\n *\n * Inserting a projection requires us to locate the projected nodes from the parent component. The\n * complication is that those nodes themselves could be re-projected from their parent component.\n *\n * @param tView The `TView` of `LView` which needs to be inserted, detached, destroyed\n * @param lView The `LView` which needs to be inserted, detached, destroyed.\n * @param tProjectionNode node to project\n */\nexport function applyProjection(tView: TView, lView: LView, tProjectionNode: TProjectionNode) {\n const renderer = lView[RENDERER];\n const parentRNode = getParentRElement(tView, tProjectionNode, lView);\n const parentTNode = tProjectionNode.parent || lView[T_HOST]!;\n let beforeNode = getInsertInFrontOfRNode(parentTNode, tProjectionNode, lView);\n applyProjectionRecursive(\n renderer, WalkTNodeTreeAction.Create, lView, tProjectionNode, parentRNode, beforeNode);\n}\n\n/**\n * `applyProjectionRecursive` performs operation on the projection specified by `action` (insert,\n * detach, destroy)\n *\n * Inserting a projection requires us to locate the projected nodes from the parent component. The\n * complication is that those nodes themselves could be re-projected from their parent component.\n *\n * @param renderer Render to use\n * @param action action to perform (insert, detach, destroy)\n * @param lView The LView which needs to be inserted, detached, destroyed.\n * @param tProjectionNode node to project\n * @param parentRElement parent DOM element for insertion/removal.\n * @param beforeNode Before which node the insertions should happen.\n */\nfunction applyProjectionRecursive(\n renderer: Renderer3, action: WalkTNodeTreeAction, lView: LView,\n tProjectionNode: TProjectionNode, parentRElement: RElement|null, beforeNode: RNode|null) {\n const componentLView = lView[DECLARATION_COMPONENT_VIEW];\n const componentNode = componentLView[T_HOST] as TElementNode;\n ngDevMode &&\n assertEqual(typeof tProjectionNode.projection, 'number', 'expecting projection index');\n const nodeToProjectOrRNodes = componentNode.projection![tProjectionNode.projection]!;\n if (Array.isArray(nodeToProjectOrRNodes)) {\n // This should not exist, it is a bit of a hack. When we bootstrap a top level node and we\n // need to support passing projectable nodes, so we cheat and put them in the TNode\n // of the Host TView. (Yes we put instance info at the T Level). We can get away with it\n // because we know that that TView is not shared and therefore it will not be a problem.\n // This should be refactored and cleaned up.\n for (let i = 0; i < nodeToProjectOrRNodes.length; i++) {\n const rNode = nodeToProjectOrRNodes[i];\n applyToElementOrContainer(action, renderer, parentRElement, rNode, beforeNode);\n }\n } else {\n let nodeToProject: TNode|null = nodeToProjectOrRNodes;\n const projectedComponentLView = componentLView[PARENT] as LView;\n applyNodes(\n renderer, action, nodeToProject, projectedComponentLView, parentRElement, beforeNode, true);\n }\n}\n\n\n/**\n * `applyContainer` performs an operation on the container and its views as specified by\n * `action` (insert, detach, destroy)\n *\n * Inserting a Container is complicated by the fact that the container may have Views which\n * themselves have containers or projections.\n *\n * @param renderer Renderer to use\n * @param action action to perform (insert, detach, destroy)\n * @param lContainer The LContainer which needs to be inserted, detached, destroyed.\n * @param parentRElement parent DOM element for insertion/removal.\n * @param beforeNode Before which node the insertions should happen.\n */\nfunction applyContainer(\n renderer: Renderer3, action: WalkTNodeTreeAction, lContainer: LContainer,\n parentRElement: RElement|null, beforeNode: RNode|null|undefined) {\n ngDevMode && assertLContainer(lContainer);\n const anchor = lContainer[NATIVE]; // LContainer has its own before node.\n const native = unwrapRNode(lContainer);\n // An LContainer can be created dynamically on any node by injecting ViewContainerRef.\n // Asking for a ViewContainerRef on an element will result in a creation of a separate anchor\n // node (comment in the DOM) that will be different from the LContainer's host node. In this\n // particular case we need to execute action on 2 nodes:\n // - container's host node (this is done in the executeActionOnElementOrContainer)\n // - container's host node (this is done here)\n if (anchor !== native) {\n // This is very strange to me (Misko). I would expect that the native is same as anchor. I\n // don't see a reason why they should be different, but they are.\n //\n // If they are we need to process the second anchor as well.\n applyToElementOrContainer(action, renderer, parentRElement, anchor, beforeNode);\n }\n for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n const lView = lContainer[i] as LView;\n applyView(lView[TVIEW], lView, renderer, action, parentRElement, anchor);\n }\n}\n\n/**\n * Writes class/style to element.\n *\n * @param renderer Renderer to use.\n * @param isClassBased `true` if it should be written to `class` (`false` to write to `style`)\n * @param rNode The Node to write to.\n * @param prop Property to write to. This would be the class/style name.\n * @param value Value to write. If `null`/`undefined`/`false` this is considered a remove (set/add\n * otherwise).\n */\nexport function applyStyling(\n renderer: Renderer3, isClassBased: boolean, rNode: RElement, prop: string, value: any) {\n const isProcedural = isProceduralRenderer(renderer);\n if (isClassBased) {\n // We actually want JS true/false here because any truthy value should add the class\n if (!value) {\n ngDevMode && ngDevMode.rendererRemoveClass++;\n if (isProcedural) {\n (renderer as Renderer2).removeClass(rNode, prop);\n } else {\n (rNode as HTMLElement).classList.remove(prop);\n }\n } else {\n ngDevMode && ngDevMode.rendererAddClass++;\n if (isProcedural) {\n (renderer as Renderer2).addClass(rNode, prop);\n } else {\n ngDevMode && assertDefined((rNode as HTMLElement).classList, 'HTMLElement expected');\n (rNode as HTMLElement).classList.add(prop);\n }\n }\n } else {\n let flags = prop.indexOf('-') === -1 ? undefined : RendererStyleFlags2.DashCase as number;\n if (value == null /** || value === undefined */) {\n ngDevMode && ngDevMode.rendererRemoveStyle++;\n if (isProcedural) {\n (renderer as Renderer2).removeStyle(rNode, prop, flags);\n } else {\n (rNode as HTMLElement).style.removeProperty(prop);\n }\n } else {\n // A value is important if it ends with `!important`. The style\n // parser strips any semicolons at the end of the value.\n const isImportant = typeof value === 'string' ? value.endsWith('!important') : false;\n\n if (isImportant) {\n // !important has to be stripped from the value for it to be valid.\n value = value.slice(0, -10);\n flags! |= RendererStyleFlags2.Important;\n }\n\n ngDevMode && ngDevMode.rendererSetStyle++;\n if (isProcedural) {\n (renderer as Renderer2).setStyle(rNode, prop, value, flags);\n } else {\n ngDevMode && assertDefined((rNode as HTMLElement).style, 'HTMLElement expected');\n (rNode as HTMLElement).style.setProperty(prop, value, isImportant ? 'important' : '');\n }\n }\n }\n}\n\n\n/**\n * Write `cssText` to `RElement`.\n *\n * This function does direct write without any reconciliation. Used for writing initial values, so\n * that static styling values do not pull in the style parser.\n *\n * @param renderer Renderer to use\n * @param element The element which needs to be updated.\n * @param newValue The new class list to write.\n */\nexport function writeDirectStyle(renderer: Renderer3, element: RElement, newValue: string) {\n ngDevMode && assertString(newValue, '\\'newValue\\' should be a string');\n if (isProceduralRenderer(renderer)) {\n renderer.setAttribute(element, 'style', newValue);\n } else {\n (element as HTMLElement).style.cssText = newValue;\n }\n ngDevMode && ngDevMode.rendererSetStyle++;\n}\n\n/**\n * Write `className` to `RElement`.\n *\n * This function does direct write without any reconciliation. Used for writing initial values, so\n * that static styling values do not pull in the style parser.\n *\n * @param renderer Renderer to use\n * @param element The element which needs to be updated.\n * @param newValue The new class list to write.\n */\nexport function writeDirectClass(renderer: Renderer3, element: RElement, newValue: string) {\n ngDevMode && assertString(newValue, '\\'newValue\\' should be a string');\n if (isProceduralRenderer(renderer)) {\n if (newValue === '') {\n // There are tests in `google3` which expect `element.getAttribute('class')` to be `null`.\n renderer.removeAttribute(element, 'class');\n } else {\n renderer.setAttribute(element, 'class', newValue);\n }\n } else {\n element.className = newValue;\n }\n ngDevMode && ngDevMode.rendererSetClassName++;\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 {assertNotEqual} from '../../util/assert';\nimport {CharCode} from '../../util/char_code';\n\n\n/**\n * Returns an index of `classToSearch` in `className` taking token boundaries into account.\n *\n * `classIndexOf('AB A', 'A', 0)` will be 3 (not 0 since `AB!==A`)\n *\n * @param className A string containing classes (whitespace separated)\n * @param classToSearch A class name to locate\n * @param startingIndex Starting location of search\n * @returns an index of the located class (or -1 if not found)\n */\nexport function classIndexOf(\n className: string, classToSearch: string, startingIndex: number): number {\n ngDevMode && assertNotEqual(classToSearch, '', 'can not look for \"\" string.');\n let end = className.length;\n while (true) {\n const foundIndex = className.indexOf(classToSearch, startingIndex);\n if (foundIndex === -1) return foundIndex;\n if (foundIndex === 0 || className.charCodeAt(foundIndex - 1) <= CharCode.SPACE) {\n // Ensure that it has leading whitespace\n const length = classToSearch.length;\n if (foundIndex + length === end ||\n className.charCodeAt(foundIndex + length) <= CharCode.SPACE) {\n // Ensure that it has trailing whitespace\n return foundIndex;\n }\n }\n // False positive, keep searching from where we left off.\n startingIndex = foundIndex + 1;\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 '../util/ng_dev_mode';\n\nimport {assertDefined, assertEqual, assertNotEqual} from '../util/assert';\n\nimport {AttributeMarker, TAttributes, TNode, TNodeType, unusedValueExportToPlacateAjd as unused1} from './interfaces/node';\nimport {CssSelector, CssSelectorList, SelectorFlags, unusedValueExportToPlacateAjd as unused2} from './interfaces/projection';\nimport {classIndexOf} from './styling/class_differ';\nimport {isNameOnlyAttributeMarker} from './util/attrs_utils';\n\nconst unusedValueToPlacateAjd = unused1 + unused2;\n\nconst NG_TEMPLATE_SELECTOR = 'ng-template';\n\n/**\n * Search the `TAttributes` to see if it contains `cssClassToMatch` (case insensitive)\n *\n * @param attrs `TAttributes` to search through.\n * @param cssClassToMatch class to match (lowercase)\n * @param isProjectionMode Whether or not class matching should look into the attribute `class` in\n * addition to the `AttributeMarker.Classes`.\n */\nfunction isCssClassMatching(\n attrs: TAttributes, cssClassToMatch: string, isProjectionMode: boolean): boolean {\n // TODO(misko): The fact that this function needs to know about `isProjectionMode` seems suspect.\n // It is strange to me that sometimes the class information comes in form of `class` attribute\n // and sometimes in form of `AttributeMarker.Classes`. Some investigation is needed to determine\n // if that is the right behavior.\n ngDevMode &&\n assertEqual(\n cssClassToMatch, cssClassToMatch.toLowerCase(), 'Class name expected to be lowercase.');\n let i = 0;\n while (i < attrs.length) {\n let item = attrs[i++];\n if (isProjectionMode && item === 'class') {\n item = attrs[i] as string;\n if (classIndexOf(item.toLowerCase(), cssClassToMatch, 0) !== -1) {\n return true;\n }\n } else if (item === AttributeMarker.Classes) {\n // We found the classes section. Start searching for the class.\n while (i < attrs.length && typeof (item = attrs[i++]) == 'string') {\n // while we have strings\n if (item.toLowerCase() === cssClassToMatch) return true;\n }\n return false;\n }\n }\n return false;\n}\n\n/**\n * Checks whether the `tNode` represents an inline template (e.g. `*ngFor`).\n *\n * @param tNode current TNode\n */\nexport function isInlineTemplate(tNode: TNode): boolean {\n return tNode.type === TNodeType.Container && tNode.value !== NG_TEMPLATE_SELECTOR;\n}\n\n/**\n * Function that checks whether a given tNode matches tag-based selector and has a valid type.\n *\n * Matching can be performed in 2 modes: projection mode (when we project nodes) and regular\n * directive matching mode:\n * - in the \"directive matching\" mode we do _not_ take TContainer's tagName into account if it is\n * different from NG_TEMPLATE_SELECTOR (value different from NG_TEMPLATE_SELECTOR indicates that a\n * tag name was extracted from * syntax so we would match the same directive twice);\n * - in the \"projection\" mode, we use a tag name potentially extracted from the * syntax processing\n * (applicable to TNodeType.Container only).\n */\nfunction hasTagAndTypeMatch(\n tNode: TNode, currentSelector: string, isProjectionMode: boolean): boolean {\n const tagNameToCompare =\n tNode.type === TNodeType.Container && !isProjectionMode ? NG_TEMPLATE_SELECTOR : tNode.value;\n return currentSelector === tagNameToCompare;\n}\n\n/**\n * A utility function to match an Ivy node static data against a simple CSS selector\n *\n * @param node static data of the node to match\n * @param selector The selector to try matching against the node.\n * @param isProjectionMode if `true` we are matching for content projection, otherwise we are doing\n * directive matching.\n * @returns true if node matches the selector.\n */\nexport function isNodeMatchingSelector(\n tNode: TNode, selector: CssSelector, isProjectionMode: boolean): boolean {\n ngDevMode && assertDefined(selector[0], 'Selector should have a tag name');\n let mode: SelectorFlags = SelectorFlags.ELEMENT;\n const nodeAttrs = tNode.attrs || [];\n\n // Find the index of first attribute that has no value, only a name.\n const nameOnlyMarkerIdx = getNameOnlyMarkerIndex(nodeAttrs);\n\n // When processing \":not\" selectors, we skip to the next \":not\" if the\n // current one doesn't match\n let skipToNextSelector = false;\n\n for (let i = 0; i < selector.length; i++) {\n const current = selector[i];\n if (typeof current === 'number') {\n // If we finish processing a :not selector and it hasn't failed, return false\n if (!skipToNextSelector && !isPositive(mode) && !isPositive(current)) {\n return false;\n }\n // If we are skipping to the next :not() and this mode flag is positive,\n // it's a part of the current :not() selector, and we should keep skipping\n if (skipToNextSelector && isPositive(current)) continue;\n skipToNextSelector = false;\n mode = (current as number) | (mode & SelectorFlags.NOT);\n continue;\n }\n\n if (skipToNextSelector) continue;\n\n if (mode & SelectorFlags.ELEMENT) {\n mode = SelectorFlags.ATTRIBUTE | mode & SelectorFlags.NOT;\n if (current !== '' && !hasTagAndTypeMatch(tNode, current, isProjectionMode) ||\n current === '' && selector.length === 1) {\n if (isPositive(mode)) return false;\n skipToNextSelector = true;\n }\n } else {\n const selectorAttrValue = mode & SelectorFlags.CLASS ? current : selector[++i];\n\n // special case for matching against classes when a tNode has been instantiated with\n // class and style values as separate attribute values (e.g. ['title', CLASS, 'foo'])\n if ((mode & SelectorFlags.CLASS) && tNode.attrs !== null) {\n if (!isCssClassMatching(tNode.attrs, selectorAttrValue as string, isProjectionMode)) {\n if (isPositive(mode)) return false;\n skipToNextSelector = true;\n }\n continue;\n }\n\n const attrName = (mode & SelectorFlags.CLASS) ? 'class' : current;\n const attrIndexInNode =\n findAttrIndexInNode(attrName, nodeAttrs, isInlineTemplate(tNode), isProjectionMode);\n\n if (attrIndexInNode === -1) {\n if (isPositive(mode)) return false;\n skipToNextSelector = true;\n continue;\n }\n\n if (selectorAttrValue !== '') {\n let nodeAttrValue: string;\n if (attrIndexInNode > nameOnlyMarkerIdx) {\n nodeAttrValue = '';\n } else {\n ngDevMode &&\n assertNotEqual(\n nodeAttrs[attrIndexInNode], AttributeMarker.NamespaceURI,\n 'We do not match directives on namespaced attributes');\n // we lowercase the attribute value to be able to match\n // selectors without case-sensitivity\n // (selectors are already in lowercase when generated)\n nodeAttrValue = (nodeAttrs[attrIndexInNode + 1] as string).toLowerCase();\n }\n\n const compareAgainstClassName = mode & SelectorFlags.CLASS ? nodeAttrValue : null;\n if (compareAgainstClassName &&\n classIndexOf(compareAgainstClassName, selectorAttrValue as string, 0) !== -1 ||\n mode & SelectorFlags.ATTRIBUTE && selectorAttrValue !== nodeAttrValue) {\n if (isPositive(mode)) return false;\n skipToNextSelector = true;\n }\n }\n }\n }\n\n return isPositive(mode) || skipToNextSelector;\n}\n\nfunction isPositive(mode: SelectorFlags): boolean {\n return (mode & SelectorFlags.NOT) === 0;\n}\n\n/**\n * Examines the attribute's definition array for a node to find the index of the\n * attribute that matches the given `name`.\n *\n * NOTE: This will not match namespaced attributes.\n *\n * Attribute matching depends upon `isInlineTemplate` and `isProjectionMode`.\n * The following table summarizes which types of attributes we attempt to match:\n *\n * ===========================================================================================================\n * Modes | Normal Attributes | Bindings Attributes | Template Attributes | I18n\n * Attributes\n * ===========================================================================================================\n * Inline + Projection | YES | YES | NO | YES\n * -----------------------------------------------------------------------------------------------------------\n * Inline + Directive | NO | NO | YES | NO\n * -----------------------------------------------------------------------------------------------------------\n * Non-inline + Projection | YES | YES | NO | YES\n * -----------------------------------------------------------------------------------------------------------\n * Non-inline + Directive | YES | YES | NO | YES\n * ===========================================================================================================\n *\n * @param name the name of the attribute to find\n * @param attrs the attribute array to examine\n * @param isInlineTemplate true if the node being matched is an inline template (e.g. `*ngFor`)\n * rather than a manually expanded template node (e.g `<ng-template>`).\n * @param isProjectionMode true if we are matching against content projection otherwise we are\n * matching against directives.\n */\nfunction findAttrIndexInNode(\n name: string, attrs: TAttributes|null, isInlineTemplate: boolean,\n isProjectionMode: boolean): number {\n if (attrs === null) return -1;\n\n let i = 0;\n\n if (isProjectionMode || !isInlineTemplate) {\n let bindingsMode = false;\n while (i < attrs.length) {\n const maybeAttrName = attrs[i];\n if (maybeAttrName === name) {\n return i;\n } else if (\n maybeAttrName === AttributeMarker.Bindings || maybeAttrName === AttributeMarker.I18n) {\n bindingsMode = true;\n } else if (\n maybeAttrName === AttributeMarker.Classes || maybeAttrName === AttributeMarker.Styles) {\n let value = attrs[++i];\n // We should skip classes here because we have a separate mechanism for\n // matching classes in projection mode.\n while (typeof value === 'string') {\n value = attrs[++i];\n }\n continue;\n } else if (maybeAttrName === AttributeMarker.Template) {\n // We do not care about Template attributes in this scenario.\n break;\n } else if (maybeAttrName === AttributeMarker.NamespaceURI) {\n // Skip the whole namespaced attribute and value. This is by design.\n i += 4;\n continue;\n }\n // In binding mode there are only names, rather than name-value pairs.\n i += bindingsMode ? 1 : 2;\n }\n // We did not match the attribute\n return -1;\n } else {\n return matchTemplateAttribute(attrs, name);\n }\n}\n\nexport function isNodeMatchingSelectorList(\n tNode: TNode, selector: CssSelectorList, isProjectionMode: boolean = false): boolean {\n for (let i = 0; i < selector.length; i++) {\n if (isNodeMatchingSelector(tNode, selector[i], isProjectionMode)) {\n return true;\n }\n }\n\n return false;\n}\n\nexport function getProjectAsAttrValue(tNode: TNode): CssSelector|null {\n const nodeAttrs = tNode.attrs;\n if (nodeAttrs != null) {\n const ngProjectAsAttrIdx = nodeAttrs.indexOf(AttributeMarker.ProjectAs);\n // only check for ngProjectAs in attribute names, don't accidentally match attribute's value\n // (attribute names are stored at even indexes)\n if ((ngProjectAsAttrIdx & 1) === 0) {\n return nodeAttrs[ngProjectAsAttrIdx + 1] as CssSelector;\n }\n }\n return null;\n}\n\nfunction getNameOnlyMarkerIndex(nodeAttrs: TAttributes) {\n for (let i = 0; i < nodeAttrs.length; i++) {\n const nodeAttr = nodeAttrs[i];\n if (isNameOnlyAttributeMarker(nodeAttr)) {\n return i;\n }\n }\n return nodeAttrs.length;\n}\n\nfunction matchTemplateAttribute(attrs: TAttributes, name: string): number {\n let i = attrs.indexOf(AttributeMarker.Template);\n if (i > -1) {\n i++;\n while (i < attrs.length) {\n const attr = attrs[i];\n // Return in case we checked all template attrs and are switching to the next section in the\n // attrs array (that starts with a number that represents an attribute marker).\n if (typeof attr === 'number') return -1;\n if (attr === name) return i;\n i++;\n }\n }\n return -1;\n}\n\n/**\n * Checks whether a selector is inside a CssSelectorList\n * @param selector Selector to be checked.\n * @param list List in which to look for the selector.\n */\nexport function isSelectorInSelectorList(selector: CssSelector, list: CssSelectorList): boolean {\n selectorListLoop: for (let i = 0; i < list.length; i++) {\n const currentSelectorInList = list[i];\n if (selector.length !== currentSelectorInList.length) {\n continue;\n }\n for (let j = 0; j < selector.length; j++) {\n if (selector[j] !== currentSelectorInList[j]) {\n continue selectorListLoop;\n }\n }\n return true;\n }\n return false;\n}\n\nfunction maybeWrapInNotSelector(isNegativeMode: boolean, chunk: string): string {\n return isNegativeMode ? ':not(' + chunk.trim() + ')' : chunk;\n}\n\nfunction stringifyCSSSelector(selector: CssSelector): string {\n let result = selector[0] as string;\n let i = 1;\n let mode = SelectorFlags.ATTRIBUTE;\n let currentChunk = '';\n let isNegativeMode = false;\n while (i < selector.length) {\n let valueOrMarker = selector[i];\n if (typeof valueOrMarker === 'string') {\n if (mode & SelectorFlags.ATTRIBUTE) {\n const attrValue = selector[++i] as string;\n currentChunk +=\n '[' + valueOrMarker + (attrValue.length > 0 ? '=\"' + attrValue + '\"' : '') + ']';\n } else if (mode & SelectorFlags.CLASS) {\n currentChunk += '.' + valueOrMarker;\n } else if (mode & SelectorFlags.ELEMENT) {\n currentChunk += ' ' + valueOrMarker;\n }\n } else {\n //\n // Append current chunk to the final result in case we come across SelectorFlag, which\n // indicates that the previous section of a selector is over. We need to accumulate content\n // between flags to make sure we wrap the chunk later in :not() selector if needed, e.g.\n // ```\n // ['', Flags.CLASS, '.classA', Flags.CLASS | Flags.NOT, '.classB', '.classC']\n // ```\n // should be transformed to `.classA :not(.classB .classC)`.\n //\n // Note: for negative selector part, we accumulate content between flags until we find the\n // next negative flag. This is needed to support a case where `:not()` rule contains more than\n // one chunk, e.g. the following selector:\n // ```\n // ['', Flags.ELEMENT | Flags.NOT, 'p', Flags.CLASS, 'foo', Flags.CLASS | Flags.NOT, 'bar']\n // ```\n // should be stringified to `:not(p.foo) :not(.bar)`\n //\n if (currentChunk !== '' && !isPositive(valueOrMarker)) {\n result += maybeWrapInNotSelector(isNegativeMode, currentChunk);\n currentChunk = '';\n }\n mode = valueOrMarker;\n // According to CssSelector spec, once we come across `SelectorFlags.NOT` flag, the negative\n // mode is maintained for remaining chunks of a selector.\n isNegativeMode = isNegativeMode || !isPositive(mode);\n }\n i++;\n }\n if (currentChunk !== '') {\n result += maybeWrapInNotSelector(isNegativeMode, currentChunk);\n }\n return result;\n}\n\n/**\n * Generates string representation of CSS selector in parsed form.\n *\n * ComponentDef and DirectiveDef are generated with the selector in parsed form to avoid doing\n * additional parsing at runtime (for example, for directive matching). However in some cases (for\n * example, while bootstrapping a component), a string version of the selector is required to query\n * for the host element on the page. This function takes the parsed form of a selector and returns\n * its string representation.\n *\n * @param selectorList selector in parsed form\n * @returns string representation of a given selector\n */\nexport function stringifyCSSSelectorList(selectorList: CssSelectorList): string {\n return selectorList.map(stringifyCSSSelector).join(',');\n}\n\n/**\n * Extracts attributes and classes information from a given CSS selector.\n *\n * This function is used while creating a component dynamically. In this case, the host element\n * (that is created dynamically) should contain attributes and classes specified in component's CSS\n * selector.\n *\n * @param selector CSS selector in parsed form (in a form of array)\n * @returns object with `attrs` and `classes` fields that contain extracted information\n */\nexport function extractAttrsAndClassesFromSelector(selector: CssSelector):\n {attrs: string[], classes: string[]} {\n const attrs: string[] = [];\n const classes: string[] = [];\n let i = 1;\n let mode = SelectorFlags.ATTRIBUTE;\n while (i < selector.length) {\n let valueOrMarker = selector[i];\n if (typeof valueOrMarker === 'string') {\n if (mode === SelectorFlags.ATTRIBUTE) {\n if (valueOrMarker !== '') {\n attrs.push(valueOrMarker, selector[++i] as string);\n }\n } else if (mode === SelectorFlags.CLASS) {\n classes.push(valueOrMarker);\n }\n } else {\n // According to CssSelector spec, once we come across `SelectorFlags.NOT` flag, the negative\n // mode is maintained for remaining chunks of a selector. Since attributes and classes are\n // extracted only for \"positive\" part of the selector, we can stop here.\n if (!isPositive(mode)) break;\n mode = valueOrMarker;\n }\n i++;\n }\n return {attrs, classes};\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport interface NO_CHANGE {\n // This is a brand that ensures that this type can never match anything else\n __brand__: 'NO_CHANGE';\n}\n\n/** A special value which designates that a value has not changed. */\nexport const NO_CHANGE: NO_CHANGE =\n (typeof ngDevMode === 'undefined' || ngDevMode) ? {__brand__: 'NO_CHANGE'} : ({} as NO_CHANGE);\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 */\nimport {assertGreaterThan} from '../../util/assert';\nimport {assertIndexInDeclRange} from '../assert';\nimport {executeCheckHooks, executeInitAndCheckHooks} from '../hooks';\nimport {FLAGS, InitPhaseState, LView, LViewFlags, TView} from '../interfaces/view';\nimport {getLView, getSelectedIndex, getTView, isInCheckNoChangesMode, setSelectedIndex} from '../state';\n\n\n/**\n * Advances to an element for later binding instructions.\n *\n * Used in conjunction with instructions like {@link property} to act on elements with specified\n * indices, for example those created with {@link element} or {@link elementStart}.\n *\n * ```ts\n * (rf: RenderFlags, ctx: any) => {\n * if (rf & 1) {\n * text(0, 'Hello');\n * text(1, 'Goodbye')\n * element(2, 'div');\n * }\n * if (rf & 2) {\n * advance(2); // Advance twice to the <div>.\n * property('title', 'test');\n * }\n * }\n * ```\n * @param delta Number of elements to advance forwards by.\n *\n * @codeGenApi\n */\nexport function ɵɵadvance(delta: number): void {\n ngDevMode && assertGreaterThan(delta, 0, 'Can only advance forward');\n selectIndexInternal(getTView(), getLView(), getSelectedIndex() + delta, isInCheckNoChangesMode());\n}\n\nexport function selectIndexInternal(\n tView: TView, lView: LView, index: number, checkNoChangesMode: boolean) {\n ngDevMode && assertIndexInDeclRange(lView, index);\n\n // Flush the initial hooks for elements in the view that have been added up to this point.\n // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n if (!checkNoChangesMode) {\n const hooksInitPhaseCompleted =\n (lView[FLAGS] & LViewFlags.InitPhaseStateMask) === InitPhaseState.InitPhaseCompleted;\n if (hooksInitPhaseCompleted) {\n const preOrderCheckHooks = tView.preOrderCheckHooks;\n if (preOrderCheckHooks !== null) {\n executeCheckHooks(lView, preOrderCheckHooks, index);\n }\n } else {\n const preOrderHooks = tView.preOrderHooks;\n if (preOrderHooks !== null) {\n executeInitAndCheckHooks(lView, preOrderHooks, InitPhaseState.OnInitHooksToBeRun, index);\n }\n }\n }\n\n // We must set the selected index *after* running the hooks, because hooks may have side-effects\n // that cause other template functions to run, thus updating the selected index, which is global\n // state. If we run `setSelectedIndex` *before* we run the hooks, in some cases the selected index\n // will be altered by the time we leave the `ɵɵadvance` instruction.\n setSelectedIndex(index);\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 {KeyValueArray} from '../../util/array_utils';\nimport {assertNumber, assertNumberInRange} from '../../util/assert';\n\n/**\n * Value stored in the `TData` which is needed to re-concatenate the styling.\n *\n * See: `TStylingKeyPrimitive` and `TStylingStatic`\n */\nexport type TStylingKey = TStylingKeyPrimitive|TStylingStatic;\n\n\n/**\n * The primitive portion (`TStylingStatic` removed) of the value stored in the `TData` which is\n * needed to re-concatenate the styling.\n *\n * - `string`: Stores the property name. Used with `ɵɵstyleProp`/`ɵɵclassProp` instruction.\n * - `null`: Represents map, so there is no name. Used with `ɵɵstyleMap`/`ɵɵclassMap`.\n * - `false`: Represents an ignore case. This happens when `ɵɵstyleProp`/`ɵɵclassProp` instruction\n * is combined with directive which shadows its input `@Input('class')`. That way the binding\n * should not participate in the styling resolution.\n */\nexport type TStylingKeyPrimitive = string|null|false;\n\n/**\n * Store the static values for the styling binding.\n *\n * The `TStylingStatic` is just `KeyValueArray` where key `\"\"` (stored at location 0) contains the\n * `TStylingKey` (stored at location 1). In other words this wraps the `TStylingKey` such that the\n * `\"\"` contains the wrapped value.\n *\n * When instructions are resolving styling they may need to look forward or backwards in the linked\n * list to resolve the value. For this reason we have to make sure that he linked list also contains\n * the static values. However the list only has space for one item per styling instruction. For this\n * reason we store the static values here as part of the `TStylingKey`. This means that the\n * resolution function when looking for a value needs to first look at the binding value, and than\n * at `TStylingKey` (if it exists).\n *\n * Imagine we have:\n *\n * ```\n * <div class=\"TEMPLATE\" my-dir>\n *\n * @Directive({\n * host: {\n * class: 'DIR',\n * '[class.dynamic]': 'exp' // ɵɵclassProp('dynamic', ctx.exp);\n * }\n * })\n * ```\n *\n * In the above case the linked list will contain one item:\n *\n * ```\n * // assume binding location: 10 for `ɵɵclassProp('dynamic', ctx.exp);`\n * tData[10] = <TStylingStatic>[\n * '': 'dynamic', // This is the wrapped value of `TStylingKey`\n * 'DIR': true, // This is the default static value of directive binding.\n * ];\n * tData[10 + 1] = 0; // We don't have prev/next.\n *\n * lView[10] = undefined; // assume `ctx.exp` is `undefined`\n * lView[10 + 1] = undefined; // Just normalized `lView[10]`\n * ```\n *\n * So when the function is resolving styling value, it first needs to look into the linked list\n * (there is none) and than into the static `TStylingStatic` too see if there is a default value for\n * `dynamic` (there is not). Therefore it is safe to remove it.\n *\n * If setting `true` case:\n * ```\n * lView[10] = true; // assume `ctx.exp` is `true`\n * lView[10 + 1] = true; // Just normalized `lView[10]`\n * ```\n * So when the function is resolving styling value, it first needs to look into the linked list\n * (there is none) and than into `TNode.residualClass` (TNode.residualStyle) which contains\n * ```\n * tNode.residualClass = [\n * 'TEMPLATE': true,\n * ];\n * ```\n *\n * This means that it is safe to add class.\n */\nexport interface TStylingStatic extends KeyValueArray<any> {}\n\n/**\n * This is a branded number which contains previous and next index.\n *\n * When we come across styling instructions we need to store the `TStylingKey` in the correct\n * order so that we can re-concatenate the styling value in the desired priority.\n *\n * The insertion can happen either at the:\n * - end of template as in the case of coming across additional styling instruction in the template\n * - in front of the template in the case of coming across additional instruction in the\n * `hostBindings`.\n *\n * We use `TStylingRange` to store the previous and next index into the `TData` where the template\n * bindings can be found.\n *\n * - bit 0 is used to mark that the previous index has a duplicate for current value.\n * - bit 1 is used to mark that the next index has a duplicate for the current value.\n * - bits 2-16 are used to encode the next/tail of the template.\n * - bits 17-32 are used to encode the previous/head of template.\n *\n * NODE: *duplicate* false implies that it is statically known that this binding will not collide\n * with other bindings and therefore there is no need to check other bindings. For example the\n * bindings in `<div [style.color]=\"exp\" [style.width]=\"exp\">` will never collide and will have\n * their bits set accordingly. Previous duplicate means that we may need to check previous if the\n * current binding is `null`. Next duplicate means that we may need to check next bindings if the\n * current binding is not `null`.\n *\n * NOTE: `0` has special significance and represents `null` as in no additional pointer.\n */\nexport interface TStylingRange {\n __brand__: 'TStylingRange';\n}\n\n/**\n * Shift and masks constants for encoding two numbers into and duplicate info into a single number.\n */\nexport const enum StylingRange {\n /// Number of bits to shift for the previous pointer\n PREV_SHIFT = 17,\n /// Previous pointer mask.\n PREV_MASK = 0xFFFE0000,\n\n /// Number of bits to shift for the next pointer\n NEXT_SHIFT = 2,\n /// Next pointer mask.\n NEXT_MASK = 0x001FFFC,\n\n // Mask to remove nagative bit. (interpret number as positive)\n UNSIGNED_MASK = 0x7FFF,\n\n /**\n * This bit is set if the previous bindings contains a binding which could possibly cause a\n * duplicate. For example: `<div [style]=\"map\" [style.width]=\"width\">`, the `width` binding will\n * have previous duplicate set. The implication is that if `width` binding becomes `null`, it is\n * necessary to defer the value to `map.width`. (Because `width` overwrites `map.width`.)\n */\n PREV_DUPLICATE = 0x02,\n\n /**\n * This bit is set to if the next binding contains a binding which could possibly cause a\n * duplicate. For example: `<div [style]=\"map\" [style.width]=\"width\">`, the `map` binding will\n * have next duplicate set. The implication is that if `map.width` binding becomes not `null`, it\n * is necessary to defer the value to `width`. (Because `width` overwrites `map.width`.)\n */\n NEXT_DUPLICATE = 0x01,\n}\n\n\nexport function toTStylingRange(prev: number, next: number): TStylingRange {\n ngDevMode && assertNumberInRange(prev, 0, StylingRange.UNSIGNED_MASK);\n ngDevMode && assertNumberInRange(next, 0, StylingRange.UNSIGNED_MASK);\n return (prev << StylingRange.PREV_SHIFT | next << StylingRange.NEXT_SHIFT) as any;\n}\n\nexport function getTStylingRangePrev(tStylingRange: TStylingRange): number {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return ((tStylingRange as any as number) >> StylingRange.PREV_SHIFT) & StylingRange.UNSIGNED_MASK;\n}\n\nexport function getTStylingRangePrevDuplicate(tStylingRange: TStylingRange): boolean {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return ((tStylingRange as any as number) & StylingRange.PREV_DUPLICATE) ==\n StylingRange.PREV_DUPLICATE;\n}\n\nexport function setTStylingRangePrev(\n tStylingRange: TStylingRange, previous: number): TStylingRange {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n ngDevMode && assertNumberInRange(previous, 0, StylingRange.UNSIGNED_MASK);\n return (((tStylingRange as any as number) & ~StylingRange.PREV_MASK) |\n (previous << StylingRange.PREV_SHIFT)) as any;\n}\n\nexport function setTStylingRangePrevDuplicate(tStylingRange: TStylingRange): TStylingRange {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return ((tStylingRange as any as number) | StylingRange.PREV_DUPLICATE) as any;\n}\n\nexport function getTStylingRangeNext(tStylingRange: TStylingRange): number {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return ((tStylingRange as any as number) & StylingRange.NEXT_MASK) >> StylingRange.NEXT_SHIFT;\n}\n\nexport function setTStylingRangeNext(tStylingRange: TStylingRange, next: number): TStylingRange {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n ngDevMode && assertNumberInRange(next, 0, StylingRange.UNSIGNED_MASK);\n return (((tStylingRange as any as number) & ~StylingRange.NEXT_MASK) | //\n next << StylingRange.NEXT_SHIFT) as any;\n}\n\nexport function getTStylingRangeNextDuplicate(tStylingRange: TStylingRange): boolean {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return ((tStylingRange as any as number) & StylingRange.NEXT_DUPLICATE) ===\n StylingRange.NEXT_DUPLICATE;\n}\n\nexport function setTStylingRangeNextDuplicate(tStylingRange: TStylingRange): TStylingRange {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return ((tStylingRange as any as number) | StylingRange.NEXT_DUPLICATE) as any;\n}\n\nexport function getTStylingRangeTail(tStylingRange: TStylingRange): number {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n const next = getTStylingRangeNext(tStylingRange);\n return next === 0 ? getTStylingRangePrev(tStylingRange) : next;\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 * Patch a `debug` property on top of the existing object.\n *\n * NOTE: always call this method with `ngDevMode && attachDebugObject(...)`\n *\n * @param obj Object to patch\n * @param debug Value to patch\n */\nexport function attachDebugObject(obj: any, debug: any): void {\n if (ngDevMode) {\n Object.defineProperty(obj, 'debug', {value: debug, enumerable: false});\n } else {\n throw new Error(\n 'This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');\n }\n}\n\n/**\n * Patch a `debug` property getter on top of the existing object.\n *\n * NOTE: always call this method with `ngDevMode && attachDebugObject(...)`\n *\n * @param obj Object to patch\n * @param debugGetter Getter returning a value to patch\n */\nexport function attachDebugGetter<T>(obj: T, debugGetter: (this: T) => any): void {\n if (ngDevMode) {\n Object.defineProperty(obj, 'debug', {get: debugGetter, enumerable: false});\n } else {\n throw new Error(\n 'This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');\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 '../../di/injector';\nimport {Type} from '../../interface/type';\nimport {SchemaMetadata} from '../../metadata/schema';\nimport {Sanitizer} from '../../sanitization/sanitizer';\nimport {KeyValueArray} from '../../util/array_utils';\nimport {assertDefined} from '../../util/assert';\nimport {createNamedArrayType} from '../../util/named_array_type';\nimport {initNgDevMode} from '../../util/ng_dev_mode';\nimport {assertNodeInjector} from '../assert';\nimport {getInjectorIndex, getParentInjectorLocation} from '../di';\nimport {CONTAINER_HEADER_OFFSET, HAS_TRANSPLANTED_VIEWS, LContainer, MOVED_VIEWS, NATIVE} from '../interfaces/container';\nimport {ComponentTemplate, DirectiveDef, DirectiveDefList, PipeDefList, ViewQueriesFunction} from '../interfaces/definition';\nimport {NO_PARENT_INJECTOR, NodeInjectorOffset} from '../interfaces/injector';\nimport {AttributeMarker, InsertBeforeIndex, PropertyAliases, TConstants, TContainerNode, TElementNode, TNode as ITNode, TNodeFlags, TNodeProviderIndexes, TNodeType, toTNodeTypeAsString} from '../interfaces/node';\nimport {SelectorFlags} from '../interfaces/projection';\nimport {LQueries, TQueries} from '../interfaces/query';\nimport {Renderer3, RendererFactory3} from '../interfaces/renderer';\nimport {RComment, RElement, RNode} from '../interfaces/renderer_dom';\nimport {getTStylingRangeNext, getTStylingRangeNextDuplicate, getTStylingRangePrev, getTStylingRangePrevDuplicate, TStylingKey, TStylingRange} from '../interfaces/styling';\nimport {CHILD_HEAD, CHILD_TAIL, CLEANUP, CONTEXT, DebugNode, DECLARATION_VIEW, DestroyHookData, FLAGS, HEADER_OFFSET, HookData, HOST, HostBindingOpCodes, INJECTOR, LContainerDebug as ILContainerDebug, LView, LViewDebug as ILViewDebug, LViewDebugRange, LViewDebugRangeContent, LViewFlags, NEXT, NodeInjectorDebug, PARENT, QUERIES, RENDERER, RENDERER_FACTORY, SANITIZER, T_HOST, TData, TView as ITView, TVIEW, TView, TViewType, TViewTypeAsString} from '../interfaces/view';\nimport {attachDebugObject} from '../util/debug_utils';\nimport {getParentInjectorIndex, getParentInjectorView} from '../util/injector_utils';\nimport {unwrapRNode} from '../util/view_utils';\n\nconst NG_DEV_MODE = ((typeof ngDevMode === 'undefined' || !!ngDevMode) && initNgDevMode());\n\n/*\n * This file contains conditionally attached classes which provide human readable (debug) level\n * information for `LView`, `LContainer` and other internal data structures. These data structures\n * are stored internally as array which makes it very difficult during debugging to reason about the\n * current state of the system.\n *\n * Patching the array with extra property does change the array's hidden class' but it does not\n * change the cost of access, therefore this patching should not have significant if any impact in\n * `ngDevMode` mode. (see: https://jsperf.com/array-vs-monkey-patch-array)\n *\n * So instead of seeing:\n * ```\n * Array(30) [Object, 659, null, …]\n * ```\n *\n * You get to see:\n * ```\n * LViewDebug {\n * views: [...],\n * flags: {attached: true, ...}\n * nodes: [\n * {html: '<div id=\"123\">', ..., nodes: [\n * {html: '<span>', ..., nodes: null}\n * ]}\n * ]\n * }\n * ```\n */\n\nlet LVIEW_COMPONENT_CACHE!: Map<string|null, Array<any>>;\nlet LVIEW_EMBEDDED_CACHE!: Map<string|null, Array<any>>;\nlet LVIEW_ROOT!: Array<any>;\n\ninterface TViewDebug extends ITView {\n type: TViewType;\n}\n\n/**\n * This function clones a blueprint and creates LView.\n *\n * Simple slice will keep the same type, and we need it to be LView\n */\nexport function cloneToLViewFromTViewBlueprint(tView: TView): LView {\n const debugTView = tView as TViewDebug;\n const lView = getLViewToClone(debugTView.type, tView.template && tView.template.name);\n return lView.concat(tView.blueprint) as any;\n}\n\nfunction getLViewToClone(type: TViewType, name: string|null): Array<any> {\n switch (type) {\n case TViewType.Root:\n if (LVIEW_ROOT === undefined) LVIEW_ROOT = new (createNamedArrayType('LRootView'))();\n return LVIEW_ROOT;\n case TViewType.Component:\n if (LVIEW_COMPONENT_CACHE === undefined) LVIEW_COMPONENT_CACHE = new Map();\n let componentArray = LVIEW_COMPONENT_CACHE.get(name);\n if (componentArray === undefined) {\n componentArray = new (createNamedArrayType('LComponentView' + nameSuffix(name)))();\n LVIEW_COMPONENT_CACHE.set(name, componentArray);\n }\n return componentArray;\n case TViewType.Embedded:\n if (LVIEW_EMBEDDED_CACHE === undefined) LVIEW_EMBEDDED_CACHE = new Map();\n let embeddedArray = LVIEW_EMBEDDED_CACHE.get(name);\n if (embeddedArray === undefined) {\n embeddedArray = new (createNamedArrayType('LEmbeddedView' + nameSuffix(name)))();\n LVIEW_EMBEDDED_CACHE.set(name, embeddedArray);\n }\n return embeddedArray;\n }\n}\n\nfunction nameSuffix(text: string|null|undefined): string {\n if (text == null) return '';\n const index = text.lastIndexOf('_Template');\n return '_' + (index === -1 ? text : text.substr(0, index));\n}\n\n/**\n * This class is a debug version of Object literal so that we can have constructor name show up\n * in\n * debug tools in ngDevMode.\n */\nexport const TViewConstructor = class TView implements ITView {\n constructor(\n public type: TViewType,\n public blueprint: LView,\n public template: ComponentTemplate<{}>|null,\n public queries: TQueries|null,\n public viewQuery: ViewQueriesFunction<{}>|null,\n public declTNode: ITNode|null,\n public data: TData,\n public bindingStartIndex: number,\n public expandoStartIndex: number,\n public hostBindingOpCodes: HostBindingOpCodes|null,\n public firstCreatePass: boolean,\n public firstUpdatePass: boolean,\n public staticViewQueries: boolean,\n public staticContentQueries: boolean,\n public preOrderHooks: HookData|null,\n public preOrderCheckHooks: HookData|null,\n public contentHooks: HookData|null,\n public contentCheckHooks: HookData|null,\n public viewHooks: HookData|null,\n public viewCheckHooks: HookData|null,\n public destroyHooks: DestroyHookData|null,\n public cleanup: any[]|null,\n public contentQueries: number[]|null,\n public components: number[]|null,\n public directiveRegistry: DirectiveDefList|null,\n public pipeRegistry: PipeDefList|null,\n public firstChild: ITNode|null,\n public schemas: SchemaMetadata[]|null,\n public consts: TConstants|null,\n public incompleteFirstPass: boolean,\n public _decls: number,\n public _vars: number,\n\n ) {}\n\n get template_(): string {\n const buf: string[] = [];\n processTNodeChildren(this.firstChild, buf);\n return buf.join('');\n }\n\n get type_(): string {\n return TViewTypeAsString[this.type] || `TViewType.?${this.type}?`;\n }\n};\n\nclass TNode implements ITNode {\n constructor(\n public tView_: TView, //\n public type: TNodeType, //\n public index: number, //\n public insertBeforeIndex: InsertBeforeIndex, //\n public injectorIndex: number, //\n public directiveStart: number, //\n public directiveEnd: number, //\n public directiveStylingLast: number, //\n public propertyBindings: number[]|null, //\n public flags: TNodeFlags, //\n public providerIndexes: TNodeProviderIndexes, //\n public value: string|null, //\n public attrs: (string|AttributeMarker|(string|SelectorFlags)[])[]|null, //\n public mergedAttrs: (string|AttributeMarker|(string|SelectorFlags)[])[]|null, //\n public localNames: (string|number)[]|null, //\n public initialInputs: (string[]|null)[]|null|undefined, //\n public inputs: PropertyAliases|null, //\n public outputs: PropertyAliases|null, //\n public tViews: ITView|ITView[]|null, //\n public next: ITNode|null, //\n public projectionNext: ITNode|null, //\n public child: ITNode|null, //\n public parent: TElementNode|TContainerNode|null, //\n public projection: number|(ITNode|RNode[])[]|null, //\n public styles: string|null, //\n public stylesWithoutHost: string|null, //\n public residualStyles: KeyValueArray<any>|undefined|null, //\n public classes: string|null, //\n public classesWithoutHost: string|null, //\n public residualClasses: KeyValueArray<any>|undefined|null, //\n public classBindings: TStylingRange, //\n public styleBindings: TStylingRange, //\n ) {}\n\n /**\n * Return a human debug version of the set of `NodeInjector`s which will be consulted when\n * resolving tokens from this `TNode`.\n *\n * When debugging applications, it is often difficult to determine which `NodeInjector`s will be\n * consulted. This method shows a list of `DebugNode`s representing the `TNode`s which will be\n * consulted in order when resolving a token starting at this `TNode`.\n *\n * The original data is stored in `LView` and `TView` with a lot of offset indexes, and so it is\n * difficult to reason about.\n *\n * @param lView The `LView` instance for this `TNode`.\n */\n debugNodeInjectorPath(lView: LView): DebugNode[] {\n const path: DebugNode[] = [];\n let injectorIndex = getInjectorIndex(this, lView);\n if (injectorIndex === -1) {\n // Looks like the current `TNode` does not have `NodeInjector` associated with it => look for\n // parent NodeInjector.\n const parentLocation = getParentInjectorLocation(this, lView);\n if (parentLocation !== NO_PARENT_INJECTOR) {\n // We found a parent, so start searching from the parent location.\n injectorIndex = getParentInjectorIndex(parentLocation);\n lView = getParentInjectorView(parentLocation, lView);\n } else {\n // No parents have been found, so there are no `NodeInjector`s to consult.\n }\n }\n while (injectorIndex !== -1) {\n ngDevMode && assertNodeInjector(lView, injectorIndex);\n const tNode = lView[TVIEW].data[injectorIndex + NodeInjectorOffset.TNODE] as TNode;\n path.push(buildDebugNode(tNode, lView));\n const parentLocation = lView[injectorIndex + NodeInjectorOffset.PARENT];\n if (parentLocation === NO_PARENT_INJECTOR) {\n injectorIndex = -1;\n } else {\n injectorIndex = getParentInjectorIndex(parentLocation);\n lView = getParentInjectorView(parentLocation, lView);\n }\n }\n return path;\n }\n\n get type_(): string {\n return toTNodeTypeAsString(this.type) || `TNodeType.?${this.type}?`;\n }\n\n get flags_(): string {\n const flags: string[] = [];\n if (this.flags & TNodeFlags.hasClassInput) flags.push('TNodeFlags.hasClassInput');\n if (this.flags & TNodeFlags.hasContentQuery) flags.push('TNodeFlags.hasContentQuery');\n if (this.flags & TNodeFlags.hasStyleInput) flags.push('TNodeFlags.hasStyleInput');\n if (this.flags & TNodeFlags.hasHostBindings) flags.push('TNodeFlags.hasHostBindings');\n if (this.flags & TNodeFlags.isComponentHost) flags.push('TNodeFlags.isComponentHost');\n if (this.flags & TNodeFlags.isDirectiveHost) flags.push('TNodeFlags.isDirectiveHost');\n if (this.flags & TNodeFlags.isDetached) flags.push('TNodeFlags.isDetached');\n if (this.flags & TNodeFlags.isProjected) flags.push('TNodeFlags.isProjected');\n return flags.join('|');\n }\n\n get template_(): string {\n if (this.type & TNodeType.Text) return this.value!;\n const buf: string[] = [];\n const tagName = typeof this.value === 'string' && this.value || this.type_;\n buf.push('<', tagName);\n if (this.flags) {\n buf.push(' ', this.flags_);\n }\n if (this.attrs) {\n for (let i = 0; i < this.attrs.length;) {\n const attrName = this.attrs[i++];\n if (typeof attrName == 'number') {\n break;\n }\n const attrValue = this.attrs[i++];\n buf.push(' ', attrName as string, '=\"', attrValue as string, '\"');\n }\n }\n buf.push('>');\n processTNodeChildren(this.child, buf);\n buf.push('</', tagName, '>');\n return buf.join('');\n }\n\n get styleBindings_(): DebugStyleBindings {\n return toDebugStyleBinding(this, false);\n }\n get classBindings_(): DebugStyleBindings {\n return toDebugStyleBinding(this, true);\n }\n\n get providerIndexStart_(): number {\n return this.providerIndexes & TNodeProviderIndexes.ProvidersStartIndexMask;\n }\n get providerIndexEnd_(): number {\n return this.providerIndexStart_ +\n (this.providerIndexes >>> TNodeProviderIndexes.CptViewProvidersCountShift);\n }\n}\nexport const TNodeDebug = TNode;\nexport type TNodeDebug = TNode;\n\nexport interface DebugStyleBindings extends\n Array<KeyValueArray<any>|DebugStyleBinding|string|null> {}\nexport interface DebugStyleBinding {\n key: TStylingKey;\n index: number;\n isTemplate: boolean;\n prevDuplicate: boolean;\n nextDuplicate: boolean;\n prevIndex: number;\n nextIndex: number;\n}\n\nfunction toDebugStyleBinding(tNode: TNode, isClassBased: boolean): DebugStyleBindings {\n const tData = tNode.tView_.data;\n const bindings: DebugStyleBindings = [] as any;\n const range = isClassBased ? tNode.classBindings : tNode.styleBindings;\n const prev = getTStylingRangePrev(range);\n const next = getTStylingRangeNext(range);\n let isTemplate = next !== 0;\n let cursor = isTemplate ? next : prev;\n while (cursor !== 0) {\n const itemKey = tData[cursor] as TStylingKey;\n const itemRange = tData[cursor + 1] as TStylingRange;\n bindings.unshift({\n key: itemKey,\n index: cursor,\n isTemplate: isTemplate,\n prevDuplicate: getTStylingRangePrevDuplicate(itemRange),\n nextDuplicate: getTStylingRangeNextDuplicate(itemRange),\n nextIndex: getTStylingRangeNext(itemRange),\n prevIndex: getTStylingRangePrev(itemRange),\n });\n if (cursor === prev) isTemplate = false;\n cursor = getTStylingRangePrev(itemRange);\n }\n bindings.push((isClassBased ? tNode.residualClasses : tNode.residualStyles) || null);\n return bindings;\n}\n\nfunction processTNodeChildren(tNode: ITNode|null, buf: string[]) {\n while (tNode) {\n buf.push((tNode as any as {template_: string}).template_);\n tNode = tNode.next;\n }\n}\n\nconst TViewData = NG_DEV_MODE && createNamedArrayType('TViewData') || null! as ArrayConstructor;\nlet TVIEWDATA_EMPTY: unknown[]; // can't initialize here or it will not be tree shaken, because\n // `LView` constructor could have side-effects.\n/**\n * This function clones a blueprint and creates TData.\n *\n * Simple slice will keep the same type, and we need it to be TData\n */\nexport function cloneToTViewData(list: any[]): TData {\n if (TVIEWDATA_EMPTY === undefined) TVIEWDATA_EMPTY = new TViewData();\n return TVIEWDATA_EMPTY.concat(list) as any;\n}\n\nexport const LViewBlueprint =\n NG_DEV_MODE && createNamedArrayType('LViewBlueprint') || null! as ArrayConstructor;\nexport const MatchesArray =\n NG_DEV_MODE && createNamedArrayType('MatchesArray') || null! as ArrayConstructor;\nexport const TViewComponents =\n NG_DEV_MODE && createNamedArrayType('TViewComponents') || null! as ArrayConstructor;\nexport const TNodeLocalNames =\n NG_DEV_MODE && createNamedArrayType('TNodeLocalNames') || null! as ArrayConstructor;\nexport const TNodeInitialInputs =\n NG_DEV_MODE && createNamedArrayType('TNodeInitialInputs') || null! as ArrayConstructor;\nexport const TNodeInitialData =\n NG_DEV_MODE && createNamedArrayType('TNodeInitialData') || null! as ArrayConstructor;\nexport const LCleanup =\n NG_DEV_MODE && createNamedArrayType('LCleanup') || null! as ArrayConstructor;\nexport const TCleanup =\n NG_DEV_MODE && createNamedArrayType('TCleanup') || null! as ArrayConstructor;\n\n\n\nexport function attachLViewDebug(lView: LView) {\n attachDebugObject(lView, new LViewDebug(lView));\n}\n\nexport function attachLContainerDebug(lContainer: LContainer) {\n attachDebugObject(lContainer, new LContainerDebug(lContainer));\n}\n\nexport function toDebug(obj: LView): ILViewDebug;\nexport function toDebug(obj: LView|null): ILViewDebug|null;\nexport function toDebug(obj: LView|LContainer|null): ILViewDebug|ILContainerDebug|null;\nexport function toDebug(obj: any): any {\n if (obj) {\n const debug = (obj as any).debug;\n assertDefined(debug, 'Object does not have a debug representation.');\n return debug;\n } else {\n return obj;\n }\n}\n\n/**\n * Use this method to unwrap a native element in `LView` and convert it into HTML for easier\n * reading.\n *\n * @param value possibly wrapped native DOM node.\n * @param includeChildren If `true` then the serialized HTML form will include child elements\n * (same\n * as `outerHTML`). If `false` then the serialized HTML form will only contain the element\n * itself\n * (will not serialize child elements).\n */\nfunction toHtml(value: any, includeChildren: boolean = false): string|null {\n const node: Node|null = unwrapRNode(value) as any;\n if (node) {\n switch (node.nodeType) {\n case Node.TEXT_NODE:\n return node.textContent;\n case Node.COMMENT_NODE:\n return `<!--${(node as Comment).textContent}-->`;\n case Node.ELEMENT_NODE:\n const outerHTML = (node as Element).outerHTML;\n if (includeChildren) {\n return outerHTML;\n } else {\n const innerHTML = '>' + (node as Element).innerHTML + '<';\n return (outerHTML.split(innerHTML)[0]) + '>';\n }\n }\n }\n return null;\n}\n\nexport class LViewDebug implements ILViewDebug {\n constructor(private readonly _raw_lView: LView) {}\n\n /**\n * Flags associated with the `LView` unpacked into a more readable state.\n */\n get flags() {\n const flags = this._raw_lView[FLAGS];\n return {\n __raw__flags__: flags,\n initPhaseState: flags & LViewFlags.InitPhaseStateMask,\n creationMode: !!(flags & LViewFlags.CreationMode),\n firstViewPass: !!(flags & LViewFlags.FirstLViewPass),\n checkAlways: !!(flags & LViewFlags.CheckAlways),\n dirty: !!(flags & LViewFlags.Dirty),\n attached: !!(flags & LViewFlags.Attached),\n destroyed: !!(flags & LViewFlags.Destroyed),\n isRoot: !!(flags & LViewFlags.IsRoot),\n indexWithinInitPhase: flags >> LViewFlags.IndexWithinInitPhaseShift,\n };\n }\n get parent(): ILViewDebug|ILContainerDebug|null {\n return toDebug(this._raw_lView[PARENT]);\n }\n get hostHTML(): string|null {\n return toHtml(this._raw_lView[HOST], true);\n }\n get html(): string {\n return (this.nodes || []).map(mapToHTML).join('');\n }\n get context(): {}|null {\n return this._raw_lView[CONTEXT];\n }\n /**\n * The tree of nodes associated with the current `LView`. The nodes have been normalized into\n * a tree structure with relevant details pulled out for readability.\n */\n get nodes(): DebugNode[] {\n const lView = this._raw_lView;\n const tNode = lView[TVIEW].firstChild;\n return toDebugNodes(tNode, lView);\n }\n get template(): string {\n return (this.tView as any as {template_: string}).template_;\n }\n get tView(): ITView {\n return this._raw_lView[TVIEW];\n }\n get cleanup(): any[]|null {\n return this._raw_lView[CLEANUP];\n }\n get injector(): Injector|null {\n return this._raw_lView[INJECTOR];\n }\n get rendererFactory(): RendererFactory3 {\n return this._raw_lView[RENDERER_FACTORY];\n }\n get renderer(): Renderer3 {\n return this._raw_lView[RENDERER];\n }\n get sanitizer(): Sanitizer|null {\n return this._raw_lView[SANITIZER];\n }\n get childHead(): ILViewDebug|ILContainerDebug|null {\n return toDebug(this._raw_lView[CHILD_HEAD]);\n }\n get next(): ILViewDebug|ILContainerDebug|null {\n return toDebug(this._raw_lView[NEXT]);\n }\n get childTail(): ILViewDebug|ILContainerDebug|null {\n return toDebug(this._raw_lView[CHILD_TAIL]);\n }\n get declarationView(): ILViewDebug|null {\n return toDebug(this._raw_lView[DECLARATION_VIEW]);\n }\n get queries(): LQueries|null {\n return this._raw_lView[QUERIES];\n }\n get tHost(): ITNode|null {\n return this._raw_lView[T_HOST];\n }\n\n get decls(): LViewDebugRange {\n return toLViewRange(this.tView, this._raw_lView, HEADER_OFFSET, this.tView.bindingStartIndex);\n }\n\n get vars(): LViewDebugRange {\n return toLViewRange(\n this.tView, this._raw_lView, this.tView.bindingStartIndex, this.tView.expandoStartIndex);\n }\n\n get expando(): LViewDebugRange {\n return toLViewRange(\n this.tView, this._raw_lView, this.tView.expandoStartIndex, this._raw_lView.length);\n }\n\n /**\n * Normalized view of child views (and containers) attached at this location.\n */\n get childViews(): Array<ILViewDebug|ILContainerDebug> {\n const childViews: Array<ILViewDebug|ILContainerDebug> = [];\n let child = this.childHead;\n while (child) {\n childViews.push(child);\n child = child.next;\n }\n return childViews;\n }\n}\n\nfunction mapToHTML(node: DebugNode): string {\n if (node.type === 'ElementContainer') {\n return (node.children || []).map(mapToHTML).join('');\n } else if (node.type === 'IcuContainer') {\n throw new Error('Not implemented');\n } else {\n return toHtml(node.native, true) || '';\n }\n}\n\nfunction toLViewRange(tView: TView, lView: LView, start: number, end: number): LViewDebugRange {\n let content: LViewDebugRangeContent[] = [];\n for (let index = start; index < end; index++) {\n content.push({index: index, t: tView.data[index], l: lView[index]});\n }\n return {start: start, end: end, length: end - start, content: content};\n}\n\n/**\n * Turns a flat list of nodes into a tree by walking the associated `TNode` tree.\n *\n * @param tNode\n * @param lView\n */\nexport function toDebugNodes(tNode: ITNode|null, lView: LView): DebugNode[] {\n if (tNode) {\n const debugNodes: DebugNode[] = [];\n let tNodeCursor: ITNode|null = tNode;\n while (tNodeCursor) {\n debugNodes.push(buildDebugNode(tNodeCursor, lView));\n tNodeCursor = tNodeCursor.next;\n }\n return debugNodes;\n } else {\n return [];\n }\n}\n\nexport function buildDebugNode(tNode: ITNode, lView: LView): DebugNode {\n const rawValue = lView[tNode.index];\n const native = unwrapRNode(rawValue);\n const factories: Type<any>[] = [];\n const instances: any[] = [];\n const tView = lView[TVIEW];\n for (let i = tNode.directiveStart; i < tNode.directiveEnd; i++) {\n const def = tView.data[i] as DirectiveDef<any>;\n factories.push(def.type);\n instances.push(lView[i]);\n }\n return {\n html: toHtml(native),\n type: toTNodeTypeAsString(tNode.type),\n tNode,\n native: native as any,\n children: toDebugNodes(tNode.child, lView),\n factories,\n instances,\n injector: buildNodeInjectorDebug(tNode, tView, lView),\n get injectorResolutionPath() {\n return (tNode as TNode).debugNodeInjectorPath(lView);\n },\n };\n}\n\nfunction buildNodeInjectorDebug(tNode: ITNode, tView: ITView, lView: LView): NodeInjectorDebug {\n const viewProviders: Type<any>[] = [];\n for (let i = (tNode as TNode).providerIndexStart_; i < (tNode as TNode).providerIndexEnd_; i++) {\n viewProviders.push(tView.data[i] as Type<any>);\n }\n const providers: Type<any>[] = [];\n for (let i = (tNode as TNode).providerIndexEnd_; i < (tNode as TNode).directiveEnd; i++) {\n providers.push(tView.data[i] as Type<any>);\n }\n const nodeInjectorDebug = {\n bloom: toBloom(lView, tNode.injectorIndex),\n cumulativeBloom: toBloom(tView.data, tNode.injectorIndex),\n providers,\n viewProviders,\n parentInjectorIndex: lView[(tNode as TNode).providerIndexStart_ - 1],\n };\n return nodeInjectorDebug;\n}\n\n/**\n * Convert a number at `idx` location in `array` into binary representation.\n *\n * @param array\n * @param idx\n */\nfunction binary(array: any[], idx: number): string {\n const value = array[idx];\n // If not a number we print 8 `?` to retain alignment but let user know that it was called on\n // wrong type.\n if (typeof value !== 'number') return '????????';\n // We prefix 0s so that we have constant length number\n const text = '00000000' + value.toString(2);\n return text.substring(text.length - 8);\n}\n\n/**\n * Convert a bloom filter at location `idx` in `array` into binary representation.\n *\n * @param array\n * @param idx\n */\nfunction toBloom(array: any[], idx: number): string {\n if (idx < 0) {\n return 'NO_NODE_INJECTOR';\n }\n return `${binary(array, idx + 7)}_${binary(array, idx + 6)}_${binary(array, idx + 5)}_${\n binary(array, idx + 4)}_${binary(array, idx + 3)}_${binary(array, idx + 2)}_${\n binary(array, idx + 1)}_${binary(array, idx + 0)}`;\n}\n\nexport class LContainerDebug implements ILContainerDebug {\n constructor(private readonly _raw_lContainer: LContainer) {}\n\n get hasTransplantedViews(): boolean {\n return this._raw_lContainer[HAS_TRANSPLANTED_VIEWS];\n }\n get views(): ILViewDebug[] {\n return this._raw_lContainer.slice(CONTAINER_HEADER_OFFSET)\n .map(toDebug as (l: LView) => ILViewDebug);\n }\n get parent(): ILViewDebug|null {\n return toDebug(this._raw_lContainer[PARENT]);\n }\n get movedViews(): LView[]|null {\n return this._raw_lContainer[MOVED_VIEWS];\n }\n get host(): RElement|RComment|LView {\n return this._raw_lContainer[HOST];\n }\n get native(): RComment {\n return this._raw_lContainer[NATIVE];\n }\n get next() {\n return toDebug(this._raw_lContainer[NEXT]);\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 */\nimport {Injector} from '../../di';\nimport {ErrorHandler} from '../../error_handler';\nimport {DoCheck, OnChanges, OnInit} from '../../interface/lifecycle_hooks';\nimport {CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA, SchemaMetadata} from '../../metadata/schema';\nimport {ViewEncapsulation} from '../../metadata/view';\nimport {validateAgainstEventAttributes, validateAgainstEventProperties} from '../../sanitization/sanitization';\nimport {Sanitizer} from '../../sanitization/sanitizer';\nimport {assertDefined, assertDomNode, assertEqual, assertGreaterThanOrEqual, assertIndexInRange, assertNotEqual, assertNotSame, assertSame, assertString} from '../../util/assert';\nimport {escapeCommentText} from '../../util/dom';\nimport {createNamedArrayType} from '../../util/named_array_type';\nimport {initNgDevMode} from '../../util/ng_dev_mode';\nimport {normalizeDebugBindingName, normalizeDebugBindingValue} from '../../util/ng_reflect';\nimport {stringify} from '../../util/stringify';\nimport {assertFirstCreatePass, assertFirstUpdatePass, assertLContainer, assertLView, assertTNodeForLView, assertTNodeForTView} from '../assert';\nimport {attachPatchData, readPatchedLView} from '../context_discovery';\nimport {getFactoryDef} from '../definition_factory';\nimport {diPublicInInjector, getNodeInjectable, getOrCreateNodeInjectorForNode} from '../di';\nimport {formatRuntimeError, RuntimeError, RuntimeErrorCode} from '../error_code';\nimport {throwMultipleComponentError} from '../errors';\nimport {executeCheckHooks, executeInitAndCheckHooks, incrementInitPhaseFlags} from '../hooks';\nimport {CONTAINER_HEADER_OFFSET, HAS_TRANSPLANTED_VIEWS, LContainer, MOVED_VIEWS} from '../interfaces/container';\nimport {ComponentDef, ComponentTemplate, DirectiveDef, DirectiveDefListOrFactory, HostBindingsFunction, PipeDefListOrFactory, RenderFlags, ViewQueriesFunction} from '../interfaces/definition';\nimport {NodeInjectorFactory} from '../interfaces/injector';\nimport {AttributeMarker, InitialInputData, InitialInputs, LocalRefExtractor, PropertyAliases, PropertyAliasValue, TAttributes, TConstantsOrFactory, TContainerNode, TDirectiveHostNode, TElementContainerNode, TElementNode, TIcuContainerNode, TNode, TNodeFlags, TNodeType, TProjectionNode} from '../interfaces/node';\nimport {isProceduralRenderer, Renderer3, RendererFactory3} from '../interfaces/renderer';\nimport {RComment, RElement, RNode, RText} from '../interfaces/renderer_dom';\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {isComponentDef, isComponentHost, isContentQueryHost, isRootView} from '../interfaces/type_checks';\nimport {CHILD_HEAD, CHILD_TAIL, CLEANUP, CONTEXT, DECLARATION_COMPONENT_VIEW, DECLARATION_VIEW, FLAGS, HEADER_OFFSET, HOST, HostBindingOpCodes, InitPhaseState, INJECTOR, LView, LViewFlags, NEXT, PARENT, RENDERER, RENDERER_FACTORY, RootContext, RootContextFlags, SANITIZER, T_HOST, TData, TRANSPLANTED_VIEWS_TO_REFRESH, TVIEW, TView, TViewType} from '../interfaces/view';\nimport {assertPureTNodeType, assertTNodeType} from '../node_assert';\nimport {updateTextNode} from '../node_manipulation';\nimport {isInlineTemplate, isNodeMatchingSelectorList} from '../node_selector_matcher';\nimport {profiler, ProfilerEvent} from '../profiler';\nimport {enterView, getBindingsEnabled, getCurrentDirectiveIndex, getCurrentParentTNode, getCurrentTNode, getCurrentTNodePlaceholderOk, getSelectedIndex, isCurrentTNodeParent, isInCheckNoChangesMode, isInI18nBlock, leaveView, setBindingIndex, setBindingRootForHostBindings, setCurrentDirectiveIndex, setCurrentQueryIndex, setCurrentTNode, setIsInCheckNoChangesMode, setSelectedIndex} from '../state';\nimport {NO_CHANGE} from '../tokens';\nimport {isAnimationProp, mergeHostAttrs} from '../util/attrs_utils';\nimport {INTERPOLATION_DELIMITER} from '../util/misc_utils';\nimport {renderStringify, stringifyForError} from '../util/stringify_utils';\nimport {getFirstLContainer, getLViewParent, getNextLContainer} from '../util/view_traversal_utils';\nimport {getComponentLViewByIndex, getNativeByIndex, getNativeByTNode, isCreationMode, resetPreOrderHookFlags, unwrapLView, updateTransplantedViewCount, viewAttachedToChangeDetector} from '../util/view_utils';\n\nimport {selectIndexInternal} from './advance';\nimport {attachLContainerDebug, attachLViewDebug, cloneToLViewFromTViewBlueprint, cloneToTViewData, LCleanup, LViewBlueprint, MatchesArray, TCleanup, TNodeDebug, TNodeInitialInputs, TNodeLocalNames, TViewComponents, TViewConstructor} from './lview_debug';\n\n\n\n/**\n * A permanent marker promise which signifies that the current CD tree is\n * clean.\n */\nconst _CLEAN_PROMISE = (() => Promise.resolve(null))();\n\n/**\n * Invoke `HostBindingsFunction`s for view.\n *\n * This methods executes `TView.hostBindingOpCodes`. It is used to execute the\n * `HostBindingsFunction`s associated with the current `LView`.\n *\n * @param tView Current `TView`.\n * @param lView Current `LView`.\n */\nexport function processHostBindingOpCodes(tView: TView, lView: LView): void {\n const hostBindingOpCodes = tView.hostBindingOpCodes;\n if (hostBindingOpCodes === null) return;\n try {\n for (let i = 0; i < hostBindingOpCodes.length; i++) {\n const opCode = hostBindingOpCodes[i] as number;\n if (opCode < 0) {\n // Negative numbers are element indexes.\n setSelectedIndex(~opCode);\n } else {\n // Positive numbers are NumberTuple which store bindingRootIndex and directiveIndex.\n const directiveIdx = opCode;\n const bindingRootIndx = hostBindingOpCodes[++i] as number;\n const hostBindingFn = hostBindingOpCodes[++i] as HostBindingsFunction<any>;\n setBindingRootForHostBindings(bindingRootIndx, directiveIdx);\n const context = lView[directiveIdx];\n hostBindingFn(RenderFlags.Update, context);\n }\n }\n } finally {\n setSelectedIndex(-1);\n }\n}\n\n\n/** Refreshes all content queries declared by directives in a given view */\nfunction refreshContentQueries(tView: TView, lView: LView): void {\n const contentQueries = tView.contentQueries;\n if (contentQueries !== null) {\n for (let i = 0; i < contentQueries.length; i += 2) {\n const queryStartIdx = contentQueries[i];\n const directiveDefIdx = contentQueries[i + 1];\n if (directiveDefIdx !== -1) {\n const directiveDef = tView.data[directiveDefIdx] as DirectiveDef<any>;\n ngDevMode && assertDefined(directiveDef, 'DirectiveDef not found.');\n ngDevMode &&\n assertDefined(directiveDef.contentQueries, 'contentQueries function should be defined');\n setCurrentQueryIndex(queryStartIdx);\n directiveDef.contentQueries!(RenderFlags.Update, lView[directiveDefIdx], directiveDefIdx);\n }\n }\n }\n}\n\n/** Refreshes child components in the current view (update mode). */\nfunction refreshChildComponents(hostLView: LView, components: number[]): void {\n for (let i = 0; i < components.length; i++) {\n refreshComponent(hostLView, components[i]);\n }\n}\n\n/** Renders child components in the current view (creation mode). */\nfunction renderChildComponents(hostLView: LView, components: number[]): void {\n for (let i = 0; i < components.length; i++) {\n renderComponent(hostLView, components[i]);\n }\n}\n\nexport function createLView<T>(\n parentLView: LView|null, tView: TView, context: T|null, flags: LViewFlags, host: RElement|null,\n tHostNode: TNode|null, rendererFactory: RendererFactory3|null, renderer: Renderer3|null,\n sanitizer: Sanitizer|null, injector: Injector|null): LView {\n const lView =\n ngDevMode ? cloneToLViewFromTViewBlueprint(tView) : tView.blueprint.slice() as LView;\n lView[HOST] = host;\n lView[FLAGS] = flags | LViewFlags.CreationMode | LViewFlags.Attached | LViewFlags.FirstLViewPass;\n resetPreOrderHookFlags(lView);\n ngDevMode && tView.declTNode && parentLView && assertTNodeForLView(tView.declTNode, parentLView);\n lView[PARENT] = lView[DECLARATION_VIEW] = parentLView;\n lView[CONTEXT] = context;\n lView[RENDERER_FACTORY] = (rendererFactory || parentLView && parentLView[RENDERER_FACTORY])!;\n ngDevMode && assertDefined(lView[RENDERER_FACTORY], 'RendererFactory is required');\n lView[RENDERER] = (renderer || parentLView && parentLView[RENDERER])!;\n ngDevMode && assertDefined(lView[RENDERER], 'Renderer is required');\n lView[SANITIZER] = sanitizer || parentLView && parentLView[SANITIZER] || null!;\n lView[INJECTOR as any] = injector || parentLView && parentLView[INJECTOR] || null;\n lView[T_HOST] = tHostNode;\n ngDevMode &&\n assertEqual(\n tView.type == TViewType.Embedded ? parentLView !== null : true, true,\n 'Embedded views must have parentLView');\n lView[DECLARATION_COMPONENT_VIEW] =\n tView.type == TViewType.Embedded ? parentLView![DECLARATION_COMPONENT_VIEW] : lView;\n ngDevMode && attachLViewDebug(lView);\n return lView;\n}\n\n/**\n * Create and stores the TNode, and hooks it up to the tree.\n *\n * @param tView The current `TView`.\n * @param index The index at which the TNode should be saved (null if view, since they are not\n * saved).\n * @param type The type of TNode to create\n * @param native The native element for this node, if applicable\n * @param name The tag name of the associated native element, if applicable\n * @param attrs Any attrs for the native element, if applicable\n */\nexport function getOrCreateTNode(\n tView: TView, index: number, type: TNodeType.Element|TNodeType.Text, name: string|null,\n attrs: TAttributes|null): TElementNode;\nexport function getOrCreateTNode(\n tView: TView, index: number, type: TNodeType.Container, name: string|null,\n attrs: TAttributes|null): TContainerNode;\nexport function getOrCreateTNode(\n tView: TView, index: number, type: TNodeType.Projection, name: null,\n attrs: TAttributes|null): TProjectionNode;\nexport function getOrCreateTNode(\n tView: TView, index: number, type: TNodeType.ElementContainer, name: string|null,\n attrs: TAttributes|null): TElementContainerNode;\nexport function getOrCreateTNode(\n tView: TView, index: number, type: TNodeType.Icu, name: null,\n attrs: TAttributes|null): TElementContainerNode;\nexport function getOrCreateTNode(\n tView: TView, index: number, type: TNodeType, name: string|null, attrs: TAttributes|null):\n TElementNode&TContainerNode&TElementContainerNode&TProjectionNode&TIcuContainerNode {\n ngDevMode && index !== 0 && // 0 are bogus nodes and they are OK. See `createContainerRef` in\n // `view_engine_compatibility` for additional context.\n assertGreaterThanOrEqual(index, HEADER_OFFSET, 'TNodes can\\'t be in the LView header.');\n // Keep this function short, so that the VM will inline it.\n ngDevMode && assertPureTNodeType(type);\n let tNode = tView.data[index] as TNode;\n if (tNode === null) {\n tNode = createTNodeAtIndex(tView, index, type, name, attrs);\n if (isInI18nBlock()) {\n // If we are in i18n block then all elements should be pre declared through `Placeholder`\n // See `TNodeType.Placeholder` and `LFrame.inI18n` for more context.\n // If the `TNode` was not pre-declared than it means it was not mentioned which means it was\n // removed, so we mark it as detached.\n tNode.flags |= TNodeFlags.isDetached;\n }\n } else if (tNode.type & TNodeType.Placeholder) {\n tNode.type = type;\n tNode.value = name;\n tNode.attrs = attrs;\n const parent = getCurrentParentTNode();\n tNode.injectorIndex = parent === null ? -1 : parent.injectorIndex;\n ngDevMode && assertTNodeForTView(tNode, tView);\n ngDevMode && assertEqual(index, tNode.index, 'Expecting same index');\n }\n setCurrentTNode(tNode, true);\n return tNode as TElementNode & TContainerNode & TElementContainerNode & TProjectionNode &\n TIcuContainerNode;\n}\n\nexport function createTNodeAtIndex(\n tView: TView, index: number, type: TNodeType, name: string|null, attrs: TAttributes|null) {\n const currentTNode = getCurrentTNodePlaceholderOk();\n const isParent = isCurrentTNodeParent();\n const parent = isParent ? currentTNode : currentTNode && currentTNode.parent;\n // Parents cannot cross component boundaries because components will be used in multiple places.\n const tNode = tView.data[index] =\n createTNode(tView, parent as TElementNode | TContainerNode, type, index, name, attrs);\n // Assign a pointer to the first child node of a given view. The first node is not always the one\n // at index 0, in case of i18n, index 0 can be the instruction `i18nStart` and the first node has\n // the index 1 or more, so we can't just check node index.\n if (tView.firstChild === null) {\n tView.firstChild = tNode;\n }\n if (currentTNode !== null) {\n if (isParent) {\n // FIXME(misko): This logic looks unnecessarily complicated. Could we simplify?\n if (currentTNode.child == null && tNode.parent !== null) {\n // We are in the same view, which means we are adding content node to the parent view.\n currentTNode.child = tNode;\n }\n } else {\n if (currentTNode.next === null) {\n // In the case of i18n the `currentTNode` may already be linked, in which case we don't want\n // to break the links which i18n created.\n currentTNode.next = tNode;\n }\n }\n }\n return tNode;\n}\n\n\n/**\n * When elements are created dynamically after a view blueprint is created (e.g. through\n * i18nApply()), we need to adjust the blueprint for future\n * template passes.\n *\n * @param tView `TView` associated with `LView`\n * @param lView The `LView` containing the blueprint to adjust\n * @param numSlotsToAlloc The number of slots to alloc in the LView, should be >0\n * @param initialValue Initial value to store in blueprint\n */\nexport function allocExpando(\n tView: TView, lView: LView, numSlotsToAlloc: number, initialValue: any): number {\n if (numSlotsToAlloc === 0) return -1;\n if (ngDevMode) {\n assertFirstCreatePass(tView);\n assertSame(tView, lView[TVIEW], '`LView` must be associated with `TView`!');\n assertEqual(tView.data.length, lView.length, 'Expecting LView to be same size as TView');\n assertEqual(\n tView.data.length, tView.blueprint.length, 'Expecting Blueprint to be same size as TView');\n assertFirstUpdatePass(tView);\n }\n const allocIdx = lView.length;\n for (let i = 0; i < numSlotsToAlloc; i++) {\n lView.push(initialValue);\n tView.blueprint.push(initialValue);\n tView.data.push(null);\n }\n return allocIdx;\n}\n\n\n//////////////////////////\n//// Render\n//////////////////////////\n\n/**\n * Processes a view in the creation mode. This includes a number of steps in a specific order:\n * - creating view query functions (if any);\n * - executing a template function in the creation mode;\n * - updating static queries (if any);\n * - creating child components defined in a given view.\n */\nexport function renderView<T>(tView: TView, lView: LView, context: T): void {\n ngDevMode && assertEqual(isCreationMode(lView), true, 'Should be run in creation mode');\n enterView(lView);\n try {\n const viewQuery = tView.viewQuery;\n if (viewQuery !== null) {\n executeViewQueryFn(RenderFlags.Create, viewQuery, context);\n }\n\n // Execute a template associated with this view, if it exists. A template function might not be\n // defined for the root component views.\n const templateFn = tView.template;\n if (templateFn !== null) {\n executeTemplate(tView, lView, templateFn, RenderFlags.Create, context);\n }\n\n // This needs to be set before children are processed to support recursive components.\n // This must be set to false immediately after the first creation run because in an\n // ngFor loop, all the views will be created together before update mode runs and turns\n // off firstCreatePass. If we don't set it here, instances will perform directive\n // matching, etc again and again.\n if (tView.firstCreatePass) {\n tView.firstCreatePass = false;\n }\n\n // We resolve content queries specifically marked as `static` in creation mode. Dynamic\n // content queries are resolved during change detection (i.e. update mode), after embedded\n // views are refreshed (see block above).\n if (tView.staticContentQueries) {\n refreshContentQueries(tView, lView);\n }\n\n // We must materialize query results before child components are processed\n // in case a child component has projected a container. The LContainer needs\n // to exist so the embedded views are properly attached by the container.\n if (tView.staticViewQueries) {\n executeViewQueryFn(RenderFlags.Update, tView.viewQuery!, context);\n }\n\n // Render child component views.\n const components = tView.components;\n if (components !== null) {\n renderChildComponents(lView, components);\n }\n\n } catch (error) {\n // If we didn't manage to get past the first template pass due to\n // an error, mark the view as corrupted so we can try to recover.\n if (tView.firstCreatePass) {\n tView.incompleteFirstPass = true;\n tView.firstCreatePass = false;\n }\n\n throw error;\n } finally {\n lView[FLAGS] &= ~LViewFlags.CreationMode;\n leaveView();\n }\n}\n\n/**\n * Processes a view in update mode. This includes a number of steps in a specific order:\n * - executing a template function in update mode;\n * - executing hooks;\n * - refreshing queries;\n * - setting host bindings;\n * - refreshing child (embedded and component) views.\n */\nexport function refreshView<T>(\n tView: TView, lView: LView, templateFn: ComponentTemplate<{}>|null, context: T) {\n ngDevMode && assertEqual(isCreationMode(lView), false, 'Should be run in update mode');\n const flags = lView[FLAGS];\n if ((flags & LViewFlags.Destroyed) === LViewFlags.Destroyed) return;\n enterView(lView);\n // Check no changes mode is a dev only mode used to verify that bindings have not changed\n // since they were assigned. We do not want to execute lifecycle hooks in that mode.\n const isInCheckNoChangesPass = isInCheckNoChangesMode();\n try {\n resetPreOrderHookFlags(lView);\n\n setBindingIndex(tView.bindingStartIndex);\n if (templateFn !== null) {\n executeTemplate(tView, lView, templateFn, RenderFlags.Update, context);\n }\n\n const hooksInitPhaseCompleted =\n (flags & LViewFlags.InitPhaseStateMask) === InitPhaseState.InitPhaseCompleted;\n\n // execute pre-order hooks (OnInit, OnChanges, DoCheck)\n // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n if (!isInCheckNoChangesPass) {\n if (hooksInitPhaseCompleted) {\n const preOrderCheckHooks = tView.preOrderCheckHooks;\n if (preOrderCheckHooks !== null) {\n executeCheckHooks(lView, preOrderCheckHooks, null);\n }\n } else {\n const preOrderHooks = tView.preOrderHooks;\n if (preOrderHooks !== null) {\n executeInitAndCheckHooks(lView, preOrderHooks, InitPhaseState.OnInitHooksToBeRun, null);\n }\n incrementInitPhaseFlags(lView, InitPhaseState.OnInitHooksToBeRun);\n }\n }\n\n // First mark transplanted views that are declared in this lView as needing a refresh at their\n // insertion points. This is needed to avoid the situation where the template is defined in this\n // `LView` but its declaration appears after the insertion component.\n markTransplantedViewsForRefresh(lView);\n refreshEmbeddedViews(lView);\n\n // Content query results must be refreshed before content hooks are called.\n if (tView.contentQueries !== null) {\n refreshContentQueries(tView, lView);\n }\n\n // execute content hooks (AfterContentInit, AfterContentChecked)\n // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n if (!isInCheckNoChangesPass) {\n if (hooksInitPhaseCompleted) {\n const contentCheckHooks = tView.contentCheckHooks;\n if (contentCheckHooks !== null) {\n executeCheckHooks(lView, contentCheckHooks);\n }\n } else {\n const contentHooks = tView.contentHooks;\n if (contentHooks !== null) {\n executeInitAndCheckHooks(\n lView, contentHooks, InitPhaseState.AfterContentInitHooksToBeRun);\n }\n incrementInitPhaseFlags(lView, InitPhaseState.AfterContentInitHooksToBeRun);\n }\n }\n\n processHostBindingOpCodes(tView, lView);\n\n // Refresh child component views.\n const components = tView.components;\n if (components !== null) {\n refreshChildComponents(lView, components);\n }\n\n // View queries must execute after refreshing child components because a template in this view\n // could be inserted in a child component. If the view query executes before child component\n // refresh, the template might not yet be inserted.\n const viewQuery = tView.viewQuery;\n if (viewQuery !== null) {\n executeViewQueryFn(RenderFlags.Update, viewQuery, context);\n }\n\n // execute view hooks (AfterViewInit, AfterViewChecked)\n // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n if (!isInCheckNoChangesPass) {\n if (hooksInitPhaseCompleted) {\n const viewCheckHooks = tView.viewCheckHooks;\n if (viewCheckHooks !== null) {\n executeCheckHooks(lView, viewCheckHooks);\n }\n } else {\n const viewHooks = tView.viewHooks;\n if (viewHooks !== null) {\n executeInitAndCheckHooks(lView, viewHooks, InitPhaseState.AfterViewInitHooksToBeRun);\n }\n incrementInitPhaseFlags(lView, InitPhaseState.AfterViewInitHooksToBeRun);\n }\n }\n if (tView.firstUpdatePass === true) {\n // We need to make sure that we only flip the flag on successful `refreshView` only\n // Don't do this in `finally` block.\n // If we did this in `finally` block then an exception could block the execution of styling\n // instructions which in turn would be unable to insert themselves into the styling linked\n // list. The result of this would be that if the exception would not be throw on subsequent CD\n // the styling would be unable to process it data and reflect to the DOM.\n tView.firstUpdatePass = false;\n }\n\n // Do not reset the dirty state when running in check no changes mode. We don't want components\n // to behave differently depending on whether check no changes is enabled or not. For example:\n // Marking an OnPush component as dirty from within the `ngAfterViewInit` hook in order to\n // refresh a `NgClass` binding should work. If we would reset the dirty state in the check\n // no changes cycle, the component would be not be dirty for the next update pass. This would\n // be different in production mode where the component dirty state is not reset.\n if (!isInCheckNoChangesPass) {\n lView[FLAGS] &= ~(LViewFlags.Dirty | LViewFlags.FirstLViewPass);\n }\n if (lView[FLAGS] & LViewFlags.RefreshTransplantedView) {\n lView[FLAGS] &= ~LViewFlags.RefreshTransplantedView;\n updateTransplantedViewCount(lView[PARENT] as LContainer, -1);\n }\n } finally {\n leaveView();\n }\n}\n\nexport function renderComponentOrTemplate<T>(\n tView: TView, lView: LView, templateFn: ComponentTemplate<{}>|null, context: T) {\n const rendererFactory = lView[RENDERER_FACTORY];\n const normalExecutionPath = !isInCheckNoChangesMode();\n const creationModeIsActive = isCreationMode(lView);\n try {\n if (normalExecutionPath && !creationModeIsActive && rendererFactory.begin) {\n rendererFactory.begin();\n }\n if (creationModeIsActive) {\n renderView(tView, lView, context);\n }\n refreshView(tView, lView, templateFn, context);\n } finally {\n if (normalExecutionPath && !creationModeIsActive && rendererFactory.end) {\n rendererFactory.end();\n }\n }\n}\n\nfunction executeTemplate<T>(\n tView: TView, lView: LView, templateFn: ComponentTemplate<T>, rf: RenderFlags, context: T) {\n const prevSelectedIndex = getSelectedIndex();\n const isUpdatePhase = rf & RenderFlags.Update;\n try {\n setSelectedIndex(-1);\n if (isUpdatePhase && lView.length > HEADER_OFFSET) {\n // When we're updating, inherently select 0 so we don't\n // have to generate that instruction for most update blocks.\n selectIndexInternal(tView, lView, HEADER_OFFSET, isInCheckNoChangesMode());\n }\n\n const preHookType =\n isUpdatePhase ? ProfilerEvent.TemplateUpdateStart : ProfilerEvent.TemplateCreateStart;\n profiler(preHookType, context);\n templateFn(rf, context);\n } finally {\n setSelectedIndex(prevSelectedIndex);\n\n const postHookType =\n isUpdatePhase ? ProfilerEvent.TemplateUpdateEnd : ProfilerEvent.TemplateCreateEnd;\n profiler(postHookType, context);\n }\n}\n\n//////////////////////////\n//// Element\n//////////////////////////\n\nexport function executeContentQueries(tView: TView, tNode: TNode, lView: LView) {\n if (isContentQueryHost(tNode)) {\n const start = tNode.directiveStart;\n const end = tNode.directiveEnd;\n for (let directiveIndex = start; directiveIndex < end; directiveIndex++) {\n const def = tView.data[directiveIndex] as DirectiveDef<any>;\n if (def.contentQueries) {\n def.contentQueries(RenderFlags.Create, lView[directiveIndex], directiveIndex);\n }\n }\n }\n}\n\n\n/**\n * Creates directive instances.\n */\nexport function createDirectivesInstances(tView: TView, lView: LView, tNode: TDirectiveHostNode) {\n if (!getBindingsEnabled()) return;\n instantiateAllDirectives(tView, lView, tNode, getNativeByTNode(tNode, lView));\n if ((tNode.flags & TNodeFlags.hasHostBindings) === TNodeFlags.hasHostBindings) {\n invokeDirectivesHostBindings(tView, lView, tNode);\n }\n}\n\n/**\n * Takes a list of local names and indices and pushes the resolved local variable values\n * to LView in the same order as they are loaded in the template with load().\n */\nexport function saveResolvedLocalsInData(\n viewData: LView, tNode: TDirectiveHostNode,\n localRefExtractor: LocalRefExtractor = getNativeByTNode): void {\n const localNames = tNode.localNames;\n if (localNames !== null) {\n let localIndex = tNode.index + 1;\n for (let i = 0; i < localNames.length; i += 2) {\n const index = localNames[i + 1] as number;\n const value = index === -1 ?\n localRefExtractor(\n tNode as TElementNode | TContainerNode | TElementContainerNode, viewData) :\n viewData[index];\n viewData[localIndex++] = value;\n }\n }\n}\n\n/**\n * Gets TView from a template function or creates a new TView\n * if it doesn't already exist.\n *\n * @param def ComponentDef\n * @returns TView\n */\nexport function getOrCreateTComponentView(def: ComponentDef<any>): TView {\n const tView = def.tView;\n\n // Create a TView if there isn't one, or recreate it if the first create pass didn't\n // complete successfully since we can't know for sure whether it's in a usable shape.\n if (tView === null || tView.incompleteFirstPass) {\n // Declaration node here is null since this function is called when we dynamically create a\n // component and hence there is no declaration.\n const declTNode = null;\n return def.tView = createTView(\n TViewType.Component, declTNode, def.template, def.decls, def.vars, def.directiveDefs,\n def.pipeDefs, def.viewQuery, def.schemas, def.consts);\n }\n\n return tView;\n}\n\n\n/**\n * Creates a TView instance\n *\n * @param type Type of `TView`.\n * @param declTNode Declaration location of this `TView`.\n * @param templateFn Template function\n * @param decls The number of nodes, local refs, and pipes in this template\n * @param directives Registry of directives for this view\n * @param pipes Registry of pipes for this view\n * @param viewQuery View queries for this view\n * @param schemas Schemas for this view\n * @param consts Constants for this view\n */\nexport function createTView(\n type: TViewType, declTNode: TNode|null, templateFn: ComponentTemplate<any>|null, decls: number,\n vars: number, directives: DirectiveDefListOrFactory|null, pipes: PipeDefListOrFactory|null,\n viewQuery: ViewQueriesFunction<any>|null, schemas: SchemaMetadata[]|null,\n constsOrFactory: TConstantsOrFactory|null): TView {\n ngDevMode && ngDevMode.tView++;\n const bindingStartIndex = HEADER_OFFSET + decls;\n // This length does not yet contain host bindings from child directives because at this point,\n // we don't know which directives are active on this template. As soon as a directive is matched\n // that has a host binding, we will update the blueprint with that def's hostVars count.\n const initialViewLength = bindingStartIndex + vars;\n const blueprint = createViewBlueprint(bindingStartIndex, initialViewLength);\n const consts = typeof constsOrFactory === 'function' ? constsOrFactory() : constsOrFactory;\n const tView = blueprint[TVIEW as any] = ngDevMode ?\n new TViewConstructor(\n type, // type: TViewType,\n blueprint, // blueprint: LView,\n templateFn, // template: ComponentTemplate<{}>|null,\n null, // queries: TQueries|null\n viewQuery, // viewQuery: ViewQueriesFunction<{}>|null,\n declTNode, // declTNode: TNode|null,\n cloneToTViewData(blueprint).fill(null, bindingStartIndex), // data: TData,\n bindingStartIndex, // bindingStartIndex: number,\n initialViewLength, // expandoStartIndex: number,\n null, // hostBindingOpCodes: HostBindingOpCodes,\n true, // firstCreatePass: boolean,\n true, // firstUpdatePass: boolean,\n false, // staticViewQueries: boolean,\n false, // staticContentQueries: boolean,\n null, // preOrderHooks: HookData|null,\n null, // preOrderCheckHooks: HookData|null,\n null, // contentHooks: HookData|null,\n null, // contentCheckHooks: HookData|null,\n null, // viewHooks: HookData|null,\n null, // viewCheckHooks: HookData|null,\n null, // destroyHooks: DestroyHookData|null,\n null, // cleanup: any[]|null,\n null, // contentQueries: number[]|null,\n null, // components: number[]|null,\n typeof directives === 'function' ? //\n directives() : //\n directives, // directiveRegistry: DirectiveDefList|null,\n typeof pipes === 'function' ? pipes() : pipes, // pipeRegistry: PipeDefList|null,\n null, // firstChild: TNode|null,\n schemas, // schemas: SchemaMetadata[]|null,\n consts, // consts: TConstants|null\n false, // incompleteFirstPass: boolean\n decls, // ngDevMode only: decls\n vars, // ngDevMode only: vars\n ) :\n {\n type: type,\n blueprint: blueprint,\n template: templateFn,\n queries: null,\n viewQuery: viewQuery,\n declTNode: declTNode,\n data: blueprint.slice().fill(null, bindingStartIndex),\n bindingStartIndex: bindingStartIndex,\n expandoStartIndex: initialViewLength,\n hostBindingOpCodes: null,\n firstCreatePass: true,\n firstUpdatePass: true,\n staticViewQueries: false,\n staticContentQueries: false,\n preOrderHooks: null,\n preOrderCheckHooks: null,\n contentHooks: null,\n contentCheckHooks: null,\n viewHooks: null,\n viewCheckHooks: null,\n destroyHooks: null,\n cleanup: null,\n contentQueries: null,\n components: null,\n directiveRegistry: typeof directives === 'function' ? directives() : directives,\n pipeRegistry: typeof pipes === 'function' ? pipes() : pipes,\n firstChild: null,\n schemas: schemas,\n consts: consts,\n incompleteFirstPass: false\n };\n if (ngDevMode) {\n // For performance reasons it is important that the tView retains the same shape during runtime.\n // (To make sure that all of the code is monomorphic.) For this reason we seal the object to\n // prevent class transitions.\n Object.seal(tView);\n }\n return tView;\n}\n\nfunction createViewBlueprint(bindingStartIndex: number, initialViewLength: number): LView {\n const blueprint = ngDevMode ? new LViewBlueprint() : [];\n\n for (let i = 0; i < initialViewLength; i++) {\n blueprint.push(i < bindingStartIndex ? null : NO_CHANGE);\n }\n\n return blueprint as LView;\n}\n\nfunction createError(text: string, token: any) {\n return new Error(`Renderer: ${text} [${stringifyForError(token)}]`);\n}\n\nfunction assertHostNodeExists(rElement: RElement, elementOrSelector: RElement|string) {\n if (!rElement) {\n if (typeof elementOrSelector === 'string') {\n throw createError('Host node with selector not found:', elementOrSelector);\n } else {\n throw createError('Host node is required:', elementOrSelector);\n }\n }\n}\n\n/**\n * Locates the host native element, used for bootstrapping existing nodes into rendering pipeline.\n *\n * @param rendererFactory Factory function to create renderer instance.\n * @param elementOrSelector Render element or CSS selector to locate the element.\n * @param encapsulation View Encapsulation defined for component that requests host element.\n */\nexport function locateHostElement(\n renderer: Renderer3, elementOrSelector: RElement|string,\n encapsulation: ViewEncapsulation): RElement {\n if (isProceduralRenderer(renderer)) {\n // When using native Shadow DOM, do not clear host element to allow native slot projection\n const preserveContent = encapsulation === ViewEncapsulation.ShadowDom;\n return renderer.selectRootElement(elementOrSelector, preserveContent);\n }\n\n let rElement = typeof elementOrSelector === 'string' ?\n renderer.querySelector(elementOrSelector)! :\n elementOrSelector;\n ngDevMode && assertHostNodeExists(rElement, elementOrSelector);\n\n // Always clear host element's content when Renderer3 is in use. For procedural renderer case we\n // make it depend on whether ShadowDom encapsulation is used (in which case the content should be\n // preserved to allow native slot projection). ShadowDom encapsulation requires procedural\n // renderer, and procedural renderer case is handled above.\n rElement.textContent = '';\n\n return rElement;\n}\n\n/**\n * Saves context for this cleanup function in LView.cleanupInstances.\n *\n * On the first template pass, saves in TView:\n * - Cleanup function\n * - Index of context we just saved in LView.cleanupInstances\n *\n * This function can also be used to store instance specific cleanup fns. In that case the `context`\n * is `null` and the function is store in `LView` (rather than it `TView`).\n */\nexport function storeCleanupWithContext(\n tView: TView, lView: LView, context: any, cleanupFn: Function): void {\n const lCleanup = getOrCreateLViewCleanup(lView);\n if (context === null) {\n // If context is null that this is instance specific callback. These callbacks can only be\n // inserted after template shared instances. For this reason in ngDevMode we freeze the TView.\n if (ngDevMode) {\n Object.freeze(getOrCreateTViewCleanup(tView));\n }\n lCleanup.push(cleanupFn);\n } else {\n lCleanup.push(context);\n\n if (tView.firstCreatePass) {\n getOrCreateTViewCleanup(tView).push(cleanupFn, lCleanup.length - 1);\n }\n }\n}\n\n/**\n * Constructs a TNode object from the arguments.\n *\n * @param tView `TView` to which this `TNode` belongs (used only in `ngDevMode`)\n * @param tParent Parent `TNode`\n * @param type The type of the node\n * @param index The index of the TNode in TView.data, adjusted for HEADER_OFFSET\n * @param tagName The tag name of the node\n * @param attrs The attributes defined on this node\n * @param tViews Any TViews attached to this node\n * @returns the TNode object\n */\nexport function createTNode(\n tView: TView, tParent: TElementNode|TContainerNode|null, type: TNodeType.Container,\n index: number, tagName: string|null, attrs: TAttributes|null): TContainerNode;\nexport function createTNode(\n tView: TView, tParent: TElementNode|TContainerNode|null, type: TNodeType.Element|TNodeType.Text,\n index: number, tagName: string|null, attrs: TAttributes|null): TElementNode;\nexport function createTNode(\n tView: TView, tParent: TElementNode|TContainerNode|null, type: TNodeType.ElementContainer,\n index: number, tagName: string|null, attrs: TAttributes|null): TElementContainerNode;\nexport function createTNode(\n tView: TView, tParent: TElementNode|TContainerNode|null, type: TNodeType.Icu, index: number,\n tagName: string|null, attrs: TAttributes|null): TIcuContainerNode;\nexport function createTNode(\n tView: TView, tParent: TElementNode|TContainerNode|null, type: TNodeType.Projection,\n index: number, tagName: string|null, attrs: TAttributes|null): TProjectionNode;\nexport function createTNode(\n tView: TView, tParent: TElementNode|TContainerNode|null, type: TNodeType, index: number,\n tagName: string|null, attrs: TAttributes|null): TNode;\nexport function createTNode(\n tView: TView, tParent: TElementNode|TContainerNode|null, type: TNodeType, index: number,\n value: string|null, attrs: TAttributes|null): TNode {\n ngDevMode && index !== 0 && // 0 are bogus nodes and they are OK. See `createContainerRef` in\n // `view_engine_compatibility` for additional context.\n assertGreaterThanOrEqual(index, HEADER_OFFSET, 'TNodes can\\'t be in the LView header.');\n ngDevMode && assertNotSame(attrs, undefined, '\\'undefined\\' is not valid value for \\'attrs\\'');\n ngDevMode && ngDevMode.tNode++;\n ngDevMode && tParent && assertTNodeForTView(tParent, tView);\n let injectorIndex = tParent ? tParent.injectorIndex : -1;\n const tNode = ngDevMode ?\n new TNodeDebug(\n tView, // tView_: TView\n type, // type: TNodeType\n index, // index: number\n null, // insertBeforeIndex: null|-1|number|number[]\n injectorIndex, // injectorIndex: number\n -1, // directiveStart: number\n -1, // directiveEnd: number\n -1, // directiveStylingLast: number\n null, // propertyBindings: number[]|null\n 0, // flags: TNodeFlags\n 0, // providerIndexes: TNodeProviderIndexes\n value, // value: string|null\n attrs, // attrs: (string|AttributeMarker|(string|SelectorFlags)[])[]|null\n null, // mergedAttrs\n null, // localNames: (string|number)[]|null\n undefined, // initialInputs: (string[]|null)[]|null|undefined\n null, // inputs: PropertyAliases|null\n null, // outputs: PropertyAliases|null\n null, // tViews: ITView|ITView[]|null\n null, // next: ITNode|null\n null, // projectionNext: ITNode|null\n null, // child: ITNode|null\n tParent, // parent: TElementNode|TContainerNode|null\n null, // projection: number|(ITNode|RNode[])[]|null\n null, // styles: string|null\n null, // stylesWithoutHost: string|null\n undefined, // residualStyles: string|null\n null, // classes: string|null\n null, // classesWithoutHost: string|null\n undefined, // residualClasses: string|null\n 0 as any, // classBindings: TStylingRange;\n 0 as any, // styleBindings: TStylingRange;\n ) :\n {\n type,\n index,\n insertBeforeIndex: null,\n injectorIndex,\n directiveStart: -1,\n directiveEnd: -1,\n directiveStylingLast: -1,\n propertyBindings: null,\n flags: 0,\n providerIndexes: 0,\n value: value,\n attrs: attrs,\n mergedAttrs: null,\n localNames: null,\n initialInputs: undefined,\n inputs: null,\n outputs: null,\n tViews: null,\n next: null,\n projectionNext: null,\n child: null,\n parent: tParent,\n projection: null,\n styles: null,\n stylesWithoutHost: null,\n residualStyles: undefined,\n classes: null,\n classesWithoutHost: null,\n residualClasses: undefined,\n classBindings: 0 as any,\n styleBindings: 0 as any,\n };\n if (ngDevMode) {\n // For performance reasons it is important that the tNode retains the same shape during runtime.\n // (To make sure that all of the code is monomorphic.) For this reason we seal the object to\n // prevent class transitions.\n Object.seal(tNode);\n }\n return tNode;\n}\n\n\nfunction generatePropertyAliases(\n inputAliasMap: {[publicName: string]: string}, directiveDefIdx: number,\n propStore: PropertyAliases|null): PropertyAliases|null {\n for (let publicName in inputAliasMap) {\n if (inputAliasMap.hasOwnProperty(publicName)) {\n propStore = propStore === null ? {} : propStore;\n const internalName = inputAliasMap[publicName];\n\n if (propStore.hasOwnProperty(publicName)) {\n propStore[publicName].push(directiveDefIdx, internalName);\n } else {\n (propStore[publicName] = [directiveDefIdx, internalName]);\n }\n }\n }\n return propStore;\n}\n\n/**\n * Initializes data structures required to work with directive inputs and outputs.\n * Initialization is done for all directives matched on a given TNode.\n */\nfunction initializeInputAndOutputAliases(tView: TView, tNode: TNode): void {\n ngDevMode && assertFirstCreatePass(tView);\n\n const start = tNode.directiveStart;\n const end = tNode.directiveEnd;\n const tViewData = tView.data;\n\n const tNodeAttrs = tNode.attrs;\n const inputsFromAttrs: InitialInputData = ngDevMode ? new TNodeInitialInputs() : [];\n let inputsStore: PropertyAliases|null = null;\n let outputsStore: PropertyAliases|null = null;\n for (let i = start; i < end; i++) {\n const directiveDef = tViewData[i] as DirectiveDef<any>;\n const directiveInputs = directiveDef.inputs;\n // Do not use unbound attributes as inputs to structural directives, since structural\n // directive inputs can only be set using microsyntax (e.g. `<div *dir=\"exp\">`).\n // TODO(FW-1930): microsyntax expressions may also contain unbound/static attributes, which\n // should be set for inline templates.\n const initialInputs = (tNodeAttrs !== null && !isInlineTemplate(tNode)) ?\n generateInitialInputs(directiveInputs, tNodeAttrs) :\n null;\n inputsFromAttrs.push(initialInputs);\n inputsStore = generatePropertyAliases(directiveInputs, i, inputsStore);\n outputsStore = generatePropertyAliases(directiveDef.outputs, i, outputsStore);\n }\n\n if (inputsStore !== null) {\n if (inputsStore.hasOwnProperty('class')) {\n tNode.flags |= TNodeFlags.hasClassInput;\n }\n if (inputsStore.hasOwnProperty('style')) {\n tNode.flags |= TNodeFlags.hasStyleInput;\n }\n }\n\n tNode.initialInputs = inputsFromAttrs;\n tNode.inputs = inputsStore;\n tNode.outputs = outputsStore;\n}\n\n/**\n * Mapping between attributes names that don't correspond to their element property names.\n *\n * Performance note: this function is written as a series of if checks (instead of, say, a property\n * object lookup) for performance reasons - the series of `if` checks seems to be the fastest way of\n * mapping property names. Do NOT change without benchmarking.\n *\n * Note: this mapping has to be kept in sync with the equally named mapping in the template\n * type-checking machinery of ngtsc.\n */\nfunction mapPropName(name: string): string {\n if (name === 'class') return 'className';\n if (name === 'for') return 'htmlFor';\n if (name === 'formaction') return 'formAction';\n if (name === 'innerHtml') return 'innerHTML';\n if (name === 'readonly') return 'readOnly';\n if (name === 'tabindex') return 'tabIndex';\n return name;\n}\n\nexport function elementPropertyInternal<T>(\n tView: TView, tNode: TNode, lView: LView, propName: string, value: T, renderer: Renderer3,\n sanitizer: SanitizerFn|null|undefined, nativeOnly: boolean): void {\n ngDevMode && assertNotSame(value, NO_CHANGE as any, 'Incoming value should never be NO_CHANGE.');\n const element = getNativeByTNode(tNode, lView) as RElement | RComment;\n let inputData = tNode.inputs;\n let dataValue: PropertyAliasValue|undefined;\n if (!nativeOnly && inputData != null && (dataValue = inputData[propName])) {\n setInputsForProperty(tView, lView, dataValue, propName, value);\n if (isComponentHost(tNode)) markDirtyIfOnPush(lView, tNode.index);\n if (ngDevMode) {\n setNgReflectProperties(lView, element, tNode.type, dataValue, value);\n }\n } else if (tNode.type & TNodeType.AnyRNode) {\n propName = mapPropName(propName);\n\n if (ngDevMode) {\n validateAgainstEventProperties(propName);\n if (!validateProperty(tView, element, propName, tNode)) {\n // Return here since we only log warnings for unknown properties.\n logUnknownPropertyError(propName, tNode);\n return;\n }\n ngDevMode.rendererSetProperty++;\n }\n\n // It is assumed that the sanitizer is only added when the compiler determines that the\n // property is risky, so sanitization can be done without further checks.\n value = sanitizer != null ? (sanitizer(value, tNode.value || '', propName) as any) : value;\n if (isProceduralRenderer(renderer)) {\n renderer.setProperty(element as RElement, propName, value);\n } else if (!isAnimationProp(propName)) {\n (element as RElement).setProperty ? (element as any).setProperty(propName, value) :\n (element as any)[propName] = value;\n }\n } else if (tNode.type & TNodeType.AnyContainer) {\n // If the node is a container and the property didn't\n // match any of the inputs or schemas we should throw.\n if (ngDevMode && !matchingSchemas(tView, tNode.value)) {\n logUnknownPropertyError(propName, tNode);\n }\n }\n}\n\n/** If node is an OnPush component, marks its LView dirty. */\nfunction markDirtyIfOnPush(lView: LView, viewIndex: number): void {\n ngDevMode && assertLView(lView);\n const childComponentLView = getComponentLViewByIndex(viewIndex, lView);\n if (!(childComponentLView[FLAGS] & LViewFlags.CheckAlways)) {\n childComponentLView[FLAGS] |= LViewFlags.Dirty;\n }\n}\n\nfunction setNgReflectProperty(\n lView: LView, element: RElement|RComment, type: TNodeType, attrName: string, value: any) {\n const renderer = lView[RENDERER];\n attrName = normalizeDebugBindingName(attrName);\n const debugValue = normalizeDebugBindingValue(value);\n if (type & TNodeType.AnyRNode) {\n if (value == null) {\n isProceduralRenderer(renderer) ? renderer.removeAttribute((element as RElement), attrName) :\n (element as RElement).removeAttribute(attrName);\n } else {\n isProceduralRenderer(renderer) ?\n renderer.setAttribute((element as RElement), attrName, debugValue) :\n (element as RElement).setAttribute(attrName, debugValue);\n }\n } else {\n const textContent =\n escapeCommentText(`bindings=${JSON.stringify({[attrName]: debugValue}, null, 2)}`);\n if (isProceduralRenderer(renderer)) {\n renderer.setValue((element as RComment), textContent);\n } else {\n (element as RComment).textContent = textContent;\n }\n }\n}\n\nexport function setNgReflectProperties(\n lView: LView, element: RElement|RComment, type: TNodeType, dataValue: PropertyAliasValue,\n value: any) {\n if (type & (TNodeType.AnyRNode | TNodeType.Container)) {\n /**\n * dataValue is an array containing runtime input or output names for the directives:\n * i+0: directive instance index\n * i+1: privateName\n *\n * e.g. [0, 'change', 'change-minified']\n * we want to set the reflected property with the privateName: dataValue[i+1]\n */\n for (let i = 0; i < dataValue.length; i += 2) {\n setNgReflectProperty(lView, element, type, dataValue[i + 1] as string, value);\n }\n }\n}\n\nfunction validateProperty(\n tView: TView, element: RElement|RComment, propName: string, tNode: TNode): boolean {\n // If `schemas` is set to `null`, that's an indication that this Component was compiled in AOT\n // mode where this check happens at compile time. In JIT mode, `schemas` is always present and\n // defined as an array (as an empty array in case `schemas` field is not defined) and we should\n // execute the check below.\n if (tView.schemas === null) return true;\n\n // The property is considered valid if the element matches the schema, it exists on the element\n // or it is synthetic, and we are in a browser context (web worker nodes should be skipped).\n if (matchingSchemas(tView, tNode.value) || propName in element || isAnimationProp(propName)) {\n return true;\n }\n\n // Note: `typeof Node` returns 'function' in most browsers, but on IE it is 'object' so we\n // need to account for both here, while being careful for `typeof null` also returning 'object'.\n return typeof Node === 'undefined' || Node === null || !(element instanceof Node);\n}\n\nexport function matchingSchemas(tView: TView, tagName: string|null): boolean {\n const schemas = tView.schemas;\n\n if (schemas !== null) {\n for (let i = 0; i < schemas.length; i++) {\n const schema = schemas[i];\n if (schema === NO_ERRORS_SCHEMA ||\n schema === CUSTOM_ELEMENTS_SCHEMA && tagName && tagName.indexOf('-') > -1) {\n return true;\n }\n }\n }\n\n return false;\n}\n\n/**\n * Logs an error that a property is not supported on an element.\n * @param propName Name of the invalid property.\n * @param tNode Node on which we encountered the property.\n */\nfunction logUnknownPropertyError(propName: string, tNode: TNode): void {\n let message = `Can't bind to '${propName}' since it isn't a known property of '${tNode.value}'.`;\n console.error(formatRuntimeError(RuntimeErrorCode.UNKNOWN_BINDING, message));\n}\n\n/**\n * Instantiate a root component.\n */\nexport function instantiateRootComponent<T>(tView: TView, lView: LView, def: ComponentDef<T>): T {\n const rootTNode = getCurrentTNode()!;\n if (tView.firstCreatePass) {\n if (def.providersResolver) def.providersResolver(def);\n const directiveIndex = allocExpando(tView, lView, 1, null);\n ngDevMode &&\n assertEqual(\n directiveIndex, rootTNode.directiveStart,\n 'Because this is a root component the allocated expando should match the TNode component.');\n configureViewWithDirective(tView, rootTNode, lView, directiveIndex, def);\n }\n const directive =\n getNodeInjectable(lView, tView, rootTNode.directiveStart, rootTNode as TElementNode);\n attachPatchData(directive, lView);\n const native = getNativeByTNode(rootTNode, lView);\n if (native) {\n attachPatchData(native, lView);\n }\n return directive;\n}\n\n/**\n * Resolve the matched directives on a node.\n */\nexport function resolveDirectives(\n tView: TView, lView: LView, tNode: TElementNode|TContainerNode|TElementContainerNode,\n localRefs: string[]|null): boolean {\n // Please make sure to have explicit type for `exportsMap`. Inferred type triggers bug in\n // tsickle.\n ngDevMode && assertFirstCreatePass(tView);\n\n let hasDirectives = false;\n if (getBindingsEnabled()) {\n const directiveDefs: DirectiveDef<any>[]|null = findDirectiveDefMatches(tView, lView, tNode);\n const exportsMap: ({[key: string]: number}|null) = localRefs === null ? null : {'': -1};\n\n if (directiveDefs !== null) {\n hasDirectives = true;\n initTNodeFlags(tNode, tView.data.length, directiveDefs.length);\n // When the same token is provided by several directives on the same node, some rules apply in\n // the viewEngine:\n // - viewProviders have priority over providers\n // - the last directive in NgModule.declarations has priority over the previous one\n // So to match these rules, the order in which providers are added in the arrays is very\n // important.\n for (let i = 0; i < directiveDefs.length; i++) {\n const def = directiveDefs[i];\n if (def.providersResolver) def.providersResolver(def);\n }\n let preOrderHooksFound = false;\n let preOrderCheckHooksFound = false;\n let directiveIdx = allocExpando(tView, lView, directiveDefs.length, null);\n ngDevMode &&\n assertSame(\n directiveIdx, tNode.directiveStart,\n 'TNode.directiveStart should point to just allocated space');\n\n for (let i = 0; i < directiveDefs.length; i++) {\n const def = directiveDefs[i];\n // Merge the attrs in the order of matches. This assumes that the first directive is the\n // component itself, so that the component has the least priority.\n tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, def.hostAttrs);\n\n configureViewWithDirective(tView, tNode, lView, directiveIdx, def);\n saveNameToExportMap(directiveIdx, def, exportsMap);\n\n if (def.contentQueries !== null) tNode.flags |= TNodeFlags.hasContentQuery;\n if (def.hostBindings !== null || def.hostAttrs !== null || def.hostVars !== 0)\n tNode.flags |= TNodeFlags.hasHostBindings;\n\n const lifeCycleHooks: OnChanges&OnInit&DoCheck = def.type.prototype;\n // Only push a node index into the preOrderHooks array if this is the first\n // pre-order hook found on this node.\n if (!preOrderHooksFound &&\n (lifeCycleHooks.ngOnChanges || lifeCycleHooks.ngOnInit || lifeCycleHooks.ngDoCheck)) {\n // We will push the actual hook function into this array later during dir instantiation.\n // We cannot do it now because we must ensure hooks are registered in the same\n // order that directives are created (i.e. injection order).\n (tView.preOrderHooks || (tView.preOrderHooks = [])).push(tNode.index);\n preOrderHooksFound = true;\n }\n\n if (!preOrderCheckHooksFound && (lifeCycleHooks.ngOnChanges || lifeCycleHooks.ngDoCheck)) {\n (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(tNode.index);\n preOrderCheckHooksFound = true;\n }\n\n directiveIdx++;\n }\n\n initializeInputAndOutputAliases(tView, tNode);\n }\n if (exportsMap) cacheMatchingLocalNames(tNode, localRefs, exportsMap);\n }\n // Merge the template attrs last so that they have the highest priority.\n tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, tNode.attrs);\n return hasDirectives;\n}\n\n/**\n * Add `hostBindings` to the `TView.hostBindingOpCodes`.\n *\n * @param tView `TView` to which the `hostBindings` should be added.\n * @param tNode `TNode` the element which contains the directive\n * @param lView `LView` current `LView`\n * @param directiveIdx Directive index in view.\n * @param directiveVarsIdx Where will the directive's vars be stored\n * @param def `ComponentDef`/`DirectiveDef`, which contains the `hostVars`/`hostBindings` to add.\n */\nexport function registerHostBindingOpCodes(\n tView: TView, tNode: TNode, lView: LView, directiveIdx: number, directiveVarsIdx: number,\n def: ComponentDef<any>|DirectiveDef<any>): void {\n ngDevMode && assertFirstCreatePass(tView);\n\n const hostBindings = def.hostBindings;\n if (hostBindings) {\n let hostBindingOpCodes = tView.hostBindingOpCodes;\n if (hostBindingOpCodes === null) {\n hostBindingOpCodes = tView.hostBindingOpCodes = [] as any as HostBindingOpCodes;\n }\n const elementIndx = ~tNode.index;\n if (lastSelectedElementIdx(hostBindingOpCodes) != elementIndx) {\n // Conditionally add select element so that we are more efficient in execution.\n // NOTE: this is strictly not necessary and it trades code size for runtime perf.\n // (We could just always add it.)\n hostBindingOpCodes.push(elementIndx);\n }\n hostBindingOpCodes.push(directiveIdx, directiveVarsIdx, hostBindings);\n }\n}\n\n/**\n * Returns the last selected element index in the `HostBindingOpCodes`\n *\n * For perf reasons we don't need to update the selected element index in `HostBindingOpCodes` only\n * if it changes. This method returns the last index (or '0' if not found.)\n *\n * Selected element index are only the ones which are negative.\n */\nfunction lastSelectedElementIdx(hostBindingOpCodes: HostBindingOpCodes): number {\n let i = hostBindingOpCodes.length;\n while (i > 0) {\n const value = hostBindingOpCodes[--i];\n if (typeof value === 'number' && value < 0) {\n return value;\n }\n }\n return 0;\n}\n\n\n/**\n * Instantiate all the directives that were previously resolved on the current node.\n */\nfunction instantiateAllDirectives(\n tView: TView, lView: LView, tNode: TDirectiveHostNode, native: RNode) {\n const start = tNode.directiveStart;\n const end = tNode.directiveEnd;\n if (!tView.firstCreatePass) {\n getOrCreateNodeInjectorForNode(tNode, lView);\n }\n\n attachPatchData(native, lView);\n\n const initialInputs = tNode.initialInputs;\n for (let i = start; i < end; i++) {\n const def = tView.data[i] as DirectiveDef<any>;\n const isComponent = isComponentDef(def);\n\n if (isComponent) {\n ngDevMode && assertTNodeType(tNode, TNodeType.AnyRNode);\n addComponentLogic(lView, tNode as TElementNode, def as ComponentDef<any>);\n }\n\n const directive = getNodeInjectable(lView, tView, i, tNode);\n attachPatchData(directive, lView);\n\n if (initialInputs !== null) {\n setInputsFromAttrs(lView, i - start, directive, def, tNode, initialInputs!);\n }\n\n if (isComponent) {\n const componentView = getComponentLViewByIndex(tNode.index, lView);\n componentView[CONTEXT] = directive;\n }\n }\n}\n\nfunction invokeDirectivesHostBindings(tView: TView, lView: LView, tNode: TNode) {\n const start = tNode.directiveStart;\n const end = tNode.directiveEnd;\n const firstCreatePass = tView.firstCreatePass;\n const elementIndex = tNode.index;\n const currentDirectiveIndex = getCurrentDirectiveIndex();\n try {\n setSelectedIndex(elementIndex);\n for (let dirIndex = start; dirIndex < end; dirIndex++) {\n const def = tView.data[dirIndex] as DirectiveDef<unknown>;\n const directive = lView[dirIndex];\n setCurrentDirectiveIndex(dirIndex);\n if (def.hostBindings !== null || def.hostVars !== 0 || def.hostAttrs !== null) {\n invokeHostBindingsInCreationMode(def, directive);\n }\n }\n } finally {\n setSelectedIndex(-1);\n setCurrentDirectiveIndex(currentDirectiveIndex);\n }\n}\n\n/**\n * Invoke the host bindings in creation mode.\n *\n * @param def `DirectiveDef` which may contain the `hostBindings` function.\n * @param directive Instance of directive.\n */\nexport function invokeHostBindingsInCreationMode(def: DirectiveDef<any>, directive: any) {\n if (def.hostBindings !== null) {\n def.hostBindings!(RenderFlags.Create, directive);\n }\n}\n\n/**\n * Matches the current node against all available selectors.\n * If a component is matched (at most one), it is returned in first position in the array.\n */\nfunction findDirectiveDefMatches(\n tView: TView, viewData: LView,\n tNode: TElementNode|TContainerNode|TElementContainerNode): DirectiveDef<any>[]|null {\n ngDevMode && assertFirstCreatePass(tView);\n ngDevMode && assertTNodeType(tNode, TNodeType.AnyRNode | TNodeType.AnyContainer);\n\n const registry = tView.directiveRegistry;\n let matches: any[]|null = null;\n if (registry) {\n for (let i = 0; i < registry.length; i++) {\n const def = registry[i] as ComponentDef<any>| DirectiveDef<any>;\n if (isNodeMatchingSelectorList(tNode, def.selectors!, /* isProjectionMode */ false)) {\n matches || (matches = ngDevMode ? new MatchesArray() : []);\n diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, viewData), tView, def.type);\n\n if (isComponentDef(def)) {\n if (ngDevMode) {\n assertTNodeType(\n tNode, TNodeType.Element,\n `\"${tNode.value}\" tags cannot be used as component hosts. ` +\n `Please use a different tag to activate the ${stringify(def.type)} component.`);\n\n if (tNode.flags & TNodeFlags.isComponentHost) throwMultipleComponentError(tNode);\n }\n markAsComponentHost(tView, tNode);\n // The component is always stored first with directives after.\n matches.unshift(def);\n } else {\n matches.push(def);\n }\n }\n }\n }\n return matches;\n}\n\n/**\n * Marks a given TNode as a component's host. This consists of:\n * - setting appropriate TNode flags;\n * - storing index of component's host element so it will be queued for view refresh during CD.\n */\nexport function markAsComponentHost(tView: TView, hostTNode: TNode): void {\n ngDevMode && assertFirstCreatePass(tView);\n hostTNode.flags |= TNodeFlags.isComponentHost;\n (tView.components || (tView.components = ngDevMode ? new TViewComponents() : []))\n .push(hostTNode.index);\n}\n\n\n/** Caches local names and their matching directive indices for query and template lookups. */\nfunction cacheMatchingLocalNames(\n tNode: TNode, localRefs: string[]|null, exportsMap: {[key: string]: number}): void {\n if (localRefs) {\n const localNames: (string|number)[] = tNode.localNames = ngDevMode ? new TNodeLocalNames() : [];\n\n // Local names must be stored in tNode in the same order that localRefs are defined\n // in the template to ensure the data is loaded in the same slots as their refs\n // in the template (for template queries).\n for (let i = 0; i < localRefs.length; i += 2) {\n const index = exportsMap[localRefs[i + 1]];\n if (index == null)\n throw new RuntimeError(\n RuntimeErrorCode.EXPORT_NOT_FOUND, `Export of name '${localRefs[i + 1]}' not found!`);\n localNames.push(localRefs[i], index);\n }\n }\n}\n\n/**\n * Builds up an export map as directives are created, so local refs can be quickly mapped\n * to their directive instances.\n */\nfunction saveNameToExportMap(\n directiveIdx: number, def: DirectiveDef<any>|ComponentDef<any>,\n exportsMap: {[key: string]: number}|null) {\n if (exportsMap) {\n if (def.exportAs) {\n for (let i = 0; i < def.exportAs.length; i++) {\n exportsMap[def.exportAs[i]] = directiveIdx;\n }\n }\n if (isComponentDef(def)) exportsMap[''] = directiveIdx;\n }\n}\n\n/**\n * Initializes the flags on the current node, setting all indices to the initial index,\n * the directive count to 0, and adding the isComponent flag.\n * @param index the initial index\n */\nexport function initTNodeFlags(tNode: TNode, index: number, numberOfDirectives: number) {\n ngDevMode &&\n assertNotEqual(\n numberOfDirectives, tNode.directiveEnd - tNode.directiveStart,\n 'Reached the max number of directives');\n tNode.flags |= TNodeFlags.isDirectiveHost;\n // When the first directive is created on a node, save the index\n tNode.directiveStart = index;\n tNode.directiveEnd = index + numberOfDirectives;\n tNode.providerIndexes = index;\n}\n\n/**\n * Setup directive for instantiation.\n *\n * We need to create a `NodeInjectorFactory` which is then inserted in both the `Blueprint` as well\n * as `LView`. `TView` gets the `DirectiveDef`.\n *\n * @param tView `TView`\n * @param tNode `TNode`\n * @param lView `LView`\n * @param directiveIndex Index where the directive will be stored in the Expando.\n * @param def `DirectiveDef`\n */\nfunction configureViewWithDirective<T>(\n tView: TView, tNode: TNode, lView: LView, directiveIndex: number, def: DirectiveDef<T>): void {\n ngDevMode &&\n assertGreaterThanOrEqual(directiveIndex, HEADER_OFFSET, 'Must be in Expando section');\n tView.data[directiveIndex] = def;\n const directiveFactory =\n def.factory || ((def as {factory: Function}).factory = getFactoryDef(def.type, true));\n const nodeInjectorFactory = new NodeInjectorFactory(directiveFactory, isComponentDef(def), null);\n tView.blueprint[directiveIndex] = nodeInjectorFactory;\n lView[directiveIndex] = nodeInjectorFactory;\n\n registerHostBindingOpCodes(\n tView, tNode, lView, directiveIndex, allocExpando(tView, lView, def.hostVars, NO_CHANGE),\n def);\n}\n\nfunction addComponentLogic<T>(lView: LView, hostTNode: TElementNode, def: ComponentDef<T>): void {\n const native = getNativeByTNode(hostTNode, lView) as RElement;\n const tView = getOrCreateTComponentView(def);\n\n // Only component views should be added to the view tree directly. Embedded views are\n // accessed through their containers because they may be removed / re-added later.\n const rendererFactory = lView[RENDERER_FACTORY];\n const componentView = addToViewTree(\n lView,\n createLView(\n lView, tView, null, def.onPush ? LViewFlags.Dirty : LViewFlags.CheckAlways, native,\n hostTNode as TElementNode, rendererFactory, rendererFactory.createRenderer(native, def),\n null, null));\n\n // Component view will always be created before any injected LContainers,\n // so this is a regular element, wrap it with the component view\n lView[hostTNode.index] = componentView;\n}\n\nexport function elementAttributeInternal(\n tNode: TNode, lView: LView, name: string, value: any, sanitizer: SanitizerFn|null|undefined,\n namespace: string|null|undefined) {\n if (ngDevMode) {\n assertNotSame(value, NO_CHANGE as any, 'Incoming value should never be NO_CHANGE.');\n validateAgainstEventAttributes(name);\n assertTNodeType(\n tNode, TNodeType.Element,\n `Attempted to set attribute \\`${name}\\` on a container node. ` +\n `Host bindings are not valid on ng-container or ng-template.`);\n }\n const element = getNativeByTNode(tNode, lView) as RElement;\n setElementAttribute(lView[RENDERER], element, namespace, tNode.value, name, value, sanitizer);\n}\n\nexport function setElementAttribute(\n renderer: Renderer3, element: RElement, namespace: string|null|undefined, tagName: string|null,\n name: string, value: any, sanitizer: SanitizerFn|null|undefined) {\n if (value == null) {\n ngDevMode && ngDevMode.rendererRemoveAttribute++;\n isProceduralRenderer(renderer) ? renderer.removeAttribute(element, name, namespace) :\n element.removeAttribute(name);\n } else {\n ngDevMode && ngDevMode.rendererSetAttribute++;\n const strValue =\n sanitizer == null ? renderStringify(value) : sanitizer(value, tagName || '', name);\n\n\n if (isProceduralRenderer(renderer)) {\n renderer.setAttribute(element, name, strValue, namespace);\n } else {\n namespace ? element.setAttributeNS(namespace, name, strValue) :\n element.setAttribute(name, strValue);\n }\n }\n}\n\n/**\n * Sets initial input properties on directive instances from attribute data\n *\n * @param lView Current LView that is being processed.\n * @param directiveIndex Index of the directive in directives array\n * @param instance Instance of the directive on which to set the initial inputs\n * @param def The directive def that contains the list of inputs\n * @param tNode The static data for this node\n */\nfunction setInputsFromAttrs<T>(\n lView: LView, directiveIndex: number, instance: T, def: DirectiveDef<T>, tNode: TNode,\n initialInputData: InitialInputData): void {\n const initialInputs: InitialInputs|null = initialInputData![directiveIndex];\n if (initialInputs !== null) {\n const setInput = def.setInput;\n for (let i = 0; i < initialInputs.length;) {\n const publicName = initialInputs[i++];\n const privateName = initialInputs[i++];\n const value = initialInputs[i++];\n if (setInput !== null) {\n def.setInput!(instance, value, publicName, privateName);\n } else {\n (instance as any)[privateName] = value;\n }\n if (ngDevMode) {\n const nativeElement = getNativeByTNode(tNode, lView) as RElement;\n setNgReflectProperty(lView, nativeElement, tNode.type, privateName, value);\n }\n }\n }\n}\n\n/**\n * Generates initialInputData for a node and stores it in the template's static storage\n * so subsequent template invocations don't have to recalculate it.\n *\n * initialInputData is an array containing values that need to be set as input properties\n * for directives on this node, but only once on creation. We need this array to support\n * the case where you set an @Input property of a directive using attribute-like syntax.\n * e.g. if you have a `name` @Input, you can set it once like this:\n *\n * <my-component name=\"Bess\"></my-component>\n *\n * @param inputs The list of inputs from the directive def\n * @param attrs The static attrs on this node\n */\nfunction generateInitialInputs(inputs: {[key: string]: string}, attrs: TAttributes): InitialInputs|\n null {\n let inputsToStore: InitialInputs|null = null;\n let i = 0;\n while (i < attrs.length) {\n const attrName = attrs[i];\n if (attrName === AttributeMarker.NamespaceURI) {\n // We do not allow inputs on namespaced attributes.\n i += 4;\n continue;\n } else if (attrName === AttributeMarker.ProjectAs) {\n // Skip over the `ngProjectAs` value.\n i += 2;\n continue;\n }\n\n // If we hit any other attribute markers, we're done anyway. None of those are valid inputs.\n if (typeof attrName === 'number') break;\n\n if (inputs.hasOwnProperty(attrName as string)) {\n if (inputsToStore === null) inputsToStore = [];\n inputsToStore.push(attrName as string, inputs[attrName as string], attrs[i + 1] as string);\n }\n\n i += 2;\n }\n return inputsToStore;\n}\n\n//////////////////////////\n//// ViewContainer & View\n//////////////////////////\n\n// Not sure why I need to do `any` here but TS complains later.\nconst LContainerArray: any = ((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode()) &&\n createNamedArrayType('LContainer');\n\n/**\n * Creates a LContainer, either from a container instruction, or for a ViewContainerRef.\n *\n * @param hostNative The host element for the LContainer\n * @param hostTNode The host TNode for the LContainer\n * @param currentView The parent view of the LContainer\n * @param native The native comment element\n * @param isForViewContainerRef Optional a flag indicating the ViewContainerRef case\n * @returns LContainer\n */\nexport function createLContainer(\n hostNative: RElement|RComment|LView, currentView: LView, native: RComment,\n tNode: TNode): LContainer {\n ngDevMode && assertLView(currentView);\n ngDevMode && !isProceduralRenderer(currentView[RENDERER]) && assertDomNode(native);\n // https://jsperf.com/array-literal-vs-new-array-really\n const lContainer: LContainer = new (ngDevMode ? LContainerArray : Array)(\n hostNative, // host native\n true, // Boolean `true` in this position signifies that this is an `LContainer`\n false, // has transplanted views\n currentView, // parent\n null, // next\n 0, // transplanted views to refresh count\n tNode, // t_host\n native, // native,\n null, // view refs\n null, // moved views\n );\n ngDevMode &&\n assertEqual(\n lContainer.length, CONTAINER_HEADER_OFFSET,\n 'Should allocate correct number of slots for LContainer header.');\n ngDevMode && attachLContainerDebug(lContainer);\n return lContainer;\n}\n\n/**\n * Goes over embedded views (ones created through ViewContainerRef APIs) and refreshes\n * them by executing an associated template function.\n */\nfunction refreshEmbeddedViews(lView: LView) {\n for (let lContainer = getFirstLContainer(lView); lContainer !== null;\n lContainer = getNextLContainer(lContainer)) {\n for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n const embeddedLView = lContainer[i];\n const embeddedTView = embeddedLView[TVIEW];\n ngDevMode && assertDefined(embeddedTView, 'TView must be allocated');\n if (viewAttachedToChangeDetector(embeddedLView)) {\n refreshView(embeddedTView, embeddedLView, embeddedTView.template, embeddedLView[CONTEXT]!);\n }\n }\n }\n}\n\n/**\n * Mark transplanted views as needing to be refreshed at their insertion points.\n *\n * @param lView The `LView` that may have transplanted views.\n */\nfunction markTransplantedViewsForRefresh(lView: LView) {\n for (let lContainer = getFirstLContainer(lView); lContainer !== null;\n lContainer = getNextLContainer(lContainer)) {\n if (!lContainer[HAS_TRANSPLANTED_VIEWS]) continue;\n\n const movedViews = lContainer[MOVED_VIEWS]!;\n ngDevMode && assertDefined(movedViews, 'Transplanted View flags set but missing MOVED_VIEWS');\n for (let i = 0; i < movedViews.length; i++) {\n const movedLView = movedViews[i]!;\n const insertionLContainer = movedLView[PARENT] as LContainer;\n ngDevMode && assertLContainer(insertionLContainer);\n // We don't want to increment the counter if the moved LView was already marked for\n // refresh.\n if ((movedLView[FLAGS] & LViewFlags.RefreshTransplantedView) === 0) {\n updateTransplantedViewCount(insertionLContainer, 1);\n }\n // Note, it is possible that the `movedViews` is tracking views that are transplanted *and*\n // those that aren't (declaration component === insertion component). In the latter case,\n // it's fine to add the flag, as we will clear it immediately in\n // `refreshEmbeddedViews` for the view currently being refreshed.\n movedLView[FLAGS] |= LViewFlags.RefreshTransplantedView;\n }\n }\n}\n\n/////////////\n\n/**\n * Refreshes components by entering the component view and processing its bindings, queries, etc.\n *\n * @param componentHostIdx Element index in LView[] (adjusted for HEADER_OFFSET)\n */\nfunction refreshComponent(hostLView: LView, componentHostIdx: number): void {\n ngDevMode && assertEqual(isCreationMode(hostLView), false, 'Should be run in update mode');\n const componentView = getComponentLViewByIndex(componentHostIdx, hostLView);\n // Only attached components that are CheckAlways or OnPush and dirty should be refreshed\n if (viewAttachedToChangeDetector(componentView)) {\n const tView = componentView[TVIEW];\n if (componentView[FLAGS] & (LViewFlags.CheckAlways | LViewFlags.Dirty)) {\n refreshView(tView, componentView, tView.template, componentView[CONTEXT]);\n } else if (componentView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) {\n // Only attached components that are CheckAlways or OnPush and dirty should be refreshed\n refreshContainsDirtyView(componentView);\n }\n }\n}\n\n/**\n * Refreshes all transplanted views marked with `LViewFlags.RefreshTransplantedView` that are\n * children or descendants of the given lView.\n *\n * @param lView The lView which contains descendant transplanted views that need to be refreshed.\n */\nfunction refreshContainsDirtyView(lView: LView) {\n for (let lContainer = getFirstLContainer(lView); lContainer !== null;\n lContainer = getNextLContainer(lContainer)) {\n for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n const embeddedLView = lContainer[i];\n if (embeddedLView[FLAGS] & LViewFlags.RefreshTransplantedView) {\n const embeddedTView = embeddedLView[TVIEW];\n ngDevMode && assertDefined(embeddedTView, 'TView must be allocated');\n refreshView(embeddedTView, embeddedLView, embeddedTView.template, embeddedLView[CONTEXT]!);\n } else if (embeddedLView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) {\n refreshContainsDirtyView(embeddedLView);\n }\n }\n }\n\n const tView = lView[TVIEW];\n // Refresh child component views.\n const components = tView.components;\n if (components !== null) {\n for (let i = 0; i < components.length; i++) {\n const componentView = getComponentLViewByIndex(components[i], lView);\n // Only attached components that are CheckAlways or OnPush and dirty should be refreshed\n if (viewAttachedToChangeDetector(componentView) &&\n componentView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) {\n refreshContainsDirtyView(componentView);\n }\n }\n }\n}\n\nfunction renderComponent(hostLView: LView, componentHostIdx: number) {\n ngDevMode && assertEqual(isCreationMode(hostLView), true, 'Should be run in creation mode');\n const componentView = getComponentLViewByIndex(componentHostIdx, hostLView);\n const componentTView = componentView[TVIEW];\n syncViewWithBlueprint(componentTView, componentView);\n renderView(componentTView, componentView, componentView[CONTEXT]);\n}\n\n/**\n * Syncs an LView instance with its blueprint if they have gotten out of sync.\n *\n * Typically, blueprints and their view instances should always be in sync, so the loop here\n * will be skipped. However, consider this case of two components side-by-side:\n *\n * App template:\n * ```\n * <comp></comp>\n * <comp></comp>\n * ```\n *\n * The following will happen:\n * 1. App template begins processing.\n * 2. First <comp> is matched as a component and its LView is created.\n * 3. Second <comp> is matched as a component and its LView is created.\n * 4. App template completes processing, so it's time to check child templates.\n * 5. First <comp> template is checked. It has a directive, so its def is pushed to blueprint.\n * 6. Second <comp> template is checked. Its blueprint has been updated by the first\n * <comp> template, but its LView was created before this update, so it is out of sync.\n *\n * Note that embedded views inside ngFor loops will never be out of sync because these views\n * are processed as soon as they are created.\n *\n * @param tView The `TView` that contains the blueprint for syncing\n * @param lView The view to sync\n */\nfunction syncViewWithBlueprint(tView: TView, lView: LView) {\n for (let i = lView.length; i < tView.blueprint.length; i++) {\n lView.push(tView.blueprint[i]);\n }\n}\n\n/**\n * Adds LView or LContainer to the end of the current view tree.\n *\n * This structure will be used to traverse through nested views to remove listeners\n * and call onDestroy callbacks.\n *\n * @param lView The view where LView or LContainer should be added\n * @param adjustedHostIndex Index of the view's host node in LView[], adjusted for header\n * @param lViewOrLContainer The LView or LContainer to add to the view tree\n * @returns The state passed in\n */\nexport function addToViewTree<T extends LView|LContainer>(lView: LView, lViewOrLContainer: T): T {\n // TODO(benlesh/misko): This implementation is incorrect, because it always adds the LContainer\n // to the end of the queue, which means if the developer retrieves the LContainers from RNodes out\n // of order, the change detection will run out of order, as the act of retrieving the the\n // LContainer from the RNode is what adds it to the queue.\n if (lView[CHILD_HEAD]) {\n lView[CHILD_TAIL]![NEXT] = lViewOrLContainer;\n } else {\n lView[CHILD_HEAD] = lViewOrLContainer;\n }\n lView[CHILD_TAIL] = lViewOrLContainer;\n return lViewOrLContainer;\n}\n\n///////////////////////////////\n//// Change detection\n///////////////////////////////\n\n\n/**\n * Marks current view and all ancestors dirty.\n *\n * Returns the root view because it is found as a byproduct of marking the view tree\n * dirty, and can be used by methods that consume markViewDirty() to easily schedule\n * change detection. Otherwise, such methods would need to traverse up the view tree\n * an additional time to get the root view and schedule a tick on it.\n *\n * @param lView The starting LView to mark dirty\n * @returns the root LView\n */\nexport function markViewDirty(lView: LView): LView|null {\n while (lView) {\n lView[FLAGS] |= LViewFlags.Dirty;\n const parent = getLViewParent(lView);\n // Stop traversing up as soon as you find a root view that wasn't attached to any container\n if (isRootView(lView) && !parent) {\n return lView;\n }\n // continue otherwise\n lView = parent!;\n }\n return null;\n}\n\n\n/**\n * Used to schedule change detection on the whole application.\n *\n * Unlike `tick`, `scheduleTick` coalesces multiple calls into one change detection run.\n * It is usually called indirectly by calling `markDirty` when the view needs to be\n * re-rendered.\n *\n * Typically `scheduleTick` uses `requestAnimationFrame` to coalesce multiple\n * `scheduleTick` requests. The scheduling function can be overridden in\n * `renderComponent`'s `scheduler` option.\n */\nexport function scheduleTick(rootContext: RootContext, flags: RootContextFlags) {\n const nothingScheduled = rootContext.flags === RootContextFlags.Empty;\n if (nothingScheduled && rootContext.clean == _CLEAN_PROMISE) {\n // https://github.com/angular/angular/issues/39296\n // should only attach the flags when really scheduling a tick\n rootContext.flags |= flags;\n let res: null|((val: null) => void);\n rootContext.clean = new Promise<null>((r) => res = r);\n rootContext.scheduler(() => {\n if (rootContext.flags & RootContextFlags.DetectChanges) {\n rootContext.flags &= ~RootContextFlags.DetectChanges;\n tickRootContext(rootContext);\n }\n\n if (rootContext.flags & RootContextFlags.FlushPlayers) {\n rootContext.flags &= ~RootContextFlags.FlushPlayers;\n const playerHandler = rootContext.playerHandler;\n if (playerHandler) {\n playerHandler.flushPlayers();\n }\n }\n\n rootContext.clean = _CLEAN_PROMISE;\n res!(null);\n });\n }\n}\n\nexport function tickRootContext(rootContext: RootContext) {\n for (let i = 0; i < rootContext.components.length; i++) {\n const rootComponent = rootContext.components[i];\n const lView = readPatchedLView(rootComponent)!;\n const tView = lView[TVIEW];\n renderComponentOrTemplate(tView, lView, tView.template, rootComponent);\n }\n}\n\nexport function detectChangesInternal<T>(tView: TView, lView: LView, context: T) {\n const rendererFactory = lView[RENDERER_FACTORY];\n if (rendererFactory.begin) rendererFactory.begin();\n try {\n refreshView(tView, lView, tView.template, context);\n } catch (error) {\n handleError(lView, error);\n throw error;\n } finally {\n if (rendererFactory.end) rendererFactory.end();\n }\n}\n\n/**\n * Synchronously perform change detection on a root view and its components.\n *\n * @param lView The view which the change detection should be performed on.\n */\nexport function detectChangesInRootView(lView: LView): void {\n tickRootContext(lView[CONTEXT] as RootContext);\n}\n\nexport function checkNoChangesInternal<T>(tView: TView, view: LView, context: T) {\n setIsInCheckNoChangesMode(true);\n try {\n detectChangesInternal(tView, view, context);\n } finally {\n setIsInCheckNoChangesMode(false);\n }\n}\n\n/**\n * Checks the change detector on a root view and its components, and throws if any changes are\n * detected.\n *\n * This is used in development mode to verify that running change detection doesn't\n * introduce other changes.\n *\n * @param lView The view which the change detection should be checked on.\n */\nexport function checkNoChangesInRootView(lView: LView): void {\n setIsInCheckNoChangesMode(true);\n try {\n detectChangesInRootView(lView);\n } finally {\n setIsInCheckNoChangesMode(false);\n }\n}\n\nfunction executeViewQueryFn<T>(\n flags: RenderFlags, viewQueryFn: ViewQueriesFunction<{}>, component: T): void {\n ngDevMode && assertDefined(viewQueryFn, 'View queries function to execute must be defined.');\n setCurrentQueryIndex(0);\n viewQueryFn(flags, component);\n}\n\n\n///////////////////////////////\n//// Bindings & interpolations\n///////////////////////////////\n\n/**\n * Stores meta-data for a property binding to be used by TestBed's `DebugElement.properties`.\n *\n * In order to support TestBed's `DebugElement.properties` we need to save, for each binding:\n * - a bound property name;\n * - a static parts of interpolated strings;\n *\n * A given property metadata is saved at the binding's index in the `TView.data` (in other words, a\n * property binding metadata will be stored in `TView.data` at the same index as a bound value in\n * `LView`). Metadata are represented as `INTERPOLATION_DELIMITER`-delimited string with the\n * following format:\n * - `propertyName` for bound properties;\n * - `propertyName�prefix�interpolation_static_part1�..interpolation_static_partN�suffix` for\n * interpolated properties.\n *\n * @param tData `TData` where meta-data will be saved;\n * @param tNode `TNode` that is a target of the binding;\n * @param propertyName bound property name;\n * @param bindingIndex binding index in `LView`\n * @param interpolationParts static interpolation parts (for property interpolations)\n */\nexport function storePropertyBindingMetadata(\n tData: TData, tNode: TNode, propertyName: string, bindingIndex: number,\n ...interpolationParts: string[]) {\n // Binding meta-data are stored only the first time a given property instruction is processed.\n // Since we don't have a concept of the \"first update pass\" we need to check for presence of the\n // binding meta-data to decide if one should be stored (or if was stored already).\n if (tData[bindingIndex] === null) {\n if (tNode.inputs == null || !tNode.inputs[propertyName]) {\n const propBindingIdxs = tNode.propertyBindings || (tNode.propertyBindings = []);\n propBindingIdxs.push(bindingIndex);\n let bindingMetadata = propertyName;\n if (interpolationParts.length > 0) {\n bindingMetadata +=\n INTERPOLATION_DELIMITER + interpolationParts.join(INTERPOLATION_DELIMITER);\n }\n tData[bindingIndex] = bindingMetadata;\n }\n }\n}\n\nexport const CLEAN_PROMISE = _CLEAN_PROMISE;\n\nexport function getOrCreateLViewCleanup(view: LView): any[] {\n // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n return view[CLEANUP] || (view[CLEANUP] = ngDevMode ? new LCleanup() : []);\n}\n\nexport function getOrCreateTViewCleanup(tView: TView): any[] {\n return tView.cleanup || (tView.cleanup = ngDevMode ? new TCleanup() : []);\n}\n\n/**\n * There are cases where the sub component's renderer needs to be included\n * instead of the current renderer (see the componentSyntheticHost* instructions).\n */\nexport function loadComponentRenderer(\n currentDef: DirectiveDef<any>|null, tNode: TNode, lView: LView): Renderer3 {\n // TODO(FW-2043): the `currentDef` is null when host bindings are invoked while creating root\n // component (see packages/core/src/render3/component.ts). This is not consistent with the process\n // of creating inner components, when current directive index is available in the state. In order\n // to avoid relying on current def being `null` (thus special-casing root component creation), the\n // process of creating root component should be unified with the process of creating inner\n // components.\n if (currentDef === null || isComponentDef(currentDef)) {\n lView = unwrapLView(lView[tNode.index])!;\n }\n return lView[RENDERER];\n}\n\n/** Handles an error thrown in an LView. */\nexport function handleError(lView: LView, error: any): void {\n const injector = lView[INJECTOR];\n const errorHandler = injector ? injector.get(ErrorHandler, null) : null;\n errorHandler && errorHandler.handleError(error);\n}\n\n/**\n * Set the inputs of directives at the current node to corresponding value.\n *\n * @param tView The current TView\n * @param lView the `LView` which contains the directives.\n * @param inputs mapping between the public \"input\" name and privately-known,\n * possibly minified, property names to write to.\n * @param value Value to set.\n */\nexport function setInputsForProperty(\n tView: TView, lView: LView, inputs: PropertyAliasValue, publicName: string, value: any): void {\n for (let i = 0; i < inputs.length;) {\n const index = inputs[i++] as number;\n const privateName = inputs[i++] as string;\n const instance = lView[index];\n ngDevMode && assertIndexInRange(lView, index);\n const def = tView.data[index] as DirectiveDef<any>;\n if (def.setInput !== null) {\n def.setInput!(instance, value, publicName, privateName);\n } else {\n instance[privateName] = value;\n }\n }\n}\n\n/**\n * Updates a text binding at a given index in a given LView.\n */\nexport function textBindingInternal(lView: LView, index: number, value: string): void {\n ngDevMode && assertString(value, 'Value should be a string');\n ngDevMode && assertNotSame(value, NO_CHANGE as any, 'value should not be NO_CHANGE');\n ngDevMode && assertIndexInRange(lView, index);\n const element = getNativeByIndex(index, lView) as any as RText;\n ngDevMode && assertDefined(element, 'native element should exist');\n updateTextNode(lView[RENDERER], element, value);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {concatStringsWithSpace} from '../../util/stringify';\nimport {assertFirstCreatePass} from '../assert';\nimport {AttributeMarker, TAttributes, TNode} from '../interfaces/node';\nimport {getTView} from '../state';\n\n/**\n * Compute the static styling (class/style) from `TAttributes`.\n *\n * This function should be called during `firstCreatePass` only.\n *\n * @param tNode The `TNode` into which the styling information should be loaded.\n * @param attrs `TAttributes` containing the styling information.\n * @param writeToHost Where should the resulting static styles be written?\n * - `false` Write to `TNode.stylesWithoutHost` / `TNode.classesWithoutHost`\n * - `true` Write to `TNode.styles` / `TNode.classes`\n */\nexport function computeStaticStyling(\n tNode: TNode, attrs: TAttributes|null, writeToHost: boolean): void {\n ngDevMode &&\n assertFirstCreatePass(getTView(), 'Expecting to be called in first template pass only');\n let styles: string|null = writeToHost ? tNode.styles : null;\n let classes: string|null = writeToHost ? tNode.classes : null;\n let mode: AttributeMarker|0 = 0;\n if (attrs !== null) {\n for (let i = 0; i < attrs.length; i++) {\n const value = attrs[i];\n if (typeof value === 'number') {\n mode = value;\n } else if (mode == AttributeMarker.Classes) {\n classes = concatStringsWithSpace(classes, value as string);\n } else if (mode == AttributeMarker.Styles) {\n const style = value as string;\n const styleValue = attrs[++i] as string;\n styles = concatStringsWithSpace(styles, style + ': ' + styleValue + ';');\n }\n }\n }\n writeToHost ? tNode.styles = styles : tNode.stylesWithoutHost = styles;\n writeToHost ? tNode.classes = classes : tNode.classesWithoutHost = classes;\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 {assertDefined} from '../../util/assert';\nimport {getComponentViewByInstance} from '../context_discovery';\nimport {CONTEXT, RootContext, RootContextFlags, TVIEW} from '../interfaces/view';\nimport {getRootView} from '../util/view_traversal_utils';\nimport {detectChangesInternal, markViewDirty, scheduleTick, tickRootContext} from './shared';\n\n/**\n * Synchronously perform change detection on a component (and possibly its sub-components).\n *\n * This function triggers change detection in a synchronous way on a component.\n *\n * @param component The component which the change detection should be performed on.\n */\nexport function detectChanges(component: {}): void {\n const view = getComponentViewByInstance(component);\n detectChangesInternal(view[TVIEW], view, component);\n}\n\n/**\n * Marks the component as dirty (needing change detection). Marking a component dirty will\n * schedule a change detection on it at some point in the future.\n *\n * Marking an already dirty component as dirty won't do anything. Only one outstanding change\n * detection can be scheduled per component tree.\n *\n * @param component Component to mark as dirty.\n */\nexport function markDirty(component: {}): void {\n ngDevMode && assertDefined(component, 'component');\n const rootView = markViewDirty(getComponentViewByInstance(component))!;\n\n ngDevMode && assertDefined(rootView[CONTEXT], 'rootContext should be defined');\n scheduleTick(rootView[CONTEXT] as RootContext, RootContextFlags.DetectChanges);\n}\n\n/**\n * Used to perform change detection on the whole application.\n *\n * This is equivalent to `detectChanges`, but invoked on root component. Additionally, `tick`\n * executes lifecycle hooks and conditionally checks components based on their\n * `ChangeDetectionStrategy` and dirtiness.\n *\n * The preferred way to trigger change detection is to call `markDirty`. `markDirty` internally\n * schedules `tick` using a scheduler in order to coalesce multiple `markDirty` calls into a\n * single change detection run. By default, the scheduler is `requestAnimationFrame`, but can\n * be changed when calling `renderComponent` and providing the `scheduler` option.\n */\nexport function tick<T>(component: T): void {\n const rootView = getRootView(component);\n const rootContext = rootView[CONTEXT] as RootContext;\n tickRootContext(rootContext);\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 {InjectionToken} from './injection_token';\nimport {Injector} from './injector';\nimport {InjectorMarkers} from './injector_marker';\n\n\n\n/**\n * An InjectionToken that gets the current `Injector` for `createInjector()`-style injectors.\n *\n * Requesting this token instead of `Injector` allows `StaticInjector` to be tree-shaken from a\n * project.\n *\n * @publicApi\n */\nexport const INJECTOR = new InjectionToken<Injector>(\n 'INJECTOR',\n // Dissable tslint because this is const enum which gets inlined not top level prop access.\n // tslint:disable-next-line: no-toplevel-property-access\n InjectorMarkers.Injector as any, // Special value used by Ivy to identify `Injector`.\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 {stringify} from '../util/stringify';\nimport {Injector} from './injector';\nimport {THROW_IF_NOT_FOUND} from './injector_compatibility';\n\nexport class NullInjector implements Injector {\n get(token: any, notFoundValue: any = THROW_IF_NOT_FOUND): any {\n if (notFoundValue === THROW_IF_NOT_FOUND) {\n const error = new Error(`NullInjectorError: No provider for ${stringify(token)}!`);\n error.name = 'NullInjectorError';\n throw error;\n }\n return notFoundValue;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectionToken} from './injection_token';\n\n\n/**\n * An internal token whose presence in an injector indicates that the injector should treat itself\n * as a root scoped injector when processing requests for unknown tokens which may indicate\n * they are provided in the root scope.\n */\nexport const INJECTOR_SCOPE = new InjectionToken<'root'|'platform'|null>('Set Injector scope.');\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 '../util/ng_dev_mode';\n\nimport {OnDestroy} from '../interface/lifecycle_hooks';\nimport {Type} from '../interface/type';\nimport {FactoryFn, getFactoryDef} from '../render3/definition_factory';\nimport {throwCyclicDependencyError, throwInvalidProviderError, throwMixedMultiProviderError} from '../render3/errors_di';\nimport {deepForEach, newArray} from '../util/array_utils';\nimport {EMPTY_ARRAY} from '../util/empty';\nimport {stringify} from '../util/stringify';\n\nimport {resolveForwardRef} from './forward_ref';\nimport {setInjectImplementation} from './inject_switch';\nimport {InjectionToken} from './injection_token';\nimport {Injector} from './injector';\nimport {catchInjectorError, injectArgs, NG_TEMP_TOKEN_PATH, setCurrentInjector, THROW_IF_NOT_FOUND, USE_VALUE, ɵɵinject} from './injector_compatibility';\nimport {INJECTOR} from './injector_token';\nimport {getInheritedInjectableDef, getInjectableDef, getInjectorDef, InjectorType, InjectorTypeWithProviders, ɵɵInjectableDeclaration} from './interface/defs';\nimport {InjectFlags} from './interface/injector';\nimport {ClassProvider, ConstructorProvider, ExistingProvider, FactoryProvider, StaticClassProvider, StaticProvider, TypeProvider, ValueProvider} from './interface/provider';\nimport {NullInjector} from './null_injector';\nimport {ProviderToken} from './provider_token';\nimport {INJECTOR_SCOPE} from './scope';\n\n\n\n/**\n * Internal type for a single provider in a deep provider array.\n */\ntype SingleProvider = TypeProvider|ValueProvider|ClassProvider|ConstructorProvider|ExistingProvider|\n FactoryProvider|StaticClassProvider;\n\n/**\n * Marker which indicates that a value has not yet been created from the factory function.\n */\nconst NOT_YET = {};\n\n/**\n * Marker which indicates that the factory function for a token is in the process of being called.\n *\n * If the injector is asked to inject a token with its value set to CIRCULAR, that indicates\n * injection of a dependency has recursively attempted to inject the original token, and there is\n * a circular dependency among the providers.\n */\nconst CIRCULAR = {};\n\n/**\n * A lazily initialized NullInjector.\n */\nlet NULL_INJECTOR: Injector|undefined = undefined;\n\nfunction getNullInjector(): Injector {\n if (NULL_INJECTOR === undefined) {\n NULL_INJECTOR = new NullInjector();\n }\n return NULL_INJECTOR;\n}\n\n/**\n * An entry in the injector which tracks information about the given token, including a possible\n * current value.\n */\ninterface Record<T> {\n factory: (() => T)|undefined;\n value: T|{};\n multi: any[]|undefined;\n}\n\n/**\n * Create a new `Injector` which is configured using a `defType` of `InjectorType<any>`s.\n *\n * @publicApi\n */\nexport function createInjector(\n defType: /* InjectorType<any> */ any, parent: Injector|null = null,\n additionalProviders: StaticProvider[]|null = null, name?: string): Injector {\n const injector =\n createInjectorWithoutInjectorInstances(defType, parent, additionalProviders, name);\n injector._resolveInjectorDefTypes();\n return injector;\n}\n\n/**\n * Creates a new injector without eagerly resolving its injector types. Can be used in places\n * where resolving the injector types immediately can lead to an infinite loop. The injector types\n * should be resolved at a later point by calling `_resolveInjectorDefTypes`.\n */\nexport function createInjectorWithoutInjectorInstances(\n defType: /* InjectorType<any> */ any, parent: Injector|null = null,\n additionalProviders: StaticProvider[]|null = null, name?: string): R3Injector {\n return new R3Injector(defType, additionalProviders, parent || getNullInjector(), name);\n}\n\nexport class R3Injector {\n /**\n * Map of tokens to records which contain the instances of those tokens.\n * - `null` value implies that we don't have the record. Used by tree-shakable injectors\n * to prevent further searches.\n */\n private records = new Map<ProviderToken<any>, Record<any>|null>();\n\n /**\n * The transitive set of `InjectorType`s which define this injector.\n */\n private injectorDefTypes = new Set<InjectorType<any>>();\n\n /**\n * Set of values instantiated by this injector which contain `ngOnDestroy` lifecycle hooks.\n */\n private onDestroy = new Set<OnDestroy>();\n\n /**\n * Flag indicating this injector provides the APP_ROOT_SCOPE token, and thus counts as the\n * root scope.\n */\n private readonly scope: 'root'|'platform'|null;\n\n readonly source: string|null;\n\n /**\n * Flag indicating that this injector was previously destroyed.\n */\n get destroyed(): boolean {\n return this._destroyed;\n }\n private _destroyed = false;\n\n constructor(\n def: InjectorType<any>, additionalProviders: StaticProvider[]|null, readonly parent: Injector,\n source: string|null = null) {\n const dedupStack: InjectorType<any>[] = [];\n\n // Start off by creating Records for every provider declared in every InjectorType\n // included transitively in additional providers then do the same for `def`. This order is\n // important because `def` may include providers that override ones in additionalProviders.\n additionalProviders &&\n deepForEach(\n additionalProviders,\n provider => this.processProvider(provider, def, additionalProviders));\n\n deepForEach([def], injectorDef => this.processInjectorType(injectorDef, [], dedupStack));\n\n // Make sure the INJECTOR token provides this injector.\n this.records.set(INJECTOR, makeRecord(undefined, this));\n\n // Detect whether this injector has the APP_ROOT_SCOPE token and thus should provide\n // any injectable scoped to APP_ROOT_SCOPE.\n const record = this.records.get(INJECTOR_SCOPE);\n this.scope = record != null ? record.value : null;\n\n // Source name, used for debugging\n this.source = source || (typeof def === 'object' ? null : stringify(def));\n }\n\n /**\n * Destroy the injector and release references to every instance or provider associated with it.\n *\n * Also calls the `OnDestroy` lifecycle hooks of every instance that was created for which a\n * hook was found.\n */\n destroy(): void {\n this.assertNotDestroyed();\n\n // Set destroyed = true first, in case lifecycle hooks re-enter destroy().\n this._destroyed = true;\n try {\n // Call all the lifecycle hooks.\n this.onDestroy.forEach(service => service.ngOnDestroy());\n } finally {\n // Release all references.\n this.records.clear();\n this.onDestroy.clear();\n this.injectorDefTypes.clear();\n }\n }\n\n get<T>(\n token: ProviderToken<T>, notFoundValue: any = THROW_IF_NOT_FOUND,\n flags = InjectFlags.Default): T {\n this.assertNotDestroyed();\n // Set the injection context.\n const previousInjector = setCurrentInjector(this);\n const previousInjectImplementation = setInjectImplementation(undefined);\n try {\n // Check for the SkipSelf flag.\n if (!(flags & InjectFlags.SkipSelf)) {\n // SkipSelf isn't set, check if the record belongs to this injector.\n let record: Record<T>|undefined|null = this.records.get(token);\n if (record === undefined) {\n // No record, but maybe the token is scoped to this injector. Look for an injectable\n // def with a scope matching this injector.\n const def = couldBeInjectableType(token) && getInjectableDef(token);\n if (def && this.injectableDefInScope(def)) {\n // Found an injectable def and it's scoped to this injector. Pretend as if it was here\n // all along.\n record = makeRecord(injectableDefOrInjectorDefFactory(token), NOT_YET);\n } else {\n record = null;\n }\n this.records.set(token, record);\n }\n // If a record was found, get the instance for it and return it.\n if (record != null /* NOT null || undefined */) {\n return this.hydrate(token, record);\n }\n }\n\n // Select the next injector based on the Self flag - if self is set, the next injector is\n // the NullInjector, otherwise it's the parent.\n const nextInjector = !(flags & InjectFlags.Self) ? this.parent : getNullInjector();\n // Set the notFoundValue based on the Optional flag - if optional is set and notFoundValue\n // is undefined, the value is null, otherwise it's the notFoundValue.\n notFoundValue = (flags & InjectFlags.Optional) && notFoundValue === THROW_IF_NOT_FOUND ?\n null :\n notFoundValue;\n return nextInjector.get(token, notFoundValue);\n } catch (e) {\n if (e.name === 'NullInjectorError') {\n const path: any[] = e[NG_TEMP_TOKEN_PATH] = e[NG_TEMP_TOKEN_PATH] || [];\n path.unshift(stringify(token));\n if (previousInjector) {\n // We still have a parent injector, keep throwing\n throw e;\n } else {\n // Format & throw the final error message when we don't have any previous injector\n return catchInjectorError(e, token, 'R3InjectorError', this.source);\n }\n } else {\n throw e;\n }\n } finally {\n // Lastly, restore the previous injection context.\n setInjectImplementation(previousInjectImplementation);\n setCurrentInjector(previousInjector);\n }\n }\n\n /** @internal */\n _resolveInjectorDefTypes() {\n this.injectorDefTypes.forEach(defType => this.get(defType));\n }\n\n toString() {\n const tokens = <string[]>[], records = this.records;\n records.forEach((v, token) => tokens.push(stringify(token)));\n return `R3Injector[${tokens.join(', ')}]`;\n }\n\n private assertNotDestroyed(): void {\n if (this._destroyed) {\n throw new Error('Injector has already been destroyed.');\n }\n }\n\n /**\n * Add an `InjectorType` or `InjectorTypeWithProviders` and all of its transitive providers\n * to this injector.\n *\n * If an `InjectorTypeWithProviders` that declares providers besides the type is specified,\n * the function will return \"true\" to indicate that the providers of the type definition need\n * to be processed. This allows us to process providers of injector types after all imports of\n * an injector definition are processed. (following View Engine semantics: see FW-1349)\n */\n private processInjectorType(\n defOrWrappedDef: InjectorType<any>|InjectorTypeWithProviders<any>,\n parents: InjectorType<any>[],\n dedupStack: InjectorType<any>[]): defOrWrappedDef is InjectorTypeWithProviders<any> {\n defOrWrappedDef = resolveForwardRef(defOrWrappedDef);\n if (!defOrWrappedDef) return false;\n\n // Either the defOrWrappedDef is an InjectorType (with injector def) or an\n // InjectorDefTypeWithProviders (aka ModuleWithProviders). Detecting either is a megamorphic\n // read, so care is taken to only do the read once.\n\n // First attempt to read the injector def (`ɵinj`).\n let def = getInjectorDef(defOrWrappedDef);\n\n // If that's not present, then attempt to read ngModule from the InjectorDefTypeWithProviders.\n const ngModule =\n (def == null) && (defOrWrappedDef as InjectorTypeWithProviders<any>).ngModule || undefined;\n\n // Determine the InjectorType. In the case where `defOrWrappedDef` is an `InjectorType`,\n // then this is easy. In the case of an InjectorDefTypeWithProviders, then the definition type\n // is the `ngModule`.\n const defType: InjectorType<any> =\n (ngModule === undefined) ? (defOrWrappedDef as InjectorType<any>) : ngModule;\n\n // Check for circular dependencies.\n if (ngDevMode && parents.indexOf(defType) !== -1) {\n const defName = stringify(defType);\n const path = parents.map(stringify);\n throwCyclicDependencyError(defName, path);\n }\n\n // Check for multiple imports of the same module\n const isDuplicate = dedupStack.indexOf(defType) !== -1;\n\n // Finally, if defOrWrappedType was an `InjectorDefTypeWithProviders`, then the actual\n // `InjectorDef` is on its `ngModule`.\n if (ngModule !== undefined) {\n def = getInjectorDef(ngModule);\n }\n\n // If no definition was found, it might be from exports. Remove it.\n if (def == null) {\n return false;\n }\n\n // Add providers in the same way that @NgModule resolution did:\n\n // First, include providers from any imports.\n if (def.imports != null && !isDuplicate) {\n // Before processing defType's imports, add it to the set of parents. This way, if it ends\n // up deeply importing itself, this can be detected.\n ngDevMode && parents.push(defType);\n // Add it to the set of dedups. This way we can detect multiple imports of the same module\n dedupStack.push(defType);\n\n let importTypesWithProviders: (InjectorTypeWithProviders<any>[])|undefined;\n try {\n deepForEach(def.imports, imported => {\n if (this.processInjectorType(imported, parents, dedupStack)) {\n if (importTypesWithProviders === undefined) importTypesWithProviders = [];\n // If the processed import is an injector type with providers, we store it in the\n // list of import types with providers, so that we can process those afterwards.\n importTypesWithProviders.push(imported);\n }\n });\n } finally {\n // Remove it from the parents set when finished.\n ngDevMode && parents.pop();\n }\n\n // Imports which are declared with providers (TypeWithProviders) need to be processed\n // after all imported modules are processed. This is similar to how View Engine\n // processes/merges module imports in the metadata resolver. See: FW-1349.\n if (importTypesWithProviders !== undefined) {\n for (let i = 0; i < importTypesWithProviders.length; i++) {\n const {ngModule, providers} = importTypesWithProviders[i];\n deepForEach(\n providers!,\n provider => this.processProvider(provider, ngModule, providers || EMPTY_ARRAY));\n }\n }\n }\n // Track the InjectorType and add a provider for it. It's important that this is done after the\n // def's imports.\n this.injectorDefTypes.add(defType);\n const factory = getFactoryDef(defType) || (() => new defType());\n this.records.set(defType, makeRecord(factory, NOT_YET));\n\n // Next, include providers listed on the definition itself.\n const defProviders = def.providers;\n if (defProviders != null && !isDuplicate) {\n const injectorType = defOrWrappedDef as InjectorType<any>;\n deepForEach(\n defProviders, provider => this.processProvider(provider, injectorType, defProviders));\n }\n\n return (\n ngModule !== undefined &&\n (defOrWrappedDef as InjectorTypeWithProviders<any>).providers !== undefined);\n }\n\n /**\n * Process a `SingleProvider` and add it.\n */\n private processProvider(\n provider: SingleProvider, ngModuleType: InjectorType<any>, providers: any[]): void {\n // Determine the token from the provider. Either it's its own token, or has a {provide: ...}\n // property.\n provider = resolveForwardRef(provider);\n let token: any =\n isTypeProvider(provider) ? provider : resolveForwardRef(provider && provider.provide);\n\n // Construct a `Record` for the provider.\n const record = providerToRecord(provider, ngModuleType, providers);\n\n if (!isTypeProvider(provider) && provider.multi === true) {\n // If the provider indicates that it's a multi-provider, process it specially.\n // First check whether it's been defined already.\n let multiRecord = this.records.get(token);\n if (multiRecord) {\n // It has. Throw a nice error if\n if (ngDevMode && multiRecord.multi === undefined) {\n throwMixedMultiProviderError();\n }\n } else {\n multiRecord = makeRecord(undefined, NOT_YET, true);\n multiRecord.factory = () => injectArgs(multiRecord!.multi!);\n this.records.set(token, multiRecord);\n }\n token = provider;\n multiRecord.multi!.push(provider);\n } else {\n const existing = this.records.get(token);\n if (ngDevMode && existing && existing.multi !== undefined) {\n throwMixedMultiProviderError();\n }\n }\n this.records.set(token, record);\n }\n\n private hydrate<T>(token: ProviderToken<T>, record: Record<T>): T {\n if (ngDevMode && record.value === CIRCULAR) {\n throwCyclicDependencyError(stringify(token));\n } else if (record.value === NOT_YET) {\n record.value = CIRCULAR;\n record.value = record.factory!();\n }\n if (typeof record.value === 'object' && record.value && hasOnDestroy(record.value)) {\n this.onDestroy.add(record.value);\n }\n return record.value as T;\n }\n\n private injectableDefInScope(def: ɵɵInjectableDeclaration<any>): boolean {\n if (!def.providedIn) {\n return false;\n }\n const providedIn = resolveForwardRef(def.providedIn);\n if (typeof providedIn === 'string') {\n return providedIn === 'any' || (providedIn === this.scope);\n } else {\n return this.injectorDefTypes.has(providedIn);\n }\n }\n}\n\nfunction injectableDefOrInjectorDefFactory(token: ProviderToken<any>): FactoryFn<any> {\n // Most tokens will have an injectable def directly on them, which specifies a factory directly.\n const injectableDef = getInjectableDef(token);\n const factory = injectableDef !== null ? injectableDef.factory : getFactoryDef(token);\n\n if (factory !== null) {\n return factory;\n }\n\n // InjectionTokens should have an injectable def (ɵprov) and thus should be handled above.\n // If it's missing that, it's an error.\n if (token instanceof InjectionToken) {\n throw new Error(`Token ${stringify(token)} is missing a ɵprov definition.`);\n }\n\n // Undecorated types can sometimes be created if they have no constructor arguments.\n if (token instanceof Function) {\n return getUndecoratedInjectableFactory(token);\n }\n\n // There was no way to resolve a factory for this token.\n throw new Error('unreachable');\n}\n\nfunction getUndecoratedInjectableFactory(token: Function) {\n // If the token has parameters then it has dependencies that we cannot resolve implicitly.\n const paramLength = token.length;\n if (paramLength > 0) {\n const args: string[] = newArray(paramLength, '?');\n throw new Error(`Can't resolve all parameters for ${stringify(token)}: (${args.join(', ')}).`);\n }\n\n // The constructor function appears to have no parameters.\n // This might be because it inherits from a super-class. In which case, use an injectable\n // def from an ancestor if there is one.\n // Otherwise this really is a simple class with no dependencies, so return a factory that\n // just instantiates the zero-arg constructor.\n const inheritedInjectableDef = getInheritedInjectableDef(token);\n if (inheritedInjectableDef !== null) {\n return () => inheritedInjectableDef.factory(token as Type<any>);\n } else {\n return () => new (token as Type<any>)();\n }\n}\n\nfunction providerToRecord(\n provider: SingleProvider, ngModuleType: InjectorType<any>, providers: any[]): Record<any> {\n if (isValueProvider(provider)) {\n return makeRecord(undefined, provider.useValue);\n } else {\n const factory: (() => any)|undefined = providerToFactory(provider, ngModuleType, providers);\n return makeRecord(factory, NOT_YET);\n }\n}\n\n/**\n * Converts a `SingleProvider` into a factory function.\n *\n * @param provider provider to convert to factory\n */\nexport function providerToFactory(\n provider: SingleProvider, ngModuleType?: InjectorType<any>, providers?: any[]): () => any {\n let factory: (() => any)|undefined = undefined;\n if (isTypeProvider(provider)) {\n const unwrappedProvider = resolveForwardRef(provider);\n return getFactoryDef(unwrappedProvider) || injectableDefOrInjectorDefFactory(unwrappedProvider);\n } else {\n if (isValueProvider(provider)) {\n factory = () => resolveForwardRef(provider.useValue);\n } else if (isFactoryProvider(provider)) {\n factory = () => provider.useFactory(...injectArgs(provider.deps || []));\n } else if (isExistingProvider(provider)) {\n factory = () => ɵɵinject(resolveForwardRef(provider.useExisting));\n } else {\n const classRef = resolveForwardRef(\n provider &&\n ((provider as StaticClassProvider | ClassProvider).useClass || provider.provide));\n if (ngDevMode && !classRef) {\n throwInvalidProviderError(ngModuleType, providers, provider);\n }\n if (hasDeps(provider)) {\n factory = () => new (classRef)(...injectArgs(provider.deps));\n } else {\n return getFactoryDef(classRef) || injectableDefOrInjectorDefFactory(classRef);\n }\n }\n }\n return factory;\n}\n\nfunction makeRecord<T>(\n factory: (() => T)|undefined, value: T|{}, multi: boolean = false): Record<T> {\n return {\n factory: factory,\n value: value,\n multi: multi ? [] : undefined,\n };\n}\n\nfunction isValueProvider(value: SingleProvider): value is ValueProvider {\n return value !== null && typeof value == 'object' && USE_VALUE in value;\n}\n\nfunction isExistingProvider(value: SingleProvider): value is ExistingProvider {\n return !!(value && (value as ExistingProvider).useExisting);\n}\n\nfunction isFactoryProvider(value: SingleProvider): value is FactoryProvider {\n return !!(value && (value as FactoryProvider).useFactory);\n}\n\nexport function isTypeProvider(value: SingleProvider): value is TypeProvider {\n return typeof value === 'function';\n}\n\nexport function isClassProvider(value: SingleProvider): value is ClassProvider {\n return !!(value as StaticClassProvider | ClassProvider).useClass;\n}\n\nfunction hasDeps(value: ClassProvider|ConstructorProvider|\n StaticClassProvider): value is ClassProvider&{deps: any[]} {\n return !!(value as any).deps;\n}\n\nfunction hasOnDestroy(value: any): value is OnDestroy {\n return value !== null && typeof value === 'object' &&\n typeof (value as OnDestroy).ngOnDestroy === 'function';\n}\n\nfunction couldBeInjectableType(value: any): value is ProviderToken<any> {\n return (typeof value === 'function') ||\n (typeof value === 'object' && value instanceof InjectionToken);\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 {stringify} from '../util/stringify';\n\nimport {resolveForwardRef} from './forward_ref';\nimport {catchInjectorError, formatError, NG_TEMP_TOKEN_PATH, setCurrentInjector, THROW_IF_NOT_FOUND, USE_VALUE, ɵɵinject} from './injector_compatibility';\nimport {InjectorMarkers} from './injector_marker';\nimport {INJECTOR} from './injector_token';\nimport {getInjectableDef, ɵɵdefineInjectable} from './interface/defs';\nimport {InjectFlags} from './interface/injector';\nimport {ConstructorProvider, ExistingProvider, FactoryProvider, StaticClassProvider, StaticProvider, ValueProvider} from './interface/provider';\nimport {Inject, Optional, Self, SkipSelf} from './metadata';\nimport {NullInjector} from './null_injector';\nimport {ProviderToken} from './provider_token';\nimport {createInjector} from './r3_injector';\nimport {INJECTOR_SCOPE} from './scope';\n\nexport function INJECTOR_IMPL__PRE_R3__(\n providers: StaticProvider[], parent: Injector|undefined, name: string) {\n return new StaticInjector(providers, parent, name);\n}\n\nexport function INJECTOR_IMPL__POST_R3__(\n providers: StaticProvider[], parent: Injector|undefined, name: string) {\n return createInjector({name: name}, parent, providers, name);\n}\n\nexport const INJECTOR_IMPL = INJECTOR_IMPL__PRE_R3__;\n\n/**\n * Concrete injectors implement this interface. Injectors are configured\n * with [providers](guide/glossary#provider) that associate\n * dependencies of various types with [injection tokens](guide/glossary#di-token).\n *\n * @see [\"DI Providers\"](guide/dependency-injection-providers).\n * @see `StaticProvider`\n *\n * @usageNotes\n *\n * The following example creates a service injector instance.\n *\n * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}\n *\n * ### Usage example\n *\n * {@example core/di/ts/injector_spec.ts region='Injector'}\n *\n * `Injector` returns itself when given `Injector` as a token:\n *\n * {@example core/di/ts/injector_spec.ts region='injectInjector'}\n *\n * @publicApi\n */\nexport abstract class Injector {\n static THROW_IF_NOT_FOUND = THROW_IF_NOT_FOUND;\n static NULL: Injector = (/* @__PURE__ */ new NullInjector());\n\n /**\n * Retrieves an instance from the injector based on the provided token.\n * @returns The instance from the injector if defined, otherwise the `notFoundValue`.\n * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.\n */\n abstract get<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): T;\n /**\n * @deprecated from v4.0.0 use ProviderToken<T>\n * @suppress {duplicate}\n */\n abstract get(token: any, notFoundValue?: any): any;\n\n /**\n * @deprecated from v5 use the new signature Injector.create(options)\n */\n static create(providers: StaticProvider[], parent?: Injector): Injector;\n\n /**\n * Creates a new injector instance that provides one or more dependencies,\n * according to a given type or types of `StaticProvider`.\n *\n * @param options An object with the following properties:\n * * `providers`: An array of providers of the [StaticProvider type](api/core/StaticProvider).\n * * `parent`: (optional) A parent injector.\n * * `name`: (optional) A developer-defined identifying name for the new injector.\n *\n * @returns The new injector instance.\n *\n */\n static create(options: {providers: StaticProvider[], parent?: Injector, name?: string}): Injector;\n\n\n static create(\n options: StaticProvider[]|{providers: StaticProvider[], parent?: Injector, name?: string},\n parent?: Injector): Injector {\n if (Array.isArray(options)) {\n return INJECTOR_IMPL(options, parent, '');\n } else {\n return INJECTOR_IMPL(options.providers, options.parent, options.name || '');\n }\n }\n\n /** @nocollapse */\n static ɵprov = /** @pureOrBreakMyCode */ ɵɵdefineInjectable({\n token: Injector,\n providedIn: 'any',\n factory: () => ɵɵinject(INJECTOR),\n });\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__ = InjectorMarkers.Injector;\n}\n\n\n\nconst IDENT = function<T>(value: T): T {\n return value;\n};\nconst EMPTY = <any[]>[];\nconst CIRCULAR = IDENT;\nconst MULTI_PROVIDER_FN = function(): any[] {\n return Array.prototype.slice.call(arguments);\n};\n\nconst enum OptionFlags {\n Optional = 1 << 0,\n CheckSelf = 1 << 1,\n CheckParent = 1 << 2,\n Default = CheckSelf | CheckParent\n}\nconst NO_NEW_LINE = 'ɵ';\n\nexport class StaticInjector implements Injector {\n readonly parent: Injector;\n readonly source: string|null;\n readonly scope: string|null;\n\n private _records: Map<any, Record|null>;\n\n constructor(\n providers: StaticProvider[], parent: Injector = Injector.NULL, source: string|null = null) {\n this.parent = parent;\n this.source = source;\n const records = this._records = new Map<any, Record>();\n records.set(\n Injector, <Record>{token: Injector, fn: IDENT, deps: EMPTY, value: this, useNew: false});\n records.set(\n INJECTOR, <Record>{token: INJECTOR, fn: IDENT, deps: EMPTY, value: this, useNew: false});\n this.scope = recursivelyProcessProviders(records, providers);\n }\n\n get<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): T;\n get(token: any, notFoundValue?: any): any;\n get(token: any, notFoundValue?: any, flags: InjectFlags = InjectFlags.Default): any {\n const records = this._records;\n let record = records.get(token);\n if (record === undefined) {\n // This means we have never seen this record, see if it is tree shakable provider.\n const injectableDef = getInjectableDef(token);\n if (injectableDef) {\n const providedIn = injectableDef && resolveForwardRef(injectableDef.providedIn);\n if (providedIn === 'any' || providedIn != null && providedIn === this.scope) {\n records.set(\n token,\n record = resolveProvider(\n {provide: token, useFactory: injectableDef.factory, deps: EMPTY}));\n }\n }\n if (record === undefined) {\n // Set record to null to make sure that we don't go through expensive lookup above again.\n records.set(token, null);\n }\n }\n let lastInjector = setCurrentInjector(this);\n try {\n return tryResolveToken(token, record, records, this.parent, notFoundValue, flags);\n } catch (e) {\n return catchInjectorError(e, token, 'StaticInjectorError', this.source);\n } finally {\n setCurrentInjector(lastInjector);\n }\n }\n\n toString() {\n const tokens = <string[]>[], records = this._records;\n records.forEach((v, token) => tokens.push(stringify(token)));\n return `StaticInjector[${tokens.join(', ')}]`;\n }\n}\n\ntype SupportedProvider =\n ValueProvider|ExistingProvider|StaticClassProvider|ConstructorProvider|FactoryProvider;\n\ninterface Record {\n fn: Function;\n useNew: boolean;\n deps: DependencyRecord[];\n value: any;\n}\n\ninterface DependencyRecord {\n token: any;\n options: number;\n}\n\nfunction resolveProvider(provider: SupportedProvider): Record {\n const deps = computeDeps(provider);\n let fn: Function = IDENT;\n let value: any = EMPTY;\n let useNew: boolean = false;\n let provide = resolveForwardRef(provider.provide);\n if (USE_VALUE in provider) {\n // We need to use USE_VALUE in provider since provider.useValue could be defined as undefined.\n value = (provider as ValueProvider).useValue;\n } else if ((provider as FactoryProvider).useFactory) {\n fn = (provider as FactoryProvider).useFactory;\n } else if ((provider as ExistingProvider).useExisting) {\n // Just use IDENT\n } else if ((provider as StaticClassProvider).useClass) {\n useNew = true;\n fn = resolveForwardRef((provider as StaticClassProvider).useClass);\n } else if (typeof provide == 'function') {\n useNew = true;\n fn = provide;\n } else {\n throw staticError(\n 'StaticProvider does not have [useValue|useFactory|useExisting|useClass] or [provide] is not newable',\n provider);\n }\n return {deps, fn, useNew, value};\n}\n\nfunction multiProviderMixError(token: any) {\n return staticError('Cannot mix multi providers and regular providers', token);\n}\n\nfunction recursivelyProcessProviders(records: Map<any, Record>, provider: StaticProvider): string|\n null {\n let scope: string|null = null;\n if (provider) {\n provider = resolveForwardRef(provider);\n if (Array.isArray(provider)) {\n // if we have an array recurse into the array\n for (let i = 0; i < provider.length; i++) {\n scope = recursivelyProcessProviders(records, provider[i]) || scope;\n }\n } else if (typeof provider === 'function') {\n // Functions were supported in ReflectiveInjector, but are not here. For safety give useful\n // error messages\n throw staticError('Function/Class not supported', provider);\n } else if (provider && typeof provider === 'object' && provider.provide) {\n // At this point we have what looks like a provider: {provide: ?, ....}\n let token = resolveForwardRef(provider.provide);\n const resolvedProvider = resolveProvider(provider);\n if (provider.multi === true) {\n // This is a multi provider.\n let multiProvider: Record|undefined = records.get(token);\n if (multiProvider) {\n if (multiProvider.fn !== MULTI_PROVIDER_FN) {\n throw multiProviderMixError(token);\n }\n } else {\n // Create a placeholder factory which will look up the constituents of the multi provider.\n records.set(token, multiProvider = <Record>{\n token: provider.provide,\n deps: [],\n useNew: false,\n fn: MULTI_PROVIDER_FN,\n value: EMPTY\n });\n }\n // Treat the provider as the token.\n token = provider;\n multiProvider.deps.push({token, options: OptionFlags.Default});\n }\n const record = records.get(token);\n if (record && record.fn == MULTI_PROVIDER_FN) {\n throw multiProviderMixError(token);\n }\n if (token === INJECTOR_SCOPE) {\n scope = resolvedProvider.value;\n }\n records.set(token, resolvedProvider);\n } else {\n throw staticError('Unexpected provider', provider);\n }\n }\n return scope;\n}\n\nfunction tryResolveToken(\n token: any, record: Record|undefined|null, records: Map<any, Record|null>, parent: Injector,\n notFoundValue: any, flags: InjectFlags): any {\n try {\n return resolveToken(token, record, records, parent, notFoundValue, flags);\n } catch (e) {\n // ensure that 'e' is of type Error.\n if (!(e instanceof Error)) {\n e = new Error(e);\n }\n const path: any[] = e[NG_TEMP_TOKEN_PATH] = e[NG_TEMP_TOKEN_PATH] || [];\n path.unshift(token);\n if (record && record.value == CIRCULAR) {\n // Reset the Circular flag.\n record.value = EMPTY;\n }\n throw e;\n }\n}\n\nfunction resolveToken(\n token: any, record: Record|undefined|null, records: Map<any, Record|null>, parent: Injector,\n notFoundValue: any, flags: InjectFlags): any {\n let value;\n if (record && !(flags & InjectFlags.SkipSelf)) {\n // If we don't have a record, this implies that we don't own the provider hence don't know how\n // to resolve it.\n value = record.value;\n if (value == CIRCULAR) {\n throw Error(NO_NEW_LINE + 'Circular dependency');\n } else if (value === EMPTY) {\n record.value = CIRCULAR;\n let obj = undefined;\n let useNew = record.useNew;\n let fn = record.fn;\n let depRecords = record.deps;\n let deps = EMPTY;\n if (depRecords.length) {\n deps = [];\n for (let i = 0; i < depRecords.length; i++) {\n const depRecord: DependencyRecord = depRecords[i];\n const options = depRecord.options;\n const childRecord =\n options & OptionFlags.CheckSelf ? records.get(depRecord.token) : undefined;\n deps.push(tryResolveToken(\n // Current Token to resolve\n depRecord.token,\n // A record which describes how to resolve the token.\n // If undefined, this means we don't have such a record\n childRecord,\n // Other records we know about.\n records,\n // If we don't know how to resolve dependency and we should not check parent for it,\n // than pass in Null injector.\n !childRecord && !(options & OptionFlags.CheckParent) ? Injector.NULL : parent,\n options & OptionFlags.Optional ? null : Injector.THROW_IF_NOT_FOUND,\n InjectFlags.Default));\n }\n }\n record.value = value = useNew ? new (fn as any)(...deps) : fn.apply(obj, deps);\n }\n } else if (!(flags & InjectFlags.Self)) {\n value = parent.get(token, notFoundValue, InjectFlags.Default);\n } else if (!(flags & InjectFlags.Optional)) {\n value = Injector.NULL.get(token, notFoundValue);\n } else {\n value = Injector.NULL.get(token, typeof notFoundValue !== 'undefined' ? notFoundValue : null);\n }\n return value;\n}\n\nfunction computeDeps(provider: StaticProvider): DependencyRecord[] {\n let deps: DependencyRecord[] = EMPTY;\n const providerDeps: any[] =\n (provider as ExistingProvider & StaticClassProvider & ConstructorProvider).deps;\n if (providerDeps && providerDeps.length) {\n deps = [];\n for (let i = 0; i < providerDeps.length; i++) {\n let options = OptionFlags.Default;\n let token = resolveForwardRef(providerDeps[i]);\n if (Array.isArray(token)) {\n for (let j = 0, annotations = token; j < annotations.length; j++) {\n const annotation = annotations[j];\n if (annotation instanceof Optional || annotation == Optional) {\n options = options | OptionFlags.Optional;\n } else if (annotation instanceof SkipSelf || annotation == SkipSelf) {\n options = options & ~OptionFlags.CheckSelf;\n } else if (annotation instanceof Self || annotation == Self) {\n options = options & ~OptionFlags.CheckParent;\n } else if (annotation instanceof Inject) {\n token = (annotation as Inject).token;\n } else {\n token = resolveForwardRef(annotation);\n }\n }\n }\n deps.push({token, options});\n }\n } else if ((provider as ExistingProvider).useExisting) {\n const token = resolveForwardRef((provider as ExistingProvider).useExisting);\n deps = [{token, options: OptionFlags.Default}];\n } else if (!providerDeps && !(USE_VALUE in provider)) {\n // useValue & useExisting are the only ones which are exempt from deps all others need it.\n throw staticError('\\'deps\\' required', provider);\n }\n return deps;\n}\n\nfunction staticError(text: string, obj: any): Error {\n return new Error(formatError(text, obj, 'StaticInjectorError'));\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 {ChangeDetectionStrategy} from '../../change_detection/constants';\nimport {Injector} from '../../di/injector';\nimport {ViewEncapsulation} from '../../metadata/view';\nimport {assertEqual} from '../../util/assert';\nimport {assertLView} from '../assert';\nimport {discoverLocalRefs, getComponentAtNodeIndex, getDirectivesAtNodeIndex, getLContext} from '../context_discovery';\nimport {getComponentDef, getDirectiveDef} from '../definition';\nimport {NodeInjector} from '../di';\nimport {buildDebugNode} from '../instructions/lview_debug';\nimport {LContext} from '../interfaces/context';\nimport {DirectiveDef} from '../interfaces/definition';\nimport {TElementNode, TNode, TNodeProviderIndexes} from '../interfaces/node';\nimport {isLView} from '../interfaces/type_checks';\nimport {CLEANUP, CONTEXT, DebugNode, FLAGS, LView, LViewFlags, T_HOST, TVIEW, TViewType} from '../interfaces/view';\nimport {stringifyForError} from './stringify_utils';\nimport {getLViewParent, getRootContext} from './view_traversal_utils';\nimport {getTNode, unwrapRNode} from './view_utils';\n\n\n\n/**\n * Retrieves the component instance associated with a given DOM element.\n *\n * @usageNotes\n * Given the following DOM structure:\n *\n * ```html\n * <app-root>\n * <div>\n * <child-comp></child-comp>\n * </div>\n * </app-root>\n * ```\n *\n * Calling `getComponent` on `<child-comp>` will return the instance of `ChildComponent`\n * associated with this DOM element.\n *\n * Calling the function on `<app-root>` will return the `MyApp` instance.\n *\n *\n * @param element DOM element from which the component should be retrieved.\n * @returns Component instance associated with the element or `null` if there\n * is no component associated with it.\n *\n * @publicApi\n * @globalApi ng\n */\nexport function getComponent<T>(element: Element): T|null {\n assertDomElement(element);\n const context = getLContext(element);\n if (context === null) return null;\n\n if (context.component === undefined) {\n context.component = getComponentAtNodeIndex(context.nodeIndex, context.lView);\n }\n\n return context.component as T;\n}\n\n\n/**\n * If inside an embedded view (e.g. `*ngIf` or `*ngFor`), retrieves the context of the embedded\n * view that the element is part of. Otherwise retrieves the instance of the component whose view\n * owns the element (in this case, the result is the same as calling `getOwningComponent`).\n *\n * @param element Element for which to get the surrounding component instance.\n * @returns Instance of the component that is around the element or null if the element isn't\n * inside any component.\n *\n * @publicApi\n * @globalApi ng\n */\nexport function getContext<T>(element: Element): T|null {\n assertDomElement(element);\n const context = getLContext(element);\n return context === null ? null : context.lView[CONTEXT] as T;\n}\n\n/**\n * Retrieves the component instance whose view contains the DOM element.\n *\n * For example, if `<child-comp>` is used in the template of `<app-comp>`\n * (i.e. a `ViewChild` of `<app-comp>`), calling `getOwningComponent` on `<child-comp>`\n * would return `<app-comp>`.\n *\n * @param elementOrDir DOM element, component or directive instance\n * for which to retrieve the root components.\n * @returns Component instance whose view owns the DOM element or null if the element is not\n * part of a component view.\n *\n * @publicApi\n * @globalApi ng\n */\nexport function getOwningComponent<T>(elementOrDir: Element|{}): T|null {\n const context = getLContext(elementOrDir);\n if (context === null) return null;\n\n let lView = context.lView;\n let parent: LView|null;\n ngDevMode && assertLView(lView);\n while (lView[TVIEW].type === TViewType.Embedded && (parent = getLViewParent(lView)!)) {\n lView = parent;\n }\n return lView[FLAGS] & LViewFlags.IsRoot ? null : lView[CONTEXT] as T;\n}\n\n/**\n * Retrieves all root components associated with a DOM element, directive or component instance.\n * Root components are those which have been bootstrapped by Angular.\n *\n * @param elementOrDir DOM element, component or directive instance\n * for which to retrieve the root components.\n * @returns Root components associated with the target object.\n *\n * @publicApi\n * @globalApi ng\n */\nexport function getRootComponents(elementOrDir: Element|{}): {}[] {\n return [...getRootContext(elementOrDir).components];\n}\n\n/**\n * Retrieves an `Injector` associated with an element, component or directive instance.\n *\n * @param elementOrDir DOM element, component or directive instance for which to\n * retrieve the injector.\n * @returns Injector associated with the element, component or directive instance.\n *\n * @publicApi\n * @globalApi ng\n */\nexport function getInjector(elementOrDir: Element|{}): Injector {\n const context = getLContext(elementOrDir);\n if (context === null) return Injector.NULL;\n\n const tNode = context.lView[TVIEW].data[context.nodeIndex] as TElementNode;\n return new NodeInjector(tNode, context.lView);\n}\n\n/**\n * Retrieve a set of injection tokens at a given DOM node.\n *\n * @param element Element for which the injection tokens should be retrieved.\n */\nexport function getInjectionTokens(element: Element): any[] {\n const context = getLContext(element);\n if (context === null) return [];\n const lView = context.lView;\n const tView = lView[TVIEW];\n const tNode = tView.data[context.nodeIndex] as TNode;\n const providerTokens: any[] = [];\n const startIndex = tNode.providerIndexes & TNodeProviderIndexes.ProvidersStartIndexMask;\n const endIndex = tNode.directiveEnd;\n for (let i = startIndex; i < endIndex; i++) {\n let value = tView.data[i];\n if (isDirectiveDefHack(value)) {\n // The fact that we sometimes store Type and sometimes DirectiveDef in this location is a\n // design flaw. We should always store same type so that we can be monomorphic. The issue\n // is that for Components/Directives we store the def instead the type. The correct behavior\n // is that we should always be storing injectable type in this location.\n value = value.type;\n }\n providerTokens.push(value);\n }\n return providerTokens;\n}\n\n/**\n * Retrieves directive instances associated with a given DOM node. Does not include\n * component instances.\n *\n * @usageNotes\n * Given the following DOM structure:\n *\n * ```html\n * <app-root>\n * <button my-button></button>\n * <my-comp></my-comp>\n * </app-root>\n * ```\n *\n * Calling `getDirectives` on `<button>` will return an array with an instance of the `MyButton`\n * directive that is associated with the DOM node.\n *\n * Calling `getDirectives` on `<my-comp>` will return an empty array.\n *\n * @param node DOM node for which to get the directives.\n * @returns Array of directives associated with the node.\n *\n * @publicApi\n * @globalApi ng\n */\nexport function getDirectives(node: Node): {}[] {\n // Skip text nodes because we can't have directives associated with them.\n if (node instanceof Text) {\n return [];\n }\n\n const context = getLContext(node);\n if (context === null) {\n return [];\n }\n\n const lView = context.lView;\n const tView = lView[TVIEW];\n const nodeIndex = context.nodeIndex;\n if (!tView?.data[nodeIndex]) {\n return [];\n }\n if (context.directives === undefined) {\n context.directives = getDirectivesAtNodeIndex(nodeIndex, lView, false);\n }\n\n // The `directives` in this case are a named array called `LComponentView`. Clone the\n // result so we don't expose an internal data structure in the user's console.\n return context.directives === null ? [] : [...context.directives];\n}\n\n/**\n * Partial metadata for a given directive instance.\n * This information might be useful for debugging purposes or tooling.\n * Currently only `inputs` and `outputs` metadata is available.\n *\n * @publicApi\n */\nexport interface DirectiveDebugMetadata {\n inputs: Record<string, string>;\n outputs: Record<string, string>;\n}\n\n/**\n * Partial metadata for a given component instance.\n * This information might be useful for debugging purposes or tooling.\n * Currently the following fields are available:\n * - inputs\n * - outputs\n * - encapsulation\n * - changeDetection\n *\n * @publicApi\n */\nexport interface ComponentDebugMetadata extends DirectiveDebugMetadata {\n encapsulation: ViewEncapsulation;\n changeDetection: ChangeDetectionStrategy;\n}\n\n/**\n * Returns the debug (partial) metadata for a particular directive or component instance.\n * The function accepts an instance of a directive or component and returns the corresponding\n * metadata.\n *\n * @param directiveOrComponentInstance Instance of a directive or component\n * @returns metadata of the passed directive or component\n *\n * @publicApi\n * @globalApi ng\n */\nexport function getDirectiveMetadata(directiveOrComponentInstance: any): ComponentDebugMetadata|\n DirectiveDebugMetadata|null {\n const {constructor} = directiveOrComponentInstance;\n if (!constructor) {\n throw new Error('Unable to find the instance constructor');\n }\n // In case a component inherits from a directive, we may have component and directive metadata\n // To ensure we don't get the metadata of the directive, we want to call `getComponentDef` first.\n const componentDef = getComponentDef(constructor);\n if (componentDef) {\n return {\n inputs: componentDef.inputs,\n outputs: componentDef.outputs,\n encapsulation: componentDef.encapsulation,\n changeDetection: componentDef.onPush ? ChangeDetectionStrategy.OnPush :\n ChangeDetectionStrategy.Default\n };\n }\n const directiveDef = getDirectiveDef(constructor);\n if (directiveDef) {\n return {inputs: directiveDef.inputs, outputs: directiveDef.outputs};\n }\n return null;\n}\n\n/**\n * Retrieve map of local references.\n *\n * The references are retrieved as a map of local reference name to element or directive instance.\n *\n * @param target DOM element, component or directive instance for which to retrieve\n * the local references.\n */\nexport function getLocalRefs(target: {}): {[key: string]: any} {\n const context = getLContext(target);\n if (context === null) return {};\n\n if (context.localRefs === undefined) {\n context.localRefs = discoverLocalRefs(context.lView, context.nodeIndex);\n }\n\n return context.localRefs || {};\n}\n\n/**\n * Retrieves the host element of a component or directive instance.\n * The host element is the DOM element that matched the selector of the directive.\n *\n * @param componentOrDirective Component or directive instance for which the host\n * element should be retrieved.\n * @returns Host element of the target.\n *\n * @publicApi\n * @globalApi ng\n */\nexport function getHostElement(componentOrDirective: {}): Element {\n return getLContext(componentOrDirective)!.native as unknown as Element;\n}\n\n/**\n * Retrieves the rendered text for a given component.\n *\n * This function retrieves the host element of a component and\n * and then returns the `textContent` for that element. This implies\n * that the text returned will include re-projected content of\n * the component as well.\n *\n * @param component The component to return the content text for.\n */\nexport function getRenderedText(component: any): string {\n const hostElement = getHostElement(component);\n return hostElement.textContent || '';\n}\n\n/**\n * Event listener configuration returned from `getListeners`.\n * @publicApi\n */\nexport interface Listener {\n /** Name of the event listener. */\n name: string;\n /** Element that the listener is bound to. */\n element: Element;\n /** Callback that is invoked when the event is triggered. */\n callback: (value: any) => any;\n /** Whether the listener is using event capturing. */\n useCapture: boolean;\n /**\n * Type of the listener (e.g. a native DOM event or a custom @Output).\n */\n type: 'dom'|'output';\n}\n\n\n/**\n * Retrieves a list of event listeners associated with a DOM element. The list does include host\n * listeners, but it does not include event listeners defined outside of the Angular context\n * (e.g. through `addEventListener`).\n *\n * @usageNotes\n * Given the following DOM structure:\n *\n * ```html\n * <app-root>\n * <div (click)=\"doSomething()\"></div>\n * </app-root>\n * ```\n *\n * Calling `getListeners` on `<div>` will return an object that looks as follows:\n *\n * ```ts\n * {\n * name: 'click',\n * element: <div>,\n * callback: () => doSomething(),\n * useCapture: false\n * }\n * ```\n *\n * @param element Element for which the DOM listeners should be retrieved.\n * @returns Array of event listeners on the DOM element.\n *\n * @publicApi\n * @globalApi ng\n */\nexport function getListeners(element: Element): Listener[] {\n assertDomElement(element);\n const lContext = getLContext(element);\n if (lContext === null) return [];\n\n const lView = lContext.lView;\n const tView = lView[TVIEW];\n const lCleanup = lView[CLEANUP];\n const tCleanup = tView.cleanup;\n const listeners: Listener[] = [];\n if (tCleanup && lCleanup) {\n for (let i = 0; i < tCleanup.length;) {\n const firstParam = tCleanup[i++];\n const secondParam = tCleanup[i++];\n if (typeof firstParam === 'string') {\n const name: string = firstParam;\n const listenerElement = unwrapRNode(lView[secondParam]) as any as Element;\n const callback: (value: any) => any = lCleanup[tCleanup[i++]];\n const useCaptureOrIndx = tCleanup[i++];\n // if useCaptureOrIndx is boolean then report it as is.\n // if useCaptureOrIndx is positive number then it in unsubscribe method\n // if useCaptureOrIndx is negative number then it is a Subscription\n const type =\n (typeof useCaptureOrIndx === 'boolean' || useCaptureOrIndx >= 0) ? 'dom' : 'output';\n const useCapture = typeof useCaptureOrIndx === 'boolean' ? useCaptureOrIndx : false;\n if (element == listenerElement) {\n listeners.push({element, name, callback, useCapture, type});\n }\n }\n }\n }\n listeners.sort(sortListeners);\n return listeners;\n}\n\nfunction sortListeners(a: Listener, b: Listener) {\n if (a.name == b.name) return 0;\n return a.name < b.name ? -1 : 1;\n}\n\n/**\n * This function should not exist because it is megamorphic and only mostly correct.\n *\n * See call site for more info.\n */\nfunction isDirectiveDefHack(obj: any): obj is DirectiveDef<any> {\n return obj.type !== undefined && obj.template !== undefined && obj.declaredInputs !== undefined;\n}\n\n/**\n * Returns the attached `DebugNode` instance for an element in the DOM.\n *\n * @param element DOM element which is owned by an existing component's view.\n */\nexport function getDebugNode(element: Element): DebugNode|null {\n if (ngDevMode && !(element instanceof Node)) {\n throw new Error('Expecting instance of DOM Element');\n }\n\n const lContext = getLContext(element);\n if (lContext === null) {\n return null;\n }\n\n const lView = lContext.lView;\n const nodeIndex = lContext.nodeIndex;\n if (nodeIndex !== -1) {\n const valueInLView = lView[nodeIndex];\n // this means that value in the lView is a component with its own\n // data. In this situation the TNode is not accessed at the same spot.\n const tNode =\n isLView(valueInLView) ? (valueInLView[T_HOST] as TNode) : getTNode(lView[TVIEW], nodeIndex);\n ngDevMode &&\n assertEqual(tNode.index, nodeIndex, 'Expecting that TNode at index is same as index');\n return buildDebugNode(tNode, lView);\n }\n\n return null;\n}\n\n/**\n * Retrieve the component `LView` from component/element.\n *\n * NOTE: `LView` is a private and should not be leaked outside.\n * Don't export this method to `ng.*` on window.\n *\n * @param target DOM element or component instance for which to retrieve the LView.\n */\nexport function getComponentLView(target: any): LView {\n const lContext = getLContext(target)!;\n const nodeIndx = lContext.nodeIndex;\n const lView = lContext.lView;\n const componentLView = lView[nodeIndx];\n ngDevMode && assertLView(componentLView);\n return componentLView;\n}\n\n/** Asserts that a value is a DOM Element. */\nfunction assertDomElement(value: any) {\n if (typeof Element !== 'undefined' && !(value instanceof Element)) {\n throw new Error('Expecting instance of DOM Element');\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 {detectChanges, markDirty} from '../instructions/change_detection';\nimport {getRootComponents} from './discovery_utils';\n\n/**\n * Marks a component for check (in case of OnPush components) and synchronously\n * performs change detection on the application this component belongs to.\n *\n * @param component Component to {@link ChangeDetectorRef#markForCheck mark for check}.\n *\n * @publicApi\n * @globalApi ng\n */\nexport function applyChanges(component: {}): void {\n markDirty(component);\n getRootComponents(component).forEach(rootComponent => detectChanges(rootComponent));\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 */\nimport {assertDefined} from '../../util/assert';\nimport {global} from '../../util/global';\nimport {setProfiler} from '../profiler';\nimport {applyChanges} from './change_detection_utils';\nimport {getComponent, getContext, getDirectiveMetadata, getDirectives, getHostElement, getInjector, getListeners, getOwningComponent, getRootComponents} from './discovery_utils';\n\n\n\n/**\n * This file introduces series of globally accessible debug tools\n * to allow for the Angular debugging story to function.\n *\n * To see this in action run the following command:\n *\n * bazel run --config=ivy\n * //packages/core/test/bundling/todo:devserver\n *\n * Then load `localhost:5432` and start using the console tools.\n */\n\n/**\n * This value reflects the property on the window where the dev\n * tools are patched (window.ng).\n * */\nexport const GLOBAL_PUBLISH_EXPANDO_KEY = 'ng';\n\nlet _published = false;\n/**\n * Publishes a collection of default debug tools onto`window.ng`.\n *\n * These functions are available globally when Angular is in development\n * mode and are automatically stripped away from prod mode is on.\n */\nexport function publishDefaultGlobalUtils() {\n if (!_published) {\n _published = true;\n\n /**\n * Warning: this function is *INTERNAL* and should not be relied upon in application's code.\n * The contract of the function might be changed in any release and/or the function can be\n * removed completely.\n */\n publishGlobalUtil('ɵsetProfiler', setProfiler);\n publishGlobalUtil('getDirectiveMetadata', getDirectiveMetadata);\n publishGlobalUtil('getComponent', getComponent);\n publishGlobalUtil('getContext', getContext);\n publishGlobalUtil('getListeners', getListeners);\n publishGlobalUtil('getOwningComponent', getOwningComponent);\n publishGlobalUtil('getHostElement', getHostElement);\n publishGlobalUtil('getInjector', getInjector);\n publishGlobalUtil('getRootComponents', getRootComponents);\n publishGlobalUtil('getDirectives', getDirectives);\n publishGlobalUtil('applyChanges', applyChanges);\n }\n}\n\nexport declare type GlobalDevModeContainer = {\n [GLOBAL_PUBLISH_EXPANDO_KEY]: {[fnName: string]: Function};\n};\n\n/**\n * Publishes the given function to `window.ng` so that it can be\n * used from the browser console when an application is not in production.\n */\nexport function publishGlobalUtil(name: string, fn: Function): void {\n if (typeof COMPILED === 'undefined' || !COMPILED) {\n // Note: we can't export `ng` when using closure enhanced optimization as:\n // - closure declares globals itself for minified names, which sometimes clobber our `ng` global\n // - we can't declare a closure extern as the namespace `ng` is already used within Google\n // for typings for AngularJS (via `goog.provide('ng....')`).\n const w = global as any as GlobalDevModeContainer;\n ngDevMode && assertDefined(fn, 'function not defined');\n if (w) {\n let container = w[GLOBAL_PUBLISH_EXPANDO_KEY];\n if (!container) {\n container = w[GLOBAL_PUBLISH_EXPANDO_KEY] = {};\n }\n container[name] = fn;\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\n// We are temporarily importing the existing viewEngine from core so we can be sure we are\n// correctly implementing its interfaces for backwards compatibility.\nimport {Injector} from '../di/injector';\nimport {Type} from '../interface/type';\nimport {Sanitizer} from '../sanitization/sanitizer';\nimport {assertDefined, assertIndexInRange} from '../util/assert';\n\nimport {assertComponentType} from './assert';\nimport {readPatchedLView} from './context_discovery';\nimport {getComponentDef} from './definition';\nimport {diPublicInInjector, getOrCreateNodeInjectorForNode} from './di';\nimport {throwProviderNotFoundError} from './errors_di';\nimport {registerPostOrderHooks} from './hooks';\nimport {addToViewTree, CLEAN_PROMISE, createLView, createTView, getOrCreateTComponentView, getOrCreateTNode, initTNodeFlags, instantiateRootComponent, invokeHostBindingsInCreationMode, locateHostElement, markAsComponentHost, refreshView, registerHostBindingOpCodes, renderView} from './instructions/shared';\nimport {ComponentDef, ComponentType, RenderFlags} from './interfaces/definition';\nimport {TElementNode, TNodeType} from './interfaces/node';\nimport {PlayerHandler} from './interfaces/player';\nimport {domRendererFactory3, Renderer3, RendererFactory3} from './interfaces/renderer';\nimport {RElement} from './interfaces/renderer_dom';\nimport {CONTEXT, HEADER_OFFSET, LView, LViewFlags, RootContext, RootContextFlags, TVIEW, TViewType} from './interfaces/view';\nimport {writeDirectClass, writeDirectStyle} from './node_manipulation';\nimport {enterView, getCurrentTNode, leaveView, setSelectedIndex} from './state';\nimport {computeStaticStyling} from './styling/static_styling';\nimport {setUpAttributes} from './util/attrs_utils';\nimport {publishDefaultGlobalUtils} from './util/global_utils';\nimport {defaultScheduler} from './util/misc_utils';\nimport {getRootContext} from './util/view_traversal_utils';\n\n\n\n/** Options that control how the component should be bootstrapped. */\nexport interface CreateComponentOptions {\n /** Which renderer factory to use. */\n rendererFactory?: RendererFactory3;\n\n /** A custom sanitizer instance */\n sanitizer?: Sanitizer;\n\n /** A custom animation player handler */\n playerHandler?: PlayerHandler;\n\n /**\n * Host element on which the component will be bootstrapped. If not specified,\n * the component definition's `tag` is used to query the existing DOM for the\n * element to bootstrap.\n */\n host?: RElement|string;\n\n /** Module injector for the component. If unspecified, the injector will be NULL_INJECTOR. */\n injector?: Injector;\n\n /**\n * List of features to be applied to the created component. Features are simply\n * functions that decorate a component with a certain behavior.\n *\n * Typically, the features in this list are features that cannot be added to the\n * other features list in the component definition because they rely on other factors.\n *\n * Example: `LifecycleHooksFeature` is a function that adds lifecycle hook capabilities\n * to root components in a tree-shakable way. It cannot be added to the component\n * features list because there's no way of knowing when the component will be used as\n * a root component.\n */\n hostFeatures?: HostFeature[];\n\n /**\n * A function which is used to schedule change detection work in the future.\n *\n * When marking components as dirty, it is necessary to schedule the work of\n * change detection in the future. This is done to coalesce multiple\n * {@link markDirty} calls into a single changed detection processing.\n *\n * The default value of the scheduler is the `requestAnimationFrame` function.\n *\n * It is also useful to override this function for testing purposes.\n */\n scheduler?: (work: () => void) => void;\n}\n\n/** See CreateComponentOptions.hostFeatures */\ntype HostFeature = (<T>(component: T, componentDef: ComponentDef<T>) => void);\n\n// TODO: A hack to not pull in the NullInjector from @angular/core.\nexport const NULL_INJECTOR: Injector = {\n get: (token: any, notFoundValue?: any) => {\n throwProviderNotFoundError(token, 'NullInjector');\n }\n};\n\n/**\n * Bootstraps a Component into an existing host element and returns an instance\n * of the component.\n *\n * Use this function to bootstrap a component into the DOM tree. Each invocation\n * of this function will create a separate tree of components, injectors and\n * change detection cycles and lifetimes. To dynamically insert a new component\n * into an existing tree such that it shares the same injection, change detection\n * and object lifetime, use {@link ViewContainer#createComponent}.\n *\n * @param componentType Component to bootstrap\n * @param options Optional parameters which control bootstrapping\n */\nexport function renderComponent<T>(\n componentType: ComponentType<T>|\n Type<T>/* Type as workaround for: Microsoft/TypeScript/issues/4881 */\n ,\n opts: CreateComponentOptions = {}): T {\n ngDevMode && publishDefaultGlobalUtils();\n ngDevMode && assertComponentType(componentType);\n\n const rendererFactory = opts.rendererFactory || domRendererFactory3;\n const sanitizer = opts.sanitizer || null;\n const componentDef = getComponentDef<T>(componentType)!;\n if (componentDef.type != componentType) (componentDef as {type: Type<any>}).type = componentType;\n\n // The first index of the first selector is the tag name.\n const componentTag = componentDef.selectors![0]![0] as string;\n const hostRenderer = rendererFactory.createRenderer(null, null);\n const hostRNode =\n locateHostElement(hostRenderer, opts.host || componentTag, componentDef.encapsulation);\n const rootFlags = componentDef.onPush ? LViewFlags.Dirty | LViewFlags.IsRoot :\n LViewFlags.CheckAlways | LViewFlags.IsRoot;\n const rootContext = createRootContext(opts.scheduler, opts.playerHandler);\n\n const renderer = rendererFactory.createRenderer(hostRNode, componentDef);\n const rootTView = createTView(TViewType.Root, null, null, 1, 0, null, null, null, null, null);\n const rootView: LView = createLView(\n null, rootTView, rootContext, rootFlags, null, null, rendererFactory, renderer, null,\n opts.injector || null);\n\n enterView(rootView);\n let component: T;\n\n try {\n if (rendererFactory.begin) rendererFactory.begin();\n const componentView = createRootComponentView(\n hostRNode, componentDef, rootView, rendererFactory, renderer, sanitizer);\n component = createRootComponent(\n componentView, componentDef, rootView, rootContext, opts.hostFeatures || null);\n\n // create mode pass\n renderView(rootTView, rootView, null);\n // update mode pass\n refreshView(rootTView, rootView, null, null);\n\n } finally {\n leaveView();\n if (rendererFactory.end) rendererFactory.end();\n }\n\n return component;\n}\n\n/**\n * Creates the root component view and the root component node.\n *\n * @param rNode Render host element.\n * @param def ComponentDef\n * @param rootView The parent view where the host node is stored\n * @param rendererFactory Factory to be used for creating child renderers.\n * @param hostRenderer The current renderer\n * @param sanitizer The sanitizer, if provided\n *\n * @returns Component view created\n */\nexport function createRootComponentView(\n rNode: RElement|null, def: ComponentDef<any>, rootView: LView,\n rendererFactory: RendererFactory3, hostRenderer: Renderer3, sanitizer?: Sanitizer|null): LView {\n const tView = rootView[TVIEW];\n const index = HEADER_OFFSET;\n ngDevMode && assertIndexInRange(rootView, index);\n rootView[index] = rNode;\n // '#host' is added here as we don't know the real host DOM name (we don't want to read it) and at\n // the same time we want to communicate the debug `TNode` that this is a special `TNode`\n // representing a host element.\n const tNode: TElementNode = getOrCreateTNode(tView, index, TNodeType.Element, '#host', null);\n const mergedAttrs = tNode.mergedAttrs = def.hostAttrs;\n if (mergedAttrs !== null) {\n computeStaticStyling(tNode, mergedAttrs, true);\n if (rNode !== null) {\n setUpAttributes(hostRenderer, rNode, mergedAttrs);\n if (tNode.classes !== null) {\n writeDirectClass(hostRenderer, rNode, tNode.classes);\n }\n if (tNode.styles !== null) {\n writeDirectStyle(hostRenderer, rNode, tNode.styles);\n }\n }\n }\n\n const viewRenderer = rendererFactory.createRenderer(rNode, def);\n const componentView = createLView(\n rootView, getOrCreateTComponentView(def), null,\n def.onPush ? LViewFlags.Dirty : LViewFlags.CheckAlways, rootView[index], tNode,\n rendererFactory, viewRenderer, sanitizer || null, null);\n\n if (tView.firstCreatePass) {\n diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, rootView), tView, def.type);\n markAsComponentHost(tView, tNode);\n initTNodeFlags(tNode, rootView.length, 1);\n }\n\n addToViewTree(rootView, componentView);\n\n // Store component view at node index, with node as the HOST\n return rootView[index] = componentView;\n}\n\n/**\n * Creates a root component and sets it up with features and host bindings. Shared by\n * renderComponent() and ViewContainerRef.createComponent().\n */\nexport function createRootComponent<T>(\n componentView: LView, componentDef: ComponentDef<T>, rootLView: LView, rootContext: RootContext,\n hostFeatures: HostFeature[]|null): any {\n const tView = rootLView[TVIEW];\n // Create directive instance with factory() and store at next index in viewData\n const component = instantiateRootComponent(tView, rootLView, componentDef);\n\n rootContext.components.push(component);\n componentView[CONTEXT] = component;\n\n hostFeatures && hostFeatures.forEach((feature) => feature(component, componentDef));\n\n // We want to generate an empty QueryList for root content queries for backwards\n // compatibility with ViewEngine.\n if (componentDef.contentQueries) {\n const tNode = getCurrentTNode()!;\n ngDevMode && assertDefined(tNode, 'TNode expected');\n componentDef.contentQueries(RenderFlags.Create, component, tNode.directiveStart);\n }\n\n const rootTNode = getCurrentTNode()!;\n ngDevMode && assertDefined(rootTNode, 'tNode should have been already created');\n if (tView.firstCreatePass &&\n (componentDef.hostBindings !== null || componentDef.hostAttrs !== null)) {\n setSelectedIndex(rootTNode.index);\n\n const rootTView = rootLView[TVIEW];\n registerHostBindingOpCodes(\n rootTView, rootTNode, rootLView, rootTNode.directiveStart, rootTNode.directiveEnd,\n componentDef);\n\n invokeHostBindingsInCreationMode(componentDef, component);\n }\n return component;\n}\n\n\nexport function createRootContext(\n scheduler?: (workFn: () => void) => void, playerHandler?: PlayerHandler|null): RootContext {\n return {\n components: [],\n scheduler: scheduler || defaultScheduler,\n clean: CLEAN_PROMISE,\n playerHandler: playerHandler || null,\n flags: RootContextFlags.Empty\n };\n}\n\n/**\n * Used to enable lifecycle hooks on the root component.\n *\n * Include this feature when calling `renderComponent` if the root component\n * you are rendering has lifecycle hooks defined. Otherwise, the hooks won't\n * be called properly.\n *\n * Example:\n *\n * ```\n * renderComponent(AppComponent, {hostFeatures: [LifecycleHooksFeature]});\n * ```\n */\nexport function LifecycleHooksFeature(component: any, def: ComponentDef<any>): void {\n const lView = readPatchedLView(component)!;\n ngDevMode && assertDefined(lView, 'LView is required');\n const tView = lView[TVIEW];\n const tNode = getCurrentTNode()!;\n ngDevMode && assertDefined(tNode, 'TNode is required');\n registerPostOrderHooks(tView, tNode);\n}\n\n/**\n * Wait on component until it is rendered.\n *\n * This function returns a `Promise` which is resolved when the component's\n * change detection is executed. This is determined by finding the scheduler\n * associated with the `component`'s render tree and waiting until the scheduler\n * flushes. If nothing is scheduled, the function returns a resolved promise.\n *\n * Example:\n * ```\n * await whenRendered(myComponent);\n * ```\n *\n * @param component Component to wait upon\n * @returns Promise which resolves when the component is rendered.\n */\nexport function whenRendered(component: any): Promise<null> {\n return getRootContext(component).clean;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type, Writable} from '../../interface/type';\nimport {EMPTY_ARRAY, EMPTY_OBJ} from '../../util/empty';\nimport {fillProperties} from '../../util/property';\nimport {ComponentDef, ContentQueriesFunction, DirectiveDef, DirectiveDefFeature, HostBindingsFunction, RenderFlags, ViewQueriesFunction} from '../interfaces/definition';\nimport {TAttributes} from '../interfaces/node';\nimport {isComponentDef} from '../interfaces/type_checks';\nimport {mergeHostAttrs} from '../util/attrs_utils';\n\nexport function getSuperType(type: Type<any>): Type<any>&\n {ɵcmp?: ComponentDef<any>, ɵdir?: DirectiveDef<any>} {\n return Object.getPrototypeOf(type.prototype).constructor;\n}\n\ntype WritableDef = Writable<DirectiveDef<any>|ComponentDef<any>>;\n\n/**\n * Merges the definition from a super class to a sub class.\n * @param definition The definition that is a SubClass of another directive of component\n *\n * @codeGenApi\n */\nexport function ɵɵInheritDefinitionFeature(definition: DirectiveDef<any>|ComponentDef<any>): void {\n let superType = getSuperType(definition.type);\n let shouldInheritFields = true;\n const inheritanceChain: WritableDef[] = [definition];\n\n while (superType) {\n let superDef: DirectiveDef<any>|ComponentDef<any>|undefined = undefined;\n if (isComponentDef(definition)) {\n // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n superDef = superType.ɵcmp || superType.ɵdir;\n } else {\n if (superType.ɵcmp) {\n throw new Error('Directives cannot inherit Components');\n }\n // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n superDef = superType.ɵdir;\n }\n\n if (superDef) {\n if (shouldInheritFields) {\n inheritanceChain.push(superDef);\n // Some fields in the definition may be empty, if there were no values to put in them that\n // would've justified object creation. Unwrap them if necessary.\n const writeableDef = definition as WritableDef;\n writeableDef.inputs = maybeUnwrapEmpty(definition.inputs);\n writeableDef.declaredInputs = maybeUnwrapEmpty(definition.declaredInputs);\n writeableDef.outputs = maybeUnwrapEmpty(definition.outputs);\n\n // Merge hostBindings\n const superHostBindings = superDef.hostBindings;\n superHostBindings && inheritHostBindings(definition, superHostBindings);\n\n // Merge queries\n const superViewQuery = superDef.viewQuery;\n const superContentQueries = superDef.contentQueries;\n superViewQuery && inheritViewQuery(definition, superViewQuery);\n superContentQueries && inheritContentQueries(definition, superContentQueries);\n\n // Merge inputs and outputs\n fillProperties(definition.inputs, superDef.inputs);\n fillProperties(definition.declaredInputs, superDef.declaredInputs);\n fillProperties(definition.outputs, superDef.outputs);\n\n // Merge animations metadata.\n // If `superDef` is a Component, the `data` field is present (defaults to an empty object).\n if (isComponentDef(superDef) && superDef.data.animation) {\n // If super def is a Component, the `definition` is also a Component, since Directives can\n // not inherit Components (we throw an error above and cannot reach this code).\n const defData = (definition as ComponentDef<any>).data;\n defData.animation = (defData.animation || []).concat(superDef.data.animation);\n }\n }\n\n // Run parent features\n const features = superDef.features;\n if (features) {\n for (let i = 0; i < features.length; i++) {\n const feature = features[i];\n if (feature && feature.ngInherit) {\n (feature as DirectiveDefFeature)(definition);\n }\n // If `InheritDefinitionFeature` is a part of the current `superDef`, it means that this\n // def already has all the necessary information inherited from its super class(es), so we\n // can stop merging fields from super classes. However we need to iterate through the\n // prototype chain to look for classes that might contain other \"features\" (like\n // NgOnChanges), which we should invoke for the original `definition`. We set the\n // `shouldInheritFields` flag to indicate that, essentially skipping fields inheritance\n // logic and only invoking functions from the \"features\" list.\n if (feature === ɵɵInheritDefinitionFeature) {\n shouldInheritFields = false;\n }\n }\n }\n }\n\n superType = Object.getPrototypeOf(superType);\n }\n mergeHostAttrsAcrossInheritance(inheritanceChain);\n}\n\n/**\n * Merge the `hostAttrs` and `hostVars` from the inherited parent to the base class.\n *\n * @param inheritanceChain A list of `WritableDefs` starting at the top most type and listing\n * sub-types in order. For each type take the `hostAttrs` and `hostVars` and merge it with the child\n * type.\n */\nfunction mergeHostAttrsAcrossInheritance(inheritanceChain: WritableDef[]) {\n let hostVars: number = 0;\n let hostAttrs: TAttributes|null = null;\n // We process the inheritance order from the base to the leaves here.\n for (let i = inheritanceChain.length - 1; i >= 0; i--) {\n const def = inheritanceChain[i];\n // For each `hostVars`, we need to add the superclass amount.\n def.hostVars = (hostVars += def.hostVars);\n // for each `hostAttrs` we need to merge it with superclass.\n def.hostAttrs =\n mergeHostAttrs(def.hostAttrs, hostAttrs = mergeHostAttrs(hostAttrs, def.hostAttrs));\n }\n}\n\nfunction maybeUnwrapEmpty<T>(value: T[]): T[];\nfunction maybeUnwrapEmpty<T>(value: T): T;\nfunction maybeUnwrapEmpty(value: any): any {\n if (value === EMPTY_OBJ) {\n return {};\n } else if (value === EMPTY_ARRAY) {\n return [];\n } else {\n return value;\n }\n}\n\nfunction inheritViewQuery(definition: WritableDef, superViewQuery: ViewQueriesFunction<any>) {\n const prevViewQuery = definition.viewQuery;\n if (prevViewQuery) {\n definition.viewQuery = (rf, ctx) => {\n superViewQuery(rf, ctx);\n prevViewQuery(rf, ctx);\n };\n } else {\n definition.viewQuery = superViewQuery;\n }\n}\n\nfunction inheritContentQueries(\n definition: WritableDef, superContentQueries: ContentQueriesFunction<any>) {\n const prevContentQueries = definition.contentQueries;\n if (prevContentQueries) {\n definition.contentQueries = (rf, ctx, directiveIndex) => {\n superContentQueries(rf, ctx, directiveIndex);\n prevContentQueries(rf, ctx, directiveIndex);\n };\n } else {\n definition.contentQueries = superContentQueries;\n }\n}\n\nfunction inheritHostBindings(\n definition: WritableDef, superHostBindings: HostBindingsFunction<any>) {\n const prevHostBindings = definition.hostBindings;\n if (prevHostBindings) {\n definition.hostBindings = (rf: RenderFlags, ctx: any) => {\n superHostBindings(rf, ctx);\n prevHostBindings(rf, ctx);\n };\n } else {\n definition.hostBindings = superHostBindings;\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 {ComponentDef, DirectiveDef} from '../interfaces/definition';\nimport {isComponentDef} from '../interfaces/type_checks';\n\nimport {getSuperType} from './inherit_definition_feature';\n\n/**\n * Fields which exist on either directive or component definitions, and need to be copied from\n * parent to child classes by the `ɵɵCopyDefinitionFeature`.\n */\nconst COPY_DIRECTIVE_FIELDS: (keyof DirectiveDef<unknown>)[] = [\n // The child class should use the providers of its parent.\n 'providersResolver',\n\n // Not listed here are any fields which are handled by the `ɵɵInheritDefinitionFeature`, such\n // as inputs, outputs, and host binding functions.\n];\n\n/**\n * Fields which exist only on component definitions, and need to be copied from parent to child\n * classes by the `ɵɵCopyDefinitionFeature`.\n *\n * The type here allows any field of `ComponentDef` which is not also a property of `DirectiveDef`,\n * since those should go in `COPY_DIRECTIVE_FIELDS` above.\n */\nconst COPY_COMPONENT_FIELDS: Exclude<keyof ComponentDef<unknown>, keyof DirectiveDef<unknown>>[] = [\n // The child class should use the template function of its parent, including all template\n // semantics.\n 'template',\n 'decls',\n 'consts',\n 'vars',\n 'onPush',\n 'ngContentSelectors',\n\n // The child class should use the CSS styles of its parent, including all styling semantics.\n 'styles',\n 'encapsulation',\n\n // The child class should be checked by the runtime in the same way as its parent.\n 'schemas',\n];\n\n/**\n * Copies the fields not handled by the `ɵɵInheritDefinitionFeature` from the supertype of a\n * definition.\n *\n * This exists primarily to support ngcc migration of an existing View Engine pattern, where an\n * entire decorator is inherited from a parent to a child class. When ngcc detects this case, it\n * generates a skeleton definition on the child class, and applies this feature.\n *\n * The `ɵɵCopyDefinitionFeature` then copies any needed fields from the parent class' definition,\n * including things like the component template function.\n *\n * @param definition The definition of a child class which inherits from a parent class with its\n * own definition.\n *\n * @codeGenApi\n */\nexport function ɵɵCopyDefinitionFeature(definition: DirectiveDef<any>|ComponentDef<any>): void {\n let superType = getSuperType(definition.type)!;\n\n let superDef: DirectiveDef<any>|ComponentDef<any>|undefined = undefined;\n if (isComponentDef(definition)) {\n // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n superDef = superType.ɵcmp!;\n } else {\n // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n superDef = superType.ɵdir!;\n }\n\n // Needed because `definition` fields are readonly.\n const defAny = (definition as any);\n\n // Copy over any fields that apply to either directives or components.\n for (const field of COPY_DIRECTIVE_FIELDS) {\n defAny[field] = superDef[field];\n }\n\n if (isComponentDef(superDef)) {\n // Copy over any component-specific fields.\n for (const field of COPY_COMPONENT_FIELDS) {\n defAny[field] = superDef[field];\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 {global as _global} from './global';\n\n// When Symbol.iterator doesn't exist, retrieves the key used in es6-shim\ndeclare const Symbol: any;\nlet _symbolIterator: any = null;\nexport function getSymbolIterator(): string|symbol {\n if (!_symbolIterator) {\n const Symbol = _global['Symbol'];\n if (Symbol && Symbol.iterator) {\n _symbolIterator = Symbol.iterator;\n } else {\n // es6-shim specific logic\n const keys = Object.getOwnPropertyNames(Map.prototype);\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i];\n if (key !== 'entries' && key !== 'size' &&\n (Map as any).prototype[key] === Map.prototype['entries']) {\n _symbolIterator = key;\n }\n }\n }\n }\n return _symbolIterator;\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 {getSymbolIterator} from '../util/symbol';\n\nexport function devModeEqual(a: any, b: any): boolean {\n const isListLikeIterableA = isListLikeIterable(a);\n const isListLikeIterableB = isListLikeIterable(b);\n if (isListLikeIterableA && isListLikeIterableB) {\n return areIterablesEqual(a, b, devModeEqual);\n } else {\n const isAObject = a && (typeof a === 'object' || typeof a === 'function');\n const isBObject = b && (typeof b === 'object' || typeof b === 'function');\n if (!isListLikeIterableA && isAObject && !isListLikeIterableB && isBObject) {\n return true;\n } else {\n return Object.is(a, b);\n }\n }\n}\n\n/**\n * Indicates that the result of a {@link Pipe} transformation has changed even though the\n * reference has not changed.\n *\n * Wrapped values are unwrapped automatically during the change detection, and the unwrapped value\n * is stored.\n *\n * Example:\n *\n * ```\n * if (this._latestValue === this._latestReturnedValue) {\n * return this._latestReturnedValue;\n * } else {\n * this._latestReturnedValue = this._latestValue;\n * return WrappedValue.wrap(this._latestValue); // this will force update\n * }\n * ```\n *\n * @publicApi\n * @deprecated from v10 stop using. (No replacement, deemed unnecessary.)\n */\nexport class WrappedValue {\n /** @deprecated from 5.3, use `unwrap()` instead - will switch to protected */\n wrapped: any;\n\n constructor(value: any) {\n this.wrapped = value;\n }\n\n /** Creates a wrapped value. */\n static wrap(value: any): WrappedValue {\n return new WrappedValue(value);\n }\n\n /**\n * Returns the underlying value of a wrapped value.\n * Returns the given `value` when it is not wrapped.\n **/\n static unwrap(value: any): any {\n return WrappedValue.isWrapped(value) ? value.wrapped : value;\n }\n\n /** Returns true if `value` is a wrapped value. */\n static isWrapped(value: any): value is WrappedValue {\n return value instanceof WrappedValue;\n }\n}\n\nexport function isListLikeIterable(obj: any): boolean {\n if (!isJsObject(obj)) return false;\n return Array.isArray(obj) ||\n (!(obj instanceof Map) && // JS Map are iterables but return entries as [k, v]\n getSymbolIterator() in obj); // JS Iterable have a Symbol.iterator prop\n}\n\nexport function areIterablesEqual(\n a: any, b: any, comparator: (a: any, b: any) => boolean): boolean {\n const iterator1 = a[getSymbolIterator()]();\n const iterator2 = b[getSymbolIterator()]();\n\n while (true) {\n const item1 = iterator1.next();\n const item2 = iterator2.next();\n if (item1.done && item2.done) return true;\n if (item1.done || item2.done) return false;\n if (!comparator(item1.value, item2.value)) return false;\n }\n}\n\nexport function iterateListLike(obj: any, fn: (p: any) => any) {\n if (Array.isArray(obj)) {\n for (let i = 0; i < obj.length; i++) {\n fn(obj[i]);\n }\n } else {\n const iterator = obj[getSymbolIterator()]();\n let item: any;\n while (!((item = iterator.next()).done)) {\n fn(item.value);\n }\n }\n}\n\nexport function isJsObject(o: any): boolean {\n return o !== null && (typeof o === 'function' || typeof o === 'object');\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 {devModeEqual} from '../change_detection/change_detection_util';\nimport {assertIndexInRange, assertLessThan, assertNotSame} from '../util/assert';\n\nimport {getExpressionChangedErrorDetails, throwErrorIfNoChangesMode} from './errors';\nimport {LView} from './interfaces/view';\nimport {isInCheckNoChangesMode} from './state';\nimport {NO_CHANGE} from './tokens';\n\n\n// TODO(misko): consider inlining\n/** Updates binding and returns the value. */\nexport function updateBinding(lView: LView, bindingIndex: number, value: any): any {\n return lView[bindingIndex] = value;\n}\n\n\n/** Gets the current binding value. */\nexport function getBinding(lView: LView, bindingIndex: number): any {\n ngDevMode && assertIndexInRange(lView, bindingIndex);\n ngDevMode &&\n assertNotSame(lView[bindingIndex], NO_CHANGE, 'Stored value should never be NO_CHANGE.');\n return lView[bindingIndex];\n}\n\n/**\n * Updates binding if changed, then returns whether it was updated.\n *\n * This function also checks the `CheckNoChangesMode` and throws if changes are made.\n * Some changes (Objects/iterables) during `CheckNoChangesMode` are exempt to comply with VE\n * behavior.\n *\n * @param lView current `LView`\n * @param bindingIndex The binding in the `LView` to check\n * @param value New value to check against `lView[bindingIndex]`\n * @returns `true` if the bindings has changed. (Throws if binding has changed during\n * `CheckNoChangesMode`)\n */\nexport function bindingUpdated(lView: LView, bindingIndex: number, value: any): boolean {\n ngDevMode && assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');\n ngDevMode &&\n assertLessThan(bindingIndex, lView.length, `Slot should have been initialized to NO_CHANGE`);\n const oldValue = lView[bindingIndex];\n\n if (Object.is(oldValue, value)) {\n return false;\n } else {\n if (ngDevMode && isInCheckNoChangesMode()) {\n // View engine didn't report undefined values as changed on the first checkNoChanges pass\n // (before the change detection was run).\n const oldValueToCompare = oldValue !== NO_CHANGE ? oldValue : undefined;\n if (!devModeEqual(oldValueToCompare, value)) {\n const details =\n getExpressionChangedErrorDetails(lView, bindingIndex, oldValueToCompare, value);\n throwErrorIfNoChangesMode(\n oldValue === NO_CHANGE, details.oldValue, details.newValue, details.propName);\n }\n // There was a change, but the `devModeEqual` decided that the change is exempt from an error.\n // For this reason we exit as if no change. The early exit is needed to prevent the changed\n // value to be written into `LView` (If we would write the new value that we would not see it\n // as change on next CD.)\n return false;\n }\n lView[bindingIndex] = value;\n return true;\n }\n}\n\n/** Updates 2 bindings if changed, then returns whether either was updated. */\nexport function bindingUpdated2(lView: LView, bindingIndex: number, exp1: any, exp2: any): boolean {\n const different = bindingUpdated(lView, bindingIndex, exp1);\n return bindingUpdated(lView, bindingIndex + 1, exp2) || different;\n}\n\n/** Updates 3 bindings if changed, then returns whether any was updated. */\nexport function bindingUpdated3(\n lView: LView, bindingIndex: number, exp1: any, exp2: any, exp3: any): boolean {\n const different = bindingUpdated2(lView, bindingIndex, exp1, exp2);\n return bindingUpdated(lView, bindingIndex + 2, exp3) || different;\n}\n\n/** Updates 4 bindings if changed, then returns whether any was updated. */\nexport function bindingUpdated4(\n lView: LView, bindingIndex: number, exp1: any, exp2: any, exp3: any, exp4: any): boolean {\n const different = bindingUpdated2(lView, bindingIndex, exp1, exp2);\n return bindingUpdated2(lView, bindingIndex + 2, exp3, exp4) || different;\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 */\nimport {bindingUpdated} from '../bindings';\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {getLView, getSelectedTNode, getTView, nextBindingIndex} from '../state';\nimport {elementAttributeInternal, storePropertyBindingMetadata} from './shared';\n\n\n\n/**\n * Updates the value of or removes a bound attribute on an Element.\n *\n * Used in the case of `[attr.title]=\"value\"`\n *\n * @param name name The name of the attribute.\n * @param value value The attribute is removed when value is `null` or `undefined`.\n * Otherwise the attribute value is set to the stringified value.\n * @param sanitizer An optional function used to sanitize the value.\n * @param namespace Optional namespace to use when setting the attribute.\n *\n * @codeGenApi\n */\nexport function ɵɵattribute(\n name: string, value: any, sanitizer?: SanitizerFn|null,\n namespace?: string): typeof ɵɵattribute {\n const lView = getLView();\n const bindingIndex = nextBindingIndex();\n if (bindingUpdated(lView, bindingIndex, value)) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, name, value, sanitizer, namespace);\n ngDevMode && storePropertyBindingMetadata(tView.data, tNode, 'attr.' + name, bindingIndex);\n }\n return ɵɵattribute;\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 {assertEqual, assertLessThan} from '../../util/assert';\nimport {bindingUpdated, bindingUpdated2, bindingUpdated3, bindingUpdated4} from '../bindings';\nimport {LView} from '../interfaces/view';\nimport {getBindingIndex, incrementBindingIndex, nextBindingIndex, setBindingIndex} from '../state';\nimport {NO_CHANGE} from '../tokens';\nimport {renderStringify} from '../util/stringify_utils';\n\n\n\n/**\n * Create interpolation bindings with a variable number of expressions.\n *\n * If there are 1 to 8 expressions `interpolation1()` to `interpolation8()` should be used instead.\n * Those are faster because there is no need to create an array of expressions and iterate over it.\n *\n * `values`:\n * - has static text at even indexes,\n * - has evaluated expressions at odd indexes.\n *\n * Returns the concatenated string when any of the arguments changes, `NO_CHANGE` otherwise.\n */\nexport function interpolationV(lView: LView, values: any[]): string|NO_CHANGE {\n ngDevMode && assertLessThan(2, values.length, 'should have at least 3 values');\n ngDevMode && assertEqual(values.length % 2, 1, 'should have an odd number of values');\n let isBindingUpdated = false;\n let bindingIndex = getBindingIndex();\n\n for (let i = 1; i < values.length; i += 2) {\n // Check if bindings (odd indexes) have changed\n isBindingUpdated = bindingUpdated(lView, bindingIndex++, values[i]) || isBindingUpdated;\n }\n setBindingIndex(bindingIndex);\n\n if (!isBindingUpdated) {\n return NO_CHANGE;\n }\n\n // Build the updated content\n let content = values[0];\n for (let i = 1; i < values.length; i += 2) {\n content += renderStringify(values[i]) + values[i + 1];\n }\n\n return content;\n}\n\n/**\n * Creates an interpolation binding with 1 expression.\n *\n * @param prefix static value used for concatenation only.\n * @param v0 value checked for change.\n * @param suffix static value used for concatenation only.\n */\nexport function interpolation1(lView: LView, prefix: string, v0: any, suffix: string): string|\n NO_CHANGE {\n const different = bindingUpdated(lView, nextBindingIndex(), v0);\n return different ? prefix + renderStringify(v0) + suffix : NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 2 expressions.\n */\nexport function interpolation2(\n lView: LView, prefix: string, v0: any, i0: string, v1: any, suffix: string): string|NO_CHANGE {\n const bindingIndex = getBindingIndex();\n const different = bindingUpdated2(lView, bindingIndex, v0, v1);\n incrementBindingIndex(2);\n\n return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + suffix : NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 3 expressions.\n */\nexport function interpolation3(\n lView: LView, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any,\n suffix: string): string|NO_CHANGE {\n const bindingIndex = getBindingIndex();\n const different = bindingUpdated3(lView, bindingIndex, v0, v1, v2);\n incrementBindingIndex(3);\n\n return different ?\n prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + suffix :\n NO_CHANGE;\n}\n\n/**\n * Create an interpolation binding with 4 expressions.\n */\nexport function interpolation4(\n lView: LView, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, suffix: string): string|NO_CHANGE {\n const bindingIndex = getBindingIndex();\n const different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n incrementBindingIndex(4);\n\n return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 +\n renderStringify(v2) + i2 + renderStringify(v3) + suffix :\n NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 5 expressions.\n */\nexport function interpolation5(\n lView: LView, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, suffix: string): string|NO_CHANGE {\n const bindingIndex = getBindingIndex();\n let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated(lView, bindingIndex + 4, v4) || different;\n incrementBindingIndex(5);\n\n return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 +\n renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + suffix :\n NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 6 expressions.\n */\nexport function interpolation6(\n lView: LView, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string): string|NO_CHANGE {\n const bindingIndex = getBindingIndex();\n let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated2(lView, bindingIndex + 4, v4, v5) || different;\n incrementBindingIndex(6);\n\n return different ?\n prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 +\n renderStringify(v3) + i3 + renderStringify(v4) + i4 + renderStringify(v5) + suffix :\n NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 7 expressions.\n */\nexport function interpolation7(\n lView: LView, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string): string|\n NO_CHANGE {\n const bindingIndex = getBindingIndex();\n let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated3(lView, bindingIndex + 4, v4, v5, v6) || different;\n incrementBindingIndex(7);\n\n return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 +\n renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + i4 +\n renderStringify(v5) + i5 + renderStringify(v6) + suffix :\n NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 8 expressions.\n */\nexport function interpolation8(\n lView: LView, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any,\n suffix: string): string|NO_CHANGE {\n const bindingIndex = getBindingIndex();\n let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated4(lView, bindingIndex + 4, v4, v5, v6, v7) || different;\n incrementBindingIndex(8);\n\n return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 +\n renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + i4 +\n renderStringify(v5) + i5 + renderStringify(v6) + i6 + renderStringify(v7) + suffix :\n NO_CHANGE;\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 */\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {getBindingIndex, getLView, getSelectedTNode, getTView} from '../state';\nimport {NO_CHANGE} from '../tokens';\nimport {interpolation1, interpolation2, interpolation3, interpolation4, interpolation5, interpolation6, interpolation7, interpolation8, interpolationV} from './interpolation';\nimport {elementAttributeInternal, storePropertyBindingMetadata} from './shared';\n\n\n\n/**\n *\n * Update an interpolated attribute on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate1('title', 'prefix', v0, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolate1(\n attrName: string, prefix: string, v0: any, suffix: string, sanitizer?: SanitizerFn,\n namespace?: string): typeof ɵɵattributeInterpolate1 {\n const lView = getLView();\n const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(\n getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 1, prefix, suffix);\n }\n return ɵɵattributeInterpolate1;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolate2(\n attrName: string, prefix: string, v0: any, i0: string, v1: any, suffix: string,\n sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolate2 {\n const lView = getLView();\n const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(\n getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 2, prefix, i0, suffix);\n }\n return ɵɵattributeInterpolate2;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate3(\n * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolate3(\n attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any,\n suffix: string, sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolate3 {\n const lView = getLView();\n const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(\n getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 3, prefix, i0, i1,\n suffix);\n }\n return ɵɵattributeInterpolate3;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate4(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolate4(\n attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, suffix: string, sanitizer?: SanitizerFn,\n namespace?: string): typeof ɵɵattributeInterpolate4 {\n const lView = getLView();\n const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(\n getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 4, prefix, i0, i1, i2,\n suffix);\n }\n return ɵɵattributeInterpolate4;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate5(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolate5(\n attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, suffix: string, sanitizer?: SanitizerFn,\n namespace?: string): typeof ɵɵattributeInterpolate5 {\n const lView = getLView();\n const interpolatedValue =\n interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(\n getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 5, prefix, i0, i1, i2,\n i3, suffix);\n }\n return ɵɵattributeInterpolate5;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate6(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolate6(\n attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string, sanitizer?: SanitizerFn,\n namespace?: string): typeof ɵɵattributeInterpolate6 {\n const lView = getLView();\n const interpolatedValue =\n interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(\n getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 6, prefix, i0, i1, i2,\n i3, i4, suffix);\n }\n return ɵɵattributeInterpolate6;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate7(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolate7(\n attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string,\n sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolate7 {\n const lView = getLView();\n const interpolatedValue =\n interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(\n getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 7, prefix, i0, i1, i2,\n i3, i4, i5, suffix);\n }\n return ɵɵattributeInterpolate7;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate8(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolate8(\n attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any,\n suffix: string, sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolate8 {\n const lView = getLView();\n const interpolatedValue = interpolation8(\n lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(\n getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 8, prefix, i0, i1, i2,\n i3, i4, i5, i6, suffix);\n }\n return ɵɵattributeInterpolate8;\n}\n\n/**\n * Update an interpolated attribute on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n * title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolateV(\n * 'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n * 'suffix']);\n * ```\n *\n * @param attrName The name of the attribute to update.\n * @param values The collection of values and the strings in-between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolateV(\n attrName: string, values: any[], sanitizer?: SanitizerFn,\n namespace?: string): typeof ɵɵattributeInterpolateV {\n const lView = getLView();\n const interpolated = interpolationV(lView, values);\n if (interpolated !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolated, sanitizer, namespace);\n if (ngDevMode) {\n const interpolationInBetween = [values[0]]; // prefix\n for (let i = 2; i < values.length; i += 2) {\n interpolationInBetween.push(values[i]);\n }\n storePropertyBindingMetadata(\n getTView().data, tNode, 'attr.' + attrName,\n getBindingIndex() - interpolationInBetween.length + 1, ...interpolationInBetween);\n }\n }\n return ɵɵattributeInterpolateV;\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 */\nimport {assertFirstCreatePass} from '../assert';\nimport {attachPatchData} from '../context_discovery';\nimport {registerPostOrderHooks} from '../hooks';\nimport {ComponentTemplate} from '../interfaces/definition';\nimport {LocalRefExtractor, TAttributes, TContainerNode, TNodeType} from '../interfaces/node';\nimport {isDirectiveHost} from '../interfaces/type_checks';\nimport {HEADER_OFFSET, LView, RENDERER, TView, TViewType} from '../interfaces/view';\nimport {appendChild} from '../node_manipulation';\nimport {getLView, getTView, setCurrentTNode} from '../state';\nimport {getConstant} from '../util/view_utils';\nimport {addToViewTree, createDirectivesInstances, createLContainer, createTView, getOrCreateTNode, resolveDirectives, saveResolvedLocalsInData} from './shared';\n\n\n\nfunction templateFirstCreatePass(\n index: number, tView: TView, lView: LView, templateFn: ComponentTemplate<any>|null,\n decls: number, vars: number, tagName?: string|null, attrsIndex?: number|null,\n localRefsIndex?: number|null): TContainerNode {\n ngDevMode && assertFirstCreatePass(tView);\n ngDevMode && ngDevMode.firstCreatePass++;\n const tViewConsts = tView.consts;\n // TODO(pk): refactor getOrCreateTNode to have the \"create\" only version\n const tNode = getOrCreateTNode(\n tView, index, TNodeType.Container, tagName || null,\n getConstant<TAttributes>(tViewConsts, attrsIndex));\n\n resolveDirectives(tView, lView, tNode, getConstant<string[]>(tViewConsts, localRefsIndex));\n registerPostOrderHooks(tView, tNode);\n\n const embeddedTView = tNode.tViews = createTView(\n TViewType.Embedded, tNode, templateFn, decls, vars, tView.directiveRegistry,\n tView.pipeRegistry, null, tView.schemas, tViewConsts);\n\n if (tView.queries !== null) {\n tView.queries.template(tView, tNode);\n embeddedTView.queries = tView.queries.embeddedTView(tNode);\n }\n\n return tNode;\n}\n\n/**\n * Creates an LContainer for an ng-template (dynamically-inserted view), e.g.\n *\n * <ng-template #foo>\n * <div></div>\n * </ng-template>\n *\n * @param index The index of the container in the data array\n * @param templateFn Inline template\n * @param decls The number of nodes, local refs, and pipes for this template\n * @param vars The number of bindings for this template\n * @param tagName The name of the container element, if applicable\n * @param attrsIndex Index of template attributes in the `consts` array.\n * @param localRefs Index of the local references in the `consts` array.\n * @param localRefExtractor A function which extracts local-refs values from the template.\n * Defaults to the current element associated with the local-ref.\n *\n * @codeGenApi\n */\nexport function ɵɵtemplate(\n index: number, templateFn: ComponentTemplate<any>|null, decls: number, vars: number,\n tagName?: string|null, attrsIndex?: number|null, localRefsIndex?: number|null,\n localRefExtractor?: LocalRefExtractor) {\n const lView = getLView();\n const tView = getTView();\n const adjustedIndex = index + HEADER_OFFSET;\n\n const tNode = tView.firstCreatePass ? templateFirstCreatePass(\n adjustedIndex, tView, lView, templateFn, decls, vars,\n tagName, attrsIndex, localRefsIndex) :\n tView.data[adjustedIndex] as TContainerNode;\n setCurrentTNode(tNode, false);\n\n const comment = lView[RENDERER].createComment(ngDevMode ? 'container' : '');\n appendChild(tView, lView, comment, tNode);\n attachPatchData(comment, lView);\n\n addToViewTree(lView, lView[adjustedIndex] = createLContainer(comment, lView, comment, tNode));\n\n if (isDirectiveHost(tNode)) {\n createDirectivesInstances(tView, lView, tNode);\n }\n\n if (localRefsIndex != null) {\n saveResolvedLocalsInData(lView, tNode, localRefExtractor);\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 */\nimport {HEADER_OFFSET, LView, TView} from '../interfaces/view';\nimport {getContextLView} from '../state';\nimport {load} from '../util/view_utils';\n\n\n/** Store a value in the `data` at a given `index`. */\nexport function store<T>(tView: TView, lView: LView, index: number, value: T): void {\n // We don't store any static data for local variables, so the first time\n // we see the template, we should store as null to avoid a sparse array\n if (index >= tView.data.length) {\n tView.data[index] = null;\n tView.blueprint[index] = null;\n }\n lView[index] = value;\n}\n\n/**\n * Retrieves a local reference from the current contextViewData.\n *\n * If the reference to retrieve is in a parent view, this instruction is used in conjunction\n * with a nextContext() call, which walks up the tree and updates the contextViewData instance.\n *\n * @param index The index of the local ref in contextViewData.\n *\n * @codeGenApi\n */\nexport function ɵɵreference<T>(index: number) {\n const contextLView = getContextLView();\n return load<T>(contextLView, HEADER_OFFSET + index);\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 */\nimport {resolveForwardRef} from '../forward_ref';\nimport {ɵɵinject, ɵɵinvalidFactoryDep} from '../injector_compatibility';\nimport {ɵɵdefineInjectable, ɵɵdefineInjector} from '../interface/defs';\n\n/**\n * A mapping of the @angular/core API surface used in generated expressions to the actual symbols.\n *\n * This should be kept up to date with the public exports of @angular/core.\n */\nexport const angularCoreDiEnv: {[name: string]: Function} = {\n 'ɵɵdefineInjectable': ɵɵdefineInjectable,\n 'ɵɵdefineInjector': ɵɵdefineInjector,\n 'ɵɵinject': ɵɵinject,\n 'ɵɵinvalidFactoryDep': ɵɵinvalidFactoryDep,\n 'resolveForwardRef': resolveForwardRef,\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 {getCompilerFacade, JitCompilerUsage, R3InjectableMetadataFacade} from '../../compiler/compiler_facade';\nimport {Type} from '../../interface/type';\nimport {NG_FACTORY_DEF} from '../../render3/fields';\nimport {getClosureSafeProperty} from '../../util/property';\nimport {resolveForwardRef} from '../forward_ref';\nimport {Injectable} from '../injectable';\nimport {NG_PROV_DEF} from '../interface/defs';\nimport {ClassSansProvider, ExistingSansProvider, FactorySansProvider, ValueProvider, ValueSansProvider} from '../interface/provider';\n\nimport {angularCoreDiEnv} from './environment';\nimport {convertDependencies, reflectDependencies} from './util';\n\n\n\n/**\n * Compile an Angular injectable according to its `Injectable` metadata, and patch the resulting\n * injectable def (`ɵprov`) onto the injectable type.\n */\nexport function compileInjectable(type: Type<any>, meta?: Injectable): void {\n let ngInjectableDef: any = null;\n let ngFactoryDef: any = null;\n\n // if NG_PROV_DEF is already defined on this class then don't overwrite it\n if (!type.hasOwnProperty(NG_PROV_DEF)) {\n Object.defineProperty(type, NG_PROV_DEF, {\n get: () => {\n if (ngInjectableDef === null) {\n const compiler =\n getCompilerFacade({usage: JitCompilerUsage.Decorator, kind: 'injectable', type});\n ngInjectableDef = compiler.compileInjectable(\n angularCoreDiEnv, `ng:///${type.name}/ɵprov.js`, getInjectableMetadata(type, meta));\n }\n return ngInjectableDef;\n },\n });\n }\n\n // if NG_FACTORY_DEF is already defined on this class then don't overwrite it\n if (!type.hasOwnProperty(NG_FACTORY_DEF)) {\n Object.defineProperty(type, NG_FACTORY_DEF, {\n get: () => {\n if (ngFactoryDef === null) {\n const compiler =\n getCompilerFacade({usage: JitCompilerUsage.Decorator, kind: 'injectable', type});\n ngFactoryDef = compiler.compileFactory(angularCoreDiEnv, `ng:///${type.name}/ɵfac.js`, {\n name: type.name,\n type,\n typeArgumentCount: 0, // In JIT mode types are not available nor used.\n deps: reflectDependencies(type),\n target: compiler.FactoryTarget.Injectable\n });\n }\n return ngFactoryDef;\n },\n // Leave this configurable so that the factories from directives or pipes can take precedence.\n configurable: true\n });\n }\n}\n\ntype UseClassProvider = Injectable&ClassSansProvider&{deps?: any[]};\n\nconst USE_VALUE =\n getClosureSafeProperty<ValueProvider>({provide: String, useValue: getClosureSafeProperty});\n\nfunction isUseClassProvider(meta: Injectable): meta is UseClassProvider {\n return (meta as UseClassProvider).useClass !== undefined;\n}\n\nfunction isUseValueProvider(meta: Injectable): meta is Injectable&ValueSansProvider {\n return USE_VALUE in meta;\n}\n\nfunction isUseFactoryProvider(meta: Injectable): meta is Injectable&FactorySansProvider {\n return (meta as FactorySansProvider).useFactory !== undefined;\n}\n\nfunction isUseExistingProvider(meta: Injectable): meta is Injectable&ExistingSansProvider {\n return (meta as ExistingSansProvider).useExisting !== undefined;\n}\n\nfunction getInjectableMetadata(type: Type<any>, srcMeta?: Injectable): R3InjectableMetadataFacade {\n // Allow the compilation of a class with a `@Injectable()` decorator without parameters\n const meta: Injectable = srcMeta || {providedIn: null};\n const compilerMeta: R3InjectableMetadataFacade = {\n name: type.name,\n type: type,\n typeArgumentCount: 0,\n providedIn: meta.providedIn,\n };\n if ((isUseClassProvider(meta) || isUseFactoryProvider(meta)) && meta.deps !== undefined) {\n compilerMeta.deps = convertDependencies(meta.deps);\n }\n // Check to see if the user explicitly provided a `useXxxx` property.\n if (isUseClassProvider(meta)) {\n compilerMeta.useClass = meta.useClass;\n } else if (isUseValueProvider(meta)) {\n compilerMeta.useValue = meta.useValue;\n } else if (isUseFactoryProvider(meta)) {\n compilerMeta.useFactory = meta.useFactory;\n } else if (isUseExistingProvider(meta)) {\n compilerMeta.useExisting = meta.useExisting;\n }\n return compilerMeta;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {ReflectionCapabilities} from '../reflection/reflection_capabilities';\nimport {EMPTY_ARRAY} from '../util/empty';\nimport {getClosureSafeProperty} from '../util/property';\n\nimport {resolveForwardRef} from './forward_ref';\nimport {injectArgs, ɵɵinject} from './injector_compatibility';\nimport {ClassSansProvider, ConstructorSansProvider, ExistingSansProvider, FactorySansProvider, StaticClassSansProvider, ValueProvider, ValueSansProvider} from './interface/provider';\n\nconst USE_VALUE =\n getClosureSafeProperty<ValueProvider>({provide: String, useValue: getClosureSafeProperty});\n\nexport function convertInjectableProviderToFactory(\n type: Type<any>,\n provider?: ValueSansProvider|ExistingSansProvider|StaticClassSansProvider|\n ConstructorSansProvider|FactorySansProvider|ClassSansProvider): () => any {\n if (!provider) {\n const reflectionCapabilities = new ReflectionCapabilities();\n const deps = reflectionCapabilities.parameters(type);\n // TODO - convert to flags.\n return () => new type(...injectArgs(deps as any[]));\n }\n\n if (USE_VALUE in provider) {\n const valueProvider = (provider as ValueSansProvider);\n return () => valueProvider.useValue;\n } else if ((provider as ExistingSansProvider).useExisting) {\n const existingProvider = (provider as ExistingSansProvider);\n return () => ɵɵinject(resolveForwardRef(existingProvider.useExisting));\n } else if ((provider as FactorySansProvider).useFactory) {\n const factoryProvider = (provider as FactorySansProvider);\n return () => factoryProvider.useFactory(...injectArgs(factoryProvider.deps || EMPTY_ARRAY));\n } else if ((provider as StaticClassSansProvider | ClassSansProvider).useClass) {\n const classProvider = (provider as StaticClassSansProvider | ClassSansProvider);\n let deps = (provider as StaticClassSansProvider).deps;\n if (!deps) {\n const reflectionCapabilities = new ReflectionCapabilities();\n deps = reflectionCapabilities.parameters(type);\n }\n return () => new (resolveForwardRef(classProvider.useClass))(...injectArgs(deps));\n } else {\n let deps = (provider as ConstructorSansProvider).deps;\n if (!deps) {\n const reflectionCapabilities = new ReflectionCapabilities();\n deps = reflectionCapabilities.parameters(type);\n }\n return () => new type(...injectArgs(deps!));\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 {Type} from '../interface/type';\nimport {makeDecorator, TypeDecorator} from '../util/decorators';\n\nimport {getInjectableDef, InjectableType, ɵɵdefineInjectable} from './interface/defs';\nimport {ClassSansProvider, ConstructorSansProvider, ExistingSansProvider, FactorySansProvider, StaticClassSansProvider, ValueSansProvider} from './interface/provider';\nimport {compileInjectable as render3CompileInjectable} from './jit/injectable';\nimport {convertInjectableProviderToFactory} from './util';\n\n\n\n/**\n * Injectable providers used in `@Injectable` decorator.\n *\n * @publicApi\n */\nexport type InjectableProvider = ValueSansProvider|ExistingSansProvider|StaticClassSansProvider|\n ConstructorSansProvider|FactorySansProvider|ClassSansProvider;\n\n/**\n * Type of the Injectable decorator / constructor function.\n *\n * @publicApi\n */\nexport interface InjectableDecorator {\n /**\n * Decorator that marks a class as available to be\n * provided and injected as a dependency.\n *\n * @see [Introduction to Services and DI](guide/architecture-services)\n * @see [Dependency Injection Guide](guide/dependency-injection)\n *\n * @usageNotes\n *\n * Marking a class with `@Injectable` ensures that the compiler\n * will generate the necessary metadata to create the class's\n * dependencies when the class is injected.\n *\n * The following example shows how a service class is properly\n * marked so that a supporting service can be injected upon creation.\n *\n * <code-example path=\"core/di/ts/metadata_spec.ts\" region=\"Injectable\"></code-example>\n *\n */\n (): TypeDecorator;\n (options?: {providedIn: Type<any>|'root'|'platform'|'any'|null}&\n InjectableProvider): TypeDecorator;\n new(): Injectable;\n new(options?: {providedIn: Type<any>|'root'|'platform'|'any'|null}&\n InjectableProvider): Injectable;\n}\n\n/**\n * Type of the Injectable metadata.\n *\n * @publicApi\n */\nexport interface Injectable {\n /**\n * Determines which injectors will provide the injectable.\n *\n * - `Type<any>` - associates the injectable with an `@NgModule` or other `InjectorType`,\n * - 'null' : Equivalent to `undefined`. The injectable is not provided in any scope automatically\n * and must be added to a `providers` array of an [@NgModule](api/core/NgModule#providers),\n * [@Component](api/core/Directive#providers) or [@Directive](api/core/Directive#providers).\n *\n * The following options specify that this injectable should be provided in one of the following\n * injectors:\n * - 'root' : The application-level injector in most apps.\n * - 'platform' : A special singleton platform injector shared by all\n * applications on the page.\n * - 'any' : Provides a unique instance in each lazy loaded module while all eagerly loaded\n * modules share one instance.\n *\n */\n providedIn?: Type<any>|'root'|'platform'|'any'|null;\n}\n\n/**\n * Injectable decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Injectable: InjectableDecorator = makeDecorator(\n 'Injectable', undefined, undefined, undefined,\n (type: Type<any>, meta: Injectable) => SWITCH_COMPILE_INJECTABLE(type as any, meta));\n\n\n/**\n * Supports @Injectable() in JIT mode for Render2.\n */\nfunction render2CompileInjectable(\n injectableType: Type<any>,\n options?: {providedIn?: Type<any>|'root'|'platform'|'any'|null}&InjectableProvider): void {\n if (options && options.providedIn !== undefined && !getInjectableDef(injectableType)) {\n (injectableType as InjectableType<any>).ɵprov = ɵɵdefineInjectable({\n token: injectableType,\n providedIn: options.providedIn,\n factory: convertInjectableProviderToFactory(injectableType, options),\n });\n }\n}\n\nexport const SWITCH_COMPILE_INJECTABLE__POST_R3__ = render3CompileInjectable;\nconst SWITCH_COMPILE_INJECTABLE__PRE_R3__ = render2CompileInjectable;\nconst SWITCH_COMPILE_INJECTABLE: typeof render3CompileInjectable =\n SWITCH_COMPILE_INJECTABLE__PRE_R3__;\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {ERROR_ORIGINAL_ERROR, wrappedError} from '../util/errors';\nimport {stringify} from '../util/stringify';\n\nimport {ReflectiveInjector} from './reflective_injector';\nimport {ReflectiveKey} from './reflective_key';\n\nfunction findFirstClosedCycle(keys: any[]): any[] {\n const res: any[] = [];\n for (let i = 0; i < keys.length; ++i) {\n if (res.indexOf(keys[i]) > -1) {\n res.push(keys[i]);\n return res;\n }\n res.push(keys[i]);\n }\n return res;\n}\n\nfunction constructResolvingPath(keys: any[]): string {\n if (keys.length > 1) {\n const reversed = findFirstClosedCycle(keys.slice().reverse());\n const tokenStrs = reversed.map(k => stringify(k.token));\n return ' (' + tokenStrs.join(' -> ') + ')';\n }\n\n return '';\n}\n\nexport interface InjectionError extends Error {\n keys: ReflectiveKey[];\n injectors: ReflectiveInjector[];\n constructResolvingMessage: (keys: ReflectiveKey[]) => string;\n addKey(injector: ReflectiveInjector, key: ReflectiveKey): void;\n}\n\nfunction injectionError(\n injector: ReflectiveInjector, key: ReflectiveKey,\n constructResolvingMessage: (keys: ReflectiveKey[]) => string,\n originalError?: Error): InjectionError {\n const keys = [key];\n const errMsg = constructResolvingMessage(keys);\n const error =\n (originalError ? wrappedError(errMsg, originalError) : Error(errMsg)) as InjectionError;\n error.addKey = addKey;\n error.keys = keys;\n error.injectors = [injector];\n error.constructResolvingMessage = constructResolvingMessage;\n (error as any)[ERROR_ORIGINAL_ERROR] = originalError;\n return error;\n}\n\nfunction addKey(this: InjectionError, injector: ReflectiveInjector, key: ReflectiveKey): void {\n this.injectors.push(injector);\n this.keys.push(key);\n // Note: This updated message won't be reflected in the `.stack` property\n this.message = this.constructResolvingMessage(this.keys);\n}\n\n/**\n * Thrown when trying to retrieve a dependency by key from {@link Injector}, but the\n * {@link Injector} does not have a {@link Provider} for the given key.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {\n * constructor(b:B) {}\n * }\n *\n * expect(() => Injector.resolveAndCreate([A])).toThrowError();\n * ```\n */\nexport function noProviderError(injector: ReflectiveInjector, key: ReflectiveKey): InjectionError {\n return injectionError(injector, key, function(keys: ReflectiveKey[]) {\n const first = stringify(keys[0].token);\n return `No provider for ${first}!${constructResolvingPath(keys)}`;\n });\n}\n\n/**\n * Thrown when dependencies form a cycle.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * var injector = Injector.resolveAndCreate([\n * {provide: \"one\", useFactory: (two) => \"two\", deps: [[new Inject(\"two\")]]},\n * {provide: \"two\", useFactory: (one) => \"one\", deps: [[new Inject(\"one\")]]}\n * ]);\n *\n * expect(() => injector.get(\"one\")).toThrowError();\n * ```\n *\n * Retrieving `A` or `B` throws a `CyclicDependencyError` as the graph above cannot be constructed.\n */\nexport function cyclicDependencyError(\n injector: ReflectiveInjector, key: ReflectiveKey): InjectionError {\n return injectionError(injector, key, function(keys: ReflectiveKey[]) {\n return `Cannot instantiate cyclic dependency!${constructResolvingPath(keys)}`;\n });\n}\n\n/**\n * Thrown when a constructing type returns with an Error.\n *\n * The `InstantiationError` class contains the original error plus the dependency graph which caused\n * this object to be instantiated.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {\n * constructor() {\n * throw new Error('message');\n * }\n * }\n *\n * var injector = Injector.resolveAndCreate([A]);\n\n * try {\n * injector.get(A);\n * } catch (e) {\n * expect(e instanceof InstantiationError).toBe(true);\n * expect(e.originalException.message).toEqual(\"message\");\n * expect(e.originalStack).toBeDefined();\n * }\n * ```\n */\nexport function instantiationError(\n injector: ReflectiveInjector, originalException: any, originalStack: any,\n key: ReflectiveKey): InjectionError {\n return injectionError(injector, key, function(keys: ReflectiveKey[]) {\n const first = stringify(keys[0].token);\n return `${originalException.message}: Error during instantiation of ${first}!${\n constructResolvingPath(keys)}.`;\n }, originalException);\n}\n\n/**\n * Thrown when an object other then {@link Provider} (or `Type`) is passed to {@link Injector}\n * creation.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * expect(() => Injector.resolveAndCreate([\"not a type\"])).toThrowError();\n * ```\n */\nexport function invalidProviderError(provider: any) {\n return Error(\n `Invalid provider - only instances of Provider and Type are allowed, got: ${provider}`);\n}\n\n/**\n * Thrown when the class has no annotation information.\n *\n * Lack of annotation information prevents the {@link Injector} from determining which dependencies\n * need to be injected into the constructor.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {\n * constructor(b) {}\n * }\n *\n * expect(() => Injector.resolveAndCreate([A])).toThrowError();\n * ```\n *\n * This error is also thrown when the class not marked with {@link Injectable} has parameter types.\n *\n * ```typescript\n * class B {}\n *\n * class A {\n * constructor(b:B) {} // no information about the parameter types of A is available at runtime.\n * }\n *\n * expect(() => Injector.resolveAndCreate([A,B])).toThrowError();\n * ```\n *\n */\nexport function noAnnotationError(typeOrFunc: Type<any>|Function, params: any[][]): Error {\n const signature: string[] = [];\n for (let i = 0, ii = params.length; i < ii; i++) {\n const parameter = params[i];\n if (!parameter || parameter.length == 0) {\n signature.push('?');\n } else {\n signature.push(parameter.map(stringify).join(' '));\n }\n }\n return Error(\n 'Cannot resolve all parameters for \\'' + stringify(typeOrFunc) + '\\'(' +\n signature.join(', ') + '). ' +\n 'Make sure that all the parameters are decorated with Inject or have valid type annotations and that \\'' +\n stringify(typeOrFunc) + '\\' is decorated with Injectable.');\n}\n\n/**\n * Thrown when getting an object by index.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {}\n *\n * var injector = Injector.resolveAndCreate([A]);\n *\n * expect(() => injector.getAt(100)).toThrowError();\n * ```\n *\n */\nexport function outOfBoundsError(index: number) {\n return Error(`Index ${index} is out-of-bounds.`);\n}\n\n// TODO: add a working example after alpha38 is released\n/**\n * Thrown when a multi provider and a regular provider are bound to the same token.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * expect(() => Injector.resolveAndCreate([\n * { provide: \"Strings\", useValue: \"string1\", multi: true},\n * { provide: \"Strings\", useValue: \"string2\", multi: false}\n * ])).toThrowError();\n * ```\n */\nexport function mixingMultiProvidersWithRegularProvidersError(\n provider1: any, provider2: any): Error {\n return Error(`Cannot mix multi providers and regular providers, got: ${provider1} ${provider2}`);\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 {stringify} from '../util/stringify';\nimport {resolveForwardRef} from './forward_ref';\n\n\n/**\n * A unique object used for retrieving items from the {@link ReflectiveInjector}.\n *\n * Keys have:\n * - a system-wide unique `id`.\n * - a `token`.\n *\n * `Key` is used internally by {@link ReflectiveInjector} because its system-wide unique `id` allows\n * the\n * injector to store created objects in a more efficient way.\n *\n * `Key` should not be created directly. {@link ReflectiveInjector} creates keys automatically when\n * resolving\n * providers.\n *\n * @deprecated No replacement\n * @publicApi\n */\nexport class ReflectiveKey {\n public readonly displayName: string;\n /**\n * Private\n */\n constructor(public token: Object, public id: number) {\n if (!token) {\n throw new Error('Token must be defined!');\n }\n this.displayName = stringify(this.token);\n }\n\n /**\n * Retrieves a `Key` for a token.\n */\n static get(token: Object): ReflectiveKey {\n return _globalKeyRegistry.get(resolveForwardRef(token));\n }\n\n /**\n * @returns the number of keys registered in the system.\n */\n static get numberOfKeys(): number {\n return _globalKeyRegistry.numberOfKeys;\n }\n}\n\nexport class KeyRegistry {\n private _allKeys = new Map<Object, ReflectiveKey>();\n\n get(token: Object): ReflectiveKey {\n if (token instanceof ReflectiveKey) return token;\n\n if (this._allKeys.has(token)) {\n return this._allKeys.get(token)!;\n }\n\n const newKey = new ReflectiveKey(token, ReflectiveKey.numberOfKeys);\n this._allKeys.set(token, newKey);\n return newKey;\n }\n\n get numberOfKeys(): number {\n return this._allKeys.size;\n }\n}\n\nconst _globalKeyRegistry = new KeyRegistry();\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {PlatformReflectionCapabilities} from './platform_reflection_capabilities';\nimport {GetterFn, MethodFn, SetterFn} from './types';\n\nexport {PlatformReflectionCapabilities};\nexport {GetterFn, MethodFn, SetterFn};\n\n/**\n * Provides access to reflection data about symbols. Used internally by Angular\n * to power dependency injection and compilation.\n */\nexport class Reflector {\n constructor(public reflectionCapabilities: PlatformReflectionCapabilities) {}\n\n updateCapabilities(caps: PlatformReflectionCapabilities) {\n this.reflectionCapabilities = caps;\n }\n\n factory(type: Type<any>): Function {\n return this.reflectionCapabilities.factory(type);\n }\n\n parameters(typeOrFunc: Type<any>): any[][] {\n return this.reflectionCapabilities.parameters(typeOrFunc);\n }\n\n annotations(typeOrFunc: Type<any>): any[] {\n return this.reflectionCapabilities.annotations(typeOrFunc);\n }\n\n propMetadata(typeOrFunc: Type<any>): {[key: string]: any[]} {\n return this.reflectionCapabilities.propMetadata(typeOrFunc);\n }\n\n hasLifecycleHook(type: any, lcProperty: string): boolean {\n return this.reflectionCapabilities.hasLifecycleHook(type, lcProperty);\n }\n\n getter(name: string): GetterFn {\n return this.reflectionCapabilities.getter(name);\n }\n\n setter(name: string): SetterFn {\n return this.reflectionCapabilities.setter(name);\n }\n\n method(name: string): MethodFn {\n return this.reflectionCapabilities.method(name);\n }\n\n importUri(type: any): string {\n return this.reflectionCapabilities.importUri(type);\n }\n\n resourceUri(type: any): string {\n return this.reflectionCapabilities.resourceUri(type);\n }\n\n resolveIdentifier(name: string, moduleUrl: string, members: string[], runtime: any): any {\n return this.reflectionCapabilities.resolveIdentifier(name, moduleUrl, members, runtime);\n }\n\n resolveEnum(identifier: any, name: string): any {\n return this.reflectionCapabilities.resolveEnum(identifier, name);\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 {ReflectionCapabilities} from './reflection_capabilities';\nimport {Reflector} from './reflector';\n\nexport {Reflector} from './reflector';\n\n/**\n * The {@link Reflector} used internally in Angular to access metadata\n * about symbols.\n */\nexport const reflector = new Reflector(new ReflectionCapabilities());\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {reflector} from '../reflection/reflection';\n\nimport {resolveForwardRef} from './forward_ref';\nimport {InjectionToken} from './injection_token';\nimport {ClassProvider, ExistingProvider, FactoryProvider, Provider, TypeProvider, ValueProvider} from './interface/provider';\nimport {Inject, Optional, Self, SkipSelf} from './metadata';\nimport {invalidProviderError, mixingMultiProvidersWithRegularProvidersError, noAnnotationError} from './reflective_errors';\nimport {ReflectiveKey} from './reflective_key';\n\n\ninterface NormalizedProvider extends TypeProvider, ValueProvider, ClassProvider, ExistingProvider,\n FactoryProvider {}\n\n/**\n * `Dependency` is used by the framework to extend DI.\n * This is internal to Angular and should not be used directly.\n */\nexport class ReflectiveDependency {\n constructor(\n public key: ReflectiveKey, public optional: boolean, public visibility: Self|SkipSelf|null) {}\n\n static fromKey(key: ReflectiveKey): ReflectiveDependency {\n return new ReflectiveDependency(key, false, null);\n }\n}\n\nconst _EMPTY_LIST: any[] = [];\n\n/**\n * An internal resolved representation of a `Provider` used by the `Injector`.\n *\n * @usageNotes\n * This is usually created automatically by `Injector.resolveAndCreate`.\n *\n * It can be created manually, as follows:\n *\n * ### Example\n *\n * ```typescript\n * var resolvedProviders = Injector.resolve([{ provide: 'message', useValue: 'Hello' }]);\n * var injector = Injector.fromResolvedProviders(resolvedProviders);\n *\n * expect(injector.get('message')).toEqual('Hello');\n * ```\n *\n * @publicApi\n */\nexport interface ResolvedReflectiveProvider {\n /**\n * A key, usually a `Type<any>`.\n */\n key: ReflectiveKey;\n\n /**\n * Factory function which can return an instance of an object represented by a key.\n */\n resolvedFactories: ResolvedReflectiveFactory[];\n\n /**\n * Indicates if the provider is a multi-provider or a regular provider.\n */\n multiProvider: boolean;\n}\n\nexport class ResolvedReflectiveProvider_ implements ResolvedReflectiveProvider {\n readonly resolvedFactory: ResolvedReflectiveFactory;\n\n constructor(\n public key: ReflectiveKey, public resolvedFactories: ResolvedReflectiveFactory[],\n public multiProvider: boolean) {\n this.resolvedFactory = this.resolvedFactories[0];\n }\n}\n\n/**\n * An internal resolved representation of a factory function created by resolving `Provider`.\n * @publicApi\n */\nexport class ResolvedReflectiveFactory {\n constructor(\n /**\n * Factory function which can return an instance of an object represented by a key.\n */\n public factory: Function,\n\n /**\n * Arguments (dependencies) to the `factory` function.\n */\n public dependencies: ReflectiveDependency[]) {}\n}\n\n\n/**\n * Resolve a single provider.\n */\nfunction resolveReflectiveFactory(provider: NormalizedProvider): ResolvedReflectiveFactory {\n let factoryFn: Function;\n let resolvedDeps: ReflectiveDependency[];\n if (provider.useClass) {\n const useClass = resolveForwardRef(provider.useClass);\n factoryFn = reflector.factory(useClass);\n resolvedDeps = _dependenciesFor(useClass);\n } else if (provider.useExisting) {\n factoryFn = (aliasInstance: any) => aliasInstance;\n resolvedDeps = [ReflectiveDependency.fromKey(ReflectiveKey.get(provider.useExisting))];\n } else if (provider.useFactory) {\n factoryFn = provider.useFactory;\n resolvedDeps = constructDependencies(provider.useFactory, provider.deps);\n } else {\n factoryFn = () => provider.useValue;\n resolvedDeps = _EMPTY_LIST;\n }\n return new ResolvedReflectiveFactory(factoryFn, resolvedDeps);\n}\n\n/**\n * Converts the `Provider` into `ResolvedProvider`.\n *\n * `Injector` internally only uses `ResolvedProvider`, `Provider` contains convenience provider\n * syntax.\n */\nfunction resolveReflectiveProvider(provider: NormalizedProvider): ResolvedReflectiveProvider {\n return new ResolvedReflectiveProvider_(\n ReflectiveKey.get(provider.provide), [resolveReflectiveFactory(provider)],\n provider.multi || false);\n}\n\n/**\n * Resolve a list of Providers.\n */\nexport function resolveReflectiveProviders(providers: Provider[]): ResolvedReflectiveProvider[] {\n const normalized = _normalizeProviders(providers, []);\n const resolved = normalized.map(resolveReflectiveProvider);\n const resolvedProviderMap = mergeResolvedReflectiveProviders(resolved, new Map());\n return Array.from(resolvedProviderMap.values());\n}\n\n/**\n * Merges a list of ResolvedProviders into a list where each key is contained exactly once and\n * multi providers have been merged.\n */\nexport function mergeResolvedReflectiveProviders(\n providers: ResolvedReflectiveProvider[],\n normalizedProvidersMap: Map<number, ResolvedReflectiveProvider>):\n Map<number, ResolvedReflectiveProvider> {\n for (let i = 0; i < providers.length; i++) {\n const provider = providers[i];\n const existing = normalizedProvidersMap.get(provider.key.id);\n if (existing) {\n if (provider.multiProvider !== existing.multiProvider) {\n throw mixingMultiProvidersWithRegularProvidersError(existing, provider);\n }\n if (provider.multiProvider) {\n for (let j = 0; j < provider.resolvedFactories.length; j++) {\n existing.resolvedFactories.push(provider.resolvedFactories[j]);\n }\n } else {\n normalizedProvidersMap.set(provider.key.id, provider);\n }\n } else {\n let resolvedProvider: ResolvedReflectiveProvider;\n if (provider.multiProvider) {\n resolvedProvider = new ResolvedReflectiveProvider_(\n provider.key, provider.resolvedFactories.slice(), provider.multiProvider);\n } else {\n resolvedProvider = provider;\n }\n normalizedProvidersMap.set(provider.key.id, resolvedProvider);\n }\n }\n return normalizedProvidersMap;\n}\n\nfunction _normalizeProviders(\n providers: Provider[], res: NormalizedProvider[]): NormalizedProvider[] {\n providers.forEach(b => {\n if (b instanceof Type) {\n res.push({provide: b, useClass: b} as NormalizedProvider);\n\n } else if (b && typeof b == 'object' && (b as any).provide !== undefined) {\n res.push(b as NormalizedProvider);\n\n } else if (Array.isArray(b)) {\n _normalizeProviders(b, res);\n\n } else {\n throw invalidProviderError(b);\n }\n });\n\n return res;\n}\n\nexport function constructDependencies(\n typeOrFunc: any, dependencies?: any[]): ReflectiveDependency[] {\n if (!dependencies) {\n return _dependenciesFor(typeOrFunc);\n } else {\n const params: any[][] = dependencies.map(t => [t]);\n return dependencies.map(t => _extractToken(typeOrFunc, t, params));\n }\n}\n\nfunction _dependenciesFor(typeOrFunc: any): ReflectiveDependency[] {\n const params = reflector.parameters(typeOrFunc);\n\n if (!params) return [];\n if (params.some(p => p == null)) {\n throw noAnnotationError(typeOrFunc, params);\n }\n return params.map(p => _extractToken(typeOrFunc, p, params));\n}\n\nfunction _extractToken(\n typeOrFunc: any, metadata: any[]|any, params: any[][]): ReflectiveDependency {\n let token: any = null;\n let optional = false;\n\n if (!Array.isArray(metadata)) {\n if (metadata instanceof Inject) {\n return _createDependency(metadata.token, optional, null);\n } else {\n return _createDependency(metadata, optional, null);\n }\n }\n\n let visibility: Self|SkipSelf|null = null;\n\n for (let i = 0; i < metadata.length; ++i) {\n const paramMetadata = metadata[i];\n\n if (paramMetadata instanceof Type) {\n token = paramMetadata;\n\n } else if (paramMetadata instanceof Inject) {\n token = paramMetadata.token;\n\n } else if (paramMetadata instanceof Optional) {\n optional = true;\n\n } else if (paramMetadata instanceof Self || paramMetadata instanceof SkipSelf) {\n visibility = paramMetadata;\n } else if (paramMetadata instanceof InjectionToken) {\n token = paramMetadata;\n }\n }\n\n token = resolveForwardRef(token);\n\n if (token != null) {\n return _createDependency(token, optional, visibility);\n } else {\n throw noAnnotationError(typeOrFunc, params);\n }\n}\n\nfunction _createDependency(\n token: any, optional: boolean, visibility: Self|SkipSelf|null): ReflectiveDependency {\n return new ReflectiveDependency(ReflectiveKey.get(token), optional, visibility);\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 './injector';\nimport {THROW_IF_NOT_FOUND} from './injector_compatibility';\nimport {Provider} from './interface/provider';\nimport {Self, SkipSelf} from './metadata';\nimport {cyclicDependencyError, instantiationError, noProviderError, outOfBoundsError} from './reflective_errors';\nimport {ReflectiveKey} from './reflective_key';\nimport {ReflectiveDependency, ResolvedReflectiveFactory, ResolvedReflectiveProvider, resolveReflectiveProviders} from './reflective_provider';\n\n\n// Threshold for the dynamic version\nconst UNDEFINED = {};\n\n/**\n * A ReflectiveDependency injection container used for instantiating objects and resolving\n * dependencies.\n *\n * An `Injector` is a replacement for a `new` operator, which can automatically resolve the\n * constructor dependencies.\n *\n * In typical use, application code asks for the dependencies in the constructor and they are\n * resolved by the `Injector`.\n *\n * @usageNotes\n * ### Example\n *\n * The following example creates an `Injector` configured to create `Engine` and `Car`.\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);\n * var car = injector.get(Car);\n * expect(car instanceof Car).toBe(true);\n * expect(car.engine instanceof Engine).toBe(true);\n * ```\n *\n * Notice, we don't use the `new` operator because we explicitly want to have the `Injector`\n * resolve all of the object's dependencies automatically.\n *\n * @deprecated from v5 - slow and brings in a lot of code, Use `Injector.create` instead.\n * @publicApi\n */\nexport abstract class ReflectiveInjector implements Injector {\n /**\n * Turns an array of provider definitions into an array of resolved providers.\n *\n * A resolution is a process of flattening multiple nested arrays and converting individual\n * providers into an array of `ResolvedReflectiveProvider`s.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var providers = ReflectiveInjector.resolve([Car, [[Engine]]]);\n *\n * expect(providers.length).toEqual(2);\n *\n * expect(providers[0] instanceof ResolvedReflectiveProvider).toBe(true);\n * expect(providers[0].key.displayName).toBe(\"Car\");\n * expect(providers[0].dependencies.length).toEqual(1);\n * expect(providers[0].factory).toBeDefined();\n *\n * expect(providers[1].key.displayName).toBe(\"Engine\");\n * });\n * ```\n *\n */\n static resolve(providers: Provider[]): ResolvedReflectiveProvider[] {\n return resolveReflectiveProviders(providers);\n }\n\n /**\n * Resolves an array of providers and creates an injector from those providers.\n *\n * The passed-in providers can be an array of `Type`, `Provider`,\n * or a recursive array of more providers.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);\n * expect(injector.get(Car) instanceof Car).toBe(true);\n * ```\n */\n static resolveAndCreate(providers: Provider[], parent?: Injector): ReflectiveInjector {\n const ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers);\n return ReflectiveInjector.fromResolvedProviders(ResolvedReflectiveProviders, parent);\n }\n\n /**\n * Creates an injector from previously resolved providers.\n *\n * This API is the recommended way to construct injectors in performance-sensitive parts.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var providers = ReflectiveInjector.resolve([Car, Engine]);\n * var injector = ReflectiveInjector.fromResolvedProviders(providers);\n * expect(injector.get(Car) instanceof Car).toBe(true);\n * ```\n */\n static fromResolvedProviders(providers: ResolvedReflectiveProvider[], parent?: Injector):\n ReflectiveInjector {\n return new ReflectiveInjector_(providers, parent);\n }\n\n\n /**\n * Parent of this injector.\n *\n * <!-- TODO: Add a link to the section of the user guide talking about hierarchical injection.\n * -->\n */\n abstract get parent(): Injector|null;\n\n /**\n * Resolves an array of providers and creates a child injector from those providers.\n *\n * <!-- TODO: Add a link to the section of the user guide talking about hierarchical injection.\n * -->\n *\n * The passed-in providers can be an array of `Type`, `Provider`,\n * or a recursive array of more providers.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class ParentProvider {}\n * class ChildProvider {}\n *\n * var parent = ReflectiveInjector.resolveAndCreate([ParentProvider]);\n * var child = parent.resolveAndCreateChild([ChildProvider]);\n *\n * expect(child.get(ParentProvider) instanceof ParentProvider).toBe(true);\n * expect(child.get(ChildProvider) instanceof ChildProvider).toBe(true);\n * expect(child.get(ParentProvider)).toBe(parent.get(ParentProvider));\n * ```\n */\n abstract resolveAndCreateChild(providers: Provider[]): ReflectiveInjector;\n\n /**\n * Creates a child injector from previously resolved providers.\n *\n * <!-- TODO: Add a link to the section of the user guide talking about hierarchical injection.\n * -->\n *\n * This API is the recommended way to construct injectors in performance-sensitive parts.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class ParentProvider {}\n * class ChildProvider {}\n *\n * var parentProviders = ReflectiveInjector.resolve([ParentProvider]);\n * var childProviders = ReflectiveInjector.resolve([ChildProvider]);\n *\n * var parent = ReflectiveInjector.fromResolvedProviders(parentProviders);\n * var child = parent.createChildFromResolved(childProviders);\n *\n * expect(child.get(ParentProvider) instanceof ParentProvider).toBe(true);\n * expect(child.get(ChildProvider) instanceof ChildProvider).toBe(true);\n * expect(child.get(ParentProvider)).toBe(parent.get(ParentProvider));\n * ```\n */\n abstract createChildFromResolved(providers: ResolvedReflectiveProvider[]): ReflectiveInjector;\n\n /**\n * Resolves a provider and instantiates an object in the context of the injector.\n *\n * The created object does not get cached by the injector.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var injector = ReflectiveInjector.resolveAndCreate([Engine]);\n *\n * var car = injector.resolveAndInstantiate(Car);\n * expect(car.engine).toBe(injector.get(Engine));\n * expect(car).not.toBe(injector.resolveAndInstantiate(Car));\n * ```\n */\n abstract resolveAndInstantiate(provider: Provider): any;\n\n /**\n * Instantiates an object using a resolved provider in the context of the injector.\n *\n * The created object does not get cached by the injector.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var injector = ReflectiveInjector.resolveAndCreate([Engine]);\n * var carProvider = ReflectiveInjector.resolve([Car])[0];\n * var car = injector.instantiateResolved(carProvider);\n * expect(car.engine).toBe(injector.get(Engine));\n * expect(car).not.toBe(injector.instantiateResolved(carProvider));\n * ```\n */\n abstract instantiateResolved(provider: ResolvedReflectiveProvider): any;\n\n abstract get(token: any, notFoundValue?: any): any;\n}\n\nexport class ReflectiveInjector_ implements ReflectiveInjector {\n private static INJECTOR_KEY = (/* @__PURE__ */ ReflectiveKey.get(Injector));\n /** @internal */\n _constructionCounter: number = 0;\n /** @internal */\n public _providers: ResolvedReflectiveProvider[];\n public readonly parent: Injector|null;\n\n keyIds: number[];\n objs: any[];\n /**\n * Private\n */\n constructor(_providers: ResolvedReflectiveProvider[], _parent?: Injector) {\n this._providers = _providers;\n this.parent = _parent || null;\n\n const len = _providers.length;\n\n this.keyIds = [];\n this.objs = [];\n\n for (let i = 0; i < len; i++) {\n this.keyIds[i] = _providers[i].key.id;\n this.objs[i] = UNDEFINED;\n }\n }\n\n get(token: any, notFoundValue: any = THROW_IF_NOT_FOUND): any {\n return this._getByKey(ReflectiveKey.get(token), null, notFoundValue);\n }\n\n resolveAndCreateChild(providers: Provider[]): ReflectiveInjector {\n const ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers);\n return this.createChildFromResolved(ResolvedReflectiveProviders);\n }\n\n createChildFromResolved(providers: ResolvedReflectiveProvider[]): ReflectiveInjector {\n const inj = new ReflectiveInjector_(providers);\n (inj as {parent: Injector | null}).parent = this;\n return inj;\n }\n\n resolveAndInstantiate(provider: Provider): any {\n return this.instantiateResolved(ReflectiveInjector.resolve([provider])[0]);\n }\n\n instantiateResolved(provider: ResolvedReflectiveProvider): any {\n return this._instantiateProvider(provider);\n }\n\n getProviderAtIndex(index: number): ResolvedReflectiveProvider {\n if (index < 0 || index >= this._providers.length) {\n throw outOfBoundsError(index);\n }\n return this._providers[index];\n }\n\n /** @internal */\n _new(provider: ResolvedReflectiveProvider): any {\n if (this._constructionCounter++ > this._getMaxNumberOfObjects()) {\n throw cyclicDependencyError(this, provider.key);\n }\n return this._instantiateProvider(provider);\n }\n\n private _getMaxNumberOfObjects(): number {\n return this.objs.length;\n }\n\n private _instantiateProvider(provider: ResolvedReflectiveProvider): any {\n if (provider.multiProvider) {\n const res = [];\n for (let i = 0; i < provider.resolvedFactories.length; ++i) {\n res[i] = this._instantiate(provider, provider.resolvedFactories[i]);\n }\n return res;\n } else {\n return this._instantiate(provider, provider.resolvedFactories[0]);\n }\n }\n\n private _instantiate(\n provider: ResolvedReflectiveProvider,\n ResolvedReflectiveFactory: ResolvedReflectiveFactory): any {\n const factory = ResolvedReflectiveFactory.factory;\n\n let deps: any[];\n try {\n deps =\n ResolvedReflectiveFactory.dependencies.map(dep => this._getByReflectiveDependency(dep));\n } catch (e) {\n if (e.addKey) {\n e.addKey(this, provider.key);\n }\n throw e;\n }\n\n let obj: any;\n try {\n obj = factory(...deps);\n } catch (e) {\n throw instantiationError(this, e, e.stack, provider.key);\n }\n\n return obj;\n }\n\n private _getByReflectiveDependency(dep: ReflectiveDependency): any {\n return this._getByKey(dep.key, dep.visibility, dep.optional ? null : THROW_IF_NOT_FOUND);\n }\n\n private _getByKey(key: ReflectiveKey, visibility: Self|SkipSelf|null, notFoundValue: any): any {\n if (key === ReflectiveInjector_.INJECTOR_KEY) {\n return this;\n }\n\n if (visibility instanceof Self) {\n return this._getByKeySelf(key, notFoundValue);\n\n } else {\n return this._getByKeyDefault(key, notFoundValue, visibility);\n }\n }\n\n private _getObjByKeyId(keyId: number): any {\n for (let i = 0; i < this.keyIds.length; i++) {\n if (this.keyIds[i] === keyId) {\n if (this.objs[i] === UNDEFINED) {\n this.objs[i] = this._new(this._providers[i]);\n }\n\n return this.objs[i];\n }\n }\n\n return UNDEFINED;\n }\n\n /** @internal */\n _throwOrNull(key: ReflectiveKey, notFoundValue: any): any {\n if (notFoundValue !== THROW_IF_NOT_FOUND) {\n return notFoundValue;\n } else {\n throw noProviderError(this, key);\n }\n }\n\n /** @internal */\n _getByKeySelf(key: ReflectiveKey, notFoundValue: any): any {\n const obj = this._getObjByKeyId(key.id);\n return (obj !== UNDEFINED) ? obj : this._throwOrNull(key, notFoundValue);\n }\n\n /** @internal */\n _getByKeyDefault(key: ReflectiveKey, notFoundValue: any, visibility: Self|SkipSelf|null): any {\n let inj: Injector|null;\n\n if (visibility instanceof SkipSelf) {\n inj = this.parent;\n } else {\n inj = this;\n }\n\n while (inj instanceof ReflectiveInjector_) {\n const inj_ = <ReflectiveInjector_>inj;\n const obj = inj_._getObjByKeyId(key.id);\n if (obj !== UNDEFINED) return obj;\n inj = inj_.parent;\n }\n if (inj !== null) {\n return inj.get(key.token, notFoundValue);\n } else {\n return this._throwOrNull(key, notFoundValue);\n }\n }\n\n get displayName(): string {\n const providers =\n _mapProviders(this, (b: ResolvedReflectiveProvider) => ' \"' + b.key.displayName + '\" ')\n .join(', ');\n return `ReflectiveInjector(providers: [${providers}])`;\n }\n\n toString(): string {\n return this.displayName;\n }\n}\n\nfunction _mapProviders(injector: ReflectiveInjector_, fn: Function): any[] {\n const res: any[] = [];\n for (let i = 0; i < injector._providers.length; ++i) {\n res[i] = fn(injector.getProviderAtIndex(i));\n }\n return res;\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 * The `di` module provides dependency injection container services.\n */\n\nexport * from './metadata';\nexport {InjectFlags} from './interface/injector';\nexport {ɵɵdefineInjectable, defineInjectable, ɵɵdefineInjector, InjectableType, InjectorType} from './interface/defs';\nexport {forwardRef, resolveForwardRef, ForwardRefFn} from './forward_ref';\nexport {Injectable, InjectableDecorator, InjectableProvider} from './injectable';\nexport {Injector} from './injector';\nexport {ProviderToken} from './provider_token';\nexport {ɵɵinject, inject, ɵɵinvalidFactoryDep} from './injector_compatibility';\nexport {INJECTOR} from './injector_token';\nexport {ReflectiveInjector} from './reflective_injector';\nexport {ClassProvider, ClassSansProvider, ConstructorProvider, ConstructorSansProvider, ExistingProvider, ExistingSansProvider, FactoryProvider, FactorySansProvider, Provider, StaticClassProvider, StaticClassSansProvider, StaticProvider, TypeProvider, ValueProvider, ValueSansProvider} from './interface/provider';\nexport {ResolvedReflectiveFactory, ResolvedReflectiveProvider} from './reflective_provider';\nexport {ReflectiveKey} from './reflective_key';\nexport {InjectionToken} from './injection_token';\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 * This file should not be necessary because node resolution should just default to `./di/index`!\n *\n * However it does not seem to work and it breaks:\n * - //packages/animations/browser/test:test_web_chromium-local\n * - //packages/compiler-cli/test:extract_i18n\n * - //packages/compiler-cli/test:ngc\n * - //packages/compiler-cli/test:perform_watch\n * - //packages/compiler-cli/test/diagnostics:check_types\n * - //packages/compiler-cli/test/transformers:test\n * - //packages/compiler/test:test\n * - //tools/public_api_guard:core_api\n *\n * Remove this file once the above is solved or wait until `ngc` is deleted and then it should be\n * safe to delete this file.\n */\n\nexport * from './di/index';\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 */\nimport {InjectFlags, resolveForwardRef} from '../../di';\nimport {assertInjectImplementationNotEqual} from '../../di/inject_switch';\nimport {ɵɵinject} from '../../di/injector_compatibility';\nimport {ProviderToken} from '../../di/provider_token';\nimport {getOrCreateInjectable} from '../di';\nimport {TDirectiveHostNode} from '../interfaces/node';\nimport {getCurrentTNode, getLView} from '../state';\n\n/**\n * Returns the value associated to the given token from the injectors.\n *\n * `directiveInject` is intended to be used for directive, component and pipe factories.\n * All other injection use `inject` which does not walk the node injector tree.\n *\n * Usage example (in factory function):\n *\n * ```ts\n * class SomeDirective {\n * constructor(directive: DirectiveA) {}\n *\n * static ɵdir = ɵɵdefineDirective({\n * type: SomeDirective,\n * factory: () => new SomeDirective(ɵɵdirectiveInject(DirectiveA))\n * });\n * }\n * ```\n * @param token the type or token to inject\n * @param flags Injection flags\n * @returns the value from the injector or `null` when not found\n *\n * @codeGenApi\n */\nexport function ɵɵdirectiveInject<T>(token: ProviderToken<T>): T;\nexport function ɵɵdirectiveInject<T>(token: ProviderToken<T>, flags: InjectFlags): T;\nexport function ɵɵdirectiveInject<T>(token: ProviderToken<T>, flags = InjectFlags.Default): T|null {\n const lView = getLView();\n // Fall back to inject() if view hasn't been created. This situation can happen in tests\n // if inject utilities are used before bootstrapping.\n if (lView === null) {\n // Verify that we will not get into infinite loop.\n ngDevMode && assertInjectImplementationNotEqual(ɵɵdirectiveInject);\n return ɵɵinject(token, flags);\n }\n const tNode = getCurrentTNode();\n return getOrCreateInjectable<T>(\n tNode as TDirectiveHostNode, lView, resolveForwardRef(token), flags);\n}\n\n/**\n * Throws an error indicating that a factory function could not be generated by the compiler for a\n * particular class.\n *\n * This instruction allows the actual error message to be optimized away when ngDevMode is turned\n * off, saving bytes of generated code while still providing a good experience in dev mode.\n *\n * The name of the class is not mentioned here, but will be in the generated factory function name\n * and thus in the stack trace.\n *\n * @codeGenApi\n */\nexport function ɵɵinvalidFactory(): never {\n const msg =\n ngDevMode ? `This constructor was not compatible with Dependency Injection.` : 'invalid';\n throw new Error(msg);\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 */\nimport {bindingUpdated} from '../bindings';\nimport {TNode} from '../interfaces/node';\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {LView, RENDERER, TView} from '../interfaces/view';\nimport {getLView, getSelectedTNode, getTView, nextBindingIndex} from '../state';\n\nimport {elementPropertyInternal, setInputsForProperty, storePropertyBindingMetadata} from './shared';\n\n\n/**\n * Update a property on a selected element.\n *\n * Operates on the element selected by index via the {@link select} instruction.\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled\n *\n * @param propName Name of property. Because it is going to DOM, this is not subject to\n * renaming as part of minification.\n * @param value New value to write.\n * @param sanitizer An optional function used to sanitize the value.\n * @returns This function returns itself so that it may be chained\n * (e.g. `property('name', ctx.name)('title', ctx.title)`)\n *\n * @codeGenApi\n */\nexport function ɵɵproperty<T>(\n propName: string, value: T, sanitizer?: SanitizerFn|null): typeof ɵɵproperty {\n const lView = getLView();\n const bindingIndex = nextBindingIndex();\n if (bindingUpdated(lView, bindingIndex, value)) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView, tNode, lView, propName, value, lView[RENDERER], sanitizer, false);\n ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);\n }\n return ɵɵproperty;\n}\n\n/**\n * Given `<div style=\"...\" my-dir>` and `MyDir` with `@Input('style')` we need to write to\n * directive input.\n */\nexport function setDirectiveInputsWhichShadowsStyling(\n tView: TView, tNode: TNode, lView: LView, value: any, isClassBased: boolean) {\n const inputs = tNode.inputs!;\n const property = isClassBased ? 'class' : 'style';\n // We support both 'class' and `className` hence the fallback.\n setInputsForProperty(tView, lView, inputs[property], property, value);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertDefined, assertEqual, assertIndexInRange} from '../../util/assert';\nimport {assertFirstCreatePass, assertHasParent} from '../assert';\nimport {attachPatchData} from '../context_discovery';\nimport {formatRuntimeError, RuntimeErrorCode} from '../error_code';\nimport {registerPostOrderHooks} from '../hooks';\nimport {hasClassInput, hasStyleInput, TAttributes, TElementNode, TNode, TNodeFlags, TNodeType} from '../interfaces/node';\nimport {RElement} from '../interfaces/renderer_dom';\nimport {isContentQueryHost, isDirectiveHost} from '../interfaces/type_checks';\nimport {HEADER_OFFSET, LView, RENDERER, TView} from '../interfaces/view';\nimport {assertTNodeType} from '../node_assert';\nimport {appendChild, createElementNode, writeDirectClass, writeDirectStyle} from '../node_manipulation';\nimport {decreaseElementDepthCount, getBindingIndex, getCurrentTNode, getElementDepthCount, getLView, getNamespace, getTView, increaseElementDepthCount, isCurrentTNodeParent, setCurrentTNode, setCurrentTNodeAsNotParent} from '../state';\nimport {computeStaticStyling} from '../styling/static_styling';\nimport {setUpAttributes} from '../util/attrs_utils';\nimport {getConstant} from '../util/view_utils';\nimport {setDirectiveInputsWhichShadowsStyling} from './property';\nimport {createDirectivesInstances, executeContentQueries, getOrCreateTNode, matchingSchemas, resolveDirectives, saveResolvedLocalsInData} from './shared';\n\n\n\nfunction elementStartFirstCreatePass(\n index: number, tView: TView, lView: LView, native: RElement, name: string,\n attrsIndex?: number|null, localRefsIndex?: number): TElementNode {\n ngDevMode && assertFirstCreatePass(tView);\n ngDevMode && ngDevMode.firstCreatePass++;\n\n const tViewConsts = tView.consts;\n const attrs = getConstant<TAttributes>(tViewConsts, attrsIndex);\n const tNode = getOrCreateTNode(tView, index, TNodeType.Element, name, attrs);\n\n const hasDirectives =\n resolveDirectives(tView, lView, tNode, getConstant<string[]>(tViewConsts, localRefsIndex));\n ngDevMode && logUnknownElementError(tView, native, tNode, hasDirectives);\n\n if (tNode.attrs !== null) {\n computeStaticStyling(tNode, tNode.attrs, false);\n }\n\n if (tNode.mergedAttrs !== null) {\n computeStaticStyling(tNode, tNode.mergedAttrs, true);\n }\n\n if (tView.queries !== null) {\n tView.queries.elementStart(tView, tNode);\n }\n\n return tNode;\n}\n\n/**\n * Create DOM element. The instruction must later be followed by `elementEnd()` call.\n *\n * @param index Index of the element in the LView array\n * @param name Name of the DOM Node\n * @param attrsIndex Index of the element's attributes in the `consts` array.\n * @param localRefsIndex Index of the element's local references in the `consts` array.\n *\n * Attributes and localRefs are passed as an array of strings where elements with an even index\n * hold an attribute name and elements with an odd index hold an attribute value, ex.:\n * ['id', 'warning5', 'class', 'alert']\n *\n * @codeGenApi\n */\nexport function ɵɵelementStart(\n index: number, name: string, attrsIndex?: number|null, localRefsIndex?: number): void {\n const lView = getLView();\n const tView = getTView();\n const adjustedIndex = HEADER_OFFSET + index;\n\n ngDevMode &&\n assertEqual(\n getBindingIndex(), tView.bindingStartIndex,\n 'elements should be created before any bindings');\n ngDevMode && assertIndexInRange(lView, adjustedIndex);\n\n const renderer = lView[RENDERER];\n const native = lView[adjustedIndex] = createElementNode(renderer, name, getNamespace());\n const tNode = tView.firstCreatePass ?\n elementStartFirstCreatePass(\n adjustedIndex, tView, lView, native, name, attrsIndex, localRefsIndex) :\n tView.data[adjustedIndex] as TElementNode;\n setCurrentTNode(tNode, true);\n\n const mergedAttrs = tNode.mergedAttrs;\n if (mergedAttrs !== null) {\n setUpAttributes(renderer, native, mergedAttrs);\n }\n const classes = tNode.classes;\n if (classes !== null) {\n writeDirectClass(renderer, native, classes);\n }\n const styles = tNode.styles;\n if (styles !== null) {\n writeDirectStyle(renderer, native, styles);\n }\n\n if ((tNode.flags & TNodeFlags.isDetached) !== TNodeFlags.isDetached) {\n // In the i18n case, the translation may have removed this element, so only add it if it is not\n // detached. See `TNodeType.Placeholder` and `LFrame.inI18n` for more context.\n appendChild(tView, lView, native, tNode);\n }\n\n // any immediate children of a component or template container must be pre-emptively\n // monkey-patched with the component view data so that the element can be inspected\n // later on using any element discovery utility methods (see `element_discovery.ts`)\n if (getElementDepthCount() === 0) {\n attachPatchData(native, lView);\n }\n increaseElementDepthCount();\n\n\n if (isDirectiveHost(tNode)) {\n createDirectivesInstances(tView, lView, tNode);\n executeContentQueries(tView, tNode, lView);\n }\n if (localRefsIndex !== null) {\n saveResolvedLocalsInData(lView, tNode);\n }\n}\n\n/**\n * Mark the end of the element.\n *\n * @codeGenApi\n */\nexport function ɵɵelementEnd(): void {\n let currentTNode = getCurrentTNode()!;\n ngDevMode && assertDefined(currentTNode, 'No parent node to close.');\n if (isCurrentTNodeParent()) {\n setCurrentTNodeAsNotParent();\n } else {\n ngDevMode && assertHasParent(getCurrentTNode());\n currentTNode = currentTNode.parent!;\n setCurrentTNode(currentTNode, false);\n }\n\n const tNode = currentTNode;\n ngDevMode && assertTNodeType(tNode, TNodeType.AnyRNode);\n\n\n decreaseElementDepthCount();\n\n const tView = getTView();\n if (tView.firstCreatePass) {\n registerPostOrderHooks(tView, currentTNode);\n if (isContentQueryHost(currentTNode)) {\n tView.queries!.elementEnd(currentTNode);\n }\n }\n\n if (tNode.classesWithoutHost != null && hasClassInput(tNode)) {\n setDirectiveInputsWhichShadowsStyling(tView, tNode, getLView(), tNode.classesWithoutHost, true);\n }\n\n if (tNode.stylesWithoutHost != null && hasStyleInput(tNode)) {\n setDirectiveInputsWhichShadowsStyling(tView, tNode, getLView(), tNode.stylesWithoutHost, false);\n }\n}\n\n/**\n * Creates an empty element using {@link elementStart} and {@link elementEnd}\n *\n * @param index Index of the element in the data array\n * @param name Name of the DOM Node\n * @param attrsIndex Index of the element's attributes in the `consts` array.\n * @param localRefsIndex Index of the element's local references in the `consts` array.\n *\n * @codeGenApi\n */\nexport function ɵɵelement(\n index: number, name: string, attrsIndex?: number|null, localRefsIndex?: number): void {\n ɵɵelementStart(index, name, attrsIndex, localRefsIndex);\n ɵɵelementEnd();\n}\n\nfunction logUnknownElementError(\n tView: TView, element: RElement, tNode: TNode, hasDirectives: boolean): void {\n const schemas = tView.schemas;\n\n // If `schemas` is set to `null`, that's an indication that this Component was compiled in AOT\n // mode where this check happens at compile time. In JIT mode, `schemas` is always present and\n // defined as an array (as an empty array in case `schemas` field is not defined) and we should\n // execute the check below.\n if (schemas === null) return;\n\n const tagName = tNode.value;\n\n // If the element matches any directive, it's considered as valid.\n if (!hasDirectives && tagName !== null) {\n // The element is unknown if it's an instance of HTMLUnknownElement or it isn't registered\n // as a custom element. Note that unknown elements with a dash in their name won't be instances\n // of HTMLUnknownElement in browsers that support web components.\n const isUnknown =\n // Note that we can't check for `typeof HTMLUnknownElement === 'function'`,\n // because while most browsers return 'function', IE returns 'object'.\n (typeof HTMLUnknownElement !== 'undefined' && HTMLUnknownElement &&\n element instanceof HTMLUnknownElement) ||\n (typeof customElements !== 'undefined' && tagName.indexOf('-') > -1 &&\n !customElements.get(tagName));\n\n if (isUnknown && !matchingSchemas(tView, tagName)) {\n let message = `'${tagName}' is not a known element:\\n`;\n message += `1. If '${\n tagName}' is an Angular component, then verify that it is part of this module.\\n`;\n if (tagName && tagName.indexOf('-') > -1) {\n message += `2. If '${\n tagName}' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.`;\n } else {\n message +=\n `2. To allow any element add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.`;\n }\n console.error(formatRuntimeError(RuntimeErrorCode.UNKNOWN_ELEMENT, message));\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 */\nimport {assertEqual, assertIndexInRange} from '../../util/assert';\nimport {assertHasParent} from '../assert';\nimport {attachPatchData} from '../context_discovery';\nimport {registerPostOrderHooks} from '../hooks';\nimport {TAttributes, TElementContainerNode, TNodeType} from '../interfaces/node';\nimport {isContentQueryHost, isDirectiveHost} from '../interfaces/type_checks';\nimport {HEADER_OFFSET, LView, RENDERER, T_HOST, TView} from '../interfaces/view';\nimport {assertTNodeType} from '../node_assert';\nimport {appendChild} from '../node_manipulation';\nimport {getBindingIndex, getCurrentTNode, getLView, getTView, isCurrentTNodeParent, setCurrentTNode, setCurrentTNodeAsNotParent} from '../state';\nimport {computeStaticStyling} from '../styling/static_styling';\nimport {getConstant} from '../util/view_utils';\n\nimport {createDirectivesInstances, executeContentQueries, getOrCreateTNode, resolveDirectives, saveResolvedLocalsInData} from './shared';\n\nfunction elementContainerStartFirstCreatePass(\n index: number, tView: TView, lView: LView, attrsIndex?: number|null,\n localRefsIndex?: number): TElementContainerNode {\n ngDevMode && ngDevMode.firstCreatePass++;\n\n const tViewConsts = tView.consts;\n const attrs = getConstant<TAttributes>(tViewConsts, attrsIndex);\n const tNode = getOrCreateTNode(tView, index, TNodeType.ElementContainer, 'ng-container', attrs);\n\n // While ng-container doesn't necessarily support styling, we use the style context to identify\n // and execute directives on the ng-container.\n if (attrs !== null) {\n computeStaticStyling(tNode, attrs, true);\n }\n\n const localRefs = getConstant<string[]>(tViewConsts, localRefsIndex);\n resolveDirectives(tView, lView, tNode, localRefs);\n\n if (tView.queries !== null) {\n tView.queries.elementStart(tView, tNode);\n }\n\n return tNode;\n}\n\n/**\n * Creates a logical container for other nodes (<ng-container>) backed by a comment node in the DOM.\n * The instruction must later be followed by `elementContainerEnd()` call.\n *\n * @param index Index of the element in the LView array\n * @param attrsIndex Index of the container attributes in the `consts` array.\n * @param localRefsIndex Index of the container's local references in the `consts` array.\n *\n * Even if this instruction accepts a set of attributes no actual attribute values are propagated to\n * the DOM (as a comment node can't have attributes). Attributes are here only for directive\n * matching purposes and setting initial inputs of directives.\n *\n * @codeGenApi\n */\nexport function ɵɵelementContainerStart(\n index: number, attrsIndex?: number|null, localRefsIndex?: number): void {\n const lView = getLView();\n const tView = getTView();\n const adjustedIndex = index + HEADER_OFFSET;\n\n ngDevMode && assertIndexInRange(lView, adjustedIndex);\n ngDevMode &&\n assertEqual(\n getBindingIndex(), tView.bindingStartIndex,\n 'element containers should be created before any bindings');\n\n const tNode = tView.firstCreatePass ?\n elementContainerStartFirstCreatePass(\n adjustedIndex, tView, lView, attrsIndex, localRefsIndex) :\n tView.data[adjustedIndex] as TElementContainerNode;\n setCurrentTNode(tNode, true);\n\n ngDevMode && ngDevMode.rendererCreateComment++;\n const native = lView[adjustedIndex] =\n lView[RENDERER].createComment(ngDevMode ? 'ng-container' : '');\n appendChild(tView, lView, native, tNode);\n attachPatchData(native, lView);\n\n if (isDirectiveHost(tNode)) {\n createDirectivesInstances(tView, lView, tNode);\n executeContentQueries(tView, tNode, lView);\n }\n\n if (localRefsIndex != null) {\n saveResolvedLocalsInData(lView, tNode);\n }\n}\n\n/**\n * Mark the end of the <ng-container>.\n *\n * @codeGenApi\n */\nexport function ɵɵelementContainerEnd(): void {\n let currentTNode = getCurrentTNode()!;\n const tView = getTView();\n if (isCurrentTNodeParent()) {\n setCurrentTNodeAsNotParent();\n } else {\n ngDevMode && assertHasParent(currentTNode);\n currentTNode = currentTNode.parent!;\n setCurrentTNode(currentTNode, false);\n }\n\n ngDevMode && assertTNodeType(currentTNode, TNodeType.ElementContainer);\n\n if (tView.firstCreatePass) {\n registerPostOrderHooks(tView, currentTNode);\n if (isContentQueryHost(currentTNode)) {\n tView.queries!.elementEnd(currentTNode);\n }\n }\n}\n\n/**\n * Creates an empty logical container using {@link elementContainerStart}\n * and {@link elementContainerEnd}\n *\n * @param index Index of the element in the LView array\n * @param attrsIndex Index of the container attributes in the `consts` array.\n * @param localRefsIndex Index of the container's local references in the `consts` array.\n *\n * @codeGenApi\n */\nexport function ɵɵelementContainer(\n index: number, attrsIndex?: number|null, localRefsIndex?: number): void {\n ɵɵelementContainerStart(index, attrsIndex, localRefsIndex);\n ɵɵelementContainerEnd();\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 */\nimport {OpaqueViewState} from '../interfaces/view';\nimport {getLView} from '../state';\n\n/**\n * Returns the current OpaqueViewState instance.\n *\n * Used in conjunction with the restoreView() instruction to save a snapshot\n * of the current view and restore it when listeners are invoked. This allows\n * walking the declaration view tree in listeners to get vars from parent views.\n *\n * @codeGenApi\n */\nexport function ɵɵgetCurrentView(): OpaqueViewState {\n return getLView() as any as OpaqueViewState;\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 {Observable, Subscribable} from 'rxjs';\n\n/**\n * Determine if the argument is shaped like a Promise\n */\nexport function isPromise<T = any>(obj: any): obj is Promise<T> {\n // allow any Promise/A+ compliant thenable.\n // It's up to the caller to ensure that obj.then conforms to the spec\n return !!obj && typeof obj.then === 'function';\n}\n\n/**\n * Determine if the argument is a Subscribable\n */\nexport function isSubscribable(obj: any|Subscribable<any>): obj is Subscribable<any> {\n return !!obj && typeof obj.subscribe === 'function';\n}\n\n/**\n * Determine if the argument is an Observable\n *\n * Strictly this tests that the `obj` is `Subscribable`, since `Observable`\n * types need additional methods, such as `lift()`. But it is adequate for our\n * needs since within the Angular framework code we only ever need to use the\n * `subscribe()` method, and RxJS has mechanisms to wrap `Subscribable` objects\n * into `Observable` as needed.\n */\nexport const isObservable =\n isSubscribable as ((obj: any|Observable<any>) => obj is Observable<any>);\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\nimport {assertIndexInRange} from '../../util/assert';\nimport {isObservable} from '../../util/lang';\nimport {PropertyAliasValue, TNode, TNodeFlags, TNodeType} from '../interfaces/node';\nimport {GlobalTargetResolver, isProceduralRenderer, Renderer3} from '../interfaces/renderer';\nimport {RElement} from '../interfaces/renderer_dom';\nimport {isDirectiveHost} from '../interfaces/type_checks';\nimport {CLEANUP, CONTEXT, FLAGS, LView, LViewFlags, RENDERER, TView} from '../interfaces/view';\nimport {assertTNodeType} from '../node_assert';\nimport {profiler, ProfilerEvent} from '../profiler';\nimport {getCurrentDirectiveDef, getCurrentTNode, getLView, getTView} from '../state';\nimport {getComponentLViewByIndex, getNativeByTNode, unwrapRNode} from '../util/view_utils';\n\nimport {getOrCreateLViewCleanup, getOrCreateTViewCleanup, handleError, loadComponentRenderer, markViewDirty} from './shared';\n\n\n\n/**\n * Adds an event listener to the current node.\n *\n * If an output exists on one of the node's directives, it also subscribes to the output\n * and saves the subscription for later cleanup.\n *\n * @param eventName Name of the event\n * @param listenerFn The function to be called when event emits\n * @param useCapture Whether or not to use capture in event listener\n * @param eventTargetResolver Function that returns global target information in case this listener\n * should be attached to a global object like window, document or body\n *\n * @codeGenApi\n */\nexport function ɵɵlistener(\n eventName: string, listenerFn: (e?: any) => any, useCapture?: boolean,\n eventTargetResolver?: GlobalTargetResolver): typeof ɵɵlistener {\n const lView = getLView();\n const tView = getTView();\n const tNode = getCurrentTNode()!;\n listenerInternal(\n tView, lView, lView[RENDERER], tNode, eventName, listenerFn, !!useCapture,\n eventTargetResolver);\n return ɵɵlistener;\n}\n\n/**\n * Registers a synthetic host listener (e.g. `(@foo.start)`) on a component or directive.\n *\n * This instruction is for compatibility purposes and is designed to ensure that a\n * synthetic host listener (e.g. `@HostListener('@foo.start')`) properly gets rendered\n * in the component's renderer. Normally all host listeners are evaluated with the\n * parent component's renderer, but, in the case of animation @triggers, they need\n * to be evaluated with the sub component's renderer (because that's where the\n * animation triggers are defined).\n *\n * Do not use this instruction as a replacement for `listener`. This instruction\n * only exists to ensure compatibility with the ViewEngine's host binding behavior.\n *\n * @param eventName Name of the event\n * @param listenerFn The function to be called when event emits\n * @param useCapture Whether or not to use capture in event listener\n * @param eventTargetResolver Function that returns global target information in case this listener\n * should be attached to a global object like window, document or body\n *\n * @codeGenApi\n */\nexport function ɵɵsyntheticHostListener(\n eventName: string, listenerFn: (e?: any) => any): typeof ɵɵsyntheticHostListener {\n const tNode = getCurrentTNode()!;\n const lView = getLView();\n const tView = getTView();\n const currentDef = getCurrentDirectiveDef(tView.data);\n const renderer = loadComponentRenderer(currentDef, tNode, lView);\n listenerInternal(tView, lView, renderer, tNode, eventName, listenerFn, false);\n return ɵɵsyntheticHostListener;\n}\n\n/**\n * A utility function that checks if a given element has already an event handler registered for an\n * event with a specified name. The TView.cleanup data structure is used to find out which events\n * are registered for a given element.\n */\nfunction findExistingListener(\n tView: TView, lView: LView, eventName: string, tNodeIdx: number): ((e?: any) => any)|null {\n const tCleanup = tView.cleanup;\n if (tCleanup != null) {\n for (let i = 0; i < tCleanup.length - 1; i += 2) {\n const cleanupEventName = tCleanup[i];\n if (cleanupEventName === eventName && tCleanup[i + 1] === tNodeIdx) {\n // We have found a matching event name on the same node but it might not have been\n // registered yet, so we must explicitly verify entries in the LView cleanup data\n // structures.\n const lCleanup = lView[CLEANUP]!;\n const listenerIdxInLCleanup = tCleanup[i + 2];\n return lCleanup.length > listenerIdxInLCleanup ? lCleanup[listenerIdxInLCleanup] : null;\n }\n // TView.cleanup can have a mix of 4-elements entries (for event handler cleanups) or\n // 2-element entries (for directive and queries destroy hooks). As such we can encounter\n // blocks of 4 or 2 items in the tView.cleanup and this is why we iterate over 2 elements\n // first and jump another 2 elements if we detect listeners cleanup (4 elements). Also check\n // documentation of TView.cleanup for more details of this data structure layout.\n if (typeof cleanupEventName === 'string') {\n i += 2;\n }\n }\n }\n return null;\n}\n\nfunction listenerInternal(\n tView: TView, lView: LView, renderer: Renderer3, tNode: TNode, eventName: string,\n listenerFn: (e?: any) => any, useCapture: boolean,\n eventTargetResolver?: GlobalTargetResolver): void {\n const isTNodeDirectiveHost = isDirectiveHost(tNode);\n const firstCreatePass = tView.firstCreatePass;\n const tCleanup: false|any[] = firstCreatePass && getOrCreateTViewCleanup(tView);\n const context = lView[CONTEXT];\n\n // When the ɵɵlistener instruction was generated and is executed we know that there is either a\n // native listener or a directive output on this element. As such we we know that we will have to\n // register a listener and store its cleanup function on LView.\n const lCleanup = getOrCreateLViewCleanup(lView);\n\n ngDevMode && assertTNodeType(tNode, TNodeType.AnyRNode | TNodeType.AnyContainer);\n\n let processOutputs = true;\n\n // Adding a native event listener is applicable when:\n // - The corresponding TNode represents a DOM element.\n // - The event target has a resolver (usually resulting in a global object,\n // such as `window` or `document`).\n if ((tNode.type & TNodeType.AnyRNode) || eventTargetResolver) {\n const native = getNativeByTNode(tNode, lView) as RElement;\n const target = eventTargetResolver ? eventTargetResolver(native) : native;\n const lCleanupIndex = lCleanup.length;\n const idxOrTargetGetter = eventTargetResolver ?\n (_lView: LView) => eventTargetResolver(unwrapRNode(_lView[tNode.index])) :\n tNode.index;\n\n // In order to match current behavior, native DOM event listeners must be added for all\n // events (including outputs).\n if (isProceduralRenderer(renderer)) {\n // There might be cases where multiple directives on the same element try to register an event\n // handler function for the same event. In this situation we want to avoid registration of\n // several native listeners as each registration would be intercepted by NgZone and\n // trigger change detection. This would mean that a single user action would result in several\n // change detections being invoked. To avoid this situation we want to have only one call to\n // native handler registration (for the same element and same type of event).\n //\n // In order to have just one native event handler in presence of multiple handler functions,\n // we just register a first handler function as a native event listener and then chain\n // (coalesce) other handler functions on top of the first native handler function.\n let existingListener = null;\n // Please note that the coalescing described here doesn't happen for events specifying an\n // alternative target (ex. (document:click)) - this is to keep backward compatibility with the\n // view engine.\n // Also, we don't have to search for existing listeners is there are no directives\n // matching on a given node as we can't register multiple event handlers for the same event in\n // a template (this would mean having duplicate attributes).\n if (!eventTargetResolver && isTNodeDirectiveHost) {\n existingListener = findExistingListener(tView, lView, eventName, tNode.index);\n }\n if (existingListener !== null) {\n // Attach a new listener to coalesced listeners list, maintaining the order in which\n // listeners are registered. For performance reasons, we keep a reference to the last\n // listener in that list (in `__ngLastListenerFn__` field), so we can avoid going through\n // the entire set each time we need to add a new listener.\n const lastListenerFn = (<any>existingListener).__ngLastListenerFn__ || existingListener;\n lastListenerFn.__ngNextListenerFn__ = listenerFn;\n (<any>existingListener).__ngLastListenerFn__ = listenerFn;\n processOutputs = false;\n } else {\n listenerFn = wrapListener(tNode, lView, context, listenerFn, false /** preventDefault */);\n const cleanupFn = renderer.listen(target as RElement, eventName, listenerFn);\n ngDevMode && ngDevMode.rendererAddEventListener++;\n\n lCleanup.push(listenerFn, cleanupFn);\n tCleanup && tCleanup.push(eventName, idxOrTargetGetter, lCleanupIndex, lCleanupIndex + 1);\n }\n\n } else {\n listenerFn = wrapListener(tNode, lView, context, listenerFn, true /** preventDefault */);\n target.addEventListener(eventName, listenerFn, useCapture);\n ngDevMode && ngDevMode.rendererAddEventListener++;\n\n lCleanup.push(listenerFn);\n tCleanup && tCleanup.push(eventName, idxOrTargetGetter, lCleanupIndex, useCapture);\n }\n } else {\n // Even if there is no native listener to add, we still need to wrap the listener so that OnPush\n // ancestors are marked dirty when an event occurs.\n listenerFn = wrapListener(tNode, lView, context, listenerFn, false /** preventDefault */);\n }\n\n // subscribe to directive outputs\n const outputs = tNode.outputs;\n let props: PropertyAliasValue|undefined;\n if (processOutputs && outputs !== null && (props = outputs[eventName])) {\n const propsLength = props.length;\n if (propsLength) {\n for (let i = 0; i < propsLength; i += 2) {\n const index = props[i] as number;\n ngDevMode && assertIndexInRange(lView, index);\n const minifiedName = props[i + 1];\n const directiveInstance = lView[index];\n const output = directiveInstance[minifiedName];\n\n if (ngDevMode && !isObservable(output)) {\n throw new Error(`@Output ${minifiedName} not initialized in '${\n directiveInstance.constructor.name}'.`);\n }\n\n const subscription = output.subscribe(listenerFn);\n const idx = lCleanup.length;\n lCleanup.push(listenerFn, subscription);\n tCleanup && tCleanup.push(eventName, tNode.index, idx, -(idx + 1));\n }\n }\n }\n}\n\nfunction executeListenerWithErrorHandling(\n lView: LView, context: {}|null, listenerFn: (e?: any) => any, e: any): boolean {\n try {\n profiler(ProfilerEvent.OutputStart, context, listenerFn);\n // Only explicitly returning false from a listener should preventDefault\n return listenerFn(e) !== false;\n } catch (error) {\n handleError(lView, error);\n return false;\n } finally {\n profiler(ProfilerEvent.OutputEnd, context, listenerFn);\n }\n}\n\n/**\n * Wraps an event listener with a function that marks ancestors dirty and prevents default behavior,\n * if applicable.\n *\n * @param tNode The TNode associated with this listener\n * @param lView The LView that contains this listener\n * @param listenerFn The listener function to call\n * @param wrapWithPreventDefault Whether or not to prevent default behavior\n * (the procedural renderer does this already, so in those cases, we should skip)\n */\nfunction wrapListener(\n tNode: TNode, lView: LView, context: {}|null, listenerFn: (e?: any) => any,\n wrapWithPreventDefault: boolean): EventListener {\n // Note: we are performing most of the work in the listener function itself\n // to optimize listener registration.\n return function wrapListenerIn_markDirtyAndPreventDefault(e: any) {\n // Ivy uses `Function` as a special token that allows us to unwrap the function\n // so that it can be invoked programmatically by `DebugNode.triggerEventHandler`.\n if (e === Function) {\n return listenerFn;\n }\n\n // In order to be backwards compatible with View Engine, events on component host nodes\n // must also mark the component view itself dirty (i.e. the view that it owns).\n const startView = tNode.flags & TNodeFlags.isComponentHost ?\n getComponentLViewByIndex(tNode.index, lView) :\n lView;\n\n // See interfaces/view.ts for more on LViewFlags.ManualOnPush\n if ((lView[FLAGS] & LViewFlags.ManualOnPush) === 0) {\n markViewDirty(startView);\n }\n\n let result = executeListenerWithErrorHandling(lView, context, listenerFn, e);\n // A just-invoked listener function might have coalesced listeners so we need to check for\n // their presence and invoke as needed.\n let nextListenerFn = (<any>wrapListenerIn_markDirtyAndPreventDefault).__ngNextListenerFn__;\n while (nextListenerFn) {\n // We should prevent default if any of the listeners explicitly return false\n result = executeListenerWithErrorHandling(lView, context, nextListenerFn, e) && result;\n nextListenerFn = (<any>nextListenerFn).__ngNextListenerFn__;\n }\n\n if (wrapWithPreventDefault && result === false) {\n e.preventDefault();\n // Necessary for legacy browsers that don't support preventDefault (e.g. IE)\n e.returnValue = false;\n }\n\n return result;\n };\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport {ɵɵnamespaceHTML, ɵɵnamespaceMathML, ɵɵnamespaceSVG} from '../state';\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 */\nimport {nextContextImpl} from '../state';\n\n/**\n * Retrieves a context at the level specified and saves it as the global, contextViewData.\n * Will get the next level up if level is not specified.\n *\n * This is used to save contexts of parent views so they can be bound in embedded views, or\n * in conjunction with reference() to bind a ref from a parent view.\n *\n * @param level The relative level of the view from which to grab context compared to contextVewData\n * @returns context\n *\n * @codeGenApi\n */\nexport function ɵɵnextContext<T = any>(level: number = 1): T {\n return nextContextImpl(level);\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 */\nimport {newArray} from '../../util/array_utils';\nimport {TAttributes, TElementNode, TNode, TNodeFlags, TNodeType} from '../interfaces/node';\nimport {ProjectionSlots} from '../interfaces/projection';\nimport {DECLARATION_COMPONENT_VIEW, HEADER_OFFSET, T_HOST} from '../interfaces/view';\nimport {applyProjection} from '../node_manipulation';\nimport {getProjectAsAttrValue, isNodeMatchingSelectorList, isSelectorInSelectorList} from '../node_selector_matcher';\nimport {getLView, getTView, setCurrentTNodeAsNotParent} from '../state';\nimport {getOrCreateTNode} from './shared';\n\n\n\n/**\n * Checks a given node against matching projection slots and returns the\n * determined slot index. Returns \"null\" if no slot matched the given node.\n *\n * This function takes into account the parsed ngProjectAs selector from the\n * node's attributes. If present, it will check whether the ngProjectAs selector\n * matches any of the projection slot selectors.\n */\nexport function matchingProjectionSlotIndex(tNode: TNode, projectionSlots: ProjectionSlots): number|\n null {\n let wildcardNgContentIndex = null;\n const ngProjectAsAttrVal = getProjectAsAttrValue(tNode);\n for (let i = 0; i < projectionSlots.length; i++) {\n const slotValue = projectionSlots[i];\n // The last wildcard projection slot should match all nodes which aren't matching\n // any selector. This is necessary to be backwards compatible with view engine.\n if (slotValue === '*') {\n wildcardNgContentIndex = i;\n continue;\n }\n // If we ran into an `ngProjectAs` attribute, we should match its parsed selector\n // to the list of selectors, otherwise we fall back to matching against the node.\n if (ngProjectAsAttrVal === null ?\n isNodeMatchingSelectorList(tNode, slotValue, /* isProjectionMode */ true) :\n isSelectorInSelectorList(ngProjectAsAttrVal, slotValue)) {\n return i; // first matching selector \"captures\" a given node\n }\n }\n return wildcardNgContentIndex;\n}\n\n/**\n * Instruction to distribute projectable nodes among <ng-content> occurrences in a given template.\n * It takes all the selectors from the entire component's template and decides where\n * each projected node belongs (it re-distributes nodes among \"buckets\" where each \"bucket\" is\n * backed by a selector).\n *\n * This function requires CSS selectors to be provided in 2 forms: parsed (by a compiler) and text,\n * un-parsed form.\n *\n * The parsed form is needed for efficient matching of a node against a given CSS selector.\n * The un-parsed, textual form is needed for support of the ngProjectAs attribute.\n *\n * Having a CSS selector in 2 different formats is not ideal, but alternatives have even more\n * drawbacks:\n * - having only a textual form would require runtime parsing of CSS selectors;\n * - we can't have only a parsed as we can't re-construct textual form from it (as entered by a\n * template author).\n *\n * @param projectionSlots? A collection of projection slots. A projection slot can be based\n * on a parsed CSS selectors or set to the wildcard selector (\"*\") in order to match\n * all nodes which do not match any selector. If not specified, a single wildcard\n * selector projection slot will be defined.\n *\n * @codeGenApi\n */\nexport function ɵɵprojectionDef(projectionSlots?: ProjectionSlots): void {\n const componentNode = getLView()[DECLARATION_COMPONENT_VIEW][T_HOST] as TElementNode;\n\n if (!componentNode.projection) {\n // If no explicit projection slots are defined, fall back to a single\n // projection slot with the wildcard selector.\n const numProjectionSlots = projectionSlots ? projectionSlots.length : 1;\n const projectionHeads: (TNode|null)[] = componentNode.projection =\n newArray(numProjectionSlots, null! as TNode);\n const tails: (TNode|null)[] = projectionHeads.slice();\n\n let componentChild: TNode|null = componentNode.child;\n\n while (componentChild !== null) {\n const slotIndex =\n projectionSlots ? matchingProjectionSlotIndex(componentChild, projectionSlots) : 0;\n\n if (slotIndex !== null) {\n if (tails[slotIndex]) {\n tails[slotIndex]!.projectionNext = componentChild;\n } else {\n projectionHeads[slotIndex] = componentChild;\n }\n tails[slotIndex] = componentChild;\n }\n\n componentChild = componentChild.next;\n }\n }\n}\n\n\n/**\n * Inserts previously re-distributed projected nodes. This instruction must be preceded by a call\n * to the projectionDef instruction.\n *\n * @param nodeIndex\n * @param selectorIndex:\n * - 0 when the selector is `*` (or unspecified as this is the default value),\n * - 1 based index of the selector from the {@link projectionDef}\n *\n * @codeGenApi\n */\nexport function ɵɵprojection(\n nodeIndex: number, selectorIndex: number = 0, attrs?: TAttributes): void {\n const lView = getLView();\n const tView = getTView();\n const tProjectionNode =\n getOrCreateTNode(tView, HEADER_OFFSET + nodeIndex, TNodeType.Projection, null, attrs || null);\n\n // We can't use viewData[HOST_NODE] because projection nodes can be nested in embedded views.\n if (tProjectionNode.projection === null) tProjectionNode.projection = selectorIndex;\n\n // `<ng-content>` has no content\n setCurrentTNodeAsNotParent();\n\n if ((tProjectionNode.flags & TNodeFlags.isDetached) !== TNodeFlags.isDetached) {\n // re-distribution of projectable nodes is stored on a component's view level\n applyProjection(tView, lView, tProjectionNode);\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 */\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {RENDERER} from '../interfaces/view';\nimport {getBindingIndex, getLView, getSelectedTNode, getTView} from '../state';\nimport {NO_CHANGE} from '../tokens';\n\nimport {interpolation1, interpolation2, interpolation3, interpolation4, interpolation5, interpolation6, interpolation7, interpolation8, interpolationV} from './interpolation';\nimport {elementPropertyInternal, storePropertyBindingMetadata} from './shared';\n\n\n/**\n *\n * Update an interpolated property on an element with a lone bound value\n *\n * Used when the value passed to a property has 1 interpolated value in it, an no additional text\n * surrounds that interpolated value:\n *\n * ```html\n * <div title=\"{{v0}}\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate('title', v0);\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate(\n propName: string, v0: any, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate {\n ɵɵpropertyInterpolate1(propName, '', v0, '', sanitizer);\n return ɵɵpropertyInterpolate;\n}\n\n\n/**\n *\n * Update an interpolated property on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate1('title', 'prefix', v0, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate1(\n propName: string, prefix: string, v0: any, suffix: string,\n sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate1 {\n const lView = getLView();\n const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(\n tView.data, tNode, propName, getBindingIndex() - 1, prefix, suffix);\n }\n return ɵɵpropertyInterpolate1;\n}\n\n/**\n *\n * Update an interpolated property on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate2(\n propName: string, prefix: string, v0: any, i0: string, v1: any, suffix: string,\n sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate2 {\n const lView = getLView();\n const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(\n tView.data, tNode, propName, getBindingIndex() - 2, prefix, i0, suffix);\n }\n return ɵɵpropertyInterpolate2;\n}\n\n/**\n *\n * Update an interpolated property on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate3(\n * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate3(\n propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any,\n suffix: string, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate3 {\n const lView = getLView();\n const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(\n tView.data, tNode, propName, getBindingIndex() - 3, prefix, i0, i1, suffix);\n }\n return ɵɵpropertyInterpolate3;\n}\n\n/**\n *\n * Update an interpolated property on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate4(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate4(\n propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, suffix: string, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate4 {\n const lView = getLView();\n const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(\n tView.data, tNode, propName, getBindingIndex() - 4, prefix, i0, i1, i2, suffix);\n }\n return ɵɵpropertyInterpolate4;\n}\n\n/**\n *\n * Update an interpolated property on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate5(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate5(\n propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, suffix: string,\n sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate5 {\n const lView = getLView();\n const interpolatedValue =\n interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(\n tView.data, tNode, propName, getBindingIndex() - 5, prefix, i0, i1, i2, i3, suffix);\n }\n return ɵɵpropertyInterpolate5;\n}\n\n/**\n *\n * Update an interpolated property on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate6(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate6(\n propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string,\n sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate6 {\n const lView = getLView();\n const interpolatedValue =\n interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(\n tView.data, tNode, propName, getBindingIndex() - 6, prefix, i0, i1, i2, i3, i4, suffix);\n }\n return ɵɵpropertyInterpolate6;\n}\n\n/**\n *\n * Update an interpolated property on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate7(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate7(\n propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string,\n sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate7 {\n const lView = getLView();\n const interpolatedValue =\n interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(\n tView.data, tNode, propName, getBindingIndex() - 7, prefix, i0, i1, i2, i3, i4, i5,\n suffix);\n }\n return ɵɵpropertyInterpolate7;\n}\n\n/**\n *\n * Update an interpolated property on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate8(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate8(\n propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any,\n suffix: string, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate8 {\n const lView = getLView();\n const interpolatedValue = interpolation8(\n lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(\n tView.data, tNode, propName, getBindingIndex() - 8, prefix, i0, i1, i2, i3, i4, i5, i6,\n suffix);\n }\n return ɵɵpropertyInterpolate8;\n}\n\n/**\n * Update an interpolated property on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n * title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolateV(\n * 'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n * 'suffix']);\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update.\n * @param values The collection of values and the strings inbetween those values, beginning with a\n * string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolateV(\n propName: string, values: any[], sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolateV {\n const lView = getLView();\n const interpolatedValue = interpolationV(lView, values);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n if (ngDevMode) {\n const interpolationInBetween = [values[0]]; // prefix\n for (let i = 2; i < values.length; i += 2) {\n interpolationInBetween.push(values[i]);\n }\n storePropertyBindingMetadata(\n tView.data, tNode, propName, getBindingIndex() - interpolationInBetween.length + 1,\n ...interpolationInBetween);\n }\n }\n return ɵɵpropertyInterpolateV;\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 {KeyValueArray, keyValueArrayIndexOf} from '../../util/array_utils';\nimport {assertEqual, assertIndexInRange, assertNotEqual} from '../../util/assert';\nimport {assertFirstUpdatePass} from '../assert';\nimport {TNode} from '../interfaces/node';\nimport {getTStylingRangeNext, getTStylingRangePrev, setTStylingRangeNext, setTStylingRangeNextDuplicate, setTStylingRangePrev, setTStylingRangePrevDuplicate, toTStylingRange, TStylingKey, TStylingKeyPrimitive, TStylingRange} from '../interfaces/styling';\nimport {TData} from '../interfaces/view';\nimport {getTView} from '../state';\n\n\n/**\n * NOTE: The word `styling` is used interchangeably as style or class styling.\n *\n * This file contains code to link styling instructions together so that they can be replayed in\n * priority order. The file exists because Ivy styling instruction execution order does not match\n * that of the priority order. The purpose of this code is to create a linked list so that the\n * instructions can be traversed in priority order when computing the styles.\n *\n * Assume we are dealing with the following code:\n * ```\n * @Component({\n * template: `\n * <my-cmp [style]=\" {color: '#001'} \"\n * [style.color]=\" #002 \"\n * dir-style-color-1\n * dir-style-color-2> `\n * })\n * class ExampleComponent {\n * static ngComp = ... {\n * ...\n * // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n * ɵɵstyleMap({color: '#001'});\n * ɵɵstyleProp('color', '#002');\n * ...\n * }\n * }\n *\n * @Directive({\n * selector: `[dir-style-color-1]',\n * })\n * class Style1Directive {\n * @HostBinding('style') style = {color: '#005'};\n * @HostBinding('style.color') color = '#006';\n *\n * static ngDir = ... {\n * ...\n * // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n * ɵɵstyleMap({color: '#005'});\n * ɵɵstyleProp('color', '#006');\n * ...\n * }\n * }\n *\n * @Directive({\n * selector: `[dir-style-color-2]',\n * })\n * class Style2Directive {\n * @HostBinding('style') style = {color: '#007'};\n * @HostBinding('style.color') color = '#008';\n *\n * static ngDir = ... {\n * ...\n * // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n * ɵɵstyleMap({color: '#007'});\n * ɵɵstyleProp('color', '#008');\n * ...\n * }\n * }\n *\n * @Directive({\n * selector: `my-cmp',\n * })\n * class MyComponent {\n * @HostBinding('style') style = {color: '#003'};\n * @HostBinding('style.color') color = '#004';\n *\n * static ngComp = ... {\n * ...\n * // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n * ɵɵstyleMap({color: '#003'});\n * ɵɵstyleProp('color', '#004');\n * ...\n * }\n * }\n * ```\n *\n * The Order of instruction execution is:\n *\n * NOTE: the comment binding location is for illustrative purposes only.\n *\n * ```\n * // Template: (ExampleComponent)\n * ɵɵstyleMap({color: '#001'}); // Binding index: 10\n * ɵɵstyleProp('color', '#002'); // Binding index: 12\n * // MyComponent\n * ɵɵstyleMap({color: '#003'}); // Binding index: 20\n * ɵɵstyleProp('color', '#004'); // Binding index: 22\n * // Style1Directive\n * ɵɵstyleMap({color: '#005'}); // Binding index: 24\n * ɵɵstyleProp('color', '#006'); // Binding index: 26\n * // Style2Directive\n * ɵɵstyleMap({color: '#007'}); // Binding index: 28\n * ɵɵstyleProp('color', '#008'); // Binding index: 30\n * ```\n *\n * The correct priority order of concatenation is:\n *\n * ```\n * // MyComponent\n * ɵɵstyleMap({color: '#003'}); // Binding index: 20\n * ɵɵstyleProp('color', '#004'); // Binding index: 22\n * // Style1Directive\n * ɵɵstyleMap({color: '#005'}); // Binding index: 24\n * ɵɵstyleProp('color', '#006'); // Binding index: 26\n * // Style2Directive\n * ɵɵstyleMap({color: '#007'}); // Binding index: 28\n * ɵɵstyleProp('color', '#008'); // Binding index: 30\n * // Template: (ExampleComponent)\n * ɵɵstyleMap({color: '#001'}); // Binding index: 10\n * ɵɵstyleProp('color', '#002'); // Binding index: 12\n * ```\n *\n * What color should be rendered?\n *\n * Once the items are correctly sorted in the list, the answer is simply the last item in the\n * concatenation list which is `#002`.\n *\n * To do so we keep a linked list of all of the bindings which pertain to this element.\n * Notice that the bindings are inserted in the order of execution, but the `TView.data` allows\n * us to traverse them in the order of priority.\n *\n * |Idx|`TView.data`|`LView` | Notes\n * |---|------------|-----------------|--------------\n * |...| | |\n * |10 |`null` |`{color: '#001'}`| `ɵɵstyleMap('color', {color: '#001'})`\n * |11 |`30 | 12` | ... |\n * |12 |`color` |`'#002'` | `ɵɵstyleProp('color', '#002')`\n * |13 |`10 | 0` | ... |\n * |...| | |\n * |20 |`null` |`{color: '#003'}`| `ɵɵstyleMap('color', {color: '#003'})`\n * |21 |`0 | 22` | ... |\n * |22 |`color` |`'#004'` | `ɵɵstyleProp('color', '#004')`\n * |23 |`20 | 24` | ... |\n * |24 |`null` |`{color: '#005'}`| `ɵɵstyleMap('color', {color: '#005'})`\n * |25 |`22 | 26` | ... |\n * |26 |`color` |`'#006'` | `ɵɵstyleProp('color', '#006')`\n * |27 |`24 | 28` | ... |\n * |28 |`null` |`{color: '#007'}`| `ɵɵstyleMap('color', {color: '#007'})`\n * |29 |`26 | 30` | ... |\n * |30 |`color` |`'#008'` | `ɵɵstyleProp('color', '#008')`\n * |31 |`28 | 10` | ... |\n *\n * The above data structure allows us to re-concatenate the styling no matter which data binding\n * changes.\n *\n * NOTE: in addition to keeping track of next/previous index the `TView.data` also stores prev/next\n * duplicate bit. The duplicate bit if true says there either is a binding with the same name or\n * there is a map (which may contain the name). This information is useful in knowing if other\n * styles with higher priority need to be searched for overwrites.\n *\n * NOTE: See `should support example in 'tnode_linked_list.ts' documentation` in\n * `tnode_linked_list_spec.ts` for working example.\n */\nlet __unused_const_as_closure_does_not_like_standalone_comment_blocks__: undefined;\n\n/**\n * Insert new `tStyleValue` at `TData` and link existing style bindings such that we maintain linked\n * list of styles and compute the duplicate flag.\n *\n * Note: this function is executed during `firstUpdatePass` only to populate the `TView.data`.\n *\n * The function works by keeping track of `tStylingRange` which contains two pointers pointing to\n * the head/tail of the template portion of the styles.\n * - if `isHost === false` (we are template) then insertion is at tail of `TStylingRange`\n * - if `isHost === true` (we are host binding) then insertion is at head of `TStylingRange`\n *\n * @param tData The `TData` to insert into.\n * @param tNode `TNode` associated with the styling element.\n * @param tStylingKey See `TStylingKey`.\n * @param index location of where `tStyleValue` should be stored (and linked into list.)\n * @param isHostBinding `true` if the insertion is for a `hostBinding`. (insertion is in front of\n * template.)\n * @param isClassBinding True if the associated `tStylingKey` as a `class` styling.\n * `tNode.classBindings` should be used (or `tNode.styleBindings` otherwise.)\n */\nexport function insertTStylingBinding(\n tData: TData, tNode: TNode, tStylingKeyWithStatic: TStylingKey, index: number,\n isHostBinding: boolean, isClassBinding: boolean): void {\n ngDevMode && assertFirstUpdatePass(getTView());\n let tBindings = isClassBinding ? tNode.classBindings : tNode.styleBindings;\n let tmplHead = getTStylingRangePrev(tBindings);\n let tmplTail = getTStylingRangeNext(tBindings);\n\n tData[index] = tStylingKeyWithStatic;\n let isKeyDuplicateOfStatic = false;\n let tStylingKey: TStylingKeyPrimitive;\n if (Array.isArray(tStylingKeyWithStatic)) {\n // We are case when the `TStylingKey` contains static fields as well.\n const staticKeyValueArray = tStylingKeyWithStatic as KeyValueArray<any>;\n tStylingKey = staticKeyValueArray[1]; // unwrap.\n // We need to check if our key is present in the static so that we can mark it as duplicate.\n if (tStylingKey === null ||\n keyValueArrayIndexOf(staticKeyValueArray, tStylingKey as string) > 0) {\n // tStylingKey is present in the statics, need to mark it as duplicate.\n isKeyDuplicateOfStatic = true;\n }\n } else {\n tStylingKey = tStylingKeyWithStatic;\n }\n if (isHostBinding) {\n // We are inserting host bindings\n\n // If we don't have template bindings then `tail` is 0.\n const hasTemplateBindings = tmplTail !== 0;\n // This is important to know because that means that the `head` can't point to the first\n // template bindings (there are none.) Instead the head points to the tail of the template.\n if (hasTemplateBindings) {\n // template head's \"prev\" will point to last host binding or to 0 if no host bindings yet\n const previousNode = getTStylingRangePrev(tData[tmplHead + 1] as TStylingRange);\n tData[index + 1] = toTStylingRange(previousNode, tmplHead);\n // if a host binding has already been registered, we need to update the next of that host\n // binding to point to this one\n if (previousNode !== 0) {\n // We need to update the template-tail value to point to us.\n tData[previousNode + 1] =\n setTStylingRangeNext(tData[previousNode + 1] as TStylingRange, index);\n }\n // The \"previous\" of the template binding head should point to this host binding\n tData[tmplHead + 1] = setTStylingRangePrev(tData[tmplHead + 1] as TStylingRange, index);\n } else {\n tData[index + 1] = toTStylingRange(tmplHead, 0);\n // if a host binding has already been registered, we need to update the next of that host\n // binding to point to this one\n if (tmplHead !== 0) {\n // We need to update the template-tail value to point to us.\n tData[tmplHead + 1] = setTStylingRangeNext(tData[tmplHead + 1] as TStylingRange, index);\n }\n // if we don't have template, the head points to template-tail, and needs to be advanced.\n tmplHead = index;\n }\n } else {\n // We are inserting in template section.\n // We need to set this binding's \"previous\" to the current template tail\n tData[index + 1] = toTStylingRange(tmplTail, 0);\n ngDevMode &&\n assertEqual(\n tmplHead !== 0 && tmplTail === 0, false,\n 'Adding template bindings after hostBindings is not allowed.');\n if (tmplHead === 0) {\n tmplHead = index;\n } else {\n // We need to update the previous value \"next\" to point to this binding\n tData[tmplTail + 1] = setTStylingRangeNext(tData[tmplTail + 1] as TStylingRange, index);\n }\n tmplTail = index;\n }\n\n // Now we need to update / compute the duplicates.\n // Starting with our location search towards head (least priority)\n if (isKeyDuplicateOfStatic) {\n tData[index + 1] = setTStylingRangePrevDuplicate(tData[index + 1] as TStylingRange);\n }\n markDuplicates(tData, tStylingKey, index, true, isClassBinding);\n markDuplicates(tData, tStylingKey, index, false, isClassBinding);\n markDuplicateOfResidualStyling(tNode, tStylingKey, tData, index, isClassBinding);\n\n tBindings = toTStylingRange(tmplHead, tmplTail);\n if (isClassBinding) {\n tNode.classBindings = tBindings;\n } else {\n tNode.styleBindings = tBindings;\n }\n}\n\n/**\n * Look into the residual styling to see if the current `tStylingKey` is duplicate of residual.\n *\n * @param tNode `TNode` where the residual is stored.\n * @param tStylingKey `TStylingKey` to store.\n * @param tData `TData` associated with the current `LView`.\n * @param index location of where `tStyleValue` should be stored (and linked into list.)\n * @param isClassBinding True if the associated `tStylingKey` as a `class` styling.\n * `tNode.classBindings` should be used (or `tNode.styleBindings` otherwise.)\n */\nfunction markDuplicateOfResidualStyling(\n tNode: TNode, tStylingKey: TStylingKey, tData: TData, index: number, isClassBinding: boolean) {\n const residual = isClassBinding ? tNode.residualClasses : tNode.residualStyles;\n if (residual != null /* or undefined */ && typeof tStylingKey == 'string' &&\n keyValueArrayIndexOf(residual, tStylingKey) >= 0) {\n // We have duplicate in the residual so mark ourselves as duplicate.\n tData[index + 1] = setTStylingRangeNextDuplicate(tData[index + 1] as TStylingRange);\n }\n}\n\n\n/**\n * Marks `TStyleValue`s as duplicates if another style binding in the list has the same\n * `TStyleValue`.\n *\n * NOTE: this function is intended to be called twice once with `isPrevDir` set to `true` and once\n * with it set to `false` to search both the previous as well as next items in the list.\n *\n * No duplicate case\n * ```\n * [style.color]\n * [style.width.px] <<- index\n * [style.height.px]\n * ```\n *\n * In the above case adding `[style.width.px]` to the existing `[style.color]` produces no\n * duplicates because `width` is not found in any other part of the linked list.\n *\n * Duplicate case\n * ```\n * [style.color]\n * [style.width.em]\n * [style.width.px] <<- index\n * ```\n * In the above case adding `[style.width.px]` will produce a duplicate with `[style.width.em]`\n * because `width` is found in the chain.\n *\n * Map case 1\n * ```\n * [style.width.px]\n * [style.color]\n * [style] <<- index\n * ```\n * In the above case adding `[style]` will produce a duplicate with any other bindings because\n * `[style]` is a Map and as such is fully dynamic and could produce `color` or `width`.\n *\n * Map case 2\n * ```\n * [style]\n * [style.width.px]\n * [style.color] <<- index\n * ```\n * In the above case adding `[style.color]` will produce a duplicate because there is already a\n * `[style]` binding which is a Map and as such is fully dynamic and could produce `color` or\n * `width`.\n *\n * NOTE: Once `[style]` (Map) is added into the system all things are mapped as duplicates.\n * NOTE: We use `style` as example, but same logic is applied to `class`es as well.\n *\n * @param tData `TData` where the linked list is stored.\n * @param tStylingKey `TStylingKeyPrimitive` which contains the value to compare to other keys in\n * the linked list.\n * @param index Starting location in the linked list to search from\n * @param isPrevDir Direction.\n * - `true` for previous (lower priority);\n * - `false` for next (higher priority).\n */\nfunction markDuplicates(\n tData: TData, tStylingKey: TStylingKeyPrimitive, index: number, isPrevDir: boolean,\n isClassBinding: boolean) {\n const tStylingAtIndex = tData[index + 1] as TStylingRange;\n const isMap = tStylingKey === null;\n let cursor =\n isPrevDir ? getTStylingRangePrev(tStylingAtIndex) : getTStylingRangeNext(tStylingAtIndex);\n let foundDuplicate = false;\n // We keep iterating as long as we have a cursor\n // AND either:\n // - we found what we are looking for, OR\n // - we are a map in which case we have to continue searching even after we find what we were\n // looking for since we are a wild card and everything needs to be flipped to duplicate.\n while (cursor !== 0 && (foundDuplicate === false || isMap)) {\n ngDevMode && assertIndexInRange(tData, cursor);\n const tStylingValueAtCursor = tData[cursor] as TStylingKey;\n const tStyleRangeAtCursor = tData[cursor + 1] as TStylingRange;\n if (isStylingMatch(tStylingValueAtCursor, tStylingKey)) {\n foundDuplicate = true;\n tData[cursor + 1] = isPrevDir ? setTStylingRangeNextDuplicate(tStyleRangeAtCursor) :\n setTStylingRangePrevDuplicate(tStyleRangeAtCursor);\n }\n cursor = isPrevDir ? getTStylingRangePrev(tStyleRangeAtCursor) :\n getTStylingRangeNext(tStyleRangeAtCursor);\n }\n if (foundDuplicate) {\n // if we found a duplicate, than mark ourselves.\n tData[index + 1] = isPrevDir ? setTStylingRangePrevDuplicate(tStylingAtIndex) :\n setTStylingRangeNextDuplicate(tStylingAtIndex);\n }\n}\n\n/**\n * Determines if two `TStylingKey`s are a match.\n *\n * When computing whether a binding contains a duplicate, we need to compare if the instruction\n * `TStylingKey` has a match.\n *\n * Here are examples of `TStylingKey`s which match given `tStylingKeyCursor` is:\n * - `color`\n * - `color` // Match another color\n * - `null` // That means that `tStylingKey` is a `classMap`/`styleMap` instruction\n * - `['', 'color', 'other', true]` // wrapped `color` so match\n * - `['', null, 'other', true]` // wrapped `null` so match\n * - `['', 'width', 'color', 'value']` // wrapped static value contains a match on `'color'`\n * - `null` // `tStylingKeyCursor` always match as it is `classMap`/`styleMap` instruction\n *\n * @param tStylingKeyCursor\n * @param tStylingKey\n */\nfunction isStylingMatch(tStylingKeyCursor: TStylingKey, tStylingKey: TStylingKeyPrimitive) {\n ngDevMode &&\n assertNotEqual(\n Array.isArray(tStylingKey), true, 'Expected that \\'tStylingKey\\' has been unwrapped');\n if (\n tStylingKeyCursor === null || // If the cursor is `null` it means that we have map at that\n // location so we must assume that we have a match.\n tStylingKey == null || // If `tStylingKey` is `null` then it is a map therefor assume that it\n // contains a match.\n (Array.isArray(tStylingKeyCursor) ? tStylingKeyCursor[1] : tStylingKeyCursor) ===\n tStylingKey // If the keys match explicitly than we are a match.\n ) {\n return true;\n } else if (Array.isArray(tStylingKeyCursor) && typeof tStylingKey === 'string') {\n // if we did not find a match, but `tStylingKeyCursor` is `KeyValueArray` that means cursor has\n // statics and we need to check those as well.\n return keyValueArrayIndexOf(tStylingKeyCursor, tStylingKey) >=\n 0; // see if we are matching the key\n }\n return 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 {assertEqual, throwError} from '../../util/assert';\nimport {CharCode} from '../../util/char_code';\n\n/**\n * Stores the locations of key/value indexes while parsing styling.\n *\n * In case of `cssText` parsing the indexes are like so:\n * ```\n * \"key1: value1; key2: value2; key3: value3\"\n * ^ ^ ^ ^ ^\n * | | | | +-- textEnd\n * | | | +---------------- valueEnd\n * | | +---------------------- value\n * | +------------------------ keyEnd\n * +---------------------------- key\n * ```\n *\n * In case of `className` parsing the indexes are like so:\n * ```\n * \"key1 key2 key3\"\n * ^ ^ ^\n * | | +-- textEnd\n * | +------------------------ keyEnd\n * +---------------------------- key\n * ```\n * NOTE: `value` and `valueEnd` are used only for styles, not classes.\n */\ninterface ParserState {\n textEnd: number;\n key: number;\n keyEnd: number;\n value: number;\n valueEnd: number;\n}\n// Global state of the parser. (This makes parser non-reentrant, but that is not an issue)\nconst parserState: ParserState = {\n textEnd: 0,\n key: 0,\n keyEnd: 0,\n value: 0,\n valueEnd: 0,\n};\n\n/**\n * Retrieves the last parsed `key` of style.\n * @param text the text to substring the key from.\n */\nexport function getLastParsedKey(text: string): string {\n return text.substring(parserState.key, parserState.keyEnd);\n}\n\n/**\n * Retrieves the last parsed `value` of style.\n * @param text the text to substring the key from.\n */\nexport function getLastParsedValue(text: string): string {\n return text.substring(parserState.value, parserState.valueEnd);\n}\n\n/**\n * Initializes `className` string for parsing and parses the first token.\n *\n * This function is intended to be used in this format:\n * ```\n * for (let i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) {\n * const key = getLastParsedKey();\n * ...\n * }\n * ```\n * @param text `className` to parse\n * @returns index where the next invocation of `parseClassNameNext` should resume.\n */\nexport function parseClassName(text: string): number {\n resetParserState(text);\n return parseClassNameNext(text, consumeWhitespace(text, 0, parserState.textEnd));\n}\n\n/**\n * Parses next `className` token.\n *\n * This function is intended to be used in this format:\n * ```\n * for (let i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) {\n * const key = getLastParsedKey();\n * ...\n * }\n * ```\n *\n * @param text `className` to parse\n * @param index where the parsing should resume.\n * @returns index where the next invocation of `parseClassNameNext` should resume.\n */\nexport function parseClassNameNext(text: string, index: number): number {\n const end = parserState.textEnd;\n if (end === index) {\n return -1;\n }\n index = parserState.keyEnd = consumeClassToken(text, parserState.key = index, end);\n return consumeWhitespace(text, index, end);\n}\n\n/**\n * Initializes `cssText` string for parsing and parses the first key/values.\n *\n * This function is intended to be used in this format:\n * ```\n * for (let i = parseStyle(text); i >= 0; i = parseStyleNext(text, i))) {\n * const key = getLastParsedKey();\n * const value = getLastParsedValue();\n * ...\n * }\n * ```\n * @param text `cssText` to parse\n * @returns index where the next invocation of `parseStyleNext` should resume.\n */\nexport function parseStyle(text: string): number {\n resetParserState(text);\n return parseStyleNext(text, consumeWhitespace(text, 0, parserState.textEnd));\n}\n\n/**\n * Parses the next `cssText` key/values.\n *\n * This function is intended to be used in this format:\n * ```\n * for (let i = parseStyle(text); i >= 0; i = parseStyleNext(text, i))) {\n * const key = getLastParsedKey();\n * const value = getLastParsedValue();\n * ...\n * }\n *\n * @param text `cssText` to parse\n * @param index where the parsing should resume.\n * @returns index where the next invocation of `parseStyleNext` should resume.\n */\nexport function parseStyleNext(text: string, startIndex: number): number {\n const end = parserState.textEnd;\n let index = parserState.key = consumeWhitespace(text, startIndex, end);\n if (end === index) {\n // we reached an end so just quit\n return -1;\n }\n index = parserState.keyEnd = consumeStyleKey(text, index, end);\n index = consumeSeparator(text, index, end, CharCode.COLON);\n index = parserState.value = consumeWhitespace(text, index, end);\n index = parserState.valueEnd = consumeStyleValue(text, index, end);\n return consumeSeparator(text, index, end, CharCode.SEMI_COLON);\n}\n\n/**\n * Reset the global state of the styling parser.\n * @param text The styling text to parse.\n */\nexport function resetParserState(text: string): void {\n parserState.key = 0;\n parserState.keyEnd = 0;\n parserState.value = 0;\n parserState.valueEnd = 0;\n parserState.textEnd = text.length;\n}\n\n/**\n * Returns index of next non-whitespace character.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index of next non-whitespace character (May be the same as `start` if no whitespace at\n * that location.)\n */\nexport function consumeWhitespace(text: string, startIndex: number, endIndex: number): number {\n while (startIndex < endIndex && text.charCodeAt(startIndex) <= CharCode.SPACE) {\n startIndex++;\n }\n return startIndex;\n}\n\n/**\n * Returns index of last char in class token.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after last char in class token.\n */\nexport function consumeClassToken(text: string, startIndex: number, endIndex: number): number {\n while (startIndex < endIndex && text.charCodeAt(startIndex) > CharCode.SPACE) {\n startIndex++;\n }\n return startIndex;\n}\n\n/**\n * Consumes all of the characters belonging to style key and token.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after last style key character.\n */\nexport function consumeStyleKey(text: string, startIndex: number, endIndex: number): number {\n let ch: number;\n while (startIndex < endIndex &&\n ((ch = text.charCodeAt(startIndex)) === CharCode.DASH || ch === CharCode.UNDERSCORE ||\n ((ch & CharCode.UPPER_CASE) >= CharCode.A && (ch & CharCode.UPPER_CASE) <= CharCode.Z) ||\n (ch >= CharCode.ZERO && ch <= CharCode.NINE))) {\n startIndex++;\n }\n return startIndex;\n}\n\n/**\n * Consumes all whitespace and the separator `:` after the style key.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after separator and surrounding whitespace.\n */\nexport function consumeSeparator(\n text: string, startIndex: number, endIndex: number, separator: number): number {\n startIndex = consumeWhitespace(text, startIndex, endIndex);\n if (startIndex < endIndex) {\n if (ngDevMode && text.charCodeAt(startIndex) !== separator) {\n malformedStyleError(text, String.fromCharCode(separator), startIndex);\n }\n startIndex++;\n }\n return startIndex;\n}\n\n\n/**\n * Consumes style value honoring `url()` and `\"\"` text.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after last style value character.\n */\nexport function consumeStyleValue(text: string, startIndex: number, endIndex: number): number {\n let ch1 = -1; // 1st previous character\n let ch2 = -1; // 2nd previous character\n let ch3 = -1; // 3rd previous character\n let i = startIndex;\n let lastChIndex = i;\n while (i < endIndex) {\n const ch: number = text.charCodeAt(i++);\n if (ch === CharCode.SEMI_COLON) {\n return lastChIndex;\n } else if (ch === CharCode.DOUBLE_QUOTE || ch === CharCode.SINGLE_QUOTE) {\n lastChIndex = i = consumeQuotedText(text, ch, i, endIndex);\n } else if (\n startIndex ===\n i - 4 && // We have seen only 4 characters so far \"URL(\" (Ignore \"foo_URL()\")\n ch3 === CharCode.U &&\n ch2 === CharCode.R && ch1 === CharCode.L && ch === CharCode.OPEN_PAREN) {\n lastChIndex = i = consumeQuotedText(text, CharCode.CLOSE_PAREN, i, endIndex);\n } else if (ch > CharCode.SPACE) {\n // if we have a non-whitespace character then capture its location\n lastChIndex = i;\n }\n ch3 = ch2;\n ch2 = ch1;\n ch1 = ch & CharCode.UPPER_CASE;\n }\n return lastChIndex;\n}\n\n/**\n * Consumes all of the quoted characters.\n *\n * @param text Text to scan\n * @param quoteCharCode CharCode of either `\"` or `'` quote or `)` for `url(...)`.\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after quoted characters.\n */\nexport function consumeQuotedText(\n text: string, quoteCharCode: number, startIndex: number, endIndex: number): number {\n let ch1 = -1; // 1st previous character\n let index = startIndex;\n while (index < endIndex) {\n const ch = text.charCodeAt(index++);\n if (ch == quoteCharCode && ch1 !== CharCode.BACK_SLASH) {\n return index;\n }\n if (ch == CharCode.BACK_SLASH && ch1 === CharCode.BACK_SLASH) {\n // two back slashes cancel each other out. For example `\"\\\\\"` should properly end the\n // quotation. (It should not assume that the last `\"` is escaped.)\n ch1 = 0;\n } else {\n ch1 = ch;\n }\n }\n throw ngDevMode ? malformedStyleError(text, String.fromCharCode(quoteCharCode), endIndex) :\n new Error();\n}\n\nfunction malformedStyleError(text: string, expecting: string, index: number): never {\n ngDevMode && assertEqual(typeof text === 'string', true, 'String expected here');\n throw throwError(\n `Malformed style at location ${index} in string '` + text.substring(0, index) + '[>>' +\n text.substring(index, index + 1) + '<<]' + text.substr(index + 1) +\n `'. Expecting '${expecting}'.`);\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 {SafeValue, unwrapSafeValue} from '../../sanitization/bypass';\nimport {KeyValueArray, keyValueArrayGet, keyValueArraySet} from '../../util/array_utils';\nimport {assertDefined, assertEqual, assertLessThan, assertNotEqual, throwError} from '../../util/assert';\nimport {EMPTY_ARRAY} from '../../util/empty';\nimport {concatStringsWithSpace, stringify} from '../../util/stringify';\nimport {assertFirstUpdatePass} from '../assert';\nimport {bindingUpdated} from '../bindings';\nimport {DirectiveDef} from '../interfaces/definition';\nimport {AttributeMarker, TAttributes, TNode, TNodeFlags, TNodeType} from '../interfaces/node';\nimport {Renderer3} from '../interfaces/renderer';\nimport {RElement} from '../interfaces/renderer_dom';\nimport {getTStylingRangeNext, getTStylingRangeNextDuplicate, getTStylingRangePrev, getTStylingRangePrevDuplicate, TStylingKey, TStylingRange} from '../interfaces/styling';\nimport {LView, RENDERER, TData, TView} from '../interfaces/view';\nimport {applyStyling} from '../node_manipulation';\nimport {getCurrentDirectiveDef, getLView, getSelectedIndex, getTView, incrementBindingIndex} from '../state';\nimport {insertTStylingBinding} from '../styling/style_binding_list';\nimport {getLastParsedKey, getLastParsedValue, parseClassName, parseClassNameNext, parseStyle, parseStyleNext} from '../styling/styling_parser';\nimport {NO_CHANGE} from '../tokens';\nimport {getNativeByIndex} from '../util/view_utils';\nimport {setDirectiveInputsWhichShadowsStyling} from './property';\n\n\n/**\n * Update a style binding on an element with the provided value.\n *\n * If the style value is falsy then it will be removed from the element\n * (or assigned a different value depending if there are any styles placed\n * on the element with `styleMap` or any static styles that are\n * present from when the element was created with `styling`).\n *\n * Note that the styling element is updated as part of `stylingApply`.\n *\n * @param prop A valid CSS property.\n * @param value New value to write (`null` or an empty string to remove).\n * @param suffix Optional suffix. Used with scalar values to add unit such as `px`.\n *\n * Note that this will apply the provided style value to the host element if this function is called\n * within a host binding function.\n *\n * @codeGenApi\n */\nexport function ɵɵstyleProp(\n prop: string, value: string|number|SafeValue|undefined|null,\n suffix?: string|null): typeof ɵɵstyleProp {\n checkStylingProperty(prop, value, suffix, false);\n return ɵɵstyleProp;\n}\n\n/**\n * Update a class binding on an element with the provided value.\n *\n * This instruction is meant to handle the `[class.foo]=\"exp\"` case and,\n * therefore, the class binding itself must already be allocated using\n * `styling` within the creation block.\n *\n * @param prop A valid CSS class (only one).\n * @param value A true/false value which will turn the class on or off.\n *\n * Note that this will apply the provided class value to the host element if this function\n * is called within a host binding function.\n *\n * @codeGenApi\n */\nexport function ɵɵclassProp(className: string, value: boolean|undefined|null): typeof ɵɵclassProp {\n checkStylingProperty(className, value, null, true);\n return ɵɵclassProp;\n}\n\n\n/**\n * Update style bindings using an object literal on an element.\n *\n * This instruction is meant to apply styling via the `[style]=\"exp\"` template bindings.\n * When styles are applied to the element they will then be updated with respect to\n * any styles/classes set via `styleProp`. If any styles are set to falsy\n * then they will be removed from the element.\n *\n * Note that the styling instruction will not be applied until `stylingApply` is called.\n *\n * @param styles A key/value style map of the styles that will be applied to the given element.\n * Any missing styles (that have already been applied to the element beforehand) will be\n * removed (unset) from the element's styling.\n *\n * Note that this will apply the provided styleMap value to the host element if this function\n * is called within a host binding.\n *\n * @codeGenApi\n */\nexport function ɵɵstyleMap(styles: {[styleName: string]: any}|string|undefined|null): void {\n checkStylingMap(styleKeyValueArraySet, styleStringParser, styles, false);\n}\n\n\n/**\n * Parse text as style and add values to KeyValueArray.\n *\n * This code is pulled out to a separate function so that it can be tree shaken away if it is not\n * needed. It is only referenced from `ɵɵstyleMap`.\n *\n * @param keyValueArray KeyValueArray to add parsed values to.\n * @param text text to parse.\n */\nexport function styleStringParser(keyValueArray: KeyValueArray<any>, text: string): void {\n for (let i = parseStyle(text); i >= 0; i = parseStyleNext(text, i)) {\n styleKeyValueArraySet(keyValueArray, getLastParsedKey(text), getLastParsedValue(text));\n }\n}\n\n\n/**\n * Update class bindings using an object literal or class-string on an element.\n *\n * This instruction is meant to apply styling via the `[class]=\"exp\"` template bindings.\n * When classes are applied to the element they will then be updated with\n * respect to any styles/classes set via `classProp`. If any\n * classes are set to falsy then they will be removed from the element.\n *\n * Note that the styling instruction will not be applied until `stylingApply` is called.\n * Note that this will the provided classMap value to the host element if this function is called\n * within a host binding.\n *\n * @param classes A key/value map or string of CSS classes that will be added to the\n * given element. Any missing classes (that have already been applied to the element\n * beforehand) will be removed (unset) from the element's list of CSS classes.\n *\n * @codeGenApi\n */\nexport function ɵɵclassMap(classes: {[className: string]: boolean|undefined|null}|string|undefined|\n null): void {\n checkStylingMap(keyValueArraySet, classStringParser, classes, true);\n}\n\n/**\n * Parse text as class and add values to KeyValueArray.\n *\n * This code is pulled out to a separate function so that it can be tree shaken away if it is not\n * needed. It is only referenced from `ɵɵclassMap`.\n *\n * @param keyValueArray KeyValueArray to add parsed values to.\n * @param text text to parse.\n */\nexport function classStringParser(keyValueArray: KeyValueArray<any>, text: string): void {\n for (let i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) {\n keyValueArraySet(keyValueArray, getLastParsedKey(text), true);\n }\n}\n\n/**\n * Common code between `ɵɵclassProp` and `ɵɵstyleProp`.\n *\n * @param prop property name.\n * @param value binding value.\n * @param suffix suffix for the property (e.g. `em` or `px`)\n * @param isClassBased `true` if `class` change (`false` if `style`)\n */\nexport function checkStylingProperty(\n prop: string, value: any|NO_CHANGE, suffix: string|undefined|null,\n isClassBased: boolean): void {\n const lView = getLView();\n const tView = getTView();\n // Styling instructions use 2 slots per binding.\n // 1. one for the value / TStylingKey\n // 2. one for the intermittent-value / TStylingRange\n const bindingIndex = incrementBindingIndex(2);\n if (tView.firstUpdatePass) {\n stylingFirstUpdatePass(tView, prop, bindingIndex, isClassBased);\n }\n if (value !== NO_CHANGE && bindingUpdated(lView, bindingIndex, value)) {\n const tNode = tView.data[getSelectedIndex()] as TNode;\n updateStyling(\n tView, tNode, lView, lView[RENDERER], prop,\n lView[bindingIndex + 1] = normalizeSuffix(value, suffix), isClassBased, bindingIndex);\n }\n}\n\n/**\n * Common code between `ɵɵclassMap` and `ɵɵstyleMap`.\n *\n * @param keyValueArraySet (See `keyValueArraySet` in \"util/array_utils\") Gets passed in as a\n * function so that `style` can be processed. This is done for tree shaking purposes.\n * @param stringParser Parser used to parse `value` if `string`. (Passed in as `style` and `class`\n * have different parsers.)\n * @param value bound value from application\n * @param isClassBased `true` if `class` change (`false` if `style`)\n */\nexport function checkStylingMap(\n keyValueArraySet: (keyValueArray: KeyValueArray<any>, key: string, value: any) => void,\n stringParser: (styleKeyValueArray: KeyValueArray<any>, text: string) => void,\n value: any|NO_CHANGE, isClassBased: boolean): void {\n const tView = getTView();\n const bindingIndex = incrementBindingIndex(2);\n if (tView.firstUpdatePass) {\n stylingFirstUpdatePass(tView, null, bindingIndex, isClassBased);\n }\n const lView = getLView();\n if (value !== NO_CHANGE && bindingUpdated(lView, bindingIndex, value)) {\n // `getSelectedIndex()` should be here (rather than in instruction) so that it is guarded by the\n // if so as not to read unnecessarily.\n const tNode = tView.data[getSelectedIndex()] as TNode;\n if (hasStylingInputShadow(tNode, isClassBased) && !isInHostBindings(tView, bindingIndex)) {\n if (ngDevMode) {\n // verify that if we are shadowing then `TData` is appropriately marked so that we skip\n // processing this binding in styling resolution.\n const tStylingKey = tView.data[bindingIndex];\n assertEqual(\n Array.isArray(tStylingKey) ? tStylingKey[1] : tStylingKey, false,\n 'Styling linked list shadow input should be marked as \\'false\\'');\n }\n // VE does not concatenate the static portion like we are doing here.\n // Instead VE just ignores the static completely if dynamic binding is present.\n // Because of locality we have already set the static portion because we don't know if there\n // is a dynamic portion until later. If we would ignore the static portion it would look like\n // the binding has removed it. This would confuse `[ngStyle]`/`[ngClass]` to do the wrong\n // thing as it would think that the static portion was removed. For this reason we\n // concatenate it so that `[ngStyle]`/`[ngClass]` can continue to work on changed.\n let staticPrefix = isClassBased ? tNode.classesWithoutHost : tNode.stylesWithoutHost;\n ngDevMode && isClassBased === false && staticPrefix !== null &&\n assertEqual(\n staticPrefix.endsWith(';'), true, 'Expecting static portion to end with \\';\\'');\n if (staticPrefix !== null) {\n // We want to make sure that falsy values of `value` become empty strings.\n value = concatStringsWithSpace(staticPrefix, value ? value : '');\n }\n // Given `<div [style] my-dir>` such that `my-dir` has `@Input('style')`.\n // This takes over the `[style]` binding. (Same for `[class]`)\n setDirectiveInputsWhichShadowsStyling(tView, tNode, lView, value, isClassBased);\n } else {\n updateStylingMap(\n tView, tNode, lView, lView[RENDERER], lView[bindingIndex + 1],\n lView[bindingIndex + 1] = toStylingKeyValueArray(keyValueArraySet, stringParser, value),\n isClassBased, bindingIndex);\n }\n }\n}\n\n/**\n * Determines when the binding is in `hostBindings` section\n *\n * @param tView Current `TView`\n * @param bindingIndex index of binding which we would like if it is in `hostBindings`\n */\nfunction isInHostBindings(tView: TView, bindingIndex: number): boolean {\n // All host bindings are placed after the expando section.\n return bindingIndex >= tView.expandoStartIndex;\n}\n\n/**\n * Collects the necessary information to insert the binding into a linked list of style bindings\n * using `insertTStylingBinding`.\n *\n * @param tView `TView` where the binding linked list will be stored.\n * @param tStylingKey Property/key of the binding.\n * @param bindingIndex Index of binding associated with the `prop`\n * @param isClassBased `true` if `class` change (`false` if `style`)\n */\nfunction stylingFirstUpdatePass(\n tView: TView, tStylingKey: TStylingKey, bindingIndex: number, isClassBased: boolean): void {\n ngDevMode && assertFirstUpdatePass(tView);\n const tData = tView.data;\n if (tData[bindingIndex + 1] === null) {\n // The above check is necessary because we don't clear first update pass until first successful\n // (no exception) template execution. This prevents the styling instruction from double adding\n // itself to the list.\n // `getSelectedIndex()` should be here (rather than in instruction) so that it is guarded by the\n // if so as not to read unnecessarily.\n const tNode = tData[getSelectedIndex()] as TNode;\n ngDevMode && assertDefined(tNode, 'TNode expected');\n const isHostBindings = isInHostBindings(tView, bindingIndex);\n if (hasStylingInputShadow(tNode, isClassBased) && tStylingKey === null && !isHostBindings) {\n // `tStylingKey === null` implies that we are either `[style]` or `[class]` binding.\n // If there is a directive which uses `@Input('style')` or `@Input('class')` than\n // we need to neutralize this binding since that directive is shadowing it.\n // We turn this into a noop by setting the key to `false`\n tStylingKey = false;\n }\n tStylingKey = wrapInStaticStylingKey(tData, tNode, tStylingKey, isClassBased);\n insertTStylingBinding(tData, tNode, tStylingKey, bindingIndex, isHostBindings, isClassBased);\n }\n}\n\n/**\n * Adds static styling information to the binding if applicable.\n *\n * The linked list of styles not only stores the list and keys, but also stores static styling\n * information on some of the keys. This function determines if the key should contain the styling\n * information and computes it.\n *\n * See `TStylingStatic` for more details.\n *\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param stylingKey `TStylingKeyPrimitive` which may need to be wrapped into `TStylingKey`\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nexport function wrapInStaticStylingKey(\n tData: TData, tNode: TNode, stylingKey: TStylingKey, isClassBased: boolean): TStylingKey {\n const hostDirectiveDef = getCurrentDirectiveDef(tData);\n let residual = isClassBased ? tNode.residualClasses : tNode.residualStyles;\n if (hostDirectiveDef === null) {\n // We are in template node.\n // If template node already had styling instruction then it has already collected the static\n // styling and there is no need to collect them again. We know that we are the first styling\n // instruction because the `TNode.*Bindings` points to 0 (nothing has been inserted yet).\n const isFirstStylingInstructionInTemplate =\n (isClassBased ? tNode.classBindings : tNode.styleBindings) as any as number === 0;\n if (isFirstStylingInstructionInTemplate) {\n // It would be nice to be able to get the statics from `mergeAttrs`, however, at this point\n // they are already merged and it would not be possible to figure which property belongs where\n // in the priority.\n stylingKey = collectStylingFromDirectives(null, tData, tNode, stylingKey, isClassBased);\n stylingKey = collectStylingFromTAttrs(stylingKey, tNode.attrs, isClassBased);\n // We know that if we have styling binding in template we can't have residual.\n residual = null;\n }\n } else {\n // We are in host binding node and there was no binding instruction in template node.\n // This means that we need to compute the residual.\n const directiveStylingLast = tNode.directiveStylingLast;\n const isFirstStylingInstructionInHostBinding =\n directiveStylingLast === -1 || tData[directiveStylingLast] !== hostDirectiveDef;\n if (isFirstStylingInstructionInHostBinding) {\n stylingKey =\n collectStylingFromDirectives(hostDirectiveDef, tData, tNode, stylingKey, isClassBased);\n if (residual === null) {\n // - If `null` than either:\n // - Template styling instruction already ran and it has consumed the static\n // styling into its `TStylingKey` and so there is no need to update residual. Instead\n // we need to update the `TStylingKey` associated with the first template node\n // instruction. OR\n // - Some other styling instruction ran and determined that there are no residuals\n let templateStylingKey = getTemplateHeadTStylingKey(tData, tNode, isClassBased);\n if (templateStylingKey !== undefined && Array.isArray(templateStylingKey)) {\n // Only recompute if `templateStylingKey` had static values. (If no static value found\n // then there is nothing to do since this operation can only produce less static keys, not\n // more.)\n templateStylingKey = collectStylingFromDirectives(\n null, tData, tNode, templateStylingKey[1] /* unwrap previous statics */,\n isClassBased);\n templateStylingKey =\n collectStylingFromTAttrs(templateStylingKey, tNode.attrs, isClassBased);\n setTemplateHeadTStylingKey(tData, tNode, isClassBased, templateStylingKey);\n }\n } else {\n // We only need to recompute residual if it is not `null`.\n // - If existing residual (implies there was no template styling). This means that some of\n // the statics may have moved from the residual to the `stylingKey` and so we have to\n // recompute.\n // - If `undefined` this is the first time we are running.\n residual = collectResidual(tData, tNode, isClassBased);\n }\n }\n }\n if (residual !== undefined) {\n isClassBased ? (tNode.residualClasses = residual) : (tNode.residualStyles = residual);\n }\n return stylingKey;\n}\n\n/**\n * Retrieve the `TStylingKey` for the template styling instruction.\n *\n * This is needed since `hostBinding` styling instructions are inserted after the template\n * instruction. While the template instruction needs to update the residual in `TNode` the\n * `hostBinding` instructions need to update the `TStylingKey` of the template instruction because\n * the template instruction is downstream from the `hostBindings` instructions.\n *\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @return `TStylingKey` if found or `undefined` if not found.\n */\nfunction getTemplateHeadTStylingKey(tData: TData, tNode: TNode, isClassBased: boolean): TStylingKey|\n undefined {\n const bindings = isClassBased ? tNode.classBindings : tNode.styleBindings;\n if (getTStylingRangeNext(bindings) === 0) {\n // There does not seem to be a styling instruction in the `template`.\n return undefined;\n }\n return tData[getTStylingRangePrev(bindings)] as TStylingKey;\n}\n\n/**\n * Update the `TStylingKey` of the first template instruction in `TNode`.\n *\n * Logically `hostBindings` styling instructions are of lower priority than that of the template.\n * However, they execute after the template styling instructions. This means that they get inserted\n * in front of the template styling instructions.\n *\n * If we have a template styling instruction and a new `hostBindings` styling instruction is\n * executed it means that it may need to steal static fields from the template instruction. This\n * method allows us to update the first template instruction `TStylingKey` with a new value.\n *\n * Assume:\n * ```\n * <div my-dir style=\"color: red\" [style.color]=\"tmplExp\"></div>\n *\n * @Directive({\n * host: {\n * 'style': 'width: 100px',\n * '[style.color]': 'dirExp',\n * }\n * })\n * class MyDir {}\n * ```\n *\n * when `[style.color]=\"tmplExp\"` executes it creates this data structure.\n * ```\n * ['', 'color', 'color', 'red', 'width', '100px'],\n * ```\n *\n * The reason for this is that the template instruction does not know if there are styling\n * instructions and must assume that there are none and must collect all of the static styling.\n * (both\n * `color' and 'width`)\n *\n * When `'[style.color]': 'dirExp',` executes we need to insert a new data into the linked list.\n * ```\n * ['', 'color', 'width', '100px'], // newly inserted\n * ['', 'color', 'color', 'red', 'width', '100px'], // this is wrong\n * ```\n *\n * Notice that the template statics is now wrong as it incorrectly contains `width` so we need to\n * update it like so:\n * ```\n * ['', 'color', 'width', '100px'],\n * ['', 'color', 'color', 'red'], // UPDATE\n * ```\n *\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @param tStylingKey New `TStylingKey` which is replacing the old one.\n */\nfunction setTemplateHeadTStylingKey(\n tData: TData, tNode: TNode, isClassBased: boolean, tStylingKey: TStylingKey): void {\n const bindings = isClassBased ? tNode.classBindings : tNode.styleBindings;\n ngDevMode &&\n assertNotEqual(\n getTStylingRangeNext(bindings), 0,\n 'Expecting to have at least one template styling binding.');\n tData[getTStylingRangePrev(bindings)] = tStylingKey;\n}\n\n/**\n * Collect all static values after the current `TNode.directiveStylingLast` index.\n *\n * Collect the remaining styling information which has not yet been collected by an existing\n * styling instruction.\n *\n * @param tData `TData` where the `DirectiveDefs` are stored.\n * @param tNode `TNode` which contains the directive range.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction collectResidual(tData: TData, tNode: TNode, isClassBased: boolean): KeyValueArray<any>|\n null {\n let residual: KeyValueArray<any>|null|undefined = undefined;\n const directiveEnd = tNode.directiveEnd;\n ngDevMode &&\n assertNotEqual(\n tNode.directiveStylingLast, -1,\n 'By the time this function gets called at least one hostBindings-node styling instruction must have executed.');\n // We add `1 + tNode.directiveStart` because we need to skip the current directive (as we are\n // collecting things after the last `hostBindings` directive which had a styling instruction.)\n for (let i = 1 + tNode.directiveStylingLast; i < directiveEnd; i++) {\n const attrs = (tData[i] as DirectiveDef<any>).hostAttrs;\n residual = collectStylingFromTAttrs(residual, attrs, isClassBased) as KeyValueArray<any>| null;\n }\n return collectStylingFromTAttrs(residual, tNode.attrs, isClassBased) as KeyValueArray<any>| null;\n}\n\n/**\n * Collect the static styling information with lower priority than `hostDirectiveDef`.\n *\n * (This is opposite of residual styling.)\n *\n * @param hostDirectiveDef `DirectiveDef` for which we want to collect lower priority static\n * styling. (Or `null` if template styling)\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param stylingKey Existing `TStylingKey` to update or wrap.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction collectStylingFromDirectives(\n hostDirectiveDef: DirectiveDef<any>|null, tData: TData, tNode: TNode, stylingKey: TStylingKey,\n isClassBased: boolean): TStylingKey {\n // We need to loop because there can be directives which have `hostAttrs` but don't have\n // `hostBindings` so this loop catches up to the current directive..\n let currentDirective: DirectiveDef<any>|null = null;\n const directiveEnd = tNode.directiveEnd;\n let directiveStylingLast = tNode.directiveStylingLast;\n if (directiveStylingLast === -1) {\n directiveStylingLast = tNode.directiveStart;\n } else {\n directiveStylingLast++;\n }\n while (directiveStylingLast < directiveEnd) {\n currentDirective = tData[directiveStylingLast] as DirectiveDef<any>;\n ngDevMode && assertDefined(currentDirective, 'expected to be defined');\n stylingKey = collectStylingFromTAttrs(stylingKey, currentDirective.hostAttrs, isClassBased);\n if (currentDirective === hostDirectiveDef) break;\n directiveStylingLast++;\n }\n if (hostDirectiveDef !== null) {\n // we only advance the styling cursor if we are collecting data from host bindings.\n // Template executes before host bindings and so if we would update the index,\n // host bindings would not get their statics.\n tNode.directiveStylingLast = directiveStylingLast;\n }\n return stylingKey;\n}\n\n/**\n * Convert `TAttrs` into `TStylingStatic`.\n *\n * @param stylingKey existing `TStylingKey` to update or wrap.\n * @param attrs `TAttributes` to process.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction collectStylingFromTAttrs(\n stylingKey: TStylingKey|undefined, attrs: TAttributes|null,\n isClassBased: boolean): TStylingKey {\n const desiredMarker = isClassBased ? AttributeMarker.Classes : AttributeMarker.Styles;\n let currentMarker = AttributeMarker.ImplicitAttributes;\n if (attrs !== null) {\n for (let i = 0; i < attrs.length; i++) {\n const item = attrs[i] as number | string;\n if (typeof item === 'number') {\n currentMarker = item;\n } else {\n if (currentMarker === desiredMarker) {\n if (!Array.isArray(stylingKey)) {\n stylingKey = stylingKey === undefined ? [] : ['', stylingKey] as any;\n }\n keyValueArraySet(\n stylingKey as KeyValueArray<any>, item, isClassBased ? true : attrs[++i]);\n }\n }\n }\n }\n return stylingKey === undefined ? null : stylingKey;\n}\n\n/**\n * Convert user input to `KeyValueArray`.\n *\n * This function takes user input which could be `string`, Object literal, or iterable and converts\n * it into a consistent representation. The output of this is `KeyValueArray` (which is an array\n * where\n * even indexes contain keys and odd indexes contain values for those keys).\n *\n * The advantage of converting to `KeyValueArray` is that we can perform diff in an input\n * independent\n * way.\n * (ie we can compare `foo bar` to `['bar', 'baz'] and determine a set of changes which need to be\n * applied)\n *\n * The fact that `KeyValueArray` is sorted is very important because it allows us to compute the\n * difference in linear fashion without the need to allocate any additional data.\n *\n * For example if we kept this as a `Map` we would have to iterate over previous `Map` to determine\n * which values need to be deleted, over the new `Map` to determine additions, and we would have to\n * keep additional `Map` to keep track of duplicates or items which have not yet been visited.\n *\n * @param keyValueArraySet (See `keyValueArraySet` in \"util/array_utils\") Gets passed in as a\n * function so that `style` can be processed. This is done\n * for tree shaking purposes.\n * @param stringParser The parser is passed in so that it will be tree shakable. See\n * `styleStringParser` and `classStringParser`\n * @param value The value to parse/convert to `KeyValueArray`\n */\nexport function toStylingKeyValueArray(\n keyValueArraySet: (keyValueArray: KeyValueArray<any>, key: string, value: any) => void,\n stringParser: (styleKeyValueArray: KeyValueArray<any>, text: string) => void,\n value: string|string[]|{[key: string]: any}|SafeValue|null|undefined): KeyValueArray<any> {\n if (value == null /*|| value === undefined */ || value === '') return EMPTY_ARRAY as any;\n const styleKeyValueArray: KeyValueArray<any> = [] as any;\n const unwrappedValue = unwrapSafeValue(value) as string | string[] | {[key: string]: any};\n if (Array.isArray(unwrappedValue)) {\n for (let i = 0; i < unwrappedValue.length; i++) {\n keyValueArraySet(styleKeyValueArray, unwrappedValue[i], true);\n }\n } else if (typeof unwrappedValue === 'object') {\n for (const key in unwrappedValue) {\n if (unwrappedValue.hasOwnProperty(key)) {\n keyValueArraySet(styleKeyValueArray, key, unwrappedValue[key]);\n }\n }\n } else if (typeof unwrappedValue === 'string') {\n stringParser(styleKeyValueArray, unwrappedValue);\n } else {\n ngDevMode &&\n throwError('Unsupported styling type ' + typeof unwrappedValue + ': ' + unwrappedValue);\n }\n return styleKeyValueArray;\n}\n\n/**\n * Set a `value` for a `key`.\n *\n * See: `keyValueArraySet` for details\n *\n * @param keyValueArray KeyValueArray to add to.\n * @param key Style key to add.\n * @param value The value to set.\n */\nexport function styleKeyValueArraySet(keyValueArray: KeyValueArray<any>, key: string, value: any) {\n keyValueArraySet(keyValueArray, key, unwrapSafeValue(value));\n}\n\n/**\n * Update map based styling.\n *\n * Map based styling could be anything which contains more than one binding. For example `string`,\n * or object literal. Dealing with all of these types would complicate the logic so\n * instead this function expects that the complex input is first converted into normalized\n * `KeyValueArray`. The advantage of normalization is that we get the values sorted, which makes it\n * very cheap to compute deltas between the previous and current value.\n *\n * @param tView Associated `TView.data` contains the linked list of binding priorities.\n * @param tNode `TNode` where the binding is located.\n * @param lView `LView` contains the values associated with other styling binding at this `TNode`.\n * @param renderer Renderer to use if any updates.\n * @param oldKeyValueArray Previous value represented as `KeyValueArray`\n * @param newKeyValueArray Current value represented as `KeyValueArray`\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @param bindingIndex Binding index of the binding.\n */\nfunction updateStylingMap(\n tView: TView, tNode: TNode, lView: LView, renderer: Renderer3,\n oldKeyValueArray: KeyValueArray<any>, newKeyValueArray: KeyValueArray<any>,\n isClassBased: boolean, bindingIndex: number) {\n if (oldKeyValueArray as KeyValueArray<any>| NO_CHANGE === NO_CHANGE) {\n // On first execution the oldKeyValueArray is NO_CHANGE => treat it as empty KeyValueArray.\n oldKeyValueArray = EMPTY_ARRAY as any;\n }\n let oldIndex = 0;\n let newIndex = 0;\n let oldKey: string|null = 0 < oldKeyValueArray.length ? oldKeyValueArray[0] : null;\n let newKey: string|null = 0 < newKeyValueArray.length ? newKeyValueArray[0] : null;\n while (oldKey !== null || newKey !== null) {\n ngDevMode && assertLessThan(oldIndex, 999, 'Are we stuck in infinite loop?');\n ngDevMode && assertLessThan(newIndex, 999, 'Are we stuck in infinite loop?');\n const oldValue =\n oldIndex < oldKeyValueArray.length ? oldKeyValueArray[oldIndex + 1] : undefined;\n const newValue =\n newIndex < newKeyValueArray.length ? newKeyValueArray[newIndex + 1] : undefined;\n let setKey: string|null = null;\n let setValue: any = undefined;\n if (oldKey === newKey) {\n // UPDATE: Keys are equal => new value is overwriting old value.\n oldIndex += 2;\n newIndex += 2;\n if (oldValue !== newValue) {\n setKey = newKey;\n setValue = newValue;\n }\n } else if (newKey === null || oldKey !== null && oldKey < newKey!) {\n // DELETE: oldKey key is missing or we did not find the oldKey in the newValue\n // (because the keyValueArray is sorted and `newKey` is found later alphabetically).\n // `\"background\" < \"color\"` so we need to delete `\"background\"` because it is not found in the\n // new array.\n oldIndex += 2;\n setKey = oldKey;\n } else {\n // CREATE: newKey's is earlier alphabetically than oldKey's (or no oldKey) => we have new key.\n // `\"color\" > \"background\"` so we need to add `color` because it is in new array but not in\n // old array.\n ngDevMode && assertDefined(newKey, 'Expecting to have a valid key');\n newIndex += 2;\n setKey = newKey;\n setValue = newValue;\n }\n if (setKey !== null) {\n updateStyling(tView, tNode, lView, renderer, setKey, setValue, isClassBased, bindingIndex);\n }\n oldKey = oldIndex < oldKeyValueArray.length ? oldKeyValueArray[oldIndex] : null;\n newKey = newIndex < newKeyValueArray.length ? newKeyValueArray[newIndex] : null;\n }\n}\n\n/**\n * Update a simple (property name) styling.\n *\n * This function takes `prop` and updates the DOM to that value. The function takes the binding\n * value as well as binding priority into consideration to determine which value should be written\n * to DOM. (For example it may be determined that there is a higher priority overwrite which blocks\n * the DOM write, or if the value goes to `undefined` a lower priority overwrite may be consulted.)\n *\n * @param tView Associated `TView.data` contains the linked list of binding priorities.\n * @param tNode `TNode` where the binding is located.\n * @param lView `LView` contains the values associated with other styling binding at this `TNode`.\n * @param renderer Renderer to use if any updates.\n * @param prop Either style property name or a class name.\n * @param value Either style value for `prop` or `true`/`false` if `prop` is class.\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @param bindingIndex Binding index of the binding.\n */\nfunction updateStyling(\n tView: TView, tNode: TNode, lView: LView, renderer: Renderer3, prop: string,\n value: string|undefined|null|boolean, isClassBased: boolean, bindingIndex: number) {\n if (!(tNode.type & TNodeType.AnyRNode)) {\n // It is possible to have styling on non-elements (such as ng-container).\n // This is rare, but it does happen. In such a case, just ignore the binding.\n return;\n }\n const tData = tView.data;\n const tRange = tData[bindingIndex + 1] as TStylingRange;\n const higherPriorityValue = getTStylingRangeNextDuplicate(tRange) ?\n findStylingValue(tData, tNode, lView, prop, getTStylingRangeNext(tRange), isClassBased) :\n undefined;\n if (!isStylingValuePresent(higherPriorityValue)) {\n // We don't have a next duplicate, or we did not find a duplicate value.\n if (!isStylingValuePresent(value)) {\n // We should delete current value or restore to lower priority value.\n if (getTStylingRangePrevDuplicate(tRange)) {\n // We have a possible prev duplicate, let's retrieve it.\n value = findStylingValue(tData, null, lView, prop, bindingIndex, isClassBased);\n }\n }\n const rNode = getNativeByIndex(getSelectedIndex(), lView) as RElement;\n applyStyling(renderer, isClassBased, rNode, prop, value);\n }\n}\n\n/**\n * Search for styling value with higher priority which is overwriting current value, or a\n * value of lower priority to which we should fall back if the value is `undefined`.\n *\n * When value is being applied at a location, related values need to be consulted.\n * - If there is a higher priority binding, we should be using that one instead.\n * For example `<div [style]=\"{color:exp1}\" [style.color]=\"exp2\">` change to `exp1`\n * requires that we check `exp2` to see if it is set to value other than `undefined`.\n * - If there is a lower priority binding and we are changing to `undefined`\n * For example `<div [style]=\"{color:exp1}\" [style.color]=\"exp2\">` change to `exp2` to\n * `undefined` requires that we check `exp1` (and static values) and use that as new value.\n *\n * NOTE: The styling stores two values.\n * 1. The raw value which came from the application is stored at `index + 0` location. (This value\n * is used for dirty checking).\n * 2. The normalized value is stored at `index + 1`.\n *\n * @param tData `TData` used for traversing the priority.\n * @param tNode `TNode` to use for resolving static styling. Also controls search direction.\n * - `TNode` search next and quit as soon as `isStylingValuePresent(value)` is true.\n * If no value found consult `tNode.residualStyle`/`tNode.residualClass` for default value.\n * - `null` search prev and go all the way to end. Return last value where\n * `isStylingValuePresent(value)` is true.\n * @param lView `LView` used for retrieving the actual values.\n * @param prop Property which we are interested in.\n * @param index Starting index in the linked list of styling bindings where the search should start.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction findStylingValue(\n tData: TData, tNode: TNode|null, lView: LView, prop: string, index: number,\n isClassBased: boolean): any {\n // `TNode` to use for resolving static styling. Also controls search direction.\n // - `TNode` search next and quit as soon as `isStylingValuePresent(value)` is true.\n // If no value found consult `tNode.residualStyle`/`tNode.residualClass` for default value.\n // - `null` search prev and go all the way to end. Return last value where\n // `isStylingValuePresent(value)` is true.\n const isPrevDirection = tNode === null;\n let value: any = undefined;\n while (index > 0) {\n const rawKey = tData[index] as TStylingKey;\n const containsStatics = Array.isArray(rawKey);\n // Unwrap the key if we contain static values.\n const key = containsStatics ? (rawKey as string[])[1] : rawKey;\n const isStylingMap = key === null;\n let valueAtLViewIndex = lView[index + 1];\n if (valueAtLViewIndex === NO_CHANGE) {\n // In firstUpdatePass the styling instructions create a linked list of styling.\n // On subsequent passes it is possible for a styling instruction to try to read a binding\n // which\n // has not yet executed. In that case we will find `NO_CHANGE` and we should assume that\n // we have `undefined` (or empty array in case of styling-map instruction) instead. This\n // allows the resolution to apply the value (which may later be overwritten when the\n // binding actually executes.)\n valueAtLViewIndex = isStylingMap ? EMPTY_ARRAY : undefined;\n }\n let currentValue = isStylingMap ? keyValueArrayGet(valueAtLViewIndex, prop) :\n key === prop ? valueAtLViewIndex : undefined;\n if (containsStatics && !isStylingValuePresent(currentValue)) {\n currentValue = keyValueArrayGet(rawKey as KeyValueArray<any>, prop);\n }\n if (isStylingValuePresent(currentValue)) {\n value = currentValue;\n if (isPrevDirection) {\n return value;\n }\n }\n const tRange = tData[index + 1] as TStylingRange;\n index = isPrevDirection ? getTStylingRangePrev(tRange) : getTStylingRangeNext(tRange);\n }\n if (tNode !== null) {\n // in case where we are going in next direction AND we did not find anything, we need to\n // consult residual styling\n let residual = isClassBased ? tNode.residualClasses : tNode.residualStyles;\n if (residual != null /** OR residual !=== undefined */) {\n value = keyValueArrayGet(residual!, prop);\n }\n }\n return value;\n}\n\n/**\n * Determines if the binding value should be used (or if the value is 'undefined' and hence priority\n * resolution should be used.)\n *\n * @param value Binding style value.\n */\nfunction isStylingValuePresent(value: any): boolean {\n // Currently only `undefined` value is considered non-binding. That is `undefined` says I don't\n // have an opinion as to what this binding should be and you should consult other bindings by\n // priority to determine the valid value.\n // This is extracted into a single function so that we have a single place to control this.\n return value !== undefined;\n}\n\n/**\n * Normalizes and/or adds a suffix to the value.\n *\n * If value is `null`/`undefined` no suffix is added\n * @param value\n * @param suffix\n */\nfunction normalizeSuffix(value: any, suffix: string|undefined|null): string|null|undefined|boolean {\n if (value == null /** || value === undefined */) {\n // do nothing\n } else if (typeof suffix === 'string') {\n value = value + suffix;\n } else if (typeof value === 'object') {\n value = stringify(unwrapSafeValue(value));\n }\n return value;\n}\n\n\n/**\n * Tests if the `TNode` has input shadow.\n *\n * An input shadow is when a directive steals (shadows) the input by using `@Input('style')` or\n * `@Input('class')` as input.\n *\n * @param tNode `TNode` which we would like to see if it has shadow.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nexport function hasStylingInputShadow(tNode: TNode, isClassBased: boolean) {\n return (tNode.flags & (isClassBased ? TNodeFlags.hasClassInput : TNodeFlags.hasStyleInput)) !== 0;\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 */\nimport {assertEqual, assertIndexInRange} from '../../util/assert';\nimport {TElementNode, TNodeType} from '../interfaces/node';\nimport {HEADER_OFFSET, RENDERER, T_HOST} from '../interfaces/view';\nimport {appendChild, createTextNode} from '../node_manipulation';\nimport {getBindingIndex, getLView, getTView, setCurrentTNode} from '../state';\n\nimport {getOrCreateTNode} from './shared';\n\n\n\n/**\n * Create static text node\n *\n * @param index Index of the node in the data array\n * @param value Static string value to write.\n *\n * @codeGenApi\n */\nexport function ɵɵtext(index: number, value: string = ''): void {\n const lView = getLView();\n const tView = getTView();\n const adjustedIndex = index + HEADER_OFFSET;\n\n ngDevMode &&\n assertEqual(\n getBindingIndex(), tView.bindingStartIndex,\n 'text nodes should be created before any bindings');\n ngDevMode && assertIndexInRange(lView, adjustedIndex);\n\n const tNode = tView.firstCreatePass ?\n getOrCreateTNode(tView, adjustedIndex, TNodeType.Text, value, null) :\n tView.data[adjustedIndex] as TElementNode;\n\n const textNative = lView[adjustedIndex] = createTextNode(lView[RENDERER], value);\n appendChild(tView, lView, textNative, tNode);\n\n // Text nodes are self closing.\n setCurrentTNode(tNode, 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 */\nimport {getLView, getSelectedIndex} from '../state';\nimport {NO_CHANGE} from '../tokens';\n\nimport {interpolation1, interpolation2, interpolation3, interpolation4, interpolation5, interpolation6, interpolation7, interpolation8, interpolationV} from './interpolation';\nimport {textBindingInternal} from './shared';\n\n\n/**\n *\n * Update text content with a lone bound value\n *\n * Used when a text node has 1 interpolated value in it, an no additional text\n * surrounds that interpolated value:\n *\n * ```html\n * <div>{{v0}}</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate(v0);\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate(v0: any): typeof ɵɵtextInterpolate {\n ɵɵtextInterpolate1('', v0, '');\n return ɵɵtextInterpolate;\n}\n\n\n/**\n *\n * Update text content with single bound value surrounded by other text.\n *\n * Used when a text node has 1 interpolated value in it:\n *\n * ```html\n * <div>prefix{{v0}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate1('prefix', v0, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate1(\n prefix: string, v0: any, suffix: string): typeof ɵɵtextInterpolate1 {\n const lView = getLView();\n const interpolated = interpolation1(lView, prefix, v0, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated as string);\n }\n return ɵɵtextInterpolate1;\n}\n\n/**\n *\n * Update text content with 2 bound values surrounded by other text.\n *\n * Used when a text node has 2 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate2('prefix', v0, '-', v1, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate2(\n prefix: string, v0: any, i0: string, v1: any, suffix: string): typeof ɵɵtextInterpolate2 {\n const lView = getLView();\n const interpolated = interpolation2(lView, prefix, v0, i0, v1, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated as string);\n }\n return ɵɵtextInterpolate2;\n}\n\n/**\n *\n * Update text content with 3 bound values surrounded by other text.\n *\n * Used when a text node has 3 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate3(\n * 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate3(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any,\n suffix: string): typeof ɵɵtextInterpolate3 {\n const lView = getLView();\n const interpolated = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated as string);\n }\n return ɵɵtextInterpolate3;\n}\n\n/**\n *\n * Update text content with 4 bound values surrounded by other text.\n *\n * Used when a text node has 4 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate4(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see ɵɵtextInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate4(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n suffix: string): typeof ɵɵtextInterpolate4 {\n const lView = getLView();\n const interpolated = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated as string);\n }\n return ɵɵtextInterpolate4;\n}\n\n/**\n *\n * Update text content with 5 bound values surrounded by other text.\n *\n * Used when a text node has 5 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate5(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate5(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, suffix: string): typeof ɵɵtextInterpolate5 {\n const lView = getLView();\n const interpolated = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated as string);\n }\n return ɵɵtextInterpolate5;\n}\n\n/**\n *\n * Update text content with 6 bound values surrounded by other text.\n *\n * Used when a text node has 6 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate6(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change. @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate6(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, i4: string, v5: any, suffix: string): typeof ɵɵtextInterpolate6 {\n const lView = getLView();\n const interpolated =\n interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated as string);\n }\n return ɵɵtextInterpolate6;\n}\n\n/**\n *\n * Update text content with 7 bound values surrounded by other text.\n *\n * Used when a text node has 7 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate7(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate7(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, i4: string, v5: any, i5: string, v6: any,\n suffix: string): typeof ɵɵtextInterpolate7 {\n const lView = getLView();\n const interpolated =\n interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated as string);\n }\n return ɵɵtextInterpolate7;\n}\n\n/**\n *\n * Update text content with 8 bound values surrounded by other text.\n *\n * Used when a text node has 8 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate8(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate8(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any,\n suffix: string): typeof ɵɵtextInterpolate8 {\n const lView = getLView();\n const interpolated = interpolation8(\n lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated as string);\n }\n return ɵɵtextInterpolate8;\n}\n\n/**\n * Update text content with 9 or more bound values other surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolateV(\n * ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n * 'suffix']);\n * ```\n *.\n * @param values The collection of values and the strings in between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n *\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵtextInterpolateV(values: any[]): typeof ɵɵtextInterpolateV {\n const lView = getLView();\n const interpolated = interpolationV(lView, values);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated as string);\n }\n return ɵɵtextInterpolateV;\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 {keyValueArraySet} from '../../util/array_utils';\nimport {getLView} from '../state';\nimport {interpolation1, interpolation2, interpolation3, interpolation4, interpolation5, interpolation6, interpolation7, interpolation8, interpolationV} from './interpolation';\nimport {checkStylingMap, classStringParser} from './styling';\n\n\n\n/**\n *\n * Update an interpolated class on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate1('prefix', v0, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵclassMapInterpolate1(prefix: string, v0: any, suffix: string): void {\n const lView = getLView();\n const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n *\n * Update an interpolated class on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate2('prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵclassMapInterpolate2(\n prefix: string, v0: any, i0: string, v1: any, suffix: string): void {\n const lView = getLView();\n const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n *\n * Update an interpolated class on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate3(\n * 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵclassMapInterpolate3(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string): void {\n const lView = getLView();\n const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n *\n * Update an interpolated class on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate4(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵclassMapInterpolate4(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n suffix: string): void {\n const lView = getLView();\n const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n *\n * Update an interpolated class on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate5(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵclassMapInterpolate5(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, suffix: string): void {\n const lView = getLView();\n const interpolatedValue =\n interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n *\n * Update an interpolated class on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate6(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵclassMapInterpolate6(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, i4: string, v5: any, suffix: string): void {\n const lView = getLView();\n const interpolatedValue =\n interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n *\n * Update an interpolated class on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate7(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵclassMapInterpolate7(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string): void {\n const lView = getLView();\n const interpolatedValue =\n interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n *\n * Update an interpolated class on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate8(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵclassMapInterpolate8(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any,\n suffix: string): void {\n const lView = getLView();\n const interpolatedValue = interpolation8(\n lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n * Update an interpolated class on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n * class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolateV(\n * ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n * 'suffix']);\n * ```\n *.\n * @param values The collection of values and the strings in-between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @codeGenApi\n */\nexport function ɵɵclassMapInterpolateV(values: any[]): void {\n const lView = getLView();\n const interpolatedValue = interpolationV(lView, values);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\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 {getLView} from '../state';\nimport {interpolation1, interpolation2, interpolation3, interpolation4, interpolation5, interpolation6, interpolation7, interpolation8, interpolationV} from './interpolation';\nimport {ɵɵstyleMap} from './styling';\n\n\n/**\n *\n * Update an interpolated style on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div style=\"key: {{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate1('key: ', v0, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵstyleMapInterpolate1(prefix: string, v0: any, suffix: string): void {\n const lView = getLView();\n const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n\n/**\n *\n * Update an interpolated style on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate2('key: ', v0, '; key1: ', v1, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵstyleMapInterpolate2(\n prefix: string, v0: any, i0: string, v1: any, suffix: string): void {\n const lView = getLView();\n const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n\n/**\n *\n * Update an interpolated style on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key2: {{v1}}; key2: {{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate3(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵstyleMapInterpolate3(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string): void {\n const lView = getLView();\n const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n\n/**\n *\n * Update an interpolated style on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate4(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵstyleMapInterpolate4(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n suffix: string): void {\n const lView = getLView();\n const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n\n/**\n *\n * Update an interpolated style on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate5(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵstyleMapInterpolate5(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, suffix: string): void {\n const lView = getLView();\n const interpolatedValue =\n interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n\n/**\n *\n * Update an interpolated style on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}};\n * key5: {{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate6(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,\n * 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵstyleMapInterpolate6(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, i4: string, v5: any, suffix: string): void {\n const lView = getLView();\n const interpolatedValue =\n interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n\n/**\n *\n * Update an interpolated style on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};\n * key6: {{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate7(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,\n * '; key6: ', v6, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵstyleMapInterpolate7(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string): void {\n const lView = getLView();\n const interpolatedValue =\n interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n\n/**\n *\n * Update an interpolated style on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};\n * key6: {{v6}}; key7: {{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate8(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,\n * '; key6: ', v6, '; key7: ', v7, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵstyleMapInterpolate8(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any,\n suffix: string): void {\n const lView = getLView();\n const interpolatedValue = interpolation8(\n lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n\n/**\n * Update an interpolated style on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n * class=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};\n * key6: {{v6}}; key7: {{v7}}; key8: {{v8}}; key9: {{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolateV(\n * ['key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,\n * '; key6: ', v6, '; key7: ', v7, '; key8: ', v8, '; key9: ', v9, 'suffix']);\n * ```\n *.\n * @param values The collection of values and the strings in-between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '; key2: ', value1, '; key2: ', value2, ..., value99, 'suffix']`)\n * @codeGenApi\n */\nexport function ɵɵstyleMapInterpolateV(values: any[]): void {\n const lView = getLView();\n const interpolatedValue = interpolationV(lView, values);\n ɵɵstyleMap(interpolatedValue);\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 {getLView,} from '../state';\nimport {interpolation1, interpolation2, interpolation3, interpolation4, interpolation5, interpolation6, interpolation7, interpolation8, interpolationV} from './interpolation';\nimport {checkStylingProperty} from './styling';\n\n\n/**\n *\n * Update an interpolated style property on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate1(0, 'prefix', v0, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵstylePropInterpolate1(\n prop: string, prefix: string, v0: any, suffix: string,\n valueSuffix?: string|null): typeof ɵɵstylePropInterpolate1 {\n const lView = getLView();\n const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate1;\n}\n\n/**\n *\n * Update an interpolated style property on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate2(0, 'prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵstylePropInterpolate2(\n prop: string, prefix: string, v0: any, i0: string, v1: any, suffix: string,\n valueSuffix?: string|null): typeof ɵɵstylePropInterpolate2 {\n const lView = getLView();\n const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate2;\n}\n\n/**\n *\n * Update an interpolated style property on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate3(0, 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵstylePropInterpolate3(\n prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string,\n valueSuffix?: string|null): typeof ɵɵstylePropInterpolate3 {\n const lView = getLView();\n const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate3;\n}\n\n/**\n *\n * Update an interpolated style property on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate4(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵstylePropInterpolate4(\n prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, suffix: string, valueSuffix?: string|null): typeof ɵɵstylePropInterpolate4 {\n const lView = getLView();\n const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate4;\n}\n\n/**\n *\n * Update an interpolated style property on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate5(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵstylePropInterpolate5(\n prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, suffix: string,\n valueSuffix?: string|null): typeof ɵɵstylePropInterpolate5 {\n const lView = getLView();\n const interpolatedValue =\n interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate5;\n}\n\n/**\n *\n * Update an interpolated style property on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate6(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵstylePropInterpolate6(\n prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string,\n valueSuffix?: string|null): typeof ɵɵstylePropInterpolate6 {\n const lView = getLView();\n const interpolatedValue =\n interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate6;\n}\n\n/**\n *\n * Update an interpolated style property on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate7(\n * 0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵstylePropInterpolate7(\n prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string,\n valueSuffix?: string|null): typeof ɵɵstylePropInterpolate7 {\n const lView = getLView();\n const interpolatedValue =\n interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate7;\n}\n\n/**\n *\n * Update an interpolated style property on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate8(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6,\n * '-', v7, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵstylePropInterpolate8(\n prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any,\n suffix: string, valueSuffix?: string|null): typeof ɵɵstylePropInterpolate8 {\n const lView = getLView();\n const interpolatedValue = interpolation8(\n lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate8;\n}\n\n/**\n * Update an interpolated style property on an element with 9 or more bound values surrounded by\n * text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n * style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\">\n * </div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolateV(\n * 0, ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n * 'suffix']);\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`..\n * @param values The collection of values and the strings in-between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵstylePropInterpolateV(\n prop: string, values: any[], valueSuffix?: string|null): typeof ɵɵstylePropInterpolateV {\n const lView = getLView();\n const interpolatedValue = interpolationV(lView, values);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolateV;\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 */\nimport {bindingUpdated} from '../bindings';\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {RENDERER} from '../interfaces/view';\nimport {getCurrentDirectiveDef, getLView, getSelectedTNode, getTView, nextBindingIndex} from '../state';\nimport {NO_CHANGE} from '../tokens';\n\nimport {elementPropertyInternal, loadComponentRenderer, storePropertyBindingMetadata} from './shared';\n\n/**\n * Update a property on a host element. Only applies to native node properties, not inputs.\n *\n * Operates on the element selected by index via the {@link select} instruction.\n *\n * @param propName Name of property. Because it is going to DOM, this is not subject to\n * renaming as part of minification.\n * @param value New value to write.\n * @param sanitizer An optional function used to sanitize the value.\n * @returns This function returns itself so that it may be chained\n * (e.g. `property('name', ctx.name)('title', ctx.title)`)\n *\n * @codeGenApi\n */\nexport function ɵɵhostProperty<T>(\n propName: string, value: T, sanitizer?: SanitizerFn|null): typeof ɵɵhostProperty {\n const lView = getLView();\n const bindingIndex = nextBindingIndex();\n if (bindingUpdated(lView, bindingIndex, value)) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(tView, tNode, lView, propName, value, lView[RENDERER], sanitizer, true);\n ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);\n }\n return ɵɵhostProperty;\n}\n\n\n/**\n * Updates a synthetic host binding (e.g. `[@foo]`) on a component or directive.\n *\n * This instruction is for compatibility purposes and is designed to ensure that a\n * synthetic host binding (e.g. `@HostBinding('@foo')`) properly gets rendered in\n * the component's renderer. Normally all host bindings are evaluated with the parent\n * component's renderer, but, in the case of animation @triggers, they need to be\n * evaluated with the sub component's renderer (because that's where the animation\n * triggers are defined).\n *\n * Do not use this instruction as a replacement for `elementProperty`. This instruction\n * only exists to ensure compatibility with the ViewEngine's host binding behavior.\n *\n * @param index The index of the element to update in the data array\n * @param propName Name of property. Because it is going to DOM, this is not subject to\n * renaming as part of minification.\n * @param value New value to write.\n * @param sanitizer An optional function used to sanitize the value.\n *\n * @codeGenApi\n */\nexport function ɵɵsyntheticHostProperty<T>(\n propName: string, value: T|NO_CHANGE,\n sanitizer?: SanitizerFn|null): typeof ɵɵsyntheticHostProperty {\n const lView = getLView();\n const bindingIndex = nextBindingIndex();\n if (bindingUpdated(lView, bindingIndex, value)) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n const currentDef = getCurrentDirectiveDef(tView.data);\n const renderer = loadComponentRenderer(currentDef, tNode, lView);\n elementPropertyInternal(tView, tNode, lView, propName, value, renderer, sanitizer, true);\n ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);\n }\n return ɵɵsyntheticHostProperty;\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 {global} from './global';\n\ndeclare global {\n const ngI18nClosureMode: boolean;\n}\n\n/**\n * NOTE: changes to the `ngI18nClosureMode` name must be synced with `compiler-cli/src/tooling.ts`.\n */\nif (typeof ngI18nClosureMode === 'undefined') {\n // These property accesses can be ignored because ngI18nClosureMode will be set to false\n // when optimizing code and the whole if statement will be dropped.\n // Make sure to refer to ngI18nClosureMode as ['ngI18nClosureMode'] for closure.\n // NOTE: we need to have it in IIFE so that the tree-shaker is happy.\n (function() {\n // tslint:disable-next-line:no-toplevel-property-access\n global['ngI18nClosureMode'] =\n // TODO(FW-1250): validate that this actually, you know, works.\n // tslint:disable-next-line:no-toplevel-property-access\n typeof goog !== 'undefined' && typeof goog.getMsg === 'function';\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// THIS CODE IS GENERATED - DO NOT MODIFY.\nconst u = undefined;\n\nfunction plural(n: number): number {\nconst i = Math.floor(Math.abs(n)), v = n.toString().replace(/^[^.]*\\.?/, '').length;\n\nif (i === 1 && v === 0)\n return 1;\nreturn 5;\n}\n\nexport default [\"en\",[[\"a\",\"p\"],[\"AM\",\"PM\"],u],[[\"AM\",\"PM\"],u,u],[[\"S\",\"M\",\"T\",\"W\",\"T\",\"F\",\"S\"],[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"]],u,[[\"J\",\"F\",\"M\",\"A\",\"M\",\"J\",\"J\",\"A\",\"S\",\"O\",\"N\",\"D\"],[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"]],u,[[\"B\",\"A\"],[\"BC\",\"AD\"],[\"Before Christ\",\"Anno Domini\"]],0,[6,0],[\"M/d/yy\",\"MMM d, y\",\"MMMM d, y\",\"EEEE, MMMM d, y\"],[\"h:mm a\",\"h:mm:ss a\",\"h:mm:ss a z\",\"h:mm:ss a zzzz\"],[\"{1}, {0}\",u,\"{1} 'at' {0}\",u],[\".\",\",\",\";\",\"%\",\"+\",\"-\",\"E\",\"×\",\"‰\",\"∞\",\"NaN\",\":\"],[\"#,##0.###\",\"#,##0%\",\"¤#,##0.00\",\"#E0\"],\"USD\",\"$\",\"US Dollar\",{},\"ltr\", plural];\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 */\nimport {global} from '../util/global';\n\nimport localeEn from './locale_en';\n\n/**\n * This const is used to store the locale data registered with `registerLocaleData`\n */\nlet LOCALE_DATA: {[localeId: string]: any} = {};\n\n/**\n * Register locale data to be used internally by Angular. See the\n * [\"I18n guide\"](guide/i18n-common-format-data-locale) to know how to import additional locale\n * data.\n *\n * The signature `registerLocaleData(data: any, extraData?: any)` is deprecated since v5.1\n */\nexport function registerLocaleData(data: any, localeId?: string|any, extraData?: any): void {\n if (typeof localeId !== 'string') {\n extraData = localeId;\n localeId = data[LocaleDataIndex.LocaleId];\n }\n\n localeId = localeId.toLowerCase().replace(/_/g, '-');\n\n LOCALE_DATA[localeId] = data;\n\n if (extraData) {\n LOCALE_DATA[localeId][LocaleDataIndex.ExtraData] = extraData;\n }\n}\n\n/**\n * Finds the locale data for a given locale.\n *\n * @param locale The locale code.\n * @returns The locale data.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n */\nexport function findLocaleData(locale: string): any {\n const normalizedLocale = normalizeLocale(locale);\n\n let match = getLocaleData(normalizedLocale);\n if (match) {\n return match;\n }\n\n // let's try to find a parent locale\n const parentLocale = normalizedLocale.split('-')[0];\n match = getLocaleData(parentLocale);\n if (match) {\n return match;\n }\n\n if (parentLocale === 'en') {\n return localeEn;\n }\n\n throw new Error(`Missing locale data for the locale \"${locale}\".`);\n}\n\n/**\n * Retrieves the default currency code for the given locale.\n *\n * The default is defined as the first currency which is still in use.\n *\n * @param locale The code of the locale whose currency code we want.\n * @returns The code of the default currency for the given locale.\n *\n */\nexport function getLocaleCurrencyCode(locale: string): string|null {\n const data = findLocaleData(locale);\n return data[LocaleDataIndex.CurrencyCode] || null;\n}\n\n/**\n * Retrieves the plural function used by ICU expressions to determine the plural case to use\n * for a given locale.\n * @param locale A locale code for the locale format rules to use.\n * @returns The plural function for the locale.\n * @see `NgPlural`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n */\nexport function getLocalePluralCase(locale: string): (value: number) => number {\n const data = findLocaleData(locale);\n return data[LocaleDataIndex.PluralCase];\n}\n\n\n\n/**\n * Helper function to get the given `normalizedLocale` from `LOCALE_DATA`\n * or from the global `ng.common.locale`.\n */\nexport function getLocaleData(normalizedLocale: string): any {\n if (!(normalizedLocale in LOCALE_DATA)) {\n LOCALE_DATA[normalizedLocale] = global.ng && global.ng.common && global.ng.common.locales &&\n global.ng.common.locales[normalizedLocale];\n }\n return LOCALE_DATA[normalizedLocale];\n}\n\n/**\n * Helper function to remove all the locale data from `LOCALE_DATA`.\n */\nexport function unregisterAllLocaleData() {\n LOCALE_DATA = {};\n}\n\n/**\n * Index of each type of locale data from the locale data array\n */\nexport enum LocaleDataIndex {\n LocaleId = 0,\n DayPeriodsFormat,\n DayPeriodsStandalone,\n DaysFormat,\n DaysStandalone,\n MonthsFormat,\n MonthsStandalone,\n Eras,\n FirstDayOfWeek,\n WeekendRange,\n DateFormat,\n TimeFormat,\n DateTimeFormat,\n NumberSymbols,\n NumberFormats,\n CurrencyCode,\n CurrencySymbol,\n CurrencyName,\n Currencies,\n Directionality,\n PluralCase,\n ExtraData\n}\n\n/**\n * Index of each type of locale data from the extra locale data array\n */\nexport const enum ExtraLocaleDataIndex {\n ExtraDayPeriodFormats = 0,\n ExtraDayPeriodStandalone,\n ExtraDayPeriodsRules\n}\n\n/**\n * Index of each value in currency data (used to describe CURRENCIES_EN in currencies.ts)\n */\nexport const enum CurrencyIndex {\n Symbol = 0,\n SymbolNarrow,\n NbOfDigits\n}\n\n/**\n * Returns the canonical form of a locale name - lowercase with `_` replaced with `-`.\n */\nfunction normalizeLocale(locale: string): string {\n return locale.toLowerCase().replace(/_/g, '-');\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 {getLocalePluralCase} from './locale_data_api';\n\nconst pluralMapping = ['zero', 'one', 'two', 'few', 'many'];\n\n/**\n * Returns the plural case based on the locale\n */\nexport function getPluralCase(value: string, locale: string): string {\n const plural = getLocalePluralCase(locale)(parseInt(value, 10));\n const result = pluralMapping[plural];\n return (result !== undefined) ? result : 'other';\n}\n\n/**\n * The locale id that the application is using by default (for translations and ICU expressions).\n */\nexport const DEFAULT_LOCALE_ID = 'en-US';\n\n/**\n * USD currency code that the application uses by default for CurrencyPipe when no\n * DEFAULT_CURRENCY_CODE is provided.\n */\nexport const USD_CURRENCY_CODE = 'USD';\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 {SanitizerFn} from './sanitization';\n\n\n/**\n * Stores a list of nodes which need to be removed.\n *\n * Numbers are indexes into the `LView`\n * - index > 0: `removeRNode(lView[0])`\n * - index < 0: `removeICU(~lView[0])`\n */\nexport interface I18nRemoveOpCodes extends Array<number> {\n __brand__: 'I18nRemoveOpCodes';\n}\n\n/**\n * `I18nMutateOpCode` defines OpCodes for `I18nMutateOpCodes` array.\n *\n * OpCodes are efficient operations which can be applied to the DOM to update it. (For example to\n * update to a new ICU case requires that we clean up previous elements and create new ones.)\n *\n * OpCodes contain three parts:\n * 1) Parent node index offset. (p)\n * 2) Reference node index offset. (r)\n * 3) The instruction to execute. (i)\n *\n * pppp pppp pppp pppp rrrr rrrr rrrr riii\n * 3322 2222 2222 1111 1111 1110 0000 0000\n * 1098 7654 3210 9876 5432 1098 7654 3210\n *\n * ```\n * var parent = lView[opCode >>> SHIFT_PARENT];\n * var refNode = lView[((opCode & MASK_REF) >>> SHIFT_REF)];\n * var instruction = opCode & MASK_OPCODE;\n * ```\n *\n * See: `I18nCreateOpCodes` for example of usage.\n */\nexport const enum IcuCreateOpCode {\n /**\n * Stores shift amount for bits 17-3 that contain reference index.\n */\n SHIFT_REF = 1,\n /**\n * Stores shift amount for bits 31-17 that contain parent index.\n */\n SHIFT_PARENT = 17,\n /**\n * Mask for OpCode\n */\n MASK_INSTRUCTION = 0b1,\n\n /**\n * Mask for the Reference node (bits 16-3)\n */\n MASK_REF = 0b11111111111111110,\n // 11111110000000000\n // 65432109876543210\n\n /**\n * Instruction to append the current node to `PARENT`.\n */\n AppendChild = 0b0,\n\n /**\n * Instruction to set the attribute of a node.\n */\n Attr = 0b1,\n}\n\n\n/**\n * Array storing OpCode for dynamically creating `i18n` blocks.\n *\n * Example:\n * ```ts\n * <I18nCreateOpCode>[\n * // For adding text nodes\n * // ---------------------\n * // Equivalent to:\n * // lView[1].appendChild(lView[0] = document.createTextNode('xyz'));\n * 'xyz', 0, 1 << SHIFT_PARENT | 0 << SHIFT_REF | AppendChild,\n *\n * // For adding element nodes\n * // ---------------------\n * // Equivalent to:\n * // lView[1].appendChild(lView[0] = document.createElement('div'));\n * ELEMENT_MARKER, 'div', 0, 1 << SHIFT_PARENT | 0 << SHIFT_REF | AppendChild,\n *\n * // For adding comment nodes\n * // ---------------------\n * // Equivalent to:\n * // lView[1].appendChild(lView[0] = document.createComment(''));\n * ICU_MARKER, '', 0, 1 << SHIFT_PARENT | 0 << SHIFT_REF | AppendChild,\n *\n * // For moving existing nodes to a different location\n * // --------------------------------------------------\n * // Equivalent to:\n * // const node = lView[1];\n * // lView[2].appendChild(node);\n * 1 << SHIFT_REF | Select, 2 << SHIFT_PARENT | 0 << SHIFT_REF | AppendChild,\n *\n * // For removing existing nodes\n * // --------------------------------------------------\n * // const node = lView[1];\n * // removeChild(tView.data(1), node, lView);\n * 1 << SHIFT_REF | Remove,\n *\n * // For writing attributes\n * // --------------------------------------------------\n * // const node = lView[1];\n * // node.setAttribute('attr', 'value');\n * 1 << SHIFT_REF | Attr, 'attr', 'value'\n * ];\n * ```\n */\nexport interface IcuCreateOpCodes extends Array<number|string|ELEMENT_MARKER|ICU_MARKER|null>,\n I18nDebug {\n __brand__: 'I18nCreateOpCodes';\n}\n\nexport const enum I18nUpdateOpCode {\n /**\n * Stores shift amount for bits 17-2 that contain reference index.\n */\n SHIFT_REF = 2,\n /**\n * Mask for OpCode\n */\n MASK_OPCODE = 0b11,\n\n /**\n * Instruction to update a text node.\n */\n Text = 0b00,\n /**\n * Instruction to update a attribute of a node.\n */\n Attr = 0b01,\n /**\n * Instruction to switch the current ICU case.\n */\n IcuSwitch = 0b10,\n /**\n * Instruction to update the current ICU case.\n */\n IcuUpdate = 0b11,\n}\n\n/**\n * Marks that the next string is an element name.\n *\n * See `I18nMutateOpCodes` documentation.\n */\nexport const ELEMENT_MARKER: ELEMENT_MARKER = {\n marker: 'element'\n};\nexport interface ELEMENT_MARKER {\n marker: 'element';\n}\n\n/**\n * Marks that the next string is comment text need for ICU.\n *\n * See `I18nMutateOpCodes` documentation.\n */\nexport const ICU_MARKER: ICU_MARKER = {\n marker: 'ICU'\n};\n\nexport interface ICU_MARKER {\n marker: 'ICU';\n}\n\nexport interface I18nDebug {\n /**\n * Human readable representation of the OpCode arrays.\n *\n * NOTE: This property only exists if `ngDevMode` is set to `true` and it is not present in\n * production. Its presence is purely to help debug issue in development, and should not be relied\n * on in production application.\n */\n debug?: string[];\n}\n\n/**\n * Array storing OpCode for dynamically creating `i18n` translation DOM elements.\n *\n * This array creates a sequence of `Text` and `Comment` (as ICU anchor) DOM elements. It consists\n * of a pair of `number` and `string` pairs which encode the operations for the creation of the\n * translated block.\n *\n * The number is shifted and encoded according to `I18nCreateOpCode`\n *\n * Pseudocode:\n * ```\n * const i18nCreateOpCodes = [\n * 10 << I18nCreateOpCode.SHIFT, \"Text Node add to DOM\",\n * 11 << I18nCreateOpCode.SHIFT | I18nCreateOpCode.COMMENT, \"Comment Node add to DOM\",\n * 12 << I18nCreateOpCode.SHIFT | I18nCreateOpCode.APPEND_LATER, \"Text Node added later\"\n * ];\n *\n * for(var i=0; i<i18nCreateOpCodes.length; i++) {\n * const opcode = i18NCreateOpCodes[i++];\n * const index = opcode >> I18nCreateOpCode.SHIFT;\n * const text = i18NCreateOpCodes[i];\n * let node: Text|Comment;\n * if (opcode & I18nCreateOpCode.COMMENT === I18nCreateOpCode.COMMENT) {\n * node = lView[~index] = document.createComment(text);\n * } else {\n * node = lView[index] = document.createText(text);\n * }\n * if (opcode & I18nCreateOpCode.APPEND_EAGERLY !== I18nCreateOpCode.APPEND_EAGERLY) {\n * parentNode.appendChild(node);\n * }\n * }\n * ```\n */\nexport interface I18nCreateOpCodes extends Array<number|string>, I18nDebug {\n __brand__: 'I18nCreateOpCodes';\n}\n\n/**\n * See `I18nCreateOpCodes`\n */\nexport enum I18nCreateOpCode {\n /**\n * Number of bits to shift index so that it can be combined with the `APPEND_EAGERLY` and\n * `COMMENT`.\n */\n SHIFT = 2,\n\n /**\n * Should the node be appended to parent imedditatly after creation.\n */\n APPEND_EAGERLY = 0b01,\n\n /**\n * If set the node should be comment (rather than a text) node.\n */\n COMMENT = 0b10,\n}\n\n\n/**\n * Stores DOM operations which need to be applied to update DOM render tree due to changes in\n * expressions.\n *\n * The basic idea is that `i18nExp` OpCodes capture expression changes and update a change\n * mask bit. (Bit 1 for expression 1, bit 2 for expression 2 etc..., bit 32 for expression 32 and\n * higher.) The OpCodes then compare its own change mask against the expression change mask to\n * determine if the OpCodes should execute.\n *\n * NOTE: 32nd bit is special as it says 32nd or higher. This way if we have more than 32 bindings\n * the code still works, but with lower efficiency. (it is unlikely that a translation would have\n * more than 32 bindings.)\n *\n * These OpCodes can be used by both the i18n block as well as ICU sub-block.\n *\n * ## Example\n *\n * Assume\n * ```ts\n * if (rf & RenderFlags.Update) {\n * i18nExp(ctx.exp1); // If changed set mask bit 1\n * i18nExp(ctx.exp2); // If changed set mask bit 2\n * i18nExp(ctx.exp3); // If changed set mask bit 3\n * i18nExp(ctx.exp4); // If changed set mask bit 4\n * i18nApply(0); // Apply all changes by executing the OpCodes.\n * }\n * ```\n * We can assume that each call to `i18nExp` sets an internal `changeMask` bit depending on the\n * index of `i18nExp`.\n *\n * ### OpCodes\n * ```ts\n * <I18nUpdateOpCodes>[\n * // The following OpCodes represent: `<div i18n-title=\"pre{{exp1}}in{{exp2}}post\">`\n * // If `changeMask & 0b11`\n * // has changed then execute update OpCodes.\n * // has NOT changed then skip `8` values and start processing next OpCodes.\n * 0b11, 8,\n * // Concatenate `newValue = 'pre'+lView[bindIndex-4]+'in'+lView[bindIndex-3]+'post';`.\n * 'pre', -4, 'in', -3, 'post',\n * // Update attribute: `elementAttribute(1, 'title', sanitizerFn(newValue));`\n * 1 << SHIFT_REF | Attr, 'title', sanitizerFn,\n *\n * // The following OpCodes represent: `<div i18n>Hello {{exp3}}!\">`\n * // If `changeMask & 0b100`\n * // has changed then execute update OpCodes.\n * // has NOT changed then skip `4` values and start processing next OpCodes.\n * 0b100, 4,\n * // Concatenate `newValue = 'Hello ' + lView[bindIndex -2] + '!';`.\n * 'Hello ', -2, '!',\n * // Update text: `lView[1].textContent = newValue;`\n * 1 << SHIFT_REF | Text,\n *\n * // The following OpCodes represent: `<div i18n>{exp4, plural, ... }\">`\n * // If `changeMask & 0b1000`\n * // has changed then execute update OpCodes.\n * // has NOT changed then skip `2` values and start processing next OpCodes.\n * 0b1000, 2,\n * // Concatenate `newValue = lView[bindIndex -1];`.\n * -1,\n * // Switch ICU: `icuSwitchCase(lView[1], 0, newValue);`\n * 0 << SHIFT_ICU | 1 << SHIFT_REF | IcuSwitch,\n *\n * // Note `changeMask & -1` is always true, so the IcuUpdate will always execute.\n * -1, 1,\n * // Update ICU: `icuUpdateCase(lView[1], 0);`\n * 0 << SHIFT_ICU | 1 << SHIFT_REF | IcuUpdate,\n *\n * ];\n * ```\n *\n */\nexport interface I18nUpdateOpCodes extends Array<string|number|SanitizerFn|null>, I18nDebug {\n __brand__: 'I18nUpdateOpCodes';\n}\n\n/**\n * Store information for the i18n translation block.\n */\nexport interface TI18n {\n /**\n * A set of OpCodes which will create the Text Nodes and ICU anchors for the translation blocks.\n *\n * NOTE: The ICU anchors are filled in with ICU Update OpCode.\n */\n create: I18nCreateOpCodes;\n\n /**\n * A set of OpCodes which will be executed on each change detection to determine if any changes to\n * DOM are required.\n */\n update: I18nUpdateOpCodes;\n}\n\n/**\n * Defines the ICU type of `select` or `plural`\n */\nexport const enum IcuType {\n select = 0,\n plural = 1,\n}\n\nexport interface TIcu {\n /**\n * Defines the ICU type of `select` or `plural`\n */\n type: IcuType;\n\n /**\n * Index in `LView` where the anchor node is stored. `<!-- ICU 0:0 -->`\n */\n anchorIdx: number;\n\n /**\n * Currently selected ICU case pointer.\n *\n * `lView[currentCaseLViewIndex]` stores the currently selected case. This is needed to know how\n * to clean up the current case when transitioning no the new case.\n *\n * If the value stored is:\n * `null`: No current case selected.\n * `<0`: A flag which means that the ICU just switched and that `icuUpdate` must be executed\n * regardless of the `mask`. (After the execution the flag is cleared)\n * `>=0` A currently selected case index.\n */\n currentCaseLViewIndex: number;\n\n /**\n * A list of case values which the current ICU will try to match.\n *\n * The last value is `other`\n */\n cases: any[];\n\n /**\n * A set of OpCodes to apply in order to build up the DOM render tree for the ICU\n */\n create: IcuCreateOpCodes[];\n\n /**\n * A set of OpCodes to apply in order to destroy the DOM render tree for the ICU.\n */\n remove: I18nRemoveOpCodes[];\n\n /**\n * A set of OpCodes to apply in order to update the DOM render tree for the ICU bindings.\n */\n update: I18nUpdateOpCodes[];\n}\n\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nexport const unusedValueExportToPlacateAjd = 1;\n\n/**\n * Parsed ICU expression\n */\nexport interface IcuExpression {\n type: IcuType;\n mainBinding: number;\n cases: string[];\n values: (string|IcuExpression)[][];\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 {DEFAULT_LOCALE_ID} from '../../i18n/localization';\nimport {assertDefined} from '../../util/assert';\n\n\n/**\n * The locale id that the application is currently using (for translations and ICU expressions).\n * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine\n * but is now defined as a global value.\n */\nlet LOCALE_ID = DEFAULT_LOCALE_ID;\n\n/**\n * Sets the locale id that will be used for translations and ICU expressions.\n * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine\n * but is now defined as a global value.\n *\n * @param localeId\n */\nexport function setLocaleId(localeId: string) {\n assertDefined(localeId, `Expected localeId to be defined`);\n if (typeof localeId === 'string') {\n LOCALE_ID = localeId.toLowerCase().replace(/_/g, '-');\n }\n}\n\n/**\n * Gets the locale id that will be used for translations and ICU expressions.\n * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine\n * but is now defined as a global value.\n */\nexport function getLocaleId(): string {\n return LOCALE_ID;\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 {assertDomNode, assertIndexInRange} from '../util/assert';\n\nimport {TNode, TNodeFlags, TNodeType} from './interfaces/node';\nimport {Renderer3} from './interfaces/renderer';\nimport {RElement, RNode} from './interfaces/renderer_dom';\nimport {LView} from './interfaces/view';\nimport {getInsertInFrontOfRNodeWithNoI18n, nativeInsertBefore} from './node_manipulation';\nimport {unwrapRNode} from './util/view_utils';\n\n\n/**\n * Find a node in front of which `currentTNode` should be inserted (takes i18n into account).\n *\n * This method determines the `RNode` in front of which we should insert the `currentRNode`. This\n * takes `TNode.insertBeforeIndex` into account.\n *\n * @param parentTNode parent `TNode`\n * @param currentTNode current `TNode` (The node which we would like to insert into the DOM)\n * @param lView current `LView`\n */\nexport function getInsertInFrontOfRNodeWithI18n(\n parentTNode: TNode, currentTNode: TNode, lView: LView): RNode|null {\n const tNodeInsertBeforeIndex = currentTNode.insertBeforeIndex;\n const insertBeforeIndex =\n Array.isArray(tNodeInsertBeforeIndex) ? tNodeInsertBeforeIndex[0] : tNodeInsertBeforeIndex;\n if (insertBeforeIndex === null) {\n return getInsertInFrontOfRNodeWithNoI18n(parentTNode, currentTNode, lView);\n } else {\n ngDevMode && assertIndexInRange(lView, insertBeforeIndex);\n return unwrapRNode(lView[insertBeforeIndex]);\n }\n}\n\n\n/**\n * Process `TNode.insertBeforeIndex` by adding i18n text nodes.\n *\n * See `TNode.insertBeforeIndex`\n */\nexport function processI18nInsertBefore(\n renderer: Renderer3, childTNode: TNode, lView: LView, childRNode: RNode|RNode[],\n parentRElement: RElement|null): void {\n const tNodeInsertBeforeIndex = childTNode.insertBeforeIndex;\n if (Array.isArray(tNodeInsertBeforeIndex)) {\n // An array indicates that there are i18n nodes that need to be added as children of this\n // `childRNode`. These i18n nodes were created before this `childRNode` was available and so\n // only now can be added. The first element of the array is the normal index where we should\n // insert the `childRNode`. Additional elements are the extra nodes to be added as children of\n // `childRNode`.\n ngDevMode && assertDomNode(childRNode);\n let i18nParent: RElement|null = childRNode as RElement;\n let anchorRNode: RNode|null = null;\n if (!(childTNode.type & TNodeType.AnyRNode)) {\n anchorRNode = i18nParent;\n i18nParent = parentRElement;\n }\n if (i18nParent !== null && (childTNode.flags & TNodeFlags.isComponentHost) === 0) {\n for (let i = 1; i < tNodeInsertBeforeIndex.length; i++) {\n // No need to `unwrapRNode` because all of the indexes point to i18n text nodes.\n // see `assertDomNode` below.\n const i18nChild = lView[tNodeInsertBeforeIndex[i]];\n nativeInsertBefore(renderer, i18nParent, i18nChild, anchorRNode, false);\n }\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertEqual} from '../../util/assert';\nimport {TNode, TNodeType} from '../interfaces/node';\nimport {setI18nHandling} from '../node_manipulation';\nimport {getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore} from '../node_manipulation_i18n';\n\n/**\n * Add `tNode` to `previousTNodes` list and update relevant `TNode`s in `previousTNodes` list\n * `tNode.insertBeforeIndex`.\n *\n * Things to keep in mind:\n * 1. All i18n text nodes are encoded as `TNodeType.Element` and are created eagerly by the\n * `ɵɵi18nStart` instruction.\n * 2. All `TNodeType.Placeholder` `TNodes` are elements which will be created later by\n * `ɵɵelementStart` instruction.\n * 3. `ɵɵelementStart` instruction will create `TNode`s in the ascending `TNode.index` order. (So a\n * smaller index `TNode` is guaranteed to be created before a larger one)\n *\n * We use the above three invariants to determine `TNode.insertBeforeIndex`.\n *\n * In an ideal world `TNode.insertBeforeIndex` would always be `TNode.next.index`. However,\n * this will not work because `TNode.next.index` may be larger than `TNode.index` which means that\n * the next node is not yet created and therefore we can't insert in front of it.\n *\n * Rule1: `TNode.insertBeforeIndex = null` if `TNode.next === null` (Initial condition, as we don't\n * know if there will be further `TNode`s inserted after.)\n * Rule2: If `previousTNode` is created after the `tNode` being inserted, then\n * `previousTNode.insertBeforeNode = tNode.index` (So when a new `tNode` is added we check\n * previous to see if we can update its `insertBeforeTNode`)\n *\n * See `TNode.insertBeforeIndex` for more context.\n *\n * @param previousTNodes A list of previous TNodes so that we can easily traverse `TNode`s in\n * reverse order. (If `TNode` would have `previous` this would not be necessary.)\n * @param newTNode A TNode to add to the `previousTNodes` list.\n */\nexport function addTNodeAndUpdateInsertBeforeIndex(previousTNodes: TNode[], newTNode: TNode) {\n // Start with Rule1\n ngDevMode &&\n assertEqual(newTNode.insertBeforeIndex, null, 'We expect that insertBeforeIndex is not set');\n\n previousTNodes.push(newTNode);\n if (previousTNodes.length > 1) {\n for (let i = previousTNodes.length - 2; i >= 0; i--) {\n const existingTNode = previousTNodes[i];\n // Text nodes are created eagerly and so they don't need their `indexBeforeIndex` updated.\n // It is safe to ignore them.\n if (!isI18nText(existingTNode)) {\n if (isNewTNodeCreatedBefore(existingTNode, newTNode) &&\n getInsertBeforeIndex(existingTNode) === null) {\n // If it was created before us in time, (and it does not yet have `insertBeforeIndex`)\n // then add the `insertBeforeIndex`.\n setInsertBeforeIndex(existingTNode, newTNode.index);\n }\n }\n }\n }\n}\n\nfunction isI18nText(tNode: TNode): boolean {\n return !(tNode.type & TNodeType.Placeholder);\n}\n\nfunction isNewTNodeCreatedBefore(existingTNode: TNode, newTNode: TNode): boolean {\n return isI18nText(newTNode) || existingTNode.index > newTNode.index;\n}\n\nfunction getInsertBeforeIndex(tNode: TNode): number|null {\n const index = tNode.insertBeforeIndex;\n return Array.isArray(index) ? index[0] : index;\n}\n\nfunction setInsertBeforeIndex(tNode: TNode, value: number): void {\n const index = tNode.insertBeforeIndex;\n if (Array.isArray(index)) {\n // Array is stored if we have to insert child nodes. See `TNode.insertBeforeIndex`\n index[0] = value;\n } else {\n setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore);\n tNode.insertBeforeIndex = 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 {assertEqual, assertGreaterThan, assertGreaterThanOrEqual, throwError} from '../../util/assert';\nimport {assertTIcu, assertTNode} from '../assert';\nimport {createTNodeAtIndex} from '../instructions/shared';\nimport {IcuCreateOpCode, TIcu} from '../interfaces/i18n';\nimport {TIcuContainerNode, TNode, TNodeType} from '../interfaces/node';\nimport {LView, TView} from '../interfaces/view';\nimport {assertTNodeType} from '../node_assert';\nimport {setI18nHandling} from '../node_manipulation';\nimport {getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore} from '../node_manipulation_i18n';\nimport {addTNodeAndUpdateInsertBeforeIndex} from './i18n_insert_before_index';\n\n\n/**\n * Retrieve `TIcu` at a given `index`.\n *\n * The `TIcu` can be stored either directly (if it is nested ICU) OR\n * it is stored inside tho `TIcuContainer` if it is top level ICU.\n *\n * The reason for this is that the top level ICU need a `TNode` so that they are part of the render\n * tree, but nested ICU's have no TNode, because we don't know ahead of time if the nested ICU is\n * expressed (parent ICU may have selected a case which does not contain it.)\n *\n * @param tView Current `TView`.\n * @param index Index where the value should be read from.\n */\nexport function getTIcu(tView: TView, index: number): TIcu|null {\n const value = tView.data[index] as null | TIcu | TIcuContainerNode | string;\n if (value === null || typeof value === 'string') return null;\n if (ngDevMode &&\n !(value.hasOwnProperty('tViews') || value.hasOwnProperty('currentCaseLViewIndex'))) {\n throwError('We expect to get \\'null\\'|\\'TIcu\\'|\\'TIcuContainer\\', but got: ' + value);\n }\n // Here the `value.hasOwnProperty('currentCaseLViewIndex')` is a polymorphic read as it can be\n // either TIcu or TIcuContainerNode. This is not ideal, but we still think it is OK because it\n // will be just two cases which fits into the browser inline cache (inline cache can take up to\n // 4)\n const tIcu = value.hasOwnProperty('currentCaseLViewIndex') ? value as TIcu :\n (value as TIcuContainerNode).value;\n ngDevMode && assertTIcu(tIcu);\n return tIcu;\n}\n\n/**\n * Store `TIcu` at a give `index`.\n *\n * The `TIcu` can be stored either directly (if it is nested ICU) OR\n * it is stored inside tho `TIcuContainer` if it is top level ICU.\n *\n * The reason for this is that the top level ICU need a `TNode` so that they are part of the render\n * tree, but nested ICU's have no TNode, because we don't know ahead of time if the nested ICU is\n * expressed (parent ICU may have selected a case which does not contain it.)\n *\n * @param tView Current `TView`.\n * @param index Index where the value should be stored at in `Tview.data`\n * @param tIcu The TIcu to store.\n */\nexport function setTIcu(tView: TView, index: number, tIcu: TIcu): void {\n const tNode = tView.data[index] as null | TIcuContainerNode;\n ngDevMode &&\n assertEqual(\n tNode === null || tNode.hasOwnProperty('tViews'), true,\n 'We expect to get \\'null\\'|\\'TIcuContainer\\'');\n if (tNode === null) {\n tView.data[index] = tIcu;\n } else {\n ngDevMode && assertTNodeType(tNode, TNodeType.Icu);\n tNode.value = tIcu;\n }\n}\n\n/**\n * Set `TNode.insertBeforeIndex` taking the `Array` into account.\n *\n * See `TNode.insertBeforeIndex`\n */\nexport function setTNodeInsertBeforeIndex(tNode: TNode, index: number) {\n ngDevMode && assertTNode(tNode);\n let insertBeforeIndex = tNode.insertBeforeIndex;\n if (insertBeforeIndex === null) {\n setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore);\n insertBeforeIndex = tNode.insertBeforeIndex =\n [null!/* may be updated to number later */, index];\n } else {\n assertEqual(Array.isArray(insertBeforeIndex), true, 'Expecting array here');\n (insertBeforeIndex as number[]).push(index);\n }\n}\n\n/**\n * Create `TNode.type=TNodeType.Placeholder` node.\n *\n * See `TNodeType.Placeholder` for more information.\n */\nexport function createTNodePlaceholder(\n tView: TView, previousTNodes: TNode[], index: number): TNode {\n const tNode = createTNodeAtIndex(tView, index, TNodeType.Placeholder, null, null);\n addTNodeAndUpdateInsertBeforeIndex(previousTNodes, tNode);\n return tNode;\n}\n\n\n/**\n * Returns current ICU case.\n *\n * ICU cases are stored as index into the `TIcu.cases`.\n * At times it is necessary to communicate that the ICU case just switched and that next ICU update\n * should update all bindings regardless of the mask. In such a case the we store negative numbers\n * for cases which have just been switched. This function removes the negative flag.\n */\nexport function getCurrentICUCaseIndex(tIcu: TIcu, lView: LView) {\n const currentCase: number|null = lView[tIcu.currentCaseLViewIndex];\n return currentCase === null ? currentCase : (currentCase < 0 ? ~currentCase : currentCase);\n}\n\nexport function getParentFromIcuCreateOpCode(mergedCode: number): number {\n return mergedCode >>> IcuCreateOpCode.SHIFT_PARENT;\n}\n\nexport function getRefFromIcuCreateOpCode(mergedCode: number): number {\n return (mergedCode & IcuCreateOpCode.MASK_REF) >>> IcuCreateOpCode.SHIFT_REF;\n}\n\nexport function getInstructionFromIcuCreateOpCode(mergedCode: number): number {\n return mergedCode & IcuCreateOpCode.MASK_INSTRUCTION;\n}\n\nexport function icuCreateOpCode(opCode: IcuCreateOpCode, parentIdx: number, refIdx: number) {\n ngDevMode && assertGreaterThanOrEqual(parentIdx, 0, 'Missing parent index');\n ngDevMode && assertGreaterThan(refIdx, 0, 'Missing ref index');\n return opCode | parentIdx << IcuCreateOpCode.SHIFT_PARENT | refIdx << IcuCreateOpCode.SHIFT_REF;\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 {getPluralCase} from '../../i18n/localization';\nimport {assertDefined, assertDomNode, assertEqual, assertGreaterThan, assertIndexInRange, throwError} from '../../util/assert';\nimport {assertIndexInExpandoRange, assertTIcu} from '../assert';\nimport {attachPatchData} from '../context_discovery';\nimport {elementPropertyInternal, setElementAttribute} from '../instructions/shared';\nimport {ELEMENT_MARKER, I18nCreateOpCode, I18nCreateOpCodes, I18nUpdateOpCode, I18nUpdateOpCodes, ICU_MARKER, IcuCreateOpCode, IcuCreateOpCodes, IcuType, TI18n, TIcu} from '../interfaces/i18n';\nimport {TNode} from '../interfaces/node';\nimport {RElement, RNode, RText} from '../interfaces/renderer_dom';\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {HEADER_OFFSET, LView, RENDERER, TView} from '../interfaces/view';\nimport {createCommentNode, createElementNode, createTextNode, nativeInsertBefore, nativeParentNode, nativeRemoveNode, updateTextNode} from '../node_manipulation';\nimport {getBindingIndex} from '../state';\nimport {renderStringify} from '../util/stringify_utils';\nimport {getNativeByIndex, unwrapRNode} from '../util/view_utils';\nimport {getLocaleId} from './i18n_locale_id';\nimport {getCurrentICUCaseIndex, getParentFromIcuCreateOpCode, getRefFromIcuCreateOpCode, getTIcu} from './i18n_util';\n\n\n\n/**\n * Keep track of which input bindings in `ɵɵi18nExp` have changed.\n *\n * This is used to efficiently update expressions in i18n only when the corresponding input has\n * changed.\n *\n * 1) Each bit represents which of the `ɵɵi18nExp` has changed.\n * 2) There are 32 bits allowed in JS.\n * 3) Bit 32 is special as it is shared for all changes past 32. (In other words if you have more\n * than 32 `ɵɵi18nExp` then all changes past 32nd `ɵɵi18nExp` will be mapped to same bit. This means\n * that we may end up changing more than we need to. But i18n expressions with 32 bindings is rare\n * so in practice it should not be an issue.)\n */\nlet changeMask = 0b0;\n\n/**\n * Keeps track of which bit needs to be updated in `changeMask`\n *\n * This value gets incremented on every call to `ɵɵi18nExp`\n */\nlet changeMaskCounter = 0;\n\n/**\n * Keep track of which input bindings in `ɵɵi18nExp` have changed.\n *\n * `setMaskBit` gets invoked by each call to `ɵɵi18nExp`.\n *\n * @param hasChange did `ɵɵi18nExp` detect a change.\n */\nexport function setMaskBit(hasChange: boolean) {\n if (hasChange) {\n changeMask = changeMask | (1 << Math.min(changeMaskCounter, 31));\n }\n changeMaskCounter++;\n}\n\nexport function applyI18n(tView: TView, lView: LView, index: number) {\n if (changeMaskCounter > 0) {\n ngDevMode && assertDefined(tView, `tView should be defined`);\n const tI18n = tView.data[index] as TI18n | I18nUpdateOpCodes;\n // When `index` points to an `ɵɵi18nAttributes` then we have an array otherwise `TI18n`\n const updateOpCodes: I18nUpdateOpCodes =\n Array.isArray(tI18n) ? tI18n as I18nUpdateOpCodes : (tI18n as TI18n).update;\n const bindingsStartIndex = getBindingIndex() - changeMaskCounter - 1;\n applyUpdateOpCodes(tView, lView, updateOpCodes, bindingsStartIndex, changeMask);\n }\n // Reset changeMask & maskBit to default for the next update cycle\n changeMask = 0b0;\n changeMaskCounter = 0;\n}\n\n\n/**\n * Apply `I18nCreateOpCodes` op-codes as stored in `TI18n.create`.\n *\n * Creates text (and comment) nodes which are internationalized.\n *\n * @param lView Current lView\n * @param createOpCodes Set of op-codes to apply\n * @param parentRNode Parent node (so that direct children can be added eagerly) or `null` if it is\n * a root node.\n * @param insertInFrontOf DOM node that should be used as an anchor.\n */\nexport function applyCreateOpCodes(\n lView: LView, createOpCodes: I18nCreateOpCodes, parentRNode: RElement|null,\n insertInFrontOf: RElement|null): void {\n const renderer = lView[RENDERER];\n for (let i = 0; i < createOpCodes.length; i++) {\n const opCode = createOpCodes[i++] as any;\n const text = createOpCodes[i] as string;\n const isComment = (opCode & I18nCreateOpCode.COMMENT) === I18nCreateOpCode.COMMENT;\n const appendNow =\n (opCode & I18nCreateOpCode.APPEND_EAGERLY) === I18nCreateOpCode.APPEND_EAGERLY;\n const index = opCode >>> I18nCreateOpCode.SHIFT;\n let rNode = lView[index];\n if (rNode === null) {\n // We only create new DOM nodes if they don't already exist: If ICU switches case back to a\n // case which was already instantiated, no need to create new DOM nodes.\n rNode = lView[index] =\n isComment ? renderer.createComment(text) : createTextNode(renderer, text);\n }\n if (appendNow && parentRNode !== null) {\n nativeInsertBefore(renderer, parentRNode, rNode, insertInFrontOf, false);\n }\n }\n}\n\n/**\n * Apply `I18nMutateOpCodes` OpCodes.\n *\n * @param tView Current `TView`\n * @param mutableOpCodes Mutable OpCodes to process\n * @param lView Current `LView`\n * @param anchorRNode place where the i18n node should be inserted.\n */\nexport function applyMutableOpCodes(\n tView: TView, mutableOpCodes: IcuCreateOpCodes, lView: LView, anchorRNode: RNode): void {\n ngDevMode && assertDomNode(anchorRNode);\n const renderer = lView[RENDERER];\n // `rootIdx` represents the node into which all inserts happen.\n let rootIdx: number|null = null;\n // `rootRNode` represents the real node into which we insert. This can be different from\n // `lView[rootIdx]` if we have projection.\n // - null we don't have a parent (as can be the case in when we are inserting into a root of\n // LView which has no parent.)\n // - `RElement` The element representing the root after taking projection into account.\n let rootRNode!: RElement|null;\n for (let i = 0; i < mutableOpCodes.length; i++) {\n const opCode = mutableOpCodes[i];\n if (typeof opCode == 'string') {\n const textNodeIndex = mutableOpCodes[++i] as number;\n if (lView[textNodeIndex] === null) {\n ngDevMode && ngDevMode.rendererCreateTextNode++;\n ngDevMode && assertIndexInRange(lView, textNodeIndex);\n lView[textNodeIndex] = createTextNode(renderer, opCode);\n }\n } else if (typeof opCode == 'number') {\n switch (opCode & IcuCreateOpCode.MASK_INSTRUCTION) {\n case IcuCreateOpCode.AppendChild:\n const parentIdx = getParentFromIcuCreateOpCode(opCode);\n if (rootIdx === null) {\n // The first operation should save the `rootIdx` because the first operation\n // must insert into the root. (Only subsequent operations can insert into a dynamic\n // parent)\n rootIdx = parentIdx;\n rootRNode = nativeParentNode(renderer, anchorRNode);\n }\n let insertInFrontOf: RNode|null;\n let parentRNode: RElement|null;\n if (parentIdx === rootIdx) {\n insertInFrontOf = anchorRNode;\n parentRNode = rootRNode;\n } else {\n insertInFrontOf = null;\n parentRNode = unwrapRNode(lView[parentIdx]) as RElement;\n }\n // FIXME(misko): Refactor with `processI18nText`\n if (parentRNode !== null) {\n // This can happen if the `LView` we are adding to is not attached to a parent `LView`.\n // In such a case there is no \"root\" we can attach to. This is fine, as we still need to\n // create the elements. When the `LView` gets later added to a parent these \"root\" nodes\n // get picked up and added.\n ngDevMode && assertDomNode(parentRNode);\n const refIdx = getRefFromIcuCreateOpCode(opCode);\n ngDevMode && assertGreaterThan(refIdx, HEADER_OFFSET, 'Missing ref');\n // `unwrapRNode` is not needed here as all of these point to RNodes as part of the i18n\n // which can't have components.\n const child = lView[refIdx] as RElement;\n ngDevMode && assertDomNode(child);\n nativeInsertBefore(renderer, parentRNode, child, insertInFrontOf, false);\n const tIcu = getTIcu(tView, refIdx);\n if (tIcu !== null && typeof tIcu === 'object') {\n // If we just added a comment node which has ICU then that ICU may have already been\n // rendered and therefore we need to re-add it here.\n ngDevMode && assertTIcu(tIcu);\n const caseIndex = getCurrentICUCaseIndex(tIcu, lView);\n if (caseIndex !== null) {\n applyMutableOpCodes(tView, tIcu.create[caseIndex], lView, lView[tIcu.anchorIdx]);\n }\n }\n }\n break;\n case IcuCreateOpCode.Attr:\n const elementNodeIndex = opCode >>> IcuCreateOpCode.SHIFT_REF;\n const attrName = mutableOpCodes[++i] as string;\n const attrValue = mutableOpCodes[++i] as string;\n // This code is used for ICU expressions only, since we don't support\n // directives/components in ICUs, we don't need to worry about inputs here\n setElementAttribute(\n renderer, getNativeByIndex(elementNodeIndex, lView) as RElement, null, null, attrName,\n attrValue, null);\n break;\n default:\n throw new Error(`Unable to determine the type of mutate operation for \"${opCode}\"`);\n }\n } else {\n switch (opCode) {\n case ICU_MARKER:\n const commentValue = mutableOpCodes[++i] as string;\n const commentNodeIndex = mutableOpCodes[++i] as number;\n if (lView[commentNodeIndex] === null) {\n ngDevMode &&\n assertEqual(\n typeof commentValue, 'string',\n `Expected \"${commentValue}\" to be a comment node value`);\n ngDevMode && ngDevMode.rendererCreateComment++;\n ngDevMode && assertIndexInExpandoRange(lView, commentNodeIndex);\n const commentRNode = lView[commentNodeIndex] =\n createCommentNode(renderer, commentValue);\n // FIXME(misko): Attaching patch data is only needed for the root (Also add tests)\n attachPatchData(commentRNode, lView);\n }\n break;\n case ELEMENT_MARKER:\n const tagName = mutableOpCodes[++i] as string;\n const elementNodeIndex = mutableOpCodes[++i] as number;\n if (lView[elementNodeIndex] === null) {\n ngDevMode &&\n assertEqual(\n typeof tagName, 'string',\n `Expected \"${tagName}\" to be an element node tag name`);\n\n ngDevMode && ngDevMode.rendererCreateElement++;\n ngDevMode && assertIndexInExpandoRange(lView, elementNodeIndex);\n const elementRNode = lView[elementNodeIndex] =\n createElementNode(renderer, tagName, null);\n // FIXME(misko): Attaching patch data is only needed for the root (Also add tests)\n attachPatchData(elementRNode, lView);\n }\n break;\n default:\n ngDevMode &&\n throwError(`Unable to determine the type of mutate operation for \"${opCode}\"`);\n }\n }\n }\n}\n\n\n/**\n * Apply `I18nUpdateOpCodes` OpCodes\n *\n * @param tView Current `TView`\n * @param lView Current `LView`\n * @param updateOpCodes OpCodes to process\n * @param bindingsStartIndex Location of the first `ɵɵi18nApply`\n * @param changeMask Each bit corresponds to a `ɵɵi18nExp` (Counting backwards from\n * `bindingsStartIndex`)\n */\nexport function applyUpdateOpCodes(\n tView: TView, lView: LView, updateOpCodes: I18nUpdateOpCodes, bindingsStartIndex: number,\n changeMask: number) {\n for (let i = 0; i < updateOpCodes.length; i++) {\n // bit code to check if we should apply the next update\n const checkBit = updateOpCodes[i] as number;\n // Number of opCodes to skip until next set of update codes\n const skipCodes = updateOpCodes[++i] as number;\n if (checkBit & changeMask) {\n // The value has been updated since last checked\n let value = '';\n for (let j = i + 1; j <= (i + skipCodes); j++) {\n const opCode = updateOpCodes[j];\n if (typeof opCode == 'string') {\n value += opCode;\n } else if (typeof opCode == 'number') {\n if (opCode < 0) {\n // Negative opCode represent `i18nExp` values offset.\n value += renderStringify(lView[bindingsStartIndex - opCode]);\n } else {\n const nodeIndex = (opCode >>> I18nUpdateOpCode.SHIFT_REF);\n switch (opCode & I18nUpdateOpCode.MASK_OPCODE) {\n case I18nUpdateOpCode.Attr:\n const propName = updateOpCodes[++j] as string;\n const sanitizeFn = updateOpCodes[++j] as SanitizerFn | null;\n const tNodeOrTagName = tView.data[nodeIndex] as TNode | string;\n ngDevMode && assertDefined(tNodeOrTagName, 'Experting TNode or string');\n if (typeof tNodeOrTagName === 'string') {\n // IF we don't have a `TNode`, then we are an element in ICU (as ICU content does\n // not have TNode), in which case we know that there are no directives, and hence\n // we use attribute setting.\n setElementAttribute(\n lView[RENDERER], lView[nodeIndex], null, tNodeOrTagName, propName, value,\n sanitizeFn);\n } else {\n elementPropertyInternal(\n tView, tNodeOrTagName, lView, propName, value, lView[RENDERER], sanitizeFn,\n false);\n }\n break;\n case I18nUpdateOpCode.Text:\n const rText = lView[nodeIndex] as RText | null;\n rText !== null && updateTextNode(lView[RENDERER], rText, value);\n break;\n case I18nUpdateOpCode.IcuSwitch:\n applyIcuSwitchCase(tView, getTIcu(tView, nodeIndex)!, lView, value);\n break;\n case I18nUpdateOpCode.IcuUpdate:\n applyIcuUpdateCase(tView, getTIcu(tView, nodeIndex)!, bindingsStartIndex, lView);\n break;\n }\n }\n }\n }\n } else {\n const opCode = updateOpCodes[i + 1] as number;\n if (opCode > 0 && (opCode & I18nUpdateOpCode.MASK_OPCODE) === I18nUpdateOpCode.IcuUpdate) {\n // Special case for the `icuUpdateCase`. It could be that the mask did not match, but\n // we still need to execute `icuUpdateCase` because the case has changed recently due to\n // previous `icuSwitchCase` instruction. (`icuSwitchCase` and `icuUpdateCase` always come in\n // pairs.)\n const nodeIndex = (opCode >>> I18nUpdateOpCode.SHIFT_REF);\n const tIcu = getTIcu(tView, nodeIndex)!;\n const currentIndex = lView[tIcu.currentCaseLViewIndex];\n if (currentIndex < 0) {\n applyIcuUpdateCase(tView, tIcu, bindingsStartIndex, lView);\n }\n }\n }\n i += skipCodes;\n }\n}\n\n/**\n * Apply OpCodes associated with updating an existing ICU.\n *\n * @param tView Current `TView`\n * @param tIcu Current `TIcu`\n * @param bindingsStartIndex Location of the first `ɵɵi18nApply`\n * @param lView Current `LView`\n */\nfunction applyIcuUpdateCase(tView: TView, tIcu: TIcu, bindingsStartIndex: number, lView: LView) {\n ngDevMode && assertIndexInRange(lView, tIcu.currentCaseLViewIndex);\n let activeCaseIndex = lView[tIcu.currentCaseLViewIndex];\n if (activeCaseIndex !== null) {\n let mask = changeMask;\n if (activeCaseIndex < 0) {\n // Clear the flag.\n // Negative number means that the ICU was freshly created and we need to force the update.\n activeCaseIndex = lView[tIcu.currentCaseLViewIndex] = ~activeCaseIndex;\n // -1 is same as all bits on, which simulates creation since it marks all bits dirty\n mask = -1;\n }\n applyUpdateOpCodes(tView, lView, tIcu.update[activeCaseIndex], bindingsStartIndex, mask);\n }\n}\n\n/**\n * Apply OpCodes associated with switching a case on ICU.\n *\n * This involves tearing down existing case and than building up a new case.\n *\n * @param tView Current `TView`\n * @param tIcu Current `TIcu`\n * @param lView Current `LView`\n * @param value Value of the case to update to.\n */\nfunction applyIcuSwitchCase(tView: TView, tIcu: TIcu, lView: LView, value: string) {\n // Rebuild a new case for this ICU\n const caseIndex = getCaseIndex(tIcu, value);\n let activeCaseIndex = getCurrentICUCaseIndex(tIcu, lView);\n if (activeCaseIndex !== caseIndex) {\n applyIcuSwitchCaseRemove(tView, tIcu, lView);\n lView[tIcu.currentCaseLViewIndex] = caseIndex === null ? null : ~caseIndex;\n if (caseIndex !== null) {\n // Add the nodes for the new case\n const anchorRNode = lView[tIcu.anchorIdx];\n if (anchorRNode) {\n ngDevMode && assertDomNode(anchorRNode);\n applyMutableOpCodes(tView, tIcu.create[caseIndex], lView, anchorRNode);\n }\n }\n }\n}\n\n/**\n * Apply OpCodes associated with tearing ICU case.\n *\n * This involves tearing down existing case and than building up a new case.\n *\n * @param tView Current `TView`\n * @param tIcu Current `TIcu`\n * @param lView Current `LView`\n */\nfunction applyIcuSwitchCaseRemove(tView: TView, tIcu: TIcu, lView: LView) {\n let activeCaseIndex = getCurrentICUCaseIndex(tIcu, lView);\n if (activeCaseIndex !== null) {\n const removeCodes = tIcu.remove[activeCaseIndex];\n for (let i = 0; i < removeCodes.length; i++) {\n const nodeOrIcuIndex = removeCodes[i] as number;\n if (nodeOrIcuIndex > 0) {\n // Positive numbers are `RNode`s.\n const rNode = getNativeByIndex(nodeOrIcuIndex, lView);\n rNode !== null && nativeRemoveNode(lView[RENDERER], rNode);\n } else {\n // Negative numbers are ICUs\n applyIcuSwitchCaseRemove(tView, getTIcu(tView, ~nodeOrIcuIndex)!, lView);\n }\n }\n }\n}\n\n\n/**\n * Returns the index of the current case of an ICU expression depending on the main binding value\n *\n * @param icuExpression\n * @param bindingValue The value of the main binding used by this ICU expression\n */\nfunction getCaseIndex(icuExpression: TIcu, bindingValue: string): number|null {\n let index = icuExpression.cases.indexOf(bindingValue);\n if (index === -1) {\n switch (icuExpression.type) {\n case IcuType.plural: {\n const resolvedCase = getPluralCase(bindingValue, getLocaleId());\n index = icuExpression.cases.indexOf(resolvedCase);\n if (index === -1 && resolvedCase !== 'other') {\n index = icuExpression.cases.indexOf('other');\n }\n break;\n }\n case IcuType.select: {\n index = icuExpression.cases.indexOf('other');\n break;\n }\n }\n }\n return index === -1 ? null : index;\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 {assertDomNode, assertNumber, assertNumberInRange} from '../../util/assert';\nimport {EMPTY_ARRAY} from '../../util/empty';\nimport {assertTIcu, assertTNodeForLView} from '../assert';\nimport {getCurrentICUCaseIndex} from '../i18n/i18n_util';\nimport {I18nRemoveOpCodes, TIcu} from '../interfaces/i18n';\nimport {TIcuContainerNode} from '../interfaces/node';\nimport {RNode} from '../interfaces/renderer_dom';\nimport {LView, TVIEW} from '../interfaces/view';\n\nexport function loadIcuContainerVisitor() {\n const _stack: any[] = [];\n let _index: number = -1;\n let _lView: LView;\n let _removes: I18nRemoveOpCodes;\n\n /**\n * Retrieves a set of root nodes from `TIcu.remove`. Used by `TNodeType.ICUContainer`\n * to determine which root belong to the ICU.\n *\n * Example of usage.\n * ```\n * const nextRNode = icuContainerIteratorStart(tIcuContainerNode, lView);\n * let rNode: RNode|null;\n * while(rNode = nextRNode()) {\n * console.log(rNode);\n * }\n * ```\n *\n * @param tIcuContainerNode Current `TIcuContainerNode`\n * @param lView `LView` where the `RNode`s should be looked up.\n */\n function icuContainerIteratorStart(tIcuContainerNode: TIcuContainerNode, lView: LView): () =>\n RNode | null {\n _lView = lView;\n while (_stack.length) _stack.pop();\n ngDevMode && assertTNodeForLView(tIcuContainerNode, lView);\n enterIcu(tIcuContainerNode.value, lView);\n return icuContainerIteratorNext;\n }\n\n function enterIcu(tIcu: TIcu, lView: LView) {\n _index = 0;\n const currentCase = getCurrentICUCaseIndex(tIcu, lView);\n if (currentCase !== null) {\n ngDevMode && assertNumberInRange(currentCase, 0, tIcu.cases.length - 1);\n _removes = tIcu.remove[currentCase];\n } else {\n _removes = EMPTY_ARRAY as any;\n }\n }\n\n\n function icuContainerIteratorNext(): RNode|null {\n if (_index < _removes.length) {\n const removeOpCode = _removes[_index++] as number;\n ngDevMode && assertNumber(removeOpCode, 'Expecting OpCode number');\n if (removeOpCode > 0) {\n const rNode = _lView[removeOpCode];\n ngDevMode && assertDomNode(rNode);\n return rNode;\n } else {\n _stack.push(_index, _removes);\n // ICUs are represented by negative indices\n const tIcuIndex = ~removeOpCode;\n const tIcu = _lView[TVIEW].data[tIcuIndex] as TIcu;\n ngDevMode && assertTIcu(tIcu);\n enterIcu(tIcu, _lView);\n return icuContainerIteratorNext();\n }\n } else {\n if (_stack.length === 0) {\n return null;\n } else {\n _removes = _stack.pop();\n _index = _stack.pop();\n return icuContainerIteratorNext();\n }\n }\n }\n\n return icuContainerIteratorStart;\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 {assertNumber, assertString} from '../../util/assert';\nimport {ELEMENT_MARKER, I18nCreateOpCode, I18nCreateOpCodes, I18nRemoveOpCodes, I18nUpdateOpCode, I18nUpdateOpCodes, ICU_MARKER, IcuCreateOpCode, IcuCreateOpCodes} from '../interfaces/i18n';\n\nimport {getInstructionFromIcuCreateOpCode, getParentFromIcuCreateOpCode, getRefFromIcuCreateOpCode} from './i18n_util';\n\n\n/**\n * Converts `I18nCreateOpCodes` array into a human readable format.\n *\n * This function is attached to the `I18nCreateOpCodes.debug` property if `ngDevMode` is enabled.\n * This function provides a human readable view of the opcodes. This is useful when debugging the\n * application as well as writing more readable tests.\n *\n * @param this `I18nCreateOpCodes` if attached as a method.\n * @param opcodes `I18nCreateOpCodes` if invoked as a function.\n */\nexport function i18nCreateOpCodesToString(\n this: I18nCreateOpCodes|void, opcodes?: I18nCreateOpCodes): string[] {\n const createOpCodes: I18nCreateOpCodes = opcodes || (Array.isArray(this) ? this : [] as any);\n let lines: string[] = [];\n for (let i = 0; i < createOpCodes.length; i++) {\n const opCode = createOpCodes[i++] as any;\n const text = createOpCodes[i] as string;\n const isComment = (opCode & I18nCreateOpCode.COMMENT) === I18nCreateOpCode.COMMENT;\n const appendNow =\n (opCode & I18nCreateOpCode.APPEND_EAGERLY) === I18nCreateOpCode.APPEND_EAGERLY;\n const index = opCode >>> I18nCreateOpCode.SHIFT;\n lines.push(`lView[${index}] = document.${isComment ? 'createComment' : 'createText'}(${\n JSON.stringify(text)});`);\n if (appendNow) {\n lines.push(`parent.appendChild(lView[${index}]);`);\n }\n }\n return lines;\n}\n\n/**\n * Converts `I18nUpdateOpCodes` array into a human readable format.\n *\n * This function is attached to the `I18nUpdateOpCodes.debug` property if `ngDevMode` is enabled.\n * This function provides a human readable view of the opcodes. This is useful when debugging the\n * application as well as writing more readable tests.\n *\n * @param this `I18nUpdateOpCodes` if attached as a method.\n * @param opcodes `I18nUpdateOpCodes` if invoked as a function.\n */\nexport function i18nUpdateOpCodesToString(\n this: I18nUpdateOpCodes|void, opcodes?: I18nUpdateOpCodes): string[] {\n const parser = new OpCodeParser(opcodes || (Array.isArray(this) ? this : []));\n let lines: string[] = [];\n\n function consumeOpCode(value: number): string {\n const ref = value >>> I18nUpdateOpCode.SHIFT_REF;\n const opCode = value & I18nUpdateOpCode.MASK_OPCODE;\n switch (opCode) {\n case I18nUpdateOpCode.Text:\n return `(lView[${ref}] as Text).textContent = $$$`;\n case I18nUpdateOpCode.Attr:\n const attrName = parser.consumeString();\n const sanitizationFn = parser.consumeFunction();\n const value = sanitizationFn ? `(${sanitizationFn})($$$)` : '$$$';\n return `(lView[${ref}] as Element).setAttribute('${attrName}', ${value})`;\n case I18nUpdateOpCode.IcuSwitch:\n return `icuSwitchCase(${ref}, $$$)`;\n case I18nUpdateOpCode.IcuUpdate:\n return `icuUpdateCase(${ref})`;\n }\n throw new Error('unexpected OpCode');\n }\n\n\n while (parser.hasMore()) {\n let mask = parser.consumeNumber();\n let size = parser.consumeNumber();\n const end = parser.i + size;\n const statements: string[] = [];\n let statement = '';\n while (parser.i < end) {\n let value = parser.consumeNumberOrString();\n if (typeof value === 'string') {\n statement += value;\n } else if (value < 0) {\n // Negative numbers are ref indexes\n // Here `i` refers to current binding index. It is to signify that the value is relative,\n // rather than absolute.\n statement += '${lView[i' + value + ']}';\n } else {\n // Positive numbers are operations.\n const opCodeText = consumeOpCode(value);\n statements.push(opCodeText.replace('$$$', '`' + statement + '`') + ';');\n statement = '';\n }\n }\n lines.push(`if (mask & 0b${mask.toString(2)}) { ${statements.join(' ')} }`);\n }\n return lines;\n}\n\n/**\n * Converts `I18nCreateOpCodes` array into a human readable format.\n *\n * This function is attached to the `I18nCreateOpCodes.debug` if `ngDevMode` is enabled. This\n * function provides a human readable view of the opcodes. This is useful when debugging the\n * application as well as writing more readable tests.\n *\n * @param this `I18nCreateOpCodes` if attached as a method.\n * @param opcodes `I18nCreateOpCodes` if invoked as a function.\n */\nexport function icuCreateOpCodesToString(\n this: IcuCreateOpCodes|void, opcodes?: IcuCreateOpCodes): string[] {\n const parser = new OpCodeParser(opcodes || (Array.isArray(this) ? this : []));\n let lines: string[] = [];\n\n function consumeOpCode(opCode: number): string {\n const parent = getParentFromIcuCreateOpCode(opCode);\n const ref = getRefFromIcuCreateOpCode(opCode);\n switch (getInstructionFromIcuCreateOpCode(opCode)) {\n case IcuCreateOpCode.AppendChild:\n return `(lView[${parent}] as Element).appendChild(lView[${lastRef}])`;\n case IcuCreateOpCode.Attr:\n return `(lView[${ref}] as Element).setAttribute(\"${parser.consumeString()}\", \"${\n parser.consumeString()}\")`;\n }\n throw new Error('Unexpected OpCode: ' + getInstructionFromIcuCreateOpCode(opCode));\n }\n\n let lastRef = -1;\n while (parser.hasMore()) {\n let value = parser.consumeNumberStringOrMarker();\n if (value === ICU_MARKER) {\n const text = parser.consumeString();\n lastRef = parser.consumeNumber();\n lines.push(`lView[${lastRef}] = document.createComment(\"${text}\")`);\n } else if (value === ELEMENT_MARKER) {\n const text = parser.consumeString();\n lastRef = parser.consumeNumber();\n lines.push(`lView[${lastRef}] = document.createElement(\"${text}\")`);\n } else if (typeof value === 'string') {\n lastRef = parser.consumeNumber();\n lines.push(`lView[${lastRef}] = document.createTextNode(\"${value}\")`);\n } else if (typeof value === 'number') {\n const line = consumeOpCode(value);\n line && lines.push(line);\n } else {\n throw new Error('Unexpected value');\n }\n }\n\n return lines;\n}\n\n/**\n * Converts `I18nRemoveOpCodes` array into a human readable format.\n *\n * This function is attached to the `I18nRemoveOpCodes.debug` if `ngDevMode` is enabled. This\n * function provides a human readable view of the opcodes. This is useful when debugging the\n * application as well as writing more readable tests.\n *\n * @param this `I18nRemoveOpCodes` if attached as a method.\n * @param opcodes `I18nRemoveOpCodes` if invoked as a function.\n */\nexport function i18nRemoveOpCodesToString(\n this: I18nRemoveOpCodes|void, opcodes?: I18nRemoveOpCodes): string[] {\n const removeCodes = opcodes || (Array.isArray(this) ? this : []);\n let lines: string[] = [];\n\n for (let i = 0; i < removeCodes.length; i++) {\n const nodeOrIcuIndex = removeCodes[i] as number;\n if (nodeOrIcuIndex > 0) {\n // Positive numbers are `RNode`s.\n lines.push(`remove(lView[${nodeOrIcuIndex}])`);\n } else {\n // Negative numbers are ICUs\n lines.push(`removeNestedICU(${~nodeOrIcuIndex})`);\n }\n }\n\n return lines;\n}\n\n\nclass OpCodeParser {\n i: number = 0;\n codes: any[];\n\n constructor(codes: any[]) {\n this.codes = codes;\n }\n\n hasMore() {\n return this.i < this.codes.length;\n }\n\n consumeNumber(): number {\n let value = this.codes[this.i++];\n assertNumber(value, 'expecting number in OpCode');\n return value;\n }\n\n consumeString(): string {\n let value = this.codes[this.i++];\n assertString(value, 'expecting string in OpCode');\n return value;\n }\n\n consumeFunction(): Function|null {\n let value = this.codes[this.i++];\n if (value === null || typeof value === 'function') {\n return value;\n }\n throw new Error('expecting function in OpCode');\n }\n\n consumeNumberOrString(): number|string {\n let value = this.codes[this.i++];\n if (typeof value === 'string') {\n return value;\n }\n assertNumber(value, 'expecting number or string in OpCode');\n return value;\n }\n\n consumeNumberStringOrMarker(): number|string|ICU_MARKER|ELEMENT_MARKER {\n let value = this.codes[this.i++];\n if (typeof value === 'string' || typeof value === 'number' || value == ICU_MARKER ||\n value == ELEMENT_MARKER) {\n return value;\n }\n assertNumber(value, 'expecting number, string, ICU_MARKER or ELEMENT_MARKER in OpCode');\n return 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 */\nimport '../../util/ng_dev_mode';\nimport '../../util/ng_i18n_closure_mode';\n\nimport {getTemplateContent, SRCSET_ATTRS, URI_ATTRS, VALID_ATTRS, VALID_ELEMENTS} from '../../sanitization/html_sanitizer';\nimport {getInertBodyHelper} from '../../sanitization/inert_body';\nimport {_sanitizeUrl, sanitizeSrcset} from '../../sanitization/url_sanitizer';\nimport {assertDefined, assertEqual, assertGreaterThanOrEqual, assertOneOf, assertString} from '../../util/assert';\nimport {CharCode} from '../../util/char_code';\nimport {loadIcuContainerVisitor} from '../instructions/i18n_icu_container_visitor';\nimport {allocExpando, createTNodeAtIndex} from '../instructions/shared';\nimport {getDocument} from '../interfaces/document';\nimport {ELEMENT_MARKER, I18nCreateOpCode, I18nCreateOpCodes, I18nRemoveOpCodes, I18nUpdateOpCode, I18nUpdateOpCodes, ICU_MARKER, IcuCreateOpCode, IcuCreateOpCodes, IcuExpression, IcuType, TI18n, TIcu} from '../interfaces/i18n';\nimport {TNode, TNodeType} from '../interfaces/node';\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {HEADER_OFFSET, LView, TView} from '../interfaces/view';\nimport {getCurrentParentTNode, getCurrentTNode, setCurrentTNode} from '../state';\nimport {attachDebugGetter} from '../util/debug_utils';\n\nimport {i18nCreateOpCodesToString, i18nRemoveOpCodesToString, i18nUpdateOpCodesToString, icuCreateOpCodesToString} from './i18n_debug';\nimport {addTNodeAndUpdateInsertBeforeIndex} from './i18n_insert_before_index';\nimport {ensureIcuContainerVisitorLoaded} from './i18n_tree_shaking';\nimport {createTNodePlaceholder, icuCreateOpCode, setTIcu, setTNodeInsertBeforeIndex} from './i18n_util';\n\n\n\nconst BINDING_REGEXP = /�(\\d+):?\\d*�/gi;\nconst ICU_REGEXP = /({\\s*�\\d+:?\\d*�\\s*,\\s*\\S{6}\\s*,[\\s\\S]*})/gi;\nconst NESTED_ICU = /�(\\d+)�/;\nconst ICU_BLOCK_REGEXP = /^\\s*(�\\d+:?\\d*�)\\s*,\\s*(select|plural)\\s*,/;\n\nconst MARKER = `�`;\nconst SUBTEMPLATE_REGEXP = /�\\/?\\*(\\d+:\\d+)�/gi;\nconst PH_REGEXP = /�(\\/?[#*]\\d+):?\\d*�/gi;\n\n/**\n * Angular Dart introduced &ngsp; as a placeholder for non-removable space, see:\n * https://github.com/dart-lang/angular/blob/0bb611387d29d65b5af7f9d2515ab571fd3fbee4/_tests/test/compiler/preserve_whitespace_test.dart#L25-L32\n * In Angular Dart &ngsp; is converted to the 0xE500 PUA (Private Use Areas) unicode character\n * and later on replaced by a space. We are re-implementing the same idea here, since translations\n * might contain this special character.\n */\nconst NGSP_UNICODE_REGEXP = /\\uE500/g;\nfunction replaceNgsp(value: string): string {\n return value.replace(NGSP_UNICODE_REGEXP, ' ');\n}\n\n/**\n * Create dynamic nodes from i18n translation block.\n *\n * - Text nodes are created synchronously\n * - TNodes are linked into tree lazily\n *\n * @param tView Current `TView`\n * @parentTNodeIndex index to the parent TNode of this i18n block\n * @param lView Current `LView`\n * @param index Index of `ɵɵi18nStart` instruction.\n * @param message Message to translate.\n * @param subTemplateIndex Index into the sub template of message translation. (ie in case of\n * `ngIf`) (-1 otherwise)\n */\nexport function i18nStartFirstCreatePass(\n tView: TView, parentTNodeIndex: number, lView: LView, index: number, message: string,\n subTemplateIndex: number) {\n const rootTNode = getCurrentParentTNode();\n const createOpCodes: I18nCreateOpCodes = [] as any;\n const updateOpCodes: I18nUpdateOpCodes = [] as any;\n const existingTNodeStack: TNode[][] = [[]];\n if (ngDevMode) {\n attachDebugGetter(createOpCodes, i18nCreateOpCodesToString);\n attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString);\n }\n\n message = getTranslationForTemplate(message, subTemplateIndex);\n const msgParts = replaceNgsp(message).split(PH_REGEXP);\n for (let i = 0; i < msgParts.length; i++) {\n let value = msgParts[i];\n if ((i & 1) === 0) {\n // Even indexes are text (including bindings & ICU expressions)\n const parts = i18nParseTextIntoPartsAndICU(value);\n for (let j = 0; j < parts.length; j++) {\n let part = parts[j];\n if ((j & 1) === 0) {\n // `j` is odd therefore `part` is string\n const text = part as string;\n ngDevMode && assertString(text, 'Parsed ICU part should be string');\n if (text !== '') {\n i18nStartFirstCreatePassProcessTextNode(\n tView, rootTNode, existingTNodeStack[0], createOpCodes, updateOpCodes, lView, text);\n }\n } else {\n // `j` is Even therefor `part` is an `ICUExpression`\n const icuExpression: IcuExpression = part as IcuExpression;\n // Verify that ICU expression has the right shape. Translations might contain invalid\n // constructions (while original messages were correct), so ICU parsing at runtime may\n // not succeed (thus `icuExpression` remains a string).\n // Note: we intentionally retain the error here by not using `ngDevMode`, because\n // the value can change based on the locale and users aren't guaranteed to hit\n // an invalid string while they're developing.\n if (typeof icuExpression !== 'object') {\n throw new Error(`Unable to parse ICU expression in \"${message}\" message.`);\n }\n const icuContainerTNode = createTNodeAndAddOpCode(\n tView, rootTNode, existingTNodeStack[0], lView, createOpCodes,\n ngDevMode ? `ICU ${index}:${icuExpression.mainBinding}` : '', true);\n const icuNodeIndex = icuContainerTNode.index;\n ngDevMode &&\n assertGreaterThanOrEqual(\n icuNodeIndex, HEADER_OFFSET, 'Index must be in absolute LView offset');\n icuStart(tView, lView, updateOpCodes, parentTNodeIndex, icuExpression, icuNodeIndex);\n }\n }\n } else {\n // Odd indexes are placeholders (elements and sub-templates)\n // At this point value is something like: '/#1:2' (originally coming from '�/#1:2�')\n const isClosing = value.charCodeAt(0) === CharCode.SLASH;\n const type = value.charCodeAt(isClosing ? 1 : 0);\n ngDevMode && assertOneOf(type, CharCode.STAR, CharCode.HASH);\n const index = HEADER_OFFSET + Number.parseInt(value.substring((isClosing ? 2 : 1)));\n if (isClosing) {\n existingTNodeStack.shift();\n setCurrentTNode(getCurrentParentTNode()!, false);\n } else {\n const tNode = createTNodePlaceholder(tView, existingTNodeStack[0], index);\n existingTNodeStack.unshift([]);\n setCurrentTNode(tNode, true);\n }\n }\n }\n\n tView.data[index] = <TI18n>{\n create: createOpCodes,\n update: updateOpCodes,\n };\n}\n\n/**\n * Allocate space in i18n Range add create OpCode instruction to crete a text or comment node.\n *\n * @param tView Current `TView` needed to allocate space in i18n range.\n * @param rootTNode Root `TNode` of the i18n block. This node determines if the new TNode will be\n * added as part of the `i18nStart` instruction or as part of the `TNode.insertBeforeIndex`.\n * @param existingTNodes internal state for `addTNodeAndUpdateInsertBeforeIndex`.\n * @param lView Current `LView` needed to allocate space in i18n range.\n * @param createOpCodes Array storing `I18nCreateOpCodes` where new opCodes will be added.\n * @param text Text to be added when the `Text` or `Comment` node will be created.\n * @param isICU true if a `Comment` node for ICU (instead of `Text`) node should be created.\n */\nfunction createTNodeAndAddOpCode(\n tView: TView, rootTNode: TNode|null, existingTNodes: TNode[], lView: LView,\n createOpCodes: I18nCreateOpCodes, text: string|null, isICU: boolean): TNode {\n const i18nNodeIdx = allocExpando(tView, lView, 1, null);\n let opCode = i18nNodeIdx << I18nCreateOpCode.SHIFT;\n let parentTNode = getCurrentParentTNode();\n\n if (rootTNode === parentTNode) {\n // FIXME(misko): A null `parentTNode` should represent when we fall of the `LView` boundary.\n // (there is no parent), but in some circumstances (because we are inconsistent about how we set\n // `previousOrParentTNode`) it could point to `rootTNode` So this is a work around.\n parentTNode = null;\n }\n if (parentTNode === null) {\n // If we don't have a parent that means that we can eagerly add nodes.\n // If we have a parent than these nodes can't be added now (as the parent has not been created\n // yet) and instead the `parentTNode` is responsible for adding it. See\n // `TNode.insertBeforeIndex`\n opCode |= I18nCreateOpCode.APPEND_EAGERLY;\n }\n if (isICU) {\n opCode |= I18nCreateOpCode.COMMENT;\n ensureIcuContainerVisitorLoaded(loadIcuContainerVisitor);\n }\n createOpCodes.push(opCode, text === null ? '' : text);\n // We store `{{?}}` so that when looking at debug `TNodeType.template` we can see where the\n // bindings are.\n const tNode = createTNodeAtIndex(\n tView, i18nNodeIdx, isICU ? TNodeType.Icu : TNodeType.Text,\n text === null ? (ngDevMode ? '{{?}}' : '') : text, null);\n addTNodeAndUpdateInsertBeforeIndex(existingTNodes, tNode);\n const tNodeIdx = tNode.index;\n setCurrentTNode(tNode, false /* Text nodes are self closing */);\n if (parentTNode !== null && rootTNode !== parentTNode) {\n // We are a child of deeper node (rather than a direct child of `i18nStart` instruction.)\n // We have to make sure to add ourselves to the parent.\n setTNodeInsertBeforeIndex(parentTNode, tNodeIdx);\n }\n return tNode;\n}\n\n/**\n * Processes text node in i18n block.\n *\n * Text nodes can have:\n * - Create instruction in `createOpCodes` for creating the text node.\n * - Allocate spec for text node in i18n range of `LView`\n * - If contains binding:\n * - bindings => allocate space in i18n range of `LView` to store the binding value.\n * - populate `updateOpCodes` with update instructions.\n *\n * @param tView Current `TView`\n * @param rootTNode Root `TNode` of the i18n block. This node determines if the new TNode will\n * be added as part of the `i18nStart` instruction or as part of the\n * `TNode.insertBeforeIndex`.\n * @param existingTNodes internal state for `addTNodeAndUpdateInsertBeforeIndex`.\n * @param createOpCodes Location where the creation OpCodes will be stored.\n * @param lView Current `LView`\n * @param text The translated text (which may contain binding)\n */\nfunction i18nStartFirstCreatePassProcessTextNode(\n tView: TView, rootTNode: TNode|null, existingTNodes: TNode[], createOpCodes: I18nCreateOpCodes,\n updateOpCodes: I18nUpdateOpCodes, lView: LView, text: string): void {\n const hasBinding = text.match(BINDING_REGEXP);\n const tNode = createTNodeAndAddOpCode(\n tView, rootTNode, existingTNodes, lView, createOpCodes, hasBinding ? null : text, false);\n if (hasBinding) {\n generateBindingUpdateOpCodes(updateOpCodes, text, tNode.index, null, 0, null);\n }\n}\n\n/**\n * See `i18nAttributes` above.\n */\nexport function i18nAttributesFirstPass(tView: TView, index: number, values: string[]) {\n const previousElement = getCurrentTNode()!;\n const previousElementIndex = previousElement.index;\n const updateOpCodes: I18nUpdateOpCodes = [] as any;\n if (ngDevMode) {\n attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString);\n }\n if (tView.firstCreatePass && tView.data[index] === null) {\n for (let i = 0; i < values.length; i += 2) {\n const attrName = values[i];\n const message = values[i + 1];\n\n if (message !== '') {\n // Check if attribute value contains an ICU and throw an error if that's the case.\n // ICUs in element attributes are not supported.\n // Note: we intentionally retain the error here by not using `ngDevMode`, because\n // the `value` can change based on the locale and users aren't guaranteed to hit\n // an invalid string while they're developing.\n if (ICU_REGEXP.test(message)) {\n throw new Error(\n `ICU expressions are not supported in attributes. Message: \"${message}\".`);\n }\n\n // i18n attributes that hit this code path are guaranteed to have bindings, because\n // the compiler treats static i18n attributes as regular attribute bindings.\n // Since this may not be the first i18n attribute on this element we need to pass in how\n // many previous bindings there have already been.\n generateBindingUpdateOpCodes(\n updateOpCodes, message, previousElementIndex, attrName, countBindings(updateOpCodes),\n null);\n }\n }\n tView.data[index] = updateOpCodes;\n }\n}\n\n\n/**\n * Generate the OpCodes to update the bindings of a string.\n *\n * @param updateOpCodes Place where the update opcodes will be stored.\n * @param str The string containing the bindings.\n * @param destinationNode Index of the destination node which will receive the binding.\n * @param attrName Name of the attribute, if the string belongs to an attribute.\n * @param sanitizeFn Sanitization function used to sanitize the string after update, if necessary.\n * @param bindingStart The lView index of the next expression that can be bound via an opCode.\n * @returns The mask value for these bindings\n */\nfunction generateBindingUpdateOpCodes(\n updateOpCodes: I18nUpdateOpCodes, str: string, destinationNode: number, attrName: string|null,\n bindingStart: number, sanitizeFn: SanitizerFn|null): number {\n ngDevMode &&\n assertGreaterThanOrEqual(\n destinationNode, HEADER_OFFSET, 'Index must be in absolute LView offset');\n const maskIndex = updateOpCodes.length; // Location of mask\n const sizeIndex = maskIndex + 1; // location of size for skipping\n updateOpCodes.push(null, null); // Alloc space for mask and size\n const startIndex = maskIndex + 2; // location of first allocation.\n if (ngDevMode) {\n attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString);\n }\n const textParts = str.split(BINDING_REGEXP);\n let mask = 0;\n\n for (let j = 0; j < textParts.length; j++) {\n const textValue = textParts[j];\n\n if (j & 1) {\n // Odd indexes are bindings\n const bindingIndex = bindingStart + parseInt(textValue, 10);\n updateOpCodes.push(-1 - bindingIndex);\n mask = mask | toMaskBit(bindingIndex);\n } else if (textValue !== '') {\n // Even indexes are text\n updateOpCodes.push(textValue);\n }\n }\n\n updateOpCodes.push(\n destinationNode << I18nUpdateOpCode.SHIFT_REF |\n (attrName ? I18nUpdateOpCode.Attr : I18nUpdateOpCode.Text));\n if (attrName) {\n updateOpCodes.push(attrName, sanitizeFn);\n }\n updateOpCodes[maskIndex] = mask;\n updateOpCodes[sizeIndex] = updateOpCodes.length - startIndex;\n return mask;\n}\n\n/**\n * Count the number of bindings in the given `opCodes`.\n *\n * It could be possible to speed this up, by passing the number of bindings found back from\n * `generateBindingUpdateOpCodes()` to `i18nAttributesFirstPass()` but this would then require more\n * complexity in the code and/or transient objects to be created.\n *\n * Since this function is only called once when the template is instantiated, is trivial in the\n * first instance (since `opCodes` will be an empty array), and it is not common for elements to\n * contain multiple i18n bound attributes, it seems like this is a reasonable compromise.\n */\nfunction countBindings(opCodes: I18nUpdateOpCodes): number {\n let count = 0;\n for (let i = 0; i < opCodes.length; i++) {\n const opCode = opCodes[i];\n // Bindings are negative numbers.\n if (typeof opCode === 'number' && opCode < 0) {\n count++;\n }\n }\n return count;\n}\n\n/**\n * Convert binding index to mask bit.\n *\n * Each index represents a single bit on the bit-mask. Because bit-mask only has 32 bits, we make\n * the 32nd bit share all masks for all bindings higher than 32. Since it is extremely rare to\n * have more than 32 bindings this will be hit very rarely. The downside of hitting this corner\n * case is that we will execute binding code more often than necessary. (penalty of performance)\n */\nfunction toMaskBit(bindingIndex: number): number {\n return 1 << Math.min(bindingIndex, 31);\n}\n\nexport function isRootTemplateMessage(subTemplateIndex: number): subTemplateIndex is - 1 {\n return subTemplateIndex === -1;\n}\n\n\n/**\n * Removes everything inside the sub-templates of a message.\n */\nfunction removeInnerTemplateTranslation(message: string): string {\n let match;\n let res = '';\n let index = 0;\n let inTemplate = false;\n let tagMatched;\n\n while ((match = SUBTEMPLATE_REGEXP.exec(message)) !== null) {\n if (!inTemplate) {\n res += message.substring(index, match.index + match[0].length);\n tagMatched = match[1];\n inTemplate = true;\n } else {\n if (match[0] === `${MARKER}/*${tagMatched}${MARKER}`) {\n index = match.index;\n inTemplate = false;\n }\n }\n }\n\n ngDevMode &&\n assertEqual(\n inTemplate, false,\n `Tag mismatch: unable to find the end of the sub-template in the translation \"${\n message}\"`);\n\n res += message.substr(index);\n return res;\n}\n\n\n/**\n * Extracts a part of a message and removes the rest.\n *\n * This method is used for extracting a part of the message associated with a template. A\n * translated message can span multiple templates.\n *\n * Example:\n * ```\n * <div i18n>Translate <span *ngIf>me</span>!</div>\n * ```\n *\n * @param message The message to crop\n * @param subTemplateIndex Index of the sub-template to extract. If undefined it returns the\n * external template and removes all sub-templates.\n */\nexport function getTranslationForTemplate(message: string, subTemplateIndex: number) {\n if (isRootTemplateMessage(subTemplateIndex)) {\n // We want the root template message, ignore all sub-templates\n return removeInnerTemplateTranslation(message);\n } else {\n // We want a specific sub-template\n const start =\n message.indexOf(`:${subTemplateIndex}${MARKER}`) + 2 + subTemplateIndex.toString().length;\n const end = message.search(new RegExp(`${MARKER}\\\\/\\\\*\\\\d+:${subTemplateIndex}${MARKER}`));\n return removeInnerTemplateTranslation(message.substring(start, end));\n }\n}\n\n/**\n * Generate the OpCodes for ICU expressions.\n *\n * @param icuExpression\n * @param index Index where the anchor is stored and an optional `TIcuContainerNode`\n * - `lView[anchorIdx]` points to a `Comment` node representing the anchor for the ICU.\n * - `tView.data[anchorIdx]` points to the `TIcuContainerNode` if ICU is root (`null` otherwise)\n */\nexport function icuStart(\n tView: TView, lView: LView, updateOpCodes: I18nUpdateOpCodes, parentIdx: number,\n icuExpression: IcuExpression, anchorIdx: number) {\n ngDevMode && assertDefined(icuExpression, 'ICU expression must be defined');\n let bindingMask = 0;\n const tIcu: TIcu = {\n type: icuExpression.type,\n currentCaseLViewIndex: allocExpando(tView, lView, 1, null),\n anchorIdx,\n cases: [],\n create: [],\n remove: [],\n update: []\n };\n addUpdateIcuSwitch(updateOpCodes, icuExpression, anchorIdx);\n setTIcu(tView, anchorIdx, tIcu);\n const values = icuExpression.values;\n for (let i = 0; i < values.length; i++) {\n // Each value is an array of strings & other ICU expressions\n const valueArr = values[i];\n const nestedIcus: IcuExpression[] = [];\n for (let j = 0; j < valueArr.length; j++) {\n const value = valueArr[j];\n if (typeof value !== 'string') {\n // It is an nested ICU expression\n const icuIndex = nestedIcus.push(value as IcuExpression) - 1;\n // Replace nested ICU expression by a comment node\n valueArr[j] = `<!--�${icuIndex}�-->`;\n }\n }\n bindingMask = parseIcuCase(\n tView, tIcu, lView, updateOpCodes, parentIdx, icuExpression.cases[i],\n valueArr.join(''), nestedIcus) |\n bindingMask;\n }\n if (bindingMask) {\n addUpdateIcuUpdate(updateOpCodes, bindingMask, anchorIdx);\n }\n}\n\n/**\n * Parses text containing an ICU expression and produces a JSON object for it.\n * Original code from closure library, modified for Angular.\n *\n * @param pattern Text containing an ICU expression that needs to be parsed.\n *\n */\nexport function parseICUBlock(pattern: string): IcuExpression {\n const cases = [];\n const values: (string|IcuExpression)[][] = [];\n let icuType = IcuType.plural;\n let mainBinding = 0;\n pattern = pattern.replace(ICU_BLOCK_REGEXP, function(str: string, binding: string, type: string) {\n if (type === 'select') {\n icuType = IcuType.select;\n } else {\n icuType = IcuType.plural;\n }\n mainBinding = parseInt(binding.substr(1), 10);\n return '';\n });\n\n const parts = i18nParseTextIntoPartsAndICU(pattern) as string[];\n // Looking for (key block)+ sequence. One of the keys has to be \"other\".\n for (let pos = 0; pos < parts.length;) {\n let key = parts[pos++].trim();\n if (icuType === IcuType.plural) {\n // Key can be \"=x\", we just want \"x\"\n key = key.replace(/\\s*(?:=)?(\\w+)\\s*/, '$1');\n }\n if (key.length) {\n cases.push(key);\n }\n\n const blocks = i18nParseTextIntoPartsAndICU(parts[pos++]) as string[];\n if (cases.length > values.length) {\n values.push(blocks);\n }\n }\n\n // TODO(ocombe): support ICU expressions in attributes, see #21615\n return {type: icuType, mainBinding: mainBinding, cases, values};\n}\n\n\n/**\n * Breaks pattern into strings and top level {...} blocks.\n * Can be used to break a message into text and ICU expressions, or to break an ICU expression\n * into keys and cases. Original code from closure library, modified for Angular.\n *\n * @param pattern (sub)Pattern to be broken.\n * @returns An `Array<string|IcuExpression>` where:\n * - odd positions: `string` => text between ICU expressions\n * - even positions: `ICUExpression` => ICU expression parsed into `ICUExpression` record.\n */\nexport function i18nParseTextIntoPartsAndICU(pattern: string): (string|IcuExpression)[] {\n if (!pattern) {\n return [];\n }\n\n let prevPos = 0;\n const braceStack = [];\n const results: (string|IcuExpression)[] = [];\n const braces = /[{}]/g;\n // lastIndex doesn't get set to 0 so we have to.\n braces.lastIndex = 0;\n\n let match;\n while (match = braces.exec(pattern)) {\n const pos = match.index;\n if (match[0] == '}') {\n braceStack.pop();\n\n if (braceStack.length == 0) {\n // End of the block.\n const block = pattern.substring(prevPos, pos);\n if (ICU_BLOCK_REGEXP.test(block)) {\n results.push(parseICUBlock(block));\n } else {\n results.push(block);\n }\n\n prevPos = pos + 1;\n }\n } else {\n if (braceStack.length == 0) {\n const substring = pattern.substring(prevPos, pos);\n results.push(substring);\n prevPos = pos + 1;\n }\n braceStack.push('{');\n }\n }\n\n const substring = pattern.substring(prevPos);\n results.push(substring);\n return results;\n}\n\n\n/**\n * Parses a node, its children and its siblings, and generates the mutate & update OpCodes.\n *\n */\nexport function parseIcuCase(\n tView: TView, tIcu: TIcu, lView: LView, updateOpCodes: I18nUpdateOpCodes, parentIdx: number,\n caseName: string, unsafeCaseHtml: string, nestedIcus: IcuExpression[]): number {\n const create: IcuCreateOpCodes = [] as any;\n const remove: I18nRemoveOpCodes = [] as any;\n const update: I18nUpdateOpCodes = [] as any;\n if (ngDevMode) {\n attachDebugGetter(create, icuCreateOpCodesToString);\n attachDebugGetter(remove, i18nRemoveOpCodesToString);\n attachDebugGetter(update, i18nUpdateOpCodesToString);\n }\n tIcu.cases.push(caseName);\n tIcu.create.push(create);\n tIcu.remove.push(remove);\n tIcu.update.push(update);\n\n const inertBodyHelper = getInertBodyHelper(getDocument());\n const inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeCaseHtml);\n ngDevMode && assertDefined(inertBodyElement, 'Unable to generate inert body element');\n const inertRootNode = getTemplateContent(inertBodyElement!) as Element || inertBodyElement;\n if (inertRootNode) {\n return walkIcuTree(\n tView, tIcu, lView, updateOpCodes, create, remove, update, inertRootNode, parentIdx,\n nestedIcus, 0);\n } else {\n return 0;\n }\n}\n\nfunction walkIcuTree(\n tView: TView, tIcu: TIcu, lView: LView, sharedUpdateOpCodes: I18nUpdateOpCodes,\n create: IcuCreateOpCodes, remove: I18nRemoveOpCodes, update: I18nUpdateOpCodes,\n parentNode: Element, parentIdx: number, nestedIcus: IcuExpression[], depth: number): number {\n let bindingMask = 0;\n let currentNode = parentNode.firstChild;\n while (currentNode) {\n const newIndex = allocExpando(tView, lView, 1, null);\n switch (currentNode.nodeType) {\n case Node.ELEMENT_NODE:\n const element = currentNode as Element;\n const tagName = element.tagName.toLowerCase();\n if (VALID_ELEMENTS.hasOwnProperty(tagName)) {\n addCreateNodeAndAppend(create, ELEMENT_MARKER, tagName, parentIdx, newIndex);\n tView.data[newIndex] = tagName;\n const elAttrs = element.attributes;\n for (let i = 0; i < elAttrs.length; i++) {\n const attr = elAttrs.item(i)!;\n const lowerAttrName = attr.name.toLowerCase();\n const hasBinding = !!attr.value.match(BINDING_REGEXP);\n // we assume the input string is safe, unless it's using a binding\n if (hasBinding) {\n if (VALID_ATTRS.hasOwnProperty(lowerAttrName)) {\n if (URI_ATTRS[lowerAttrName]) {\n generateBindingUpdateOpCodes(\n update, attr.value, newIndex, attr.name, 0, _sanitizeUrl);\n } else if (SRCSET_ATTRS[lowerAttrName]) {\n generateBindingUpdateOpCodes(\n update, attr.value, newIndex, attr.name, 0, sanitizeSrcset);\n } else {\n generateBindingUpdateOpCodes(update, attr.value, newIndex, attr.name, 0, null);\n }\n } else {\n ngDevMode &&\n console.warn(\n `WARNING: ignoring unsafe attribute value ` +\n `${lowerAttrName} on element ${tagName} ` +\n `(see https://g.co/ng/security#xss)`);\n }\n } else {\n addCreateAttribute(create, newIndex, attr);\n }\n }\n // Parse the children of this node (if any)\n bindingMask = walkIcuTree(\n tView, tIcu, lView, sharedUpdateOpCodes, create, remove, update,\n currentNode as Element, newIndex, nestedIcus, depth + 1) |\n bindingMask;\n addRemoveNode(remove, newIndex, depth);\n }\n break;\n case Node.TEXT_NODE:\n const value = currentNode.textContent || '';\n const hasBinding = value.match(BINDING_REGEXP);\n addCreateNodeAndAppend(create, null, hasBinding ? '' : value, parentIdx, newIndex);\n addRemoveNode(remove, newIndex, depth);\n if (hasBinding) {\n bindingMask =\n generateBindingUpdateOpCodes(update, value, newIndex, null, 0, null) | bindingMask;\n }\n break;\n case Node.COMMENT_NODE:\n // Check if the comment node is a placeholder for a nested ICU\n const isNestedIcu = NESTED_ICU.exec(currentNode.textContent || '');\n if (isNestedIcu) {\n const nestedIcuIndex = parseInt(isNestedIcu[1], 10);\n const icuExpression: IcuExpression = nestedIcus[nestedIcuIndex];\n // Create the comment node that will anchor the ICU expression\n addCreateNodeAndAppend(\n create, ICU_MARKER, ngDevMode ? `nested ICU ${nestedIcuIndex}` : '', parentIdx,\n newIndex);\n icuStart(tView, lView, sharedUpdateOpCodes, parentIdx, icuExpression, newIndex);\n addRemoveNestedIcu(remove, newIndex, depth);\n }\n break;\n }\n currentNode = currentNode.nextSibling;\n }\n return bindingMask;\n}\n\nfunction addRemoveNode(remove: I18nRemoveOpCodes, index: number, depth: number) {\n if (depth === 0) {\n remove.push(index);\n }\n}\n\nfunction addRemoveNestedIcu(remove: I18nRemoveOpCodes, index: number, depth: number) {\n if (depth === 0) {\n remove.push(~index); // remove ICU at `index`\n remove.push(index); // remove ICU comment at `index`\n }\n}\n\nfunction addUpdateIcuSwitch(\n update: I18nUpdateOpCodes, icuExpression: IcuExpression, index: number) {\n update.push(\n toMaskBit(icuExpression.mainBinding), 2, -1 - icuExpression.mainBinding,\n index << I18nUpdateOpCode.SHIFT_REF | I18nUpdateOpCode.IcuSwitch);\n}\n\nfunction addUpdateIcuUpdate(update: I18nUpdateOpCodes, bindingMask: number, index: number) {\n update.push(bindingMask, 1, index << I18nUpdateOpCode.SHIFT_REF | I18nUpdateOpCode.IcuUpdate);\n}\n\nfunction addCreateNodeAndAppend(\n create: IcuCreateOpCodes, marker: null|ICU_MARKER|ELEMENT_MARKER, text: string,\n appendToParentIdx: number, createAtIdx: number) {\n if (marker !== null) {\n create.push(marker);\n }\n create.push(\n text, createAtIdx,\n icuCreateOpCode(IcuCreateOpCode.AppendChild, appendToParentIdx, createAtIdx));\n}\n\nfunction addCreateAttribute(create: IcuCreateOpCodes, newIndex: number, attr: Attr) {\n create.push(newIndex << IcuCreateOpCode.SHIFT_REF | IcuCreateOpCode.Attr, attr.name, attr.value);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// i18nPostprocess consts\nconst ROOT_TEMPLATE_ID = 0;\nconst PP_MULTI_VALUE_PLACEHOLDERS_REGEXP = /\\[(�.+?�?)\\]/;\nconst PP_PLACEHOLDERS_REGEXP = /\\[(�.+?�?)\\]|(�\\/?\\*\\d+:\\d+�)/g;\nconst PP_ICU_VARS_REGEXP = /({\\s*)(VAR_(PLURAL|SELECT)(_\\d+)?)(\\s*,)/g;\nconst PP_ICU_PLACEHOLDERS_REGEXP = /{([A-Z0-9_]+)}/g;\nconst PP_ICUS_REGEXP = /�I18N_EXP_(ICU(_\\d+)?)�/g;\nconst PP_CLOSE_TEMPLATE_REGEXP = /\\/\\*/;\nconst PP_TEMPLATE_ID_REGEXP = /\\d+\\:(\\d+)/;\n\n// Parsed placeholder structure used in postprocessing (within `i18nPostprocess` function)\n// Contains the following fields: [templateId, isCloseTemplateTag, placeholder]\ntype PostprocessPlaceholder = [number, boolean, string];\n\n\n/**\n * Handles message string post-processing for internationalization.\n *\n * Handles message string post-processing by transforming it from intermediate\n * format (that might contain some markers that we need to replace) to the final\n * form, consumable by i18nStart instruction. Post processing steps include:\n *\n * 1. Resolve all multi-value cases (like [�*1:1��#2:1�|�#4:1�|�5�])\n * 2. Replace all ICU vars (like \"VAR_PLURAL\")\n * 3. Replace all placeholders used inside ICUs in a form of {PLACEHOLDER}\n * 4. Replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�)\n * in case multiple ICUs have the same placeholder name\n *\n * @param message Raw translation string for post processing\n * @param replacements Set of replacements that should be applied\n *\n * @returns Transformed string that can be consumed by i18nStart instruction\n *\n * @codeGenApi\n */\nexport function i18nPostprocess(\n message: string, replacements: {[key: string]: (string|string[])} = {}): string {\n /**\n * Step 1: resolve all multi-value placeholders like [�#5�|�*1:1��#2:1�|�#4:1�]\n *\n * Note: due to the way we process nested templates (BFS), multi-value placeholders are typically\n * grouped by templates, for example: [�#5�|�#6�|�#1:1�|�#3:2�] where �#5� and �#6� belong to root\n * template, �#1:1� belong to nested template with index 1 and �#1:2� - nested template with index\n * 3. However in real templates the order might be different: i.e. �#1:1� and/or �#3:2� may go in\n * front of �#6�. The post processing step restores the right order by keeping track of the\n * template id stack and looks for placeholders that belong to the currently active template.\n */\n let result: string = message;\n if (PP_MULTI_VALUE_PLACEHOLDERS_REGEXP.test(message)) {\n const matches: {[key: string]: PostprocessPlaceholder[]} = {};\n const templateIdsStack: number[] = [ROOT_TEMPLATE_ID];\n result = result.replace(PP_PLACEHOLDERS_REGEXP, (m: any, phs: string, tmpl: string): string => {\n const content = phs || tmpl;\n const placeholders: PostprocessPlaceholder[] = matches[content] || [];\n if (!placeholders.length) {\n content.split('|').forEach((placeholder: string) => {\n const match = placeholder.match(PP_TEMPLATE_ID_REGEXP);\n const templateId = match ? parseInt(match[1], 10) : ROOT_TEMPLATE_ID;\n const isCloseTemplateTag = PP_CLOSE_TEMPLATE_REGEXP.test(placeholder);\n placeholders.push([templateId, isCloseTemplateTag, placeholder]);\n });\n matches[content] = placeholders;\n }\n\n if (!placeholders.length) {\n throw new Error(`i18n postprocess: unmatched placeholder - ${content}`);\n }\n\n const currentTemplateId = templateIdsStack[templateIdsStack.length - 1];\n let idx = 0;\n // find placeholder index that matches current template id\n for (let i = 0; i < placeholders.length; i++) {\n if (placeholders[i][0] === currentTemplateId) {\n idx = i;\n break;\n }\n }\n // update template id stack based on the current tag extracted\n const [templateId, isCloseTemplateTag, placeholder] = placeholders[idx];\n if (isCloseTemplateTag) {\n templateIdsStack.pop();\n } else if (currentTemplateId !== templateId) {\n templateIdsStack.push(templateId);\n }\n // remove processed tag from the list\n placeholders.splice(idx, 1);\n return placeholder;\n });\n }\n\n // return current result if no replacements specified\n if (!Object.keys(replacements).length) {\n return result;\n }\n\n /**\n * Step 2: replace all ICU vars (like \"VAR_PLURAL\")\n */\n result = result.replace(PP_ICU_VARS_REGEXP, (match, start, key, _type, _idx, end): string => {\n return replacements.hasOwnProperty(key) ? `${start}${replacements[key]}${end}` : match;\n });\n\n /**\n * Step 3: replace all placeholders used inside ICUs in a form of {PLACEHOLDER}\n */\n result = result.replace(PP_ICU_PLACEHOLDERS_REGEXP, (match, key): string => {\n return replacements.hasOwnProperty(key) ? replacements[key] as string : match;\n });\n\n /**\n * Step 4: replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�) in case\n * multiple ICUs have the same placeholder name\n */\n result = result.replace(PP_ICUS_REGEXP, (match, key): string => {\n if (replacements.hasOwnProperty(key)) {\n const list = replacements[key] as string[];\n if (!list.length) {\n throw new Error(`i18n postprocess: unmatched ICU - ${match} with key: ${key}`);\n }\n return list.shift()!;\n }\n return match;\n });\n\n return result;\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 */\nimport '../../util/ng_dev_mode';\nimport '../../util/ng_i18n_closure_mode';\n\nimport {assertDefined} from '../../util/assert';\nimport {bindingUpdated} from '../bindings';\nimport {applyCreateOpCodes, applyI18n, setMaskBit} from '../i18n/i18n_apply';\nimport {i18nAttributesFirstPass, i18nStartFirstCreatePass} from '../i18n/i18n_parse';\nimport {i18nPostprocess} from '../i18n/i18n_postprocess';\nimport {TI18n} from '../interfaces/i18n';\nimport {TElementNode, TNodeType} from '../interfaces/node';\nimport {HEADER_OFFSET, T_HOST} from '../interfaces/view';\nimport {getClosestRElement} from '../node_manipulation';\nimport {getCurrentParentTNode, getLView, getTView, nextBindingIndex, setInI18nBlock} from '../state';\nimport {getConstant} from '../util/view_utils';\n\n/**\n * Marks a block of text as translatable.\n *\n * The instructions `i18nStart` and `i18nEnd` mark the translation block in the template.\n * The translation `message` is the value which is locale specific. The translation string may\n * contain placeholders which associate inner elements and sub-templates within the translation.\n *\n * The translation `message` placeholders are:\n * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be\n * interpolated into. The placeholder `index` points to the expression binding index. An optional\n * `block` that matches the sub-template in which it was declared.\n * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*: Marks the beginning\n * and end of DOM element that were embedded in the original translation block. The placeholder\n * `index` points to the element index in the template instructions set. An optional `block` that\n * matches the sub-template in which it was declared.\n * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be\n * split up and translated separately in each angular template function. The `index` points to the\n * `template` instruction index. A `block` that matches the sub-template in which it was declared.\n *\n * @param index A unique index of the translation in the static block.\n * @param messageIndex An index of the translation message from the `def.consts` array.\n * @param subTemplateIndex Optional sub-template index in the `message`.\n *\n * @codeGenApi\n */\nexport function ɵɵi18nStart(\n index: number, messageIndex: number, subTemplateIndex: number = -1): void {\n const tView = getTView();\n const lView = getLView();\n const adjustedIndex = HEADER_OFFSET + index;\n ngDevMode && assertDefined(tView, `tView should be defined`);\n const message = getConstant<string>(tView.consts, messageIndex)!;\n const parentTNode = getCurrentParentTNode() as TElementNode | null;\n if (tView.firstCreatePass) {\n i18nStartFirstCreatePass(\n tView, parentTNode === null ? 0 : parentTNode.index, lView, adjustedIndex, message,\n subTemplateIndex);\n }\n const tI18n = tView.data[adjustedIndex] as TI18n;\n const sameViewParentTNode = parentTNode === lView[T_HOST] ? null : parentTNode;\n const parentRNode = getClosestRElement(tView, sameViewParentTNode, lView);\n // If `parentTNode` is an `ElementContainer` than it has `<!--ng-container--->`.\n // When we do inserts we have to make sure to insert in front of `<!--ng-container--->`.\n const insertInFrontOf = parentTNode && (parentTNode.type & TNodeType.ElementContainer) ?\n lView[parentTNode.index] :\n null;\n applyCreateOpCodes(lView, tI18n.create, parentRNode, insertInFrontOf);\n setInI18nBlock(true);\n}\n\n\n\n/**\n * Translates a translation block marked by `i18nStart` and `i18nEnd`. It inserts the text/ICU nodes\n * into the render tree, moves the placeholder nodes and removes the deleted nodes.\n *\n * @codeGenApi\n */\nexport function ɵɵi18nEnd(): void {\n setInI18nBlock(false);\n}\n\n/**\n *\n * Use this instruction to create a translation block that doesn't contain any placeholder.\n * It calls both {@link i18nStart} and {@link i18nEnd} in one instruction.\n *\n * The translation `message` is the value which is locale specific. The translation string may\n * contain placeholders which associate inner elements and sub-templates within the translation.\n *\n * The translation `message` placeholders are:\n * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be\n * interpolated into. The placeholder `index` points to the expression binding index. An optional\n * `block` that matches the sub-template in which it was declared.\n * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*: Marks the beginning\n * and end of DOM element that were embedded in the original translation block. The placeholder\n * `index` points to the element index in the template instructions set. An optional `block` that\n * matches the sub-template in which it was declared.\n * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be\n * split up and translated separately in each angular template function. The `index` points to the\n * `template` instruction index. A `block` that matches the sub-template in which it was declared.\n *\n * @param index A unique index of the translation in the static block.\n * @param messageIndex An index of the translation message from the `def.consts` array.\n * @param subTemplateIndex Optional sub-template index in the `message`.\n *\n * @codeGenApi\n */\nexport function ɵɵi18n(index: number, messageIndex: number, subTemplateIndex?: number): void {\n ɵɵi18nStart(index, messageIndex, subTemplateIndex);\n ɵɵi18nEnd();\n}\n\n/**\n * Marks a list of attributes as translatable.\n *\n * @param index A unique index in the static block\n * @param values\n *\n * @codeGenApi\n */\nexport function ɵɵi18nAttributes(index: number, attrsIndex: number): void {\n const tView = getTView();\n ngDevMode && assertDefined(tView, `tView should be defined`);\n const attrs = getConstant<string[]>(tView.consts, attrsIndex)!;\n i18nAttributesFirstPass(tView, index + HEADER_OFFSET, attrs);\n}\n\n\n/**\n * Stores the values of the bindings during each update cycle in order to determine if we need to\n * update the translated nodes.\n *\n * @param value The binding's value\n * @returns This function returns itself so that it may be chained\n * (e.g. `i18nExp(ctx.name)(ctx.title)`)\n *\n * @codeGenApi\n */\nexport function ɵɵi18nExp<T>(value: T): typeof ɵɵi18nExp {\n const lView = getLView();\n setMaskBit(bindingUpdated(lView, nextBindingIndex(), value));\n return ɵɵi18nExp;\n}\n\n/**\n * Updates a translation block or an i18n attribute when the bindings have changed.\n *\n * @param index Index of either {@link i18nStart} (translation block) or {@link i18nAttributes}\n * (i18n attribute) on which it should update the content.\n *\n * @codeGenApi\n */\nexport function ɵɵi18nApply(index: number) {\n applyI18n(getTView(), getLView(), index + HEADER_OFFSET);\n}\n\n/**\n * Handles message string post-processing for internationalization.\n *\n * Handles message string post-processing by transforming it from intermediate\n * format (that might contain some markers that we need to replace) to the final\n * form, consumable by i18nStart instruction. Post processing steps include:\n *\n * 1. Resolve all multi-value cases (like [�*1:1��#2:1�|�#4:1�|�5�])\n * 2. Replace all ICU vars (like \"VAR_PLURAL\")\n * 3. Replace all placeholders used inside ICUs in a form of {PLACEHOLDER}\n * 4. Replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�)\n * in case multiple ICUs have the same placeholder name\n *\n * @param message Raw translation string for post processing\n * @param replacements Set of replacements that should be applied\n *\n * @returns Transformed string that can be consumed by i18nStart instruction\n *\n * @codeGenApi\n */\nexport function ɵɵi18nPostprocess(\n message: string, replacements: {[key: string]: (string|string[])} = {}): string {\n return i18nPostprocess(message, replacements);\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 * This file re-exports all symbols contained in this directory.\n *\n * Why is this file not `index.ts`?\n *\n * There seems to be an inconsistent path resolution of an `index.ts` file\n * when only the parent directory is referenced. This could be due to the\n * node module resolution configuration differing from rollup and/or typescript.\n *\n * With commit\n * https://github.com/angular/angular/commit/d5e3f2c64bd13ce83e7c70788b7fc514ca4a9918\n * the `instructions.ts` file was moved to `instructions/instructions.ts` and an\n * `index.ts` file was used to re-export everything. Having had file names that were\n * importing from `instructions' directly (not the from the sub file or the `index.ts`\n * file) caused strange CI issues. `index.ts` had to be renamed to `all.ts` for this\n * to work.\n *\n * Jira Issue = FW-1184\n */\nexport * from './attribute';\nexport * from './attribute_interpolation';\nexport * from './change_detection';\nexport * from './template';\nexport * from './storage';\nexport * from './di';\nexport * from './di_attr';\nexport * from './element';\nexport * from './element_container';\nexport * from './get_current_view';\nexport * from './listener';\nexport * from './namespace';\nexport * from './next_context';\nexport * from './projection';\nexport * from './property';\nexport * from './property_interpolation';\nexport * from './advance';\nexport * from './styling';\nexport * from './text';\nexport * from './text_interpolation';\nexport * from './class_map_interpolation';\nexport * from './style_map_interpolation';\nexport * from './style_prop_interpolation';\nexport * from './host_property';\nexport * from './i18n';\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\nimport {resolveForwardRef} from '../di/forward_ref';\nimport {ClassProvider, Provider} from '../di/interface/provider';\nimport {isClassProvider, isTypeProvider, providerToFactory} from '../di/r3_injector';\nimport {assertDefined} from '../util/assert';\n\nimport {diPublicInInjector, getNodeInjectable, getOrCreateNodeInjectorForNode} from './di';\nimport {ɵɵdirectiveInject} from './instructions/all';\nimport {DirectiveDef} from './interfaces/definition';\nimport {NodeInjectorFactory} from './interfaces/injector';\nimport {TContainerNode, TDirectiveHostNode, TElementContainerNode, TElementNode, TNodeProviderIndexes} from './interfaces/node';\nimport {isComponentDef} from './interfaces/type_checks';\nimport {DestroyHookData, LView, TData, TVIEW, TView} from './interfaces/view';\nimport {getCurrentTNode, getLView, getTView} from './state';\n\n\n\n/**\n * Resolves the providers which are defined in the DirectiveDef.\n *\n * When inserting the tokens and the factories in their respective arrays, we can assume that\n * this method is called first for the component (if any), and then for other directives on the same\n * node.\n * As a consequence,the providers are always processed in that order:\n * 1) The view providers of the component\n * 2) The providers of the component\n * 3) The providers of the other directives\n * This matches the structure of the injectables arrays of a view (for each node).\n * So the tokens and the factories can be pushed at the end of the arrays, except\n * in one case for multi providers.\n *\n * @param def the directive definition\n * @param providers: Array of `providers`.\n * @param viewProviders: Array of `viewProviders`.\n */\nexport function providersResolver<T>(\n def: DirectiveDef<T>, providers: Provider[], viewProviders: Provider[]): void {\n const tView = getTView();\n if (tView.firstCreatePass) {\n const isComponent = isComponentDef(def);\n\n // The list of view providers is processed first, and the flags are updated\n resolveProvider(viewProviders, tView.data, tView.blueprint, isComponent, true);\n\n // Then, the list of providers is processed, and the flags are updated\n resolveProvider(providers, tView.data, tView.blueprint, isComponent, false);\n }\n}\n\n/**\n * Resolves a provider and publishes it to the DI system.\n */\nfunction resolveProvider(\n provider: Provider, tInjectables: TData, lInjectablesBlueprint: NodeInjectorFactory[],\n isComponent: boolean, isViewProvider: boolean): void {\n provider = resolveForwardRef(provider);\n if (Array.isArray(provider)) {\n // Recursively call `resolveProvider`\n // Recursion is OK in this case because this code will not be in hot-path once we implement\n // cloning of the initial state.\n for (let i = 0; i < provider.length; i++) {\n resolveProvider(\n provider[i], tInjectables, lInjectablesBlueprint, isComponent, isViewProvider);\n }\n } else {\n const tView = getTView();\n const lView = getLView();\n let token: any = isTypeProvider(provider) ? provider : resolveForwardRef(provider.provide);\n let providerFactory: () => any = providerToFactory(provider);\n\n const tNode = getCurrentTNode()!;\n const beginIndex = tNode.providerIndexes & TNodeProviderIndexes.ProvidersStartIndexMask;\n const endIndex = tNode.directiveStart;\n const cptViewProvidersCount =\n tNode.providerIndexes >> TNodeProviderIndexes.CptViewProvidersCountShift;\n\n if (isTypeProvider(provider) || !provider.multi) {\n // Single provider case: the factory is created and pushed immediately\n const factory = new NodeInjectorFactory(providerFactory, isViewProvider, ɵɵdirectiveInject);\n const existingFactoryIndex = indexOf(\n token, tInjectables, isViewProvider ? beginIndex : beginIndex + cptViewProvidersCount,\n endIndex);\n if (existingFactoryIndex === -1) {\n diPublicInInjector(\n getOrCreateNodeInjectorForNode(\n tNode as TElementNode | TContainerNode | TElementContainerNode, lView),\n tView, token);\n registerDestroyHooksIfSupported(tView, provider, tInjectables.length);\n tInjectables.push(token);\n tNode.directiveStart++;\n tNode.directiveEnd++;\n if (isViewProvider) {\n tNode.providerIndexes += TNodeProviderIndexes.CptViewProvidersCountShifter;\n }\n lInjectablesBlueprint.push(factory);\n lView.push(factory);\n } else {\n lInjectablesBlueprint[existingFactoryIndex] = factory;\n lView[existingFactoryIndex] = factory;\n }\n } else {\n // Multi provider case:\n // We create a multi factory which is going to aggregate all the values.\n // Since the output of such a factory depends on content or view injection,\n // we create two of them, which are linked together.\n //\n // The first one (for view providers) is always in the first block of the injectables array,\n // and the second one (for providers) is always in the second block.\n // This is important because view providers have higher priority. When a multi token\n // is being looked up, the view providers should be found first.\n // Note that it is not possible to have a multi factory in the third block (directive block).\n //\n // The algorithm to process multi providers is as follows:\n // 1) If the multi provider comes from the `viewProviders` of the component:\n // a) If the special view providers factory doesn't exist, it is created and pushed.\n // b) Else, the multi provider is added to the existing multi factory.\n // 2) If the multi provider comes from the `providers` of the component or of another\n // directive:\n // a) If the multi factory doesn't exist, it is created and provider pushed into it.\n // It is also linked to the multi factory for view providers, if it exists.\n // b) Else, the multi provider is added to the existing multi factory.\n\n const existingProvidersFactoryIndex =\n indexOf(token, tInjectables, beginIndex + cptViewProvidersCount, endIndex);\n const existingViewProvidersFactoryIndex =\n indexOf(token, tInjectables, beginIndex, beginIndex + cptViewProvidersCount);\n const doesProvidersFactoryExist = existingProvidersFactoryIndex >= 0 &&\n lInjectablesBlueprint[existingProvidersFactoryIndex];\n const doesViewProvidersFactoryExist = existingViewProvidersFactoryIndex >= 0 &&\n lInjectablesBlueprint[existingViewProvidersFactoryIndex];\n\n if (isViewProvider && !doesViewProvidersFactoryExist ||\n !isViewProvider && !doesProvidersFactoryExist) {\n // Cases 1.a and 2.a\n diPublicInInjector(\n getOrCreateNodeInjectorForNode(\n tNode as TElementNode | TContainerNode | TElementContainerNode, lView),\n tView, token);\n const factory = multiFactory(\n isViewProvider ? multiViewProvidersFactoryResolver : multiProvidersFactoryResolver,\n lInjectablesBlueprint.length, isViewProvider, isComponent, providerFactory);\n if (!isViewProvider && doesViewProvidersFactoryExist) {\n lInjectablesBlueprint[existingViewProvidersFactoryIndex].providerFactory = factory;\n }\n registerDestroyHooksIfSupported(tView, provider, tInjectables.length, 0);\n tInjectables.push(token);\n tNode.directiveStart++;\n tNode.directiveEnd++;\n if (isViewProvider) {\n tNode.providerIndexes += TNodeProviderIndexes.CptViewProvidersCountShifter;\n }\n lInjectablesBlueprint.push(factory);\n lView.push(factory);\n } else {\n // Cases 1.b and 2.b\n const indexInFactory = multiFactoryAdd(\n lInjectablesBlueprint!\n [isViewProvider ? existingViewProvidersFactoryIndex :\n existingProvidersFactoryIndex],\n providerFactory, !isViewProvider && isComponent);\n registerDestroyHooksIfSupported(\n tView, provider,\n existingProvidersFactoryIndex > -1 ? existingProvidersFactoryIndex :\n existingViewProvidersFactoryIndex,\n indexInFactory);\n }\n if (!isViewProvider && isComponent && doesViewProvidersFactoryExist) {\n lInjectablesBlueprint[existingViewProvidersFactoryIndex].componentProviders!++;\n }\n }\n }\n}\n\n/**\n * Registers the `ngOnDestroy` hook of a provider, if the provider supports destroy hooks.\n * @param tView `TView` in which to register the hook.\n * @param provider Provider whose hook should be registered.\n * @param contextIndex Index under which to find the context for the hook when it's being invoked.\n * @param indexInFactory Only required for `multi` providers. Index of the provider in the multi\n * provider factory.\n */\nfunction registerDestroyHooksIfSupported(\n tView: TView, provider: Exclude<Provider, any[]>, contextIndex: number,\n indexInFactory?: number) {\n const providerIsTypeProvider = isTypeProvider(provider);\n if (providerIsTypeProvider || isClassProvider(provider)) {\n const prototype = ((provider as ClassProvider).useClass || provider).prototype;\n const ngOnDestroy = prototype.ngOnDestroy;\n if (ngOnDestroy) {\n const hooks = tView.destroyHooks || (tView.destroyHooks = []);\n\n if (!providerIsTypeProvider && ((provider as ClassProvider)).multi) {\n ngDevMode &&\n assertDefined(\n indexInFactory, 'indexInFactory when registering multi factory destroy hook');\n const existingCallbacksIndex = hooks.indexOf(contextIndex);\n\n if (existingCallbacksIndex === -1) {\n hooks.push(contextIndex, [indexInFactory, ngOnDestroy]);\n } else {\n (hooks[existingCallbacksIndex + 1] as DestroyHookData).push(indexInFactory!, ngOnDestroy);\n }\n } else {\n hooks.push(contextIndex, ngOnDestroy);\n }\n }\n }\n}\n\n/**\n * Add a factory in a multi factory.\n * @returns Index at which the factory was inserted.\n */\nfunction multiFactoryAdd(\n multiFactory: NodeInjectorFactory, factory: () => any, isComponentProvider: boolean): number {\n if (isComponentProvider) {\n multiFactory.componentProviders!++;\n }\n return multiFactory.multi!.push(factory) - 1;\n}\n\n/**\n * Returns the index of item in the array, but only in the begin to end range.\n */\nfunction indexOf(item: any, arr: any[], begin: number, end: number) {\n for (let i = begin; i < end; i++) {\n if (arr[i] === item) return i;\n }\n return -1;\n}\n\n/**\n * Use this with `multi` `providers`.\n */\nfunction multiProvidersFactoryResolver(\n this: NodeInjectorFactory, _: undefined, tData: TData, lData: LView,\n tNode: TDirectiveHostNode): any[] {\n return multiResolve(this.multi!, []);\n}\n\n/**\n * Use this with `multi` `viewProviders`.\n *\n * This factory knows how to concatenate itself with the existing `multi` `providers`.\n */\nfunction multiViewProvidersFactoryResolver(\n this: NodeInjectorFactory, _: undefined, tData: TData, lView: LView,\n tNode: TDirectiveHostNode): any[] {\n const factories = this.multi!;\n let result: any[];\n if (this.providerFactory) {\n const componentCount = this.providerFactory.componentProviders!;\n const multiProviders =\n getNodeInjectable(lView, lView[TVIEW], this.providerFactory!.index!, tNode);\n // Copy the section of the array which contains `multi` `providers` from the component\n result = multiProviders.slice(0, componentCount);\n // Insert the `viewProvider` instances.\n multiResolve(factories, result);\n // Copy the section of the array which contains `multi` `providers` from other directives\n for (let i = componentCount; i < multiProviders.length; i++) {\n result.push(multiProviders[i]);\n }\n } else {\n result = [];\n // Insert the `viewProvider` instances.\n multiResolve(factories, result);\n }\n return result;\n}\n\n/**\n * Maps an array of factories into an array of values.\n */\nfunction multiResolve(factories: Array<() => any>, result: any[]): any[] {\n for (let i = 0; i < factories.length; i++) {\n const factory = factories[i]! as () => null;\n result.push(factory());\n }\n return result;\n}\n\n/**\n * Creates a multi factory.\n */\nfunction multiFactory(\n factoryFn: (\n this: NodeInjectorFactory, _: undefined, tData: TData, lData: LView,\n tNode: TDirectiveHostNode) => any,\n index: number, isViewProvider: boolean, isComponent: boolean,\n f: () => any): NodeInjectorFactory {\n const factory = new NodeInjectorFactory(factoryFn, isViewProvider, ɵɵdirectiveInject);\n factory.multi = [];\n factory.index = index;\n factory.componentProviders = 0;\n multiFactoryAdd(factory, f, isComponent && !isViewProvider);\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 */\nimport {ProcessProvidersFunction, Provider} from '../../di/interface/provider';\nimport {providersResolver} from '../di_setup';\nimport {DirectiveDef} from '../interfaces/definition';\n\n/**\n * This feature resolves the providers of a directive (or component),\n * and publish them into the DI system, making it visible to others for injection.\n *\n * For example:\n * ```ts\n * class ComponentWithProviders {\n * constructor(private greeter: GreeterDE) {}\n *\n * static ɵcmp = defineComponent({\n * type: ComponentWithProviders,\n * selectors: [['component-with-providers']],\n * factory: () => new ComponentWithProviders(directiveInject(GreeterDE as any)),\n * decls: 1,\n * vars: 1,\n * template: function(fs: RenderFlags, ctx: ComponentWithProviders) {\n * if (fs & RenderFlags.Create) {\n * ɵɵtext(0);\n * }\n * if (fs & RenderFlags.Update) {\n * ɵɵtextInterpolate(ctx.greeter.greet());\n * }\n * },\n * features: [ɵɵProvidersFeature([GreeterDE])]\n * });\n * }\n * ```\n *\n * @param definition\n *\n * @codeGenApi\n */\nexport function ɵɵProvidersFeature<T>(providers: Provider[], viewProviders: Provider[] = []) {\n return (definition: DirectiveDef<T>) => {\n definition.providersResolver =\n (def: DirectiveDef<T>, processProvidersFn?: ProcessProvidersFunction) => {\n return providersResolver(\n def, //\n processProvidersFn ? processProvidersFn(providers) : providers, //\n viewProviders);\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 {ChangeDetectorRef} from '../change_detection/change_detection';\nimport {Injector} from '../di/injector';\nimport {Type} from '../interface/type';\n\nimport {ElementRef} from './element_ref';\nimport {NgModuleRef} from './ng_module_factory';\nimport {ViewRef} from './view_ref';\n\n/**\n * Represents a component created by a `ComponentFactory`.\n * Provides access to the component instance and related objects,\n * and provides the means of destroying the instance.\n *\n * @publicApi\n */\nexport abstract class ComponentRef<C> {\n /**\n * The host or anchor [element](guide/glossary#element) for this component instance.\n */\n abstract get location(): ElementRef;\n\n /**\n * The [dependency injector](guide/glossary#injector) for this component instance.\n */\n abstract get injector(): Injector;\n\n /**\n * This component instance.\n */\n abstract get instance(): C;\n\n /**\n * The [host view](guide/glossary#view-tree) defined by the template\n * for this component instance.\n */\n abstract get hostView(): ViewRef;\n\n /**\n * The change detector for this component instance.\n */\n abstract get changeDetectorRef(): ChangeDetectorRef;\n\n /**\n * The type of this component (as created by a `ComponentFactory` class).\n */\n abstract get componentType(): Type<any>;\n\n /**\n * Destroys the component instance and all of the data structures associated with it.\n */\n abstract destroy(): void;\n\n /**\n * A lifecycle hook that provides additional developer-defined cleanup\n * functionality for the component.\n * @param callback A handler function that cleans up developer-defined data\n * associated with this component. Called when the `destroy()` method is invoked.\n */\n abstract onDestroy(callback: Function): void;\n}\n\n/**\n * Base class for a factory that can create a component dynamically.\n * Instantiate a factory for a given type of component with `resolveComponentFactory()`.\n * Use the resulting `ComponentFactory.create()` method to create a component of that type.\n *\n * @see [Dynamic Components](guide/dynamic-component-loader)\n *\n * @publicApi\n */\nexport abstract class ComponentFactory<C> {\n /**\n * The component's HTML selector.\n */\n abstract get selector(): string;\n /**\n * The type of component the factory will create.\n */\n abstract get componentType(): Type<any>;\n /**\n * Selector for all <ng-content> elements in the component.\n */\n abstract get ngContentSelectors(): string[];\n /**\n * The inputs of the component.\n */\n abstract get inputs(): {propName: string, templateName: string}[];\n /**\n * The outputs of the component.\n */\n abstract get outputs(): {propName: string, templateName: string}[];\n /**\n * Creates a new component.\n */\n abstract create(\n injector: Injector, projectableNodes?: any[][], rootSelectorOrNode?: string|any,\n ngModule?: NgModuleRef<any>): ComponentRef<C>;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '../di/injector';\nimport {Type} from '../interface/type';\nimport {stringify} from '../util/stringify';\n\nimport {ComponentFactory, ComponentRef} from './component_factory';\nimport {NgModuleRef} from './ng_module_factory';\n\nexport function noComponentFactoryError(component: Function) {\n const error = Error(`No component factory found for ${\n stringify(component)}. Did you add it to @NgModule.entryComponents?`);\n (error as any)[ERROR_COMPONENT] = component;\n return error;\n}\n\nconst ERROR_COMPONENT = 'ngComponent';\n\nexport function getComponent(error: Error): Type<any> {\n return (error as any)[ERROR_COMPONENT];\n}\n\n\nclass _NullComponentFactoryResolver implements ComponentFactoryResolver {\n resolveComponentFactory<T>(component: {new(...args: any[]): T}): ComponentFactory<T> {\n throw noComponentFactoryError(component);\n }\n}\n\n/**\n * A simple registry that maps `Components` to generated `ComponentFactory` classes\n * that can be used to create instances of components.\n * Use to obtain the factory for a given component type,\n * then use the factory's `create()` method to create a component of that type.\n *\n * @see [Dynamic Components](guide/dynamic-component-loader)\n * @see [Usage Example](guide/dynamic-component-loader#resolving-components)\n * @see <live-example name=\"dynamic-component-loader\" noDownload></live-example>\nof the code in this cookbook\n * @publicApi\n */\nexport abstract class ComponentFactoryResolver {\n static NULL: ComponentFactoryResolver = (/* @__PURE__ */ new _NullComponentFactoryResolver());\n /**\n * Retrieves the factory object that creates a component of the given type.\n * @param component The component type.\n */\n abstract resolveComponentFactory<T>(component: Type<T>): ComponentFactory<T>;\n}\n\nexport class CodegenComponentFactoryResolver implements ComponentFactoryResolver {\n private _factories = new Map<any, ComponentFactory<any>>();\n\n constructor(\n factories: ComponentFactory<any>[], private _parent: ComponentFactoryResolver,\n private _ngModule: NgModuleRef<any>) {\n for (let i = 0; i < factories.length; i++) {\n const factory = factories[i];\n this._factories.set(factory.componentType, factory);\n }\n }\n\n resolveComponentFactory<T>(component: {new(...args: any[]): T}): ComponentFactory<T> {\n let factory = this._factories.get(component);\n if (!factory && this._parent) {\n factory = this._parent.resolveComponentFactory(component);\n }\n if (!factory) {\n throw noComponentFactoryError(component);\n }\n return new ComponentFactoryBoundToModule(factory, this._ngModule);\n }\n}\n\nexport class ComponentFactoryBoundToModule<C> extends ComponentFactory<C> {\n override readonly selector: string;\n override readonly componentType: Type<any>;\n override readonly ngContentSelectors: string[];\n override readonly inputs: {propName: string, templateName: string}[];\n override readonly outputs: {propName: string, templateName: string}[];\n\n constructor(private factory: ComponentFactory<C>, private ngModule: NgModuleRef<any>) {\n super();\n this.selector = factory.selector;\n this.componentType = factory.componentType;\n this.ngContentSelectors = factory.ngContentSelectors;\n this.inputs = factory.inputs;\n this.outputs = factory.outputs;\n }\n\n override create(\n injector: Injector, projectableNodes?: any[][], rootSelectorOrNode?: string|any,\n ngModule?: NgModuleRef<any>): ComponentRef<C> {\n return this.factory.create(\n injector, projectableNodes, rootSelectorOrNode, ngModule || this.ngModule);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport function noop(...args: any[]): any {\n // Do nothing.\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 {TNode} from '../render3/interfaces/node';\nimport {RElement} from '../render3/interfaces/renderer_dom';\nimport {LView} from '../render3/interfaces/view';\nimport {getCurrentTNode, getLView} from '../render3/state';\nimport {getNativeByTNode} from '../render3/util/view_utils';\nimport {noop} from '../util/noop';\n\n/**\n * Creates an ElementRef from the most recent node.\n *\n * @returns The ElementRef instance to use\n */\nexport function injectElementRef(): ElementRef {\n return createElementRef(getCurrentTNode()!, getLView());\n}\n\n/**\n * Creates an ElementRef given a node.\n *\n * @param tNode The node for which you'd like an ElementRef\n * @param lView The view to which the node belongs\n * @returns The ElementRef instance to use\n */\nexport function createElementRef(tNode: TNode, lView: LView): ElementRef {\n return new ElementRef(getNativeByTNode(tNode, lView) as RElement);\n}\n\nexport const SWITCH_ELEMENT_REF_FACTORY__POST_R3__ = injectElementRef;\nconst SWITCH_ELEMENT_REF_FACTORY__PRE_R3__ = noop;\nconst SWITCH_ELEMENT_REF_FACTORY: typeof injectElementRef = SWITCH_ELEMENT_REF_FACTORY__PRE_R3__;\n\n/**\n * A wrapper around a native element inside of a View.\n *\n * An `ElementRef` is backed by a render-specific element. In the browser, this is usually a DOM\n * element.\n *\n * @security Permitting direct access to the DOM can make your application more vulnerable to\n * XSS attacks. Carefully review any use of `ElementRef` in your code. For more detail, see the\n * [Security Guide](https://g.co/ng/security).\n *\n * @publicApi\n */\n// Note: We don't expose things like `Injector`, `ViewContainer`, ... here,\n// i.e. users have to ask for what they need. With that, we can build better analysis tools\n// and could do better codegen in the future.\nexport class ElementRef<T = any> {\n /**\n * The underlying native element or `null` if direct access to native elements is not supported\n * (e.g. when the application runs in a web worker).\n *\n * <div class=\"callout is-critical\">\n * <header>Use with caution</header>\n * <p>\n * Use this API as the last resort when direct access to DOM is needed. Use templating and\n * data-binding provided by Angular instead. Alternatively you can take a look at {@link\n * Renderer2}\n * which provides API that can safely be used even when direct access to native elements is not\n * supported.\n * </p>\n * <p>\n * Relying on direct DOM access creates tight coupling between your application and rendering\n * layers which will make it impossible to separate the two and deploy your application into a\n * web worker.\n * </p>\n * </div>\n *\n */\n public nativeElement: T;\n\n constructor(nativeElement: T) {\n this.nativeElement = nativeElement;\n }\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__: () => ElementRef = SWITCH_ELEMENT_REF_FACTORY;\n}\n\n/**\n * Unwraps `ElementRef` and return the `nativeElement`.\n *\n * @param value value to unwrap\n * @returns `nativeElement` if `ElementRef` otherwise returns value as is.\n */\nexport function unwrapElementRef<T, R>(value: T|ElementRef<R>): T|R {\n return value instanceof ElementRef ? value.nativeElement : value;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectionToken} from '../di/injection_token';\nimport {isProceduralRenderer} from '../render3/interfaces/renderer';\nimport {isLView} from '../render3/interfaces/type_checks';\nimport {LView, RENDERER} from '../render3/interfaces/view';\nimport {getCurrentTNode, getLView} from '../render3/state';\nimport {getComponentLViewByIndex} from '../render3/util/view_utils';\nimport {noop} from '../util/noop';\nimport {RendererStyleFlags2, RendererType2} from './api_flags';\n\n\nexport const Renderer2Interceptor = new InjectionToken<Renderer2[]>('Renderer2Interceptor');\n\n\n/**\n * Creates and initializes a custom renderer that implements the `Renderer2` base class.\n *\n * @publicApi\n */\nexport abstract class RendererFactory2 {\n /**\n * Creates and initializes a custom renderer for a host DOM element.\n * @param hostElement The element to render.\n * @param type The base class to implement.\n * @returns The new custom renderer instance.\n */\n abstract createRenderer(hostElement: any, type: RendererType2|null): Renderer2;\n /**\n * A callback invoked when rendering has begun.\n */\n abstract begin?(): void;\n /**\n * A callback invoked when rendering has completed.\n */\n abstract end?(): void;\n /**\n * Use with animations test-only mode. Notifies the test when rendering has completed.\n * @returns The asynchronous result of the developer-defined function.\n */\n abstract whenRenderingDone?(): Promise<any>;\n}\n\n\n/**\n * Extend this base class to implement custom rendering. By default, Angular\n * renders a template into DOM. You can use custom rendering to intercept\n * rendering calls, or to render to something other than DOM.\n *\n * Create your custom renderer using `RendererFactory2`.\n *\n * Use a custom renderer to bypass Angular's templating and\n * make custom UI changes that can't be expressed declaratively.\n * For example if you need to set a property or an attribute whose name is\n * not statically known, use the `setProperty()` or\n * `setAttribute()` method.\n *\n * @publicApi\n */\nexport abstract class Renderer2 {\n /**\n * Use to store arbitrary developer-defined data on a renderer instance,\n * as an object containing key-value pairs.\n * This is useful for renderers that delegate to other renderers.\n */\n abstract get data(): {[key: string]: any};\n\n /**\n * Implement this callback to destroy the renderer or the host element.\n */\n abstract destroy(): void;\n /**\n * Implement this callback to create an instance of the host element.\n * @param name An identifying name for the new element, unique within the namespace.\n * @param namespace The namespace for the new element.\n * @returns The new element.\n */\n abstract createElement(name: string, namespace?: string|null): any;\n /**\n * Implement this callback to add a comment to the DOM of the host element.\n * @param value The comment text.\n * @returns The modified element.\n */\n abstract createComment(value: string): any;\n\n /**\n * Implement this callback to add text to the DOM of the host element.\n * @param value The text string.\n * @returns The modified element.\n */\n abstract createText(value: string): any;\n /**\n * If null or undefined, the view engine won't call it.\n * This is used as a performance optimization for production mode.\n */\n // TODO(issue/24571): remove '!'.\n destroyNode!: ((node: any) => void)|null;\n /**\n * Appends a child to a given parent node in the host element DOM.\n * @param parent The parent node.\n * @param newChild The new child node.\n */\n abstract appendChild(parent: any, newChild: any): void;\n /**\n * Implement this callback to insert a child node at a given position in a parent node\n * in the host element DOM.\n * @param parent The parent node.\n * @param newChild The new child nodes.\n * @param refChild The existing child node before which `newChild` is inserted.\n * @param isMove Optional argument which signifies if the current `insertBefore` is a result of a\n * move. Animation uses this information to trigger move animations. In the past the Animation\n * would always assume that any `insertBefore` is a move. This is not strictly true because\n * with runtime i18n it is possible to invoke `insertBefore` as a result of i18n and it should\n * not trigger an animation move.\n */\n abstract insertBefore(parent: any, newChild: any, refChild: any, isMove?: boolean): void;\n /**\n * Implement this callback to remove a child node from the host element's DOM.\n * @param parent The parent node.\n * @param oldChild The child node to remove.\n * @param isHostElement Optionally signal to the renderer whether this element is a host element\n * or not\n */\n abstract removeChild(parent: any, oldChild: any, isHostElement?: boolean): void;\n /**\n * Implement this callback to prepare an element to be bootstrapped\n * as a root element, and return the element instance.\n * @param selectorOrNode The DOM element.\n * @param preserveContent Whether the contents of the root element\n * should be preserved, or cleared upon bootstrap (default behavior).\n * Use with `ViewEncapsulation.ShadowDom` to allow simple native\n * content projection via `<slot>` elements.\n * @returns The root element.\n */\n abstract selectRootElement(selectorOrNode: string|any, preserveContent?: boolean): any;\n /**\n * Implement this callback to get the parent of a given node\n * in the host element's DOM.\n * @param node The child node to query.\n * @returns The parent node, or null if there is no parent.\n * For WebWorkers, always returns true.\n * This is because the check is synchronous,\n * and the caller can't rely on checking for null.\n */\n abstract parentNode(node: any): any;\n /**\n * Implement this callback to get the next sibling node of a given node\n * in the host element's DOM.\n * @returns The sibling node, or null if there is no sibling.\n * For WebWorkers, always returns a value.\n * This is because the check is synchronous,\n * and the caller can't rely on checking for null.\n */\n abstract nextSibling(node: any): any;\n /**\n * Implement this callback to set an attribute value for an element in the DOM.\n * @param el The element.\n * @param name The attribute name.\n * @param value The new value.\n * @param namespace The namespace.\n */\n abstract setAttribute(el: any, name: string, value: string, namespace?: string|null): void;\n\n /**\n * Implement this callback to remove an attribute from an element in the DOM.\n * @param el The element.\n * @param name The attribute name.\n * @param namespace The namespace.\n */\n abstract removeAttribute(el: any, name: string, namespace?: string|null): void;\n /**\n * Implement this callback to add a class to an element in the DOM.\n * @param el The element.\n * @param name The class name.\n */\n abstract addClass(el: any, name: string): void;\n\n /**\n * Implement this callback to remove a class from an element in the DOM.\n * @param el The element.\n * @param name The class name.\n */\n abstract removeClass(el: any, name: string): void;\n\n /**\n * Implement this callback to set a CSS style for an element in the DOM.\n * @param el The element.\n * @param style The name of the style.\n * @param value The new value.\n * @param flags Flags for style variations. No flags are set by default.\n */\n abstract setStyle(el: any, style: string, value: any, flags?: RendererStyleFlags2): void;\n\n /**\n * Implement this callback to remove the value from a CSS style for an element in the DOM.\n * @param el The element.\n * @param style The name of the style.\n * @param flags Flags for style variations to remove, if set. ???\n */\n abstract removeStyle(el: any, style: string, flags?: RendererStyleFlags2): void;\n\n /**\n * Implement this callback to set the value of a property of an element in the DOM.\n * @param el The element.\n * @param name The property name.\n * @param value The new value.\n */\n abstract setProperty(el: any, name: string, value: any): void;\n\n /**\n * Implement this callback to set the value of a node in the host element.\n * @param node The node.\n * @param value The new value.\n */\n abstract setValue(node: any, value: string): void;\n\n /**\n * Implement this callback to start an event listener.\n * @param target The context in which to listen for events. Can be\n * the entire window or document, the body of the document, or a specific\n * DOM element.\n * @param eventName The event to listen for.\n * @param callback A handler function to invoke when the event occurs.\n * @returns An \"unlisten\" function for disposing of this handler.\n */\n abstract listen(\n target: 'window'|'document'|'body'|any, eventName: string,\n callback: (event: any) => boolean | void): () => void;\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__: () => Renderer2 = () => SWITCH_RENDERER2_FACTORY();\n}\n\n\nexport const SWITCH_RENDERER2_FACTORY__POST_R3__ = injectRenderer2;\nconst SWITCH_RENDERER2_FACTORY__PRE_R3__ = noop;\nconst SWITCH_RENDERER2_FACTORY: typeof injectRenderer2 = SWITCH_RENDERER2_FACTORY__PRE_R3__;\n\n/** Returns a Renderer2 (or throws when application was bootstrapped with Renderer3) */\nfunction getOrCreateRenderer2(lView: LView): Renderer2 {\n const renderer = lView[RENDERER];\n if (ngDevMode && !isProceduralRenderer(renderer)) {\n throw new Error('Cannot inject Renderer2 when the application uses Renderer3!');\n }\n return renderer as Renderer2;\n}\n\n/** Injects a Renderer2 for the current component. */\nexport function injectRenderer2(): Renderer2 {\n // We need the Renderer to be based on the component that it's being injected into, however since\n // DI happens before we've entered its view, `getLView` will return the parent view instead.\n const lView = getLView();\n const tNode = getCurrentTNode()!;\n const nodeAtIndex = getComponentLViewByIndex(tNode.index, lView);\n return getOrCreateRenderer2(isLView(nodeAtIndex) ? nodeAtIndex : lView);\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 {ɵɵdefineInjectable} from '../di/interface/defs';\nimport {SecurityContext} from './security';\n\n/**\n * Sanitizer is used by the views to sanitize potentially dangerous values.\n *\n * @publicApi\n */\nexport abstract class Sanitizer {\n abstract sanitize(context: SecurityContext, value: {}|string|null): string|null;\n /** @nocollapse */\n static ɵprov = /** @pureOrBreakMyCode */ ɵɵdefineInjectable({\n token: Sanitizer,\n providedIn: 'root',\n factory: () => null,\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @description Represents the version of Angular\n *\n * @publicApi\n */\nexport class Version {\n public readonly major: string;\n public readonly minor: string;\n public readonly patch: string;\n\n constructor(public full: string) {\n this.major = full.split('.')[0];\n this.minor = full.split('.')[1];\n this.patch = full.split('.').slice(2).join('.');\n }\n}\n\n/**\n * @publicApi\n */\nexport const VERSION = new Version('12.2.9');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {stringify} from '../../util/stringify';\nimport {isListLikeIterable, iterateListLike} from '../change_detection_util';\n\nimport {IterableChangeRecord, IterableChanges, IterableDiffer, IterableDifferFactory, NgIterable, TrackByFunction} from './iterable_differs';\n\n\nexport class DefaultIterableDifferFactory implements IterableDifferFactory {\n constructor() {}\n supports(obj: Object|null|undefined): boolean {\n return isListLikeIterable(obj);\n }\n\n create<V>(trackByFn?: TrackByFunction<V>): DefaultIterableDiffer<V> {\n return new DefaultIterableDiffer<V>(trackByFn);\n }\n}\n\nconst trackByIdentity = (index: number, item: any) => item;\n\n/**\n * @deprecated v4.0.0 - Should not be part of public API.\n * @publicApi\n */\nexport class DefaultIterableDiffer<V> implements IterableDiffer<V>, IterableChanges<V> {\n public readonly length: number = 0;\n // TODO(issue/24571): remove '!'.\n public readonly collection!: V[]|Iterable<V>|null;\n // Keeps track of the used records at any point in time (during & across `_check()` calls)\n private _linkedRecords: _DuplicateMap<V>|null = null;\n // Keeps track of the removed records at any point in time during `_check()` calls.\n private _unlinkedRecords: _DuplicateMap<V>|null = null;\n private _previousItHead: IterableChangeRecord_<V>|null = null;\n private _itHead: IterableChangeRecord_<V>|null = null;\n private _itTail: IterableChangeRecord_<V>|null = null;\n private _additionsHead: IterableChangeRecord_<V>|null = null;\n private _additionsTail: IterableChangeRecord_<V>|null = null;\n private _movesHead: IterableChangeRecord_<V>|null = null;\n private _movesTail: IterableChangeRecord_<V>|null = null;\n private _removalsHead: IterableChangeRecord_<V>|null = null;\n private _removalsTail: IterableChangeRecord_<V>|null = null;\n // Keeps track of records where custom track by is the same, but item identity has changed\n private _identityChangesHead: IterableChangeRecord_<V>|null = null;\n private _identityChangesTail: IterableChangeRecord_<V>|null = null;\n private _trackByFn: TrackByFunction<V>;\n\n constructor(trackByFn?: TrackByFunction<V>) {\n this._trackByFn = trackByFn || trackByIdentity;\n }\n\n forEachItem(fn: (record: IterableChangeRecord_<V>) => void) {\n let record: IterableChangeRecord_<V>|null;\n for (record = this._itHead; record !== null; record = record._next) {\n fn(record);\n }\n }\n\n forEachOperation(\n fn: (item: IterableChangeRecord<V>, previousIndex: number|null, currentIndex: number|null) =>\n void) {\n let nextIt = this._itHead;\n let nextRemove = this._removalsHead;\n let addRemoveOffset = 0;\n let moveOffsets: number[]|null = null;\n while (nextIt || nextRemove) {\n // Figure out which is the next record to process\n // Order: remove, add, move\n const record: IterableChangeRecord<V> = !nextRemove ||\n nextIt &&\n nextIt.currentIndex! <\n getPreviousIndex(nextRemove, addRemoveOffset, moveOffsets) ?\n nextIt! :\n nextRemove;\n const adjPreviousIndex = getPreviousIndex(record, addRemoveOffset, moveOffsets);\n const currentIndex = record.currentIndex;\n\n // consume the item, and adjust the addRemoveOffset and update moveDistance if necessary\n if (record === nextRemove) {\n addRemoveOffset--;\n nextRemove = nextRemove._nextRemoved;\n } else {\n nextIt = nextIt!._next;\n if (record.previousIndex == null) {\n addRemoveOffset++;\n } else {\n // INVARIANT: currentIndex < previousIndex\n if (!moveOffsets) moveOffsets = [];\n const localMovePreviousIndex = adjPreviousIndex - addRemoveOffset;\n const localCurrentIndex = currentIndex! - addRemoveOffset;\n if (localMovePreviousIndex != localCurrentIndex) {\n for (let i = 0; i < localMovePreviousIndex; i++) {\n const offset = i < moveOffsets.length ? moveOffsets[i] : (moveOffsets[i] = 0);\n const index = offset + i;\n if (localCurrentIndex <= index && index < localMovePreviousIndex) {\n moveOffsets[i] = offset + 1;\n }\n }\n const previousIndex = record.previousIndex;\n moveOffsets[previousIndex] = localCurrentIndex - localMovePreviousIndex;\n }\n }\n }\n\n if (adjPreviousIndex !== currentIndex) {\n fn(record, adjPreviousIndex, currentIndex);\n }\n }\n }\n\n forEachPreviousItem(fn: (record: IterableChangeRecord_<V>) => void) {\n let record: IterableChangeRecord_<V>|null;\n for (record = this._previousItHead; record !== null; record = record._nextPrevious) {\n fn(record);\n }\n }\n\n forEachAddedItem(fn: (record: IterableChangeRecord_<V>) => void) {\n let record: IterableChangeRecord_<V>|null;\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n fn(record);\n }\n }\n\n forEachMovedItem(fn: (record: IterableChangeRecord_<V>) => void) {\n let record: IterableChangeRecord_<V>|null;\n for (record = this._movesHead; record !== null; record = record._nextMoved) {\n fn(record);\n }\n }\n\n forEachRemovedItem(fn: (record: IterableChangeRecord_<V>) => void) {\n let record: IterableChangeRecord_<V>|null;\n for (record = this._removalsHead; record !== null; record = record._nextRemoved) {\n fn(record);\n }\n }\n\n forEachIdentityChange(fn: (record: IterableChangeRecord_<V>) => void) {\n let record: IterableChangeRecord_<V>|null;\n for (record = this._identityChangesHead; record !== null; record = record._nextIdentityChange) {\n fn(record);\n }\n }\n\n diff(collection: NgIterable<V>|null|undefined): DefaultIterableDiffer<V>|null {\n if (collection == null) collection = [];\n if (!isListLikeIterable(collection)) {\n throw new Error(\n `Error trying to diff '${stringify(collection)}'. Only arrays and iterables are allowed`);\n }\n\n if (this.check(collection)) {\n return this;\n } else {\n return null;\n }\n }\n\n onDestroy() {}\n\n check(collection: NgIterable<V>): boolean {\n this._reset();\n\n let record: IterableChangeRecord_<V>|null = this._itHead;\n let mayBeDirty: boolean = false;\n let index: number;\n let item: V;\n let itemTrackBy: any;\n if (Array.isArray(collection)) {\n (this as {length: number}).length = collection.length;\n\n for (let index = 0; index < this.length; index++) {\n item = collection[index];\n itemTrackBy = this._trackByFn(index, item);\n if (record === null || !Object.is(record.trackById, itemTrackBy)) {\n record = this._mismatch(record, item, itemTrackBy, index);\n mayBeDirty = true;\n } else {\n if (mayBeDirty) {\n // TODO(misko): can we limit this to duplicates only?\n record = this._verifyReinsertion(record, item, itemTrackBy, index);\n }\n if (!Object.is(record.item, item)) this._addIdentityChange(record, item);\n }\n\n record = record._next;\n }\n } else {\n index = 0;\n iterateListLike(collection, (item: V) => {\n itemTrackBy = this._trackByFn(index, item);\n if (record === null || !Object.is(record.trackById, itemTrackBy)) {\n record = this._mismatch(record, item, itemTrackBy, index);\n mayBeDirty = true;\n } else {\n if (mayBeDirty) {\n // TODO(misko): can we limit this to duplicates only?\n record = this._verifyReinsertion(record, item, itemTrackBy, index);\n }\n if (!Object.is(record.item, item)) this._addIdentityChange(record, item);\n }\n record = record._next;\n index++;\n });\n (this as {length: number}).length = index;\n }\n\n this._truncate(record);\n (this as {collection: V[] | Iterable<V>}).collection = collection;\n return this.isDirty;\n }\n\n /* CollectionChanges is considered dirty if it has any additions, moves, removals, or identity\n * changes.\n */\n get isDirty(): boolean {\n return this._additionsHead !== null || this._movesHead !== null ||\n this._removalsHead !== null || this._identityChangesHead !== null;\n }\n\n /**\n * Reset the state of the change objects to show no changes. This means set previousKey to\n * currentKey, and clear all of the queues (additions, moves, removals).\n * Set the previousIndexes of moved and added items to their currentIndexes\n * Reset the list of additions, moves and removals\n *\n * @internal\n */\n _reset() {\n if (this.isDirty) {\n let record: IterableChangeRecord_<V>|null;\n\n for (record = this._previousItHead = this._itHead; record !== null; record = record._next) {\n record._nextPrevious = record._next;\n }\n\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n record.previousIndex = record.currentIndex;\n }\n this._additionsHead = this._additionsTail = null;\n\n for (record = this._movesHead; record !== null; record = record._nextMoved) {\n record.previousIndex = record.currentIndex;\n }\n this._movesHead = this._movesTail = null;\n this._removalsHead = this._removalsTail = null;\n this._identityChangesHead = this._identityChangesTail = null;\n\n // TODO(vicb): when assert gets supported\n // assert(!this.isDirty);\n }\n }\n\n /**\n * This is the core function which handles differences between collections.\n *\n * - `record` is the record which we saw at this position last time. If null then it is a new\n * item.\n * - `item` is the current item in the collection\n * - `index` is the position of the item in the collection\n *\n * @internal\n */\n _mismatch(record: IterableChangeRecord_<V>|null, item: V, itemTrackBy: any, index: number):\n IterableChangeRecord_<V> {\n // The previous record after which we will append the current one.\n let previousRecord: IterableChangeRecord_<V>|null;\n\n if (record === null) {\n previousRecord = this._itTail;\n } else {\n previousRecord = record._prev;\n // Remove the record from the collection since we know it does not match the item.\n this._remove(record);\n }\n\n // See if we have evicted the item, which used to be at some anterior position of _itHead list.\n record = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);\n if (record !== null) {\n // It is an item which we have evicted earlier: reinsert it back into the list.\n // But first we need to check if identity changed, so we can update in view if necessary.\n if (!Object.is(record.item, item)) this._addIdentityChange(record, item);\n\n this._reinsertAfter(record, previousRecord, index);\n } else {\n // Attempt to see if the item is at some posterior position of _itHead list.\n record = this._linkedRecords === null ? null : this._linkedRecords.get(itemTrackBy, index);\n if (record !== null) {\n // We have the item in _itHead at/after `index` position. We need to move it forward in the\n // collection.\n // But first we need to check if identity changed, so we can update in view if necessary.\n if (!Object.is(record.item, item)) this._addIdentityChange(record, item);\n\n this._moveAfter(record, previousRecord, index);\n } else {\n // It is a new item: add it.\n record =\n this._addAfter(new IterableChangeRecord_<V>(item, itemTrackBy), previousRecord, index);\n }\n }\n return record;\n }\n\n /**\n * This check is only needed if an array contains duplicates. (Short circuit of nothing dirty)\n *\n * Use case: `[a, a]` => `[b, a, a]`\n *\n * If we did not have this check then the insertion of `b` would:\n * 1) evict first `a`\n * 2) insert `b` at `0` index.\n * 3) leave `a` at index `1` as is. <-- this is wrong!\n * 3) reinsert `a` at index 2. <-- this is wrong!\n *\n * The correct behavior is:\n * 1) evict first `a`\n * 2) insert `b` at `0` index.\n * 3) reinsert `a` at index 1.\n * 3) move `a` at from `1` to `2`.\n *\n *\n * Double check that we have not evicted a duplicate item. We need to check if the item type may\n * have already been removed:\n * The insertion of b will evict the first 'a'. If we don't reinsert it now it will be reinserted\n * at the end. Which will show up as the two 'a's switching position. This is incorrect, since a\n * better way to think of it is as insert of 'b' rather then switch 'a' with 'b' and then add 'a'\n * at the end.\n *\n * @internal\n */\n _verifyReinsertion(record: IterableChangeRecord_<V>, item: V, itemTrackBy: any, index: number):\n IterableChangeRecord_<V> {\n let reinsertRecord: IterableChangeRecord_<V>|null =\n this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);\n if (reinsertRecord !== null) {\n record = this._reinsertAfter(reinsertRecord, record._prev!, index);\n } else if (record.currentIndex != index) {\n record.currentIndex = index;\n this._addToMoves(record, index);\n }\n return record;\n }\n\n /**\n * Get rid of any excess {@link IterableChangeRecord_}s from the previous collection\n *\n * - `record` The first excess {@link IterableChangeRecord_}.\n *\n * @internal\n */\n _truncate(record: IterableChangeRecord_<V>|null) {\n // Anything after that needs to be removed;\n while (record !== null) {\n const nextRecord: IterableChangeRecord_<V>|null = record._next;\n this._addToRemovals(this._unlink(record));\n record = nextRecord;\n }\n if (this._unlinkedRecords !== null) {\n this._unlinkedRecords.clear();\n }\n\n if (this._additionsTail !== null) {\n this._additionsTail._nextAdded = null;\n }\n if (this._movesTail !== null) {\n this._movesTail._nextMoved = null;\n }\n if (this._itTail !== null) {\n this._itTail._next = null;\n }\n if (this._removalsTail !== null) {\n this._removalsTail._nextRemoved = null;\n }\n if (this._identityChangesTail !== null) {\n this._identityChangesTail._nextIdentityChange = null;\n }\n }\n\n /** @internal */\n _reinsertAfter(\n record: IterableChangeRecord_<V>, prevRecord: IterableChangeRecord_<V>|null,\n index: number): IterableChangeRecord_<V> {\n if (this._unlinkedRecords !== null) {\n this._unlinkedRecords.remove(record);\n }\n const prev = record._prevRemoved;\n const next = record._nextRemoved;\n\n if (prev === null) {\n this._removalsHead = next;\n } else {\n prev._nextRemoved = next;\n }\n if (next === null) {\n this._removalsTail = prev;\n } else {\n next._prevRemoved = prev;\n }\n\n this._insertAfter(record, prevRecord, index);\n this._addToMoves(record, index);\n return record;\n }\n\n /** @internal */\n _moveAfter(\n record: IterableChangeRecord_<V>, prevRecord: IterableChangeRecord_<V>|null,\n index: number): IterableChangeRecord_<V> {\n this._unlink(record);\n this._insertAfter(record, prevRecord, index);\n this._addToMoves(record, index);\n return record;\n }\n\n /** @internal */\n _addAfter(\n record: IterableChangeRecord_<V>, prevRecord: IterableChangeRecord_<V>|null,\n index: number): IterableChangeRecord_<V> {\n this._insertAfter(record, prevRecord, index);\n\n if (this._additionsTail === null) {\n // TODO(vicb):\n // assert(this._additionsHead === null);\n this._additionsTail = this._additionsHead = record;\n } else {\n // TODO(vicb):\n // assert(_additionsTail._nextAdded === null);\n // assert(record._nextAdded === null);\n this._additionsTail = this._additionsTail._nextAdded = record;\n }\n return record;\n }\n\n /** @internal */\n _insertAfter(\n record: IterableChangeRecord_<V>, prevRecord: IterableChangeRecord_<V>|null,\n index: number): IterableChangeRecord_<V> {\n // TODO(vicb):\n // assert(record != prevRecord);\n // assert(record._next === null);\n // assert(record._prev === null);\n\n const next: IterableChangeRecord_<V>|null =\n prevRecord === null ? this._itHead : prevRecord._next;\n // TODO(vicb):\n // assert(next != record);\n // assert(prevRecord != record);\n record._next = next;\n record._prev = prevRecord;\n if (next === null) {\n this._itTail = record;\n } else {\n next._prev = record;\n }\n if (prevRecord === null) {\n this._itHead = record;\n } else {\n prevRecord._next = record;\n }\n\n if (this._linkedRecords === null) {\n this._linkedRecords = new _DuplicateMap<V>();\n }\n this._linkedRecords.put(record);\n\n record.currentIndex = index;\n return record;\n }\n\n /** @internal */\n _remove(record: IterableChangeRecord_<V>): IterableChangeRecord_<V> {\n return this._addToRemovals(this._unlink(record));\n }\n\n /** @internal */\n _unlink(record: IterableChangeRecord_<V>): IterableChangeRecord_<V> {\n if (this._linkedRecords !== null) {\n this._linkedRecords.remove(record);\n }\n\n const prev = record._prev;\n const next = record._next;\n\n // TODO(vicb):\n // assert((record._prev = null) === null);\n // assert((record._next = null) === null);\n\n if (prev === null) {\n this._itHead = next;\n } else {\n prev._next = next;\n }\n if (next === null) {\n this._itTail = prev;\n } else {\n next._prev = prev;\n }\n\n return record;\n }\n\n /** @internal */\n _addToMoves(record: IterableChangeRecord_<V>, toIndex: number): IterableChangeRecord_<V> {\n // TODO(vicb):\n // assert(record._nextMoved === null);\n\n if (record.previousIndex === toIndex) {\n return record;\n }\n\n if (this._movesTail === null) {\n // TODO(vicb):\n // assert(_movesHead === null);\n this._movesTail = this._movesHead = record;\n } else {\n // TODO(vicb):\n // assert(_movesTail._nextMoved === null);\n this._movesTail = this._movesTail._nextMoved = record;\n }\n\n return record;\n }\n\n private _addToRemovals(record: IterableChangeRecord_<V>): IterableChangeRecord_<V> {\n if (this._unlinkedRecords === null) {\n this._unlinkedRecords = new _DuplicateMap<V>();\n }\n this._unlinkedRecords.put(record);\n record.currentIndex = null;\n record._nextRemoved = null;\n\n if (this._removalsTail === null) {\n // TODO(vicb):\n // assert(_removalsHead === null);\n this._removalsTail = this._removalsHead = record;\n record._prevRemoved = null;\n } else {\n // TODO(vicb):\n // assert(_removalsTail._nextRemoved === null);\n // assert(record._nextRemoved === null);\n record._prevRemoved = this._removalsTail;\n this._removalsTail = this._removalsTail._nextRemoved = record;\n }\n return record;\n }\n\n /** @internal */\n _addIdentityChange(record: IterableChangeRecord_<V>, item: V) {\n record.item = item;\n if (this._identityChangesTail === null) {\n this._identityChangesTail = this._identityChangesHead = record;\n } else {\n this._identityChangesTail = this._identityChangesTail._nextIdentityChange = record;\n }\n return record;\n }\n}\n\nexport class IterableChangeRecord_<V> implements IterableChangeRecord<V> {\n currentIndex: number|null = null;\n previousIndex: number|null = null;\n\n /** @internal */\n _nextPrevious: IterableChangeRecord_<V>|null = null;\n /** @internal */\n _prev: IterableChangeRecord_<V>|null = null;\n /** @internal */\n _next: IterableChangeRecord_<V>|null = null;\n /** @internal */\n _prevDup: IterableChangeRecord_<V>|null = null;\n /** @internal */\n _nextDup: IterableChangeRecord_<V>|null = null;\n /** @internal */\n _prevRemoved: IterableChangeRecord_<V>|null = null;\n /** @internal */\n _nextRemoved: IterableChangeRecord_<V>|null = null;\n /** @internal */\n _nextAdded: IterableChangeRecord_<V>|null = null;\n /** @internal */\n _nextMoved: IterableChangeRecord_<V>|null = null;\n /** @internal */\n _nextIdentityChange: IterableChangeRecord_<V>|null = null;\n\n\n constructor(public item: V, public trackById: any) {}\n}\n\n// A linked list of IterableChangeRecords with the same IterableChangeRecord_.item\nclass _DuplicateItemRecordList<V> {\n /** @internal */\n _head: IterableChangeRecord_<V>|null = null;\n /** @internal */\n _tail: IterableChangeRecord_<V>|null = null;\n\n /**\n * Append the record to the list of duplicates.\n *\n * Note: by design all records in the list of duplicates hold the same value in record.item.\n */\n add(record: IterableChangeRecord_<V>): void {\n if (this._head === null) {\n this._head = this._tail = record;\n record._nextDup = null;\n record._prevDup = null;\n } else {\n // TODO(vicb):\n // assert(record.item == _head.item ||\n // record.item is num && record.item.isNaN && _head.item is num && _head.item.isNaN);\n this._tail!._nextDup = record;\n record._prevDup = this._tail;\n record._nextDup = null;\n this._tail = record;\n }\n }\n\n // Returns a IterableChangeRecord_ having IterableChangeRecord_.trackById == trackById and\n // IterableChangeRecord_.currentIndex >= atOrAfterIndex\n get(trackById: any, atOrAfterIndex: number|null): IterableChangeRecord_<V>|null {\n let record: IterableChangeRecord_<V>|null;\n for (record = this._head; record !== null; record = record._nextDup) {\n if ((atOrAfterIndex === null || atOrAfterIndex <= record.currentIndex!) &&\n Object.is(record.trackById, trackById)) {\n return record;\n }\n }\n return null;\n }\n\n /**\n * Remove one {@link IterableChangeRecord_} from the list of duplicates.\n *\n * Returns whether the list of duplicates is empty.\n */\n remove(record: IterableChangeRecord_<V>): boolean {\n // TODO(vicb):\n // assert(() {\n // // verify that the record being removed is in the list.\n // for (IterableChangeRecord_ cursor = _head; cursor != null; cursor = cursor._nextDup) {\n // if (identical(cursor, record)) return true;\n // }\n // return false;\n //});\n\n const prev: IterableChangeRecord_<V>|null = record._prevDup;\n const next: IterableChangeRecord_<V>|null = record._nextDup;\n if (prev === null) {\n this._head = next;\n } else {\n prev._nextDup = next;\n }\n if (next === null) {\n this._tail = prev;\n } else {\n next._prevDup = prev;\n }\n return this._head === null;\n }\n}\n\nclass _DuplicateMap<V> {\n map = new Map<any, _DuplicateItemRecordList<V>>();\n\n put(record: IterableChangeRecord_<V>) {\n const key = record.trackById;\n\n let duplicates = this.map.get(key);\n if (!duplicates) {\n duplicates = new _DuplicateItemRecordList<V>();\n this.map.set(key, duplicates);\n }\n duplicates.add(record);\n }\n\n /**\n * Retrieve the `value` using key. Because the IterableChangeRecord_ value may be one which we\n * have already iterated over, we use the `atOrAfterIndex` to pretend it is not there.\n *\n * Use case: `[a, b, c, a, a]` if we are at index `3` which is the second `a` then asking if we\n * have any more `a`s needs to return the second `a`.\n */\n get(trackById: any, atOrAfterIndex: number|null): IterableChangeRecord_<V>|null {\n const key = trackById;\n const recordList = this.map.get(key);\n return recordList ? recordList.get(trackById, atOrAfterIndex) : null;\n }\n\n /**\n * Removes a {@link IterableChangeRecord_} from the list of duplicates.\n *\n * The list of duplicates also is removed from the map if it gets empty.\n */\n remove(record: IterableChangeRecord_<V>): IterableChangeRecord_<V> {\n const key = record.trackById;\n const recordList: _DuplicateItemRecordList<V> = this.map.get(key)!;\n // Remove the list of duplicates when it gets empty\n if (recordList.remove(record)) {\n this.map.delete(key);\n }\n return record;\n }\n\n get isEmpty(): boolean {\n return this.map.size === 0;\n }\n\n clear() {\n this.map.clear();\n }\n}\n\nfunction getPreviousIndex(item: any, addRemoveOffset: number, moveOffsets: number[]|null): number {\n const previousIndex = item.previousIndex;\n if (previousIndex === null) return previousIndex;\n let moveOffset = 0;\n if (moveOffsets && previousIndex < moveOffsets.length) {\n moveOffset = moveOffsets[previousIndex];\n }\n return previousIndex + addRemoveOffset + moveOffset;\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 {stringify} from '../../util/stringify';\nimport {isJsObject} from '../change_detection_util';\nimport {KeyValueChangeRecord, KeyValueChanges, KeyValueDiffer, KeyValueDifferFactory} from './keyvalue_differs';\n\n\nexport class DefaultKeyValueDifferFactory<K, V> implements KeyValueDifferFactory {\n constructor() {}\n supports(obj: any): boolean {\n return obj instanceof Map || isJsObject(obj);\n }\n\n create<K, V>(): KeyValueDiffer<K, V> {\n return new DefaultKeyValueDiffer<K, V>();\n }\n}\n\nexport class DefaultKeyValueDiffer<K, V> implements KeyValueDiffer<K, V>, KeyValueChanges<K, V> {\n private _records = new Map<K, KeyValueChangeRecord_<K, V>>();\n private _mapHead: KeyValueChangeRecord_<K, V>|null = null;\n // _appendAfter is used in the check loop\n private _appendAfter: KeyValueChangeRecord_<K, V>|null = null;\n private _previousMapHead: KeyValueChangeRecord_<K, V>|null = null;\n private _changesHead: KeyValueChangeRecord_<K, V>|null = null;\n private _changesTail: KeyValueChangeRecord_<K, V>|null = null;\n private _additionsHead: KeyValueChangeRecord_<K, V>|null = null;\n private _additionsTail: KeyValueChangeRecord_<K, V>|null = null;\n private _removalsHead: KeyValueChangeRecord_<K, V>|null = null;\n private _removalsTail: KeyValueChangeRecord_<K, V>|null = null;\n\n get isDirty(): boolean {\n return this._additionsHead !== null || this._changesHead !== null ||\n this._removalsHead !== null;\n }\n\n forEachItem(fn: (r: KeyValueChangeRecord<K, V>) => void) {\n let record: KeyValueChangeRecord_<K, V>|null;\n for (record = this._mapHead; record !== null; record = record._next) {\n fn(record);\n }\n }\n\n forEachPreviousItem(fn: (r: KeyValueChangeRecord<K, V>) => void) {\n let record: KeyValueChangeRecord_<K, V>|null;\n for (record = this._previousMapHead; record !== null; record = record._nextPrevious) {\n fn(record);\n }\n }\n\n forEachChangedItem(fn: (r: KeyValueChangeRecord<K, V>) => void) {\n let record: KeyValueChangeRecord_<K, V>|null;\n for (record = this._changesHead; record !== null; record = record._nextChanged) {\n fn(record);\n }\n }\n\n forEachAddedItem(fn: (r: KeyValueChangeRecord<K, V>) => void) {\n let record: KeyValueChangeRecord_<K, V>|null;\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n fn(record);\n }\n }\n\n forEachRemovedItem(fn: (r: KeyValueChangeRecord<K, V>) => void) {\n let record: KeyValueChangeRecord_<K, V>|null;\n for (record = this._removalsHead; record !== null; record = record._nextRemoved) {\n fn(record);\n }\n }\n\n diff(map?: Map<any, any>|{[k: string]: any}|null): any {\n if (!map) {\n map = new Map();\n } else if (!(map instanceof Map || isJsObject(map))) {\n throw new Error(\n `Error trying to diff '${stringify(map)}'. Only maps and objects are allowed`);\n }\n\n return this.check(map) ? this : null;\n }\n\n onDestroy() {}\n\n /**\n * Check the current state of the map vs the previous.\n * The algorithm is optimised for when the keys do no change.\n */\n check(map: Map<any, any>|{[k: string]: any}): boolean {\n this._reset();\n\n let insertBefore = this._mapHead;\n this._appendAfter = null;\n\n this._forEach(map, (value: any, key: any) => {\n if (insertBefore && insertBefore.key === key) {\n this._maybeAddToChanges(insertBefore, value);\n this._appendAfter = insertBefore;\n insertBefore = insertBefore._next;\n } else {\n const record = this._getOrCreateRecordForKey(key, value);\n insertBefore = this._insertBeforeOrAppend(insertBefore, record);\n }\n });\n\n // Items remaining at the end of the list have been deleted\n if (insertBefore) {\n if (insertBefore._prev) {\n insertBefore._prev._next = null;\n }\n\n this._removalsHead = insertBefore;\n\n for (let record: KeyValueChangeRecord_<K, V>|null = insertBefore; record !== null;\n record = record._nextRemoved) {\n if (record === this._mapHead) {\n this._mapHead = null;\n }\n this._records.delete(record.key);\n record._nextRemoved = record._next;\n record.previousValue = record.currentValue;\n record.currentValue = null;\n record._prev = null;\n record._next = null;\n }\n }\n\n // Make sure tails have no next records from previous runs\n if (this._changesTail) this._changesTail._nextChanged = null;\n if (this._additionsTail) this._additionsTail._nextAdded = null;\n\n return this.isDirty;\n }\n\n /**\n * Inserts a record before `before` or append at the end of the list when `before` is null.\n *\n * Notes:\n * - This method appends at `this._appendAfter`,\n * - This method updates `this._appendAfter`,\n * - The return value is the new value for the insertion pointer.\n */\n private _insertBeforeOrAppend(\n before: KeyValueChangeRecord_<K, V>|null,\n record: KeyValueChangeRecord_<K, V>): KeyValueChangeRecord_<K, V>|null {\n if (before) {\n const prev = before._prev;\n record._next = before;\n record._prev = prev;\n before._prev = record;\n if (prev) {\n prev._next = record;\n }\n if (before === this._mapHead) {\n this._mapHead = record;\n }\n\n this._appendAfter = before;\n return before;\n }\n\n if (this._appendAfter) {\n this._appendAfter._next = record;\n record._prev = this._appendAfter;\n } else {\n this._mapHead = record;\n }\n\n this._appendAfter = record;\n return null;\n }\n\n private _getOrCreateRecordForKey(key: K, value: V): KeyValueChangeRecord_<K, V> {\n if (this._records.has(key)) {\n const record = this._records.get(key)!;\n this._maybeAddToChanges(record, value);\n const prev = record._prev;\n const next = record._next;\n if (prev) {\n prev._next = next;\n }\n if (next) {\n next._prev = prev;\n }\n record._next = null;\n record._prev = null;\n\n return record;\n }\n\n const record = new KeyValueChangeRecord_<K, V>(key);\n this._records.set(key, record);\n record.currentValue = value;\n this._addToAdditions(record);\n return record;\n }\n\n /** @internal */\n _reset() {\n if (this.isDirty) {\n let record: KeyValueChangeRecord_<K, V>|null;\n // let `_previousMapHead` contain the state of the map before the changes\n this._previousMapHead = this._mapHead;\n for (record = this._previousMapHead; record !== null; record = record._next) {\n record._nextPrevious = record._next;\n }\n\n // Update `record.previousValue` with the value of the item before the changes\n // We need to update all changed items (that's those which have been added and changed)\n for (record = this._changesHead; record !== null; record = record._nextChanged) {\n record.previousValue = record.currentValue;\n }\n for (record = this._additionsHead; record != null; record = record._nextAdded) {\n record.previousValue = record.currentValue;\n }\n\n this._changesHead = this._changesTail = null;\n this._additionsHead = this._additionsTail = null;\n this._removalsHead = null;\n }\n }\n\n // Add the record or a given key to the list of changes only when the value has actually changed\n private _maybeAddToChanges(record: KeyValueChangeRecord_<K, V>, newValue: any): void {\n if (!Object.is(newValue, record.currentValue)) {\n record.previousValue = record.currentValue;\n record.currentValue = newValue;\n this._addToChanges(record);\n }\n }\n\n private _addToAdditions(record: KeyValueChangeRecord_<K, V>) {\n if (this._additionsHead === null) {\n this._additionsHead = this._additionsTail = record;\n } else {\n this._additionsTail!._nextAdded = record;\n this._additionsTail = record;\n }\n }\n\n private _addToChanges(record: KeyValueChangeRecord_<K, V>) {\n if (this._changesHead === null) {\n this._changesHead = this._changesTail = record;\n } else {\n this._changesTail!._nextChanged = record;\n this._changesTail = record;\n }\n }\n\n /** @internal */\n private _forEach<K, V>(obj: Map<K, V>|{[k: string]: V}, fn: (v: V, k: any) => void) {\n if (obj instanceof Map) {\n obj.forEach(fn);\n } else {\n Object.keys(obj).forEach(k => fn(obj[k], k));\n }\n }\n}\n\nclass KeyValueChangeRecord_<K, V> implements KeyValueChangeRecord<K, V> {\n previousValue: V|null = null;\n currentValue: V|null = null;\n\n /** @internal */\n _nextPrevious: KeyValueChangeRecord_<K, V>|null = null;\n /** @internal */\n _next: KeyValueChangeRecord_<K, V>|null = null;\n /** @internal */\n _prev: KeyValueChangeRecord_<K, V>|null = null;\n /** @internal */\n _nextAdded: KeyValueChangeRecord_<K, V>|null = null;\n /** @internal */\n _nextRemoved: KeyValueChangeRecord_<K, V>|null = null;\n /** @internal */\n _nextChanged: KeyValueChangeRecord_<K, V>|null = null;\n\n constructor(public key: K) {}\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 {ɵɵdefineInjectable} from '../../di/interface/defs';\nimport {StaticProvider} from '../../di/interface/provider';\nimport {Optional, SkipSelf} from '../../di/metadata';\nimport {DefaultIterableDifferFactory} from '../differs/default_iterable_differ';\n\n\n\n/**\n * A type describing supported iterable types.\n *\n * @publicApi\n */\nexport type NgIterable<T> = Array<T>|Iterable<T>;\n\n/**\n * A strategy for tracking changes over time to an iterable. Used by {@link NgForOf} to\n * respond to changes in an iterable by effecting equivalent changes in the DOM.\n *\n * @publicApi\n */\nexport interface IterableDiffer<V> {\n /**\n * Compute a difference between the previous state and the new `object` state.\n *\n * @param object containing the new value.\n * @returns an object describing the difference. The return value is only valid until the next\n * `diff()` invocation.\n */\n diff(object: NgIterable<V>|undefined|null): IterableChanges<V>|null;\n}\n\n/**\n * An object describing the changes in the `Iterable` collection since last time\n * `IterableDiffer#diff()` was invoked.\n *\n * @publicApi\n */\nexport interface IterableChanges<V> {\n /**\n * Iterate over all changes. `IterableChangeRecord` will contain information about changes\n * to each item.\n */\n forEachItem(fn: (record: IterableChangeRecord<V>) => void): void;\n\n /**\n * Iterate over a set of operations which when applied to the original `Iterable` will produce the\n * new `Iterable`.\n *\n * NOTE: These are not necessarily the actual operations which were applied to the original\n * `Iterable`, rather these are a set of computed operations which may not be the same as the\n * ones applied.\n *\n * @param record A change which needs to be applied\n * @param previousIndex The `IterableChangeRecord#previousIndex` of the `record` refers to the\n * original `Iterable` location, where as `previousIndex` refers to the transient location\n * of the item, after applying the operations up to this point.\n * @param currentIndex The `IterableChangeRecord#currentIndex` of the `record` refers to the\n * original `Iterable` location, where as `currentIndex` refers to the transient location\n * of the item, after applying the operations up to this point.\n */\n forEachOperation(\n fn:\n (record: IterableChangeRecord<V>, previousIndex: number|null,\n currentIndex: number|null) => void): void;\n\n /**\n * Iterate over changes in the order of original `Iterable` showing where the original items\n * have moved.\n */\n forEachPreviousItem(fn: (record: IterableChangeRecord<V>) => void): void;\n\n /** Iterate over all added items. */\n forEachAddedItem(fn: (record: IterableChangeRecord<V>) => void): void;\n\n /** Iterate over all moved items. */\n forEachMovedItem(fn: (record: IterableChangeRecord<V>) => void): void;\n\n /** Iterate over all removed items. */\n forEachRemovedItem(fn: (record: IterableChangeRecord<V>) => void): void;\n\n /**\n * Iterate over all items which had their identity (as computed by the `TrackByFunction`)\n * changed.\n */\n forEachIdentityChange(fn: (record: IterableChangeRecord<V>) => void): void;\n}\n\n/**\n * Record representing the item change information.\n *\n * @publicApi\n */\nexport interface IterableChangeRecord<V> {\n /** Current index of the item in `Iterable` or null if removed. */\n readonly currentIndex: number|null;\n\n /** Previous index of the item in `Iterable` or null if added. */\n readonly previousIndex: number|null;\n\n /** The item. */\n readonly item: V;\n\n /** Track by identity as computed by the `TrackByFunction`. */\n readonly trackById: any;\n}\n\n/**\n * A function optionally passed into the `NgForOf` directive to customize how `NgForOf` uniquely\n * identifies items in an iterable.\n *\n * `NgForOf` needs to uniquely identify items in the iterable to correctly perform DOM updates\n * when items in the iterable are reordered, new items are added, or existing items are removed.\n *\n *\n * In all of these scenarios it is usually desirable to only update the DOM elements associated\n * with the items affected by the change. This behavior is important to:\n *\n * - preserve any DOM-specific UI state (like cursor position, focus, text selection) when the\n * iterable is modified\n * - enable animation of item addition, removal, and iterable reordering\n * - preserve the value of the `<select>` element when nested `<option>` elements are dynamically\n * populated using `NgForOf` and the bound iterable is updated\n *\n * A common use for custom `trackBy` functions is when the model that `NgForOf` iterates over\n * contains a property with a unique identifier. For example, given a model:\n *\n * ```ts\n * class User {\n * id: number;\n * name: string;\n * ...\n * }\n * ```\n * a custom `trackBy` function could look like the following:\n * ```ts\n * function userTrackBy(index, user) {\n * return user.id;\n * }\n * ```\n *\n * A custom `trackBy` function must have several properties:\n *\n * - be [idempotent](https://en.wikipedia.org/wiki/Idempotence) (be without side effects, and always\n * return the same value for a given input)\n * - return unique value for all unique inputs\n * - be fast\n *\n * @see [`NgForOf#ngForTrackBy`](api/common/NgForOf#ngForTrackBy)\n * @publicApi\n */\nexport interface TrackByFunction<T> {\n // Note: the type parameter `U` enables more accurate template type checking in case a trackBy\n // function is declared using a base type of the iterated type. The `U` type gives TypeScript\n // additional freedom to infer a narrower type for the `item` parameter type, instead of imposing\n // the trackBy's declared item type as the inferred type for `T`.\n // See https://github.com/angular/angular/issues/40125\n\n /**\n * @param index The index of the item within the iterable.\n * @param item The item in the iterable.\n */\n <U extends T>(index: number, item: T&U): any;\n}\n\n/**\n * Provides a factory for {@link IterableDiffer}.\n *\n * @publicApi\n */\nexport interface IterableDifferFactory {\n supports(objects: any): boolean;\n create<V>(trackByFn?: TrackByFunction<V>): IterableDiffer<V>;\n}\n\nexport function defaultIterableDiffersFactory() {\n return new IterableDiffers([new DefaultIterableDifferFactory()]);\n}\n\n/**\n * A repository of different iterable diffing strategies used by NgFor, NgClass, and others.\n *\n * @publicApi\n */\nexport class IterableDiffers {\n /** @nocollapse */\n static ɵprov = /** @pureOrBreakMyCode */ ɵɵdefineInjectable(\n {token: IterableDiffers, providedIn: 'root', factory: defaultIterableDiffersFactory});\n\n /**\n * @deprecated v4.0.0 - Should be private\n */\n factories: IterableDifferFactory[];\n constructor(factories: IterableDifferFactory[]) {\n this.factories = factories;\n }\n\n static create(factories: IterableDifferFactory[], parent?: IterableDiffers): IterableDiffers {\n if (parent != null) {\n const copied = parent.factories.slice();\n factories = factories.concat(copied);\n }\n\n return new IterableDiffers(factories);\n }\n\n /**\n * Takes an array of {@link IterableDifferFactory} and returns a provider used to extend the\n * inherited {@link IterableDiffers} instance with the provided factories and return a new\n * {@link IterableDiffers} instance.\n *\n * @usageNotes\n * ### Example\n *\n * The following example shows how to extend an existing list of factories,\n * which will only be applied to the injector for this component and its children.\n * This step is all that's required to make a new {@link IterableDiffer} available.\n *\n * ```\n * @Component({\n * viewProviders: [\n * IterableDiffers.extend([new ImmutableListDiffer()])\n * ]\n * })\n * ```\n */\n static extend(factories: IterableDifferFactory[]): StaticProvider {\n return {\n provide: IterableDiffers,\n useFactory: (parent: IterableDiffers|null) => {\n // if parent is null, it means that we are in the root injector and we have just overridden\n // the default injection mechanism for IterableDiffers, in such a case just assume\n // `defaultIterableDiffersFactory`.\n return IterableDiffers.create(factories, parent || defaultIterableDiffersFactory());\n },\n // Dependency technically isn't optional, but we can provide a better error message this way.\n deps: [[IterableDiffers, new SkipSelf(), new Optional()]]\n };\n }\n\n find(iterable: any): IterableDifferFactory {\n const factory = this.factories.find(f => f.supports(iterable));\n if (factory != null) {\n return factory;\n } else {\n throw new Error(`Cannot find a differ supporting object '${iterable}' of type '${\n getTypeNameForDebugging(iterable)}'`);\n }\n }\n}\n\nexport function getTypeNameForDebugging(type: any): string {\n return type['name'] || typeof type;\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 {Optional, SkipSelf, StaticProvider, ɵɵdefineInjectable} from '../../di';\nimport {DefaultKeyValueDifferFactory} from './default_keyvalue_differ';\n\n\n/**\n * A differ that tracks changes made to an object over time.\n *\n * @publicApi\n */\nexport interface KeyValueDiffer<K, V> {\n /**\n * Compute a difference between the previous state and the new `object` state.\n *\n * @param object containing the new value.\n * @returns an object describing the difference. The return value is only valid until the next\n * `diff()` invocation.\n */\n diff(object: Map<K, V>): KeyValueChanges<K, V>|null;\n\n /**\n * Compute a difference between the previous state and the new `object` state.\n *\n * @param object containing the new value.\n * @returns an object describing the difference. The return value is only valid until the next\n * `diff()` invocation.\n */\n diff(object: {[key: string]: V}): KeyValueChanges<string, V>|null;\n // TODO(TS2.1): diff<KP extends string>(this: KeyValueDiffer<KP, V>, object: Record<KP, V>):\n // KeyValueDiffer<KP, V>;\n}\n\n/**\n * An object describing the changes in the `Map` or `{[k:string]: string}` since last time\n * `KeyValueDiffer#diff()` was invoked.\n *\n * @publicApi\n */\nexport interface KeyValueChanges<K, V> {\n /**\n * Iterate over all changes. `KeyValueChangeRecord` will contain information about changes\n * to each item.\n */\n forEachItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;\n\n /**\n * Iterate over changes in the order of original Map showing where the original items\n * have moved.\n */\n forEachPreviousItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;\n\n /**\n * Iterate over all keys for which values have changed.\n */\n forEachChangedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;\n\n /**\n * Iterate over all added items.\n */\n forEachAddedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;\n\n /**\n * Iterate over all removed items.\n */\n forEachRemovedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;\n}\n\n/**\n * Record representing the item change information.\n *\n * @publicApi\n */\nexport interface KeyValueChangeRecord<K, V> {\n /**\n * Current key in the Map.\n */\n readonly key: K;\n\n /**\n * Current value for the key or `null` if removed.\n */\n readonly currentValue: V|null;\n\n /**\n * Previous value for the key or `null` if added.\n */\n readonly previousValue: V|null;\n}\n\n/**\n * Provides a factory for {@link KeyValueDiffer}.\n *\n * @publicApi\n */\nexport interface KeyValueDifferFactory {\n /**\n * Test to see if the differ knows how to diff this kind of object.\n */\n supports(objects: any): boolean;\n\n /**\n * Create a `KeyValueDiffer`.\n */\n create<K, V>(): KeyValueDiffer<K, V>;\n}\n\nexport function defaultKeyValueDiffersFactory() {\n return new KeyValueDiffers([new DefaultKeyValueDifferFactory()]);\n}\n\n/**\n * A repository of different Map diffing strategies used by NgClass, NgStyle, and others.\n *\n * @publicApi\n */\nexport class KeyValueDiffers {\n /** @nocollapse */\n static ɵprov = /** @pureOrBreakMyCode */ ɵɵdefineInjectable(\n {token: KeyValueDiffers, providedIn: 'root', factory: defaultKeyValueDiffersFactory});\n\n /**\n * @deprecated v4.0.0 - Should be private.\n */\n factories: KeyValueDifferFactory[];\n\n constructor(factories: KeyValueDifferFactory[]) {\n this.factories = factories;\n }\n\n static create<S>(factories: KeyValueDifferFactory[], parent?: KeyValueDiffers): KeyValueDiffers {\n if (parent) {\n const copied = parent.factories.slice();\n factories = factories.concat(copied);\n }\n return new KeyValueDiffers(factories);\n }\n\n /**\n * Takes an array of {@link KeyValueDifferFactory} and returns a provider used to extend the\n * inherited {@link KeyValueDiffers} instance with the provided factories and return a new\n * {@link KeyValueDiffers} instance.\n *\n * @usageNotes\n * ### Example\n *\n * The following example shows how to extend an existing list of factories,\n * which will only be applied to the injector for this component and its children.\n * This step is all that's required to make a new {@link KeyValueDiffer} available.\n *\n * ```\n * @Component({\n * viewProviders: [\n * KeyValueDiffers.extend([new ImmutableMapDiffer()])\n * ]\n * })\n * ```\n */\n static extend<S>(factories: KeyValueDifferFactory[]): StaticProvider {\n return {\n provide: KeyValueDiffers,\n useFactory: (parent: KeyValueDiffers) => {\n // if parent is null, it means that we are in the root injector and we have just overridden\n // the default injection mechanism for KeyValueDiffers, in such a case just assume\n // `defaultKeyValueDiffersFactory`.\n return KeyValueDiffers.create(factories, parent || defaultKeyValueDiffersFactory());\n },\n // Dependency technically isn't optional, but we can provide a better error message this way.\n deps: [[KeyValueDiffers, new SkipSelf(), new Optional()]]\n };\n }\n\n find(kv: any): KeyValueDifferFactory {\n const factory = this.factories.find(f => f.supports(kv));\n if (factory) {\n return factory;\n }\n throw new Error(`Cannot find a differ supporting object '${kv}'`);\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 {assertParentView} from './assert';\nimport {icuContainerIterate} from './i18n/i18n_tree_shaking';\nimport {CONTAINER_HEADER_OFFSET} from './interfaces/container';\nimport {TIcuContainerNode, TNode, TNodeType} from './interfaces/node';\nimport {RNode} from './interfaces/renderer_dom';\nimport {isLContainer} from './interfaces/type_checks';\nimport {DECLARATION_COMPONENT_VIEW, LView, T_HOST, TVIEW, TView} from './interfaces/view';\nimport {assertTNodeType} from './node_assert';\nimport {getProjectionNodes} from './node_manipulation';\nimport {getLViewParent} from './util/view_traversal_utils';\nimport {unwrapRNode} from './util/view_utils';\n\n\n\nexport function collectNativeNodes(\n tView: TView, lView: LView, tNode: TNode|null, result: any[],\n isProjection: boolean = false): any[] {\n while (tNode !== null) {\n ngDevMode &&\n assertTNodeType(\n tNode,\n TNodeType.AnyRNode | TNodeType.AnyContainer | TNodeType.Projection | TNodeType.Icu);\n\n const lNode = lView[tNode.index];\n if (lNode !== null) {\n result.push(unwrapRNode(lNode));\n }\n\n // A given lNode can represent either a native node or a LContainer (when it is a host of a\n // ViewContainerRef). When we find a LContainer we need to descend into it to collect root nodes\n // from the views in this container.\n if (isLContainer(lNode)) {\n for (let i = CONTAINER_HEADER_OFFSET; i < lNode.length; i++) {\n const lViewInAContainer = lNode[i];\n const lViewFirstChildTNode = lViewInAContainer[TVIEW].firstChild;\n if (lViewFirstChildTNode !== null) {\n collectNativeNodes(\n lViewInAContainer[TVIEW], lViewInAContainer, lViewFirstChildTNode, result);\n }\n }\n }\n\n const tNodeType = tNode.type;\n if (tNodeType & TNodeType.ElementContainer) {\n collectNativeNodes(tView, lView, tNode.child, result);\n } else if (tNodeType & TNodeType.Icu) {\n const nextRNode = icuContainerIterate(tNode as TIcuContainerNode, lView);\n let rNode: RNode|null;\n while (rNode = nextRNode()) {\n result.push(rNode);\n }\n } else if (tNodeType & TNodeType.Projection) {\n const nodesInSlot = getProjectionNodes(lView, tNode);\n if (Array.isArray(nodesInSlot)) {\n result.push(...nodesInSlot);\n } else {\n const parentView = getLViewParent(lView[DECLARATION_COMPONENT_VIEW])!;\n ngDevMode && assertParentView(parentView);\n collectNativeNodes(parentView[TVIEW], parentView, nodesInSlot, result, true);\n }\n }\n tNode = isProjection ? tNode.projectionNext : tNode.next;\n }\n\n return result;\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 {ChangeDetectorRef as viewEngine_ChangeDetectorRef} from '../change_detection/change_detector_ref';\nimport {EmbeddedViewRef as viewEngine_EmbeddedViewRef, InternalViewRef as viewEngine_InternalViewRef, ViewRefTracker} from '../linker/view_ref';\nimport {removeFromArray} from '../util/array_utils';\nimport {assertEqual} from '../util/assert';\nimport {collectNativeNodes} from './collect_native_nodes';\nimport {checkNoChangesInRootView, checkNoChangesInternal, detectChangesInRootView, detectChangesInternal, markViewDirty, storeCleanupWithContext} from './instructions/shared';\nimport {CONTAINER_HEADER_OFFSET, VIEW_REFS} from './interfaces/container';\nimport {isLContainer} from './interfaces/type_checks';\nimport {CONTEXT, FLAGS, LView, LViewFlags, PARENT, TVIEW} from './interfaces/view';\nimport {destroyLView, detachView, renderDetachView} from './node_manipulation';\n\n\n\n// Needed due to tsickle downleveling where multiple `implements` with classes creates\n// multiple @extends in Closure annotations, which is illegal. This workaround fixes\n// the multiple @extends by making the annotation @implements instead\nexport interface viewEngine_ChangeDetectorRef_interface extends viewEngine_ChangeDetectorRef {}\n\nexport class ViewRef<T> implements viewEngine_EmbeddedViewRef<T>, viewEngine_InternalViewRef,\n viewEngine_ChangeDetectorRef_interface {\n private _appRef: ViewRefTracker|null = null;\n private _attachedToViewContainer = false;\n\n get rootNodes(): any[] {\n const lView = this._lView;\n const tView = lView[TVIEW];\n return collectNativeNodes(tView, lView, tView.firstChild, []);\n }\n\n constructor(\n /**\n * This represents `LView` associated with the component when ViewRef is a ChangeDetectorRef.\n *\n * When ViewRef is created for a dynamic component, this also represents the `LView` for the\n * component.\n *\n * For a \"regular\" ViewRef created for an embedded view, this is the `LView` for the embedded\n * view.\n *\n * @internal\n */\n public _lView: LView,\n\n /**\n * This represents the `LView` associated with the point where `ChangeDetectorRef` was\n * requested.\n *\n * This may be different from `_lView` if the `_cdRefInjectingView` is an embedded view.\n */\n private _cdRefInjectingView?: LView) {}\n\n get context(): T {\n return this._lView[CONTEXT] as T;\n }\n\n set context(value: T) {\n this._lView[CONTEXT] = value;\n }\n\n get destroyed(): boolean {\n return (this._lView[FLAGS] & LViewFlags.Destroyed) === LViewFlags.Destroyed;\n }\n\n destroy(): void {\n if (this._appRef) {\n this._appRef.detachView(this);\n } else if (this._attachedToViewContainer) {\n const parent = this._lView[PARENT];\n if (isLContainer(parent)) {\n const viewRefs = parent[VIEW_REFS] as ViewRef<unknown>[] | null;\n const index = viewRefs ? viewRefs.indexOf(this) : -1;\n if (index > -1) {\n ngDevMode &&\n assertEqual(\n index, parent.indexOf(this._lView) - CONTAINER_HEADER_OFFSET,\n 'An attached view should be in the same position within its container as its ViewRef in the VIEW_REFS array.');\n detachView(parent, index);\n removeFromArray(viewRefs!, index);\n }\n }\n this._attachedToViewContainer = false;\n }\n destroyLView(this._lView[TVIEW], this._lView);\n }\n\n onDestroy(callback: Function) {\n storeCleanupWithContext(this._lView[TVIEW], this._lView, null, callback);\n }\n\n /**\n * Marks a view and all of its ancestors dirty.\n *\n * This can be used to ensure an {@link ChangeDetectionStrategy#OnPush OnPush} component is\n * checked when it needs to be re-rendered but the two normal triggers haven't marked it\n * dirty (i.e. inputs haven't changed and events haven't fired in the view).\n *\n * <!-- TODO: Add a link to a chapter on OnPush components -->\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Component({\n * selector: 'app-root',\n * template: `Number of ticks: {{numberOfTicks}}`\n * changeDetection: ChangeDetectionStrategy.OnPush,\n * })\n * class AppComponent {\n * numberOfTicks = 0;\n *\n * constructor(private ref: ChangeDetectorRef) {\n * setInterval(() => {\n * this.numberOfTicks++;\n * // the following is required, otherwise the view will not be updated\n * this.ref.markForCheck();\n * }, 1000);\n * }\n * }\n * ```\n */\n markForCheck(): void {\n markViewDirty(this._cdRefInjectingView || this._lView);\n }\n\n /**\n * Detaches the view from the change detection tree.\n *\n * Detached views will not be checked during change detection runs until they are\n * re-attached, even if they are dirty. `detach` can be used in combination with\n * {@link ChangeDetectorRef#detectChanges detectChanges} to implement local change\n * detection checks.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n *\n * @usageNotes\n * ### Example\n *\n * The following example defines a component with a large list of readonly data.\n * Imagine the data changes constantly, many times per second. For performance reasons,\n * we want to check and update the list every five seconds. We can do that by detaching\n * the component's change detector and doing a local check every five seconds.\n *\n * ```typescript\n * class DataProvider {\n * // in a real application the returned data will be different every time\n * get data() {\n * return [1,2,3,4,5];\n * }\n * }\n *\n * @Component({\n * selector: 'giant-list',\n * template: `\n * <li *ngFor=\"let d of dataProvider.data\">Data {{d}}</li>\n * `,\n * })\n * class GiantList {\n * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {\n * ref.detach();\n * setInterval(() => {\n * this.ref.detectChanges();\n * }, 5000);\n * }\n * }\n *\n * @Component({\n * selector: 'app',\n * providers: [DataProvider],\n * template: `\n * <giant-list><giant-list>\n * `,\n * })\n * class App {\n * }\n * ```\n */\n detach(): void {\n this._lView[FLAGS] &= ~LViewFlags.Attached;\n }\n\n /**\n * Re-attaches a view to the change detection tree.\n *\n * This can be used to re-attach views that were previously detached from the tree\n * using {@link ChangeDetectorRef#detach detach}. Views are attached to the tree by default.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n *\n * @usageNotes\n * ### Example\n *\n * The following example creates a component displaying `live` data. The component will detach\n * its change detector from the main change detector tree when the component's live property\n * is set to false.\n *\n * ```typescript\n * class DataProvider {\n * data = 1;\n *\n * constructor() {\n * setInterval(() => {\n * this.data = this.data * 2;\n * }, 500);\n * }\n * }\n *\n * @Component({\n * selector: 'live-data',\n * inputs: ['live'],\n * template: 'Data: {{dataProvider.data}}'\n * })\n * class LiveData {\n * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {}\n *\n * set live(value) {\n * if (value) {\n * this.ref.reattach();\n * } else {\n * this.ref.detach();\n * }\n * }\n * }\n *\n * @Component({\n * selector: 'app-root',\n * providers: [DataProvider],\n * template: `\n * Live Update: <input type=\"checkbox\" [(ngModel)]=\"live\">\n * <live-data [live]=\"live\"><live-data>\n * `,\n * })\n * class AppComponent {\n * live = true;\n * }\n * ```\n */\n reattach(): void {\n this._lView[FLAGS] |= LViewFlags.Attached;\n }\n\n /**\n * Checks the view and its children.\n *\n * This can also be used in combination with {@link ChangeDetectorRef#detach detach} to implement\n * local change detection checks.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n *\n * @usageNotes\n * ### Example\n *\n * The following example defines a component with a large list of readonly data.\n * Imagine, the data changes constantly, many times per second. For performance reasons,\n * we want to check and update the list every five seconds.\n *\n * We can do that by detaching the component's change detector and doing a local change detection\n * check every five seconds.\n *\n * See {@link ChangeDetectorRef#detach detach} for more information.\n */\n detectChanges(): void {\n detectChangesInternal(this._lView[TVIEW], this._lView, this.context);\n }\n\n /**\n * Checks the change detector and its children, and throws if any changes are detected.\n *\n * This is used in development mode to verify that running change detection doesn't\n * introduce other changes.\n */\n checkNoChanges(): void {\n checkNoChangesInternal(this._lView[TVIEW], this._lView, this.context);\n }\n\n attachToViewContainerRef() {\n if (this._appRef) {\n throw new Error('This view is already attached directly to the ApplicationRef!');\n }\n this._attachedToViewContainer = true;\n }\n\n detachFromAppRef() {\n this._appRef = null;\n renderDetachView(this._lView[TVIEW], this._lView);\n }\n\n attachToAppRef(appRef: ViewRefTracker) {\n if (this._attachedToViewContainer) {\n throw new Error('This view is already attached to a ViewContainer!');\n }\n this._appRef = appRef;\n }\n}\n\n/** @internal */\nexport class RootViewRef<T> extends ViewRef<T> {\n constructor(public _view: LView) {\n super(_view);\n }\n\n override detectChanges(): void {\n detectChangesInRootView(this._view);\n }\n\n override checkNoChanges(): void {\n checkNoChangesInRootView(this._view);\n }\n\n override get context(): T {\n return null!;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectFlags} from '../di';\nimport {InternalInjectFlags} from '../di/interface/injector';\nimport {TNode, TNodeType} from '../render3/interfaces/node';\nimport {isComponentHost} from '../render3/interfaces/type_checks';\nimport {DECLARATION_COMPONENT_VIEW, LView} from '../render3/interfaces/view';\nimport {getCurrentTNode, getLView} from '../render3/state';\nimport {getComponentLViewByIndex} from '../render3/util/view_utils';\nimport {ViewRef as R3_ViewRef} from '../render3/view_ref';\nimport {noop} from '../util/noop';\n\nexport const SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__ = injectChangeDetectorRef;\nconst SWITCH_CHANGE_DETECTOR_REF_FACTORY__PRE_R3__ = noop;\nconst SWITCH_CHANGE_DETECTOR_REF_FACTORY: typeof injectChangeDetectorRef =\n SWITCH_CHANGE_DETECTOR_REF_FACTORY__PRE_R3__;\n\n/**\n * Base class that provides change detection functionality.\n * A change-detection tree collects all views that are to be checked for changes.\n * Use the methods to add and remove views from the tree, initiate change-detection,\n * and explicitly mark views as _dirty_, meaning that they have changed and need to be re-rendered.\n *\n * @see [Using change detection hooks](guide/lifecycle-hooks#using-change-detection-hooks)\n * @see [Defining custom change detection](guide/lifecycle-hooks#defining-custom-change-detection)\n *\n * @usageNotes\n *\n * The following examples demonstrate how to modify default change-detection behavior\n * to perform explicit detection when needed.\n *\n * ### Use `markForCheck()` with `CheckOnce` strategy\n *\n * The following example sets the `OnPush` change-detection strategy for a component\n * (`CheckOnce`, rather than the default `CheckAlways`), then forces a second check\n * after an interval. See [live demo](https://plnkr.co/edit/GC512b?p=preview).\n *\n * <code-example path=\"core/ts/change_detect/change-detection.ts\"\n * region=\"mark-for-check\"></code-example>\n *\n * ### Detach change detector to limit how often check occurs\n *\n * The following example defines a component with a large list of read-only data\n * that is expected to change constantly, many times per second.\n * To improve performance, we want to check and update the list\n * less often than the changes actually occur. To do that, we detach\n * the component's change detector and perform an explicit local check every five seconds.\n *\n * <code-example path=\"core/ts/change_detect/change-detection.ts\" region=\"detach\"></code-example>\n *\n *\n * ### Reattaching a detached component\n *\n * The following example creates a component displaying live data.\n * The component detaches its change detector from the main change detector tree\n * when the `live` property is set to false, and reattaches it when the property\n * becomes true.\n *\n * <code-example path=\"core/ts/change_detect/change-detection.ts\" region=\"reattach\"></code-example>\n *\n * @publicApi\n */\nexport abstract class ChangeDetectorRef {\n /**\n * When a view uses the {@link ChangeDetectionStrategy#OnPush OnPush} (checkOnce)\n * change detection strategy, explicitly marks the view as changed so that\n * it can be checked again.\n *\n * Components are normally marked as dirty (in need of rerendering) when inputs\n * have changed or events have fired in the view. Call this method to ensure that\n * a component is checked even if these triggers have not occured.\n *\n * <!-- TODO: Add a link to a chapter on OnPush components -->\n *\n */\n abstract markForCheck(): void;\n\n /**\n * Detaches this view from the change-detection tree.\n * A detached view is not checked until it is reattached.\n * Use in combination with `detectChanges()` to implement local change detection checks.\n *\n * Detached views are not checked during change detection runs until they are\n * re-attached, even if they are marked as dirty.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n *\n */\n abstract detach(): void;\n\n /**\n * Checks this view and its children. Use in combination with {@link ChangeDetectorRef#detach\n * detach}\n * to implement local change detection checks.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n *\n */\n abstract detectChanges(): void;\n\n /**\n * Checks the change detector and its children, and throws if any changes are detected.\n *\n * Use in development mode to verify that running change detection doesn't introduce\n * other changes.\n */\n abstract checkNoChanges(): void;\n\n /**\n * Re-attaches the previously detached view to the change detection tree.\n * Views are attached to the tree by default.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n *\n */\n abstract reattach(): void;\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__:\n (flags: InjectFlags) => ChangeDetectorRef = SWITCH_CHANGE_DETECTOR_REF_FACTORY;\n}\n\n\n\n/** Returns a ChangeDetectorRef (a.k.a. a ViewRef) */\nexport function injectChangeDetectorRef(flags: InjectFlags): ChangeDetectorRef {\n return createViewRef(\n getCurrentTNode()!, getLView(),\n (flags & InternalInjectFlags.ForPipe) === InternalInjectFlags.ForPipe);\n}\n\n/**\n * Creates a ViewRef and stores it on the injector as ChangeDetectorRef (public alias).\n *\n * @param tNode The node that is requesting a ChangeDetectorRef\n * @param lView The view to which the node belongs\n * @param isPipe Whether the view is being injected into a pipe.\n * @returns The ChangeDetectorRef to use\n */\nfunction createViewRef(tNode: TNode, lView: LView, isPipe: boolean): ChangeDetectorRef {\n if (isComponentHost(tNode) && !isPipe) {\n // The LView represents the location where the component is declared.\n // Instead we want the LView for the component View and so we need to look it up.\n const componentView = getComponentLViewByIndex(tNode.index, lView); // look down\n return new R3_ViewRef(componentView, componentView);\n } else if (tNode.type & (TNodeType.AnyRNode | TNodeType.AnyContainer | TNodeType.Icu)) {\n // The LView represents the location where the injection is requested from.\n // We need to locate the containing LView (in case where the `lView` is an embedded view)\n const hostComponentView = lView[DECLARATION_COMPONENT_VIEW]; // look up\n return new R3_ViewRef(hostComponentView, lView);\n }\n return null!;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {DefaultIterableDifferFactory} from './differs/default_iterable_differ';\nimport {DefaultKeyValueDifferFactory} from './differs/default_keyvalue_differ';\nimport {IterableDifferFactory, IterableDiffers} from './differs/iterable_differs';\nimport {KeyValueDifferFactory, KeyValueDiffers} from './differs/keyvalue_differs';\n\nexport {SimpleChange, SimpleChanges} from '../interface/simple_change';\nexport {devModeEqual, WrappedValue} from './change_detection_util';\nexport {ChangeDetectorRef} from './change_detector_ref';\nexport {ChangeDetectionStrategy, ChangeDetectorStatus, isDefaultChangeDetectionStrategy} from './constants';\nexport {DefaultIterableDifferFactory} from './differs/default_iterable_differ';\nexport {DefaultIterableDiffer} from './differs/default_iterable_differ';\nexport {DefaultKeyValueDifferFactory} from './differs/default_keyvalue_differ';\nexport {IterableChangeRecord, IterableChanges, IterableDiffer, IterableDifferFactory, IterableDiffers, NgIterable, TrackByFunction} from './differs/iterable_differs';\nexport {KeyValueChangeRecord, KeyValueChanges, KeyValueDiffer, KeyValueDifferFactory, KeyValueDiffers} from './differs/keyvalue_differs';\nexport {PipeTransform} from './pipe_transform';\n\n\n\n/**\n * Structural diffing for `Object`s and `Map`s.\n */\nconst keyValDiff: KeyValueDifferFactory[] = [new DefaultKeyValueDifferFactory()];\n\n/**\n * Structural diffing for `Iterable` types such as `Array`s.\n */\nconst iterableDiff: IterableDifferFactory[] = [new DefaultIterableDifferFactory()];\n\nexport const defaultIterableDiffers = new IterableDiffers(iterableDiff);\n\nexport const defaultKeyValueDiffers = new KeyValueDiffers(keyValDiff);\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 {assertLContainer} from '../render3/assert';\nimport {createLView, renderView} from '../render3/instructions/shared';\nimport {TContainerNode, TNode, TNodeType} from '../render3/interfaces/node';\nimport {DECLARATION_LCONTAINER, LView, LViewFlags, QUERIES, TView} from '../render3/interfaces/view';\nimport {getCurrentTNode, getLView} from '../render3/state';\nimport {ViewRef as R3_ViewRef} from '../render3/view_ref';\nimport {assertDefined} from '../util/assert';\nimport {noop} from '../util/noop';\nimport {createElementRef, ElementRef} from './element_ref';\nimport {EmbeddedViewRef} from './view_ref';\n\n\n\nexport const SWITCH_TEMPLATE_REF_FACTORY__POST_R3__ = injectTemplateRef;\nconst SWITCH_TEMPLATE_REF_FACTORY__PRE_R3__ = noop;\nconst SWITCH_TEMPLATE_REF_FACTORY: typeof injectTemplateRef = SWITCH_TEMPLATE_REF_FACTORY__PRE_R3__;\n\n/**\n * Represents an embedded template that can be used to instantiate embedded views.\n * To instantiate embedded views based on a template, use the `ViewContainerRef`\n * method `createEmbeddedView()`.\n *\n * Access a `TemplateRef` instance by placing a directive on an `<ng-template>`\n * element (or directive prefixed with `*`). The `TemplateRef` for the embedded view\n * is injected into the constructor of the directive,\n * using the `TemplateRef` token.\n *\n * You can also use a `Query` to find a `TemplateRef` associated with\n * a component or a directive.\n *\n * @see `ViewContainerRef`\n * @see [Navigate the Component Tree with DI](guide/dependency-injection-navtree)\n *\n * @publicApi\n */\nexport abstract class TemplateRef<C> {\n /**\n * The anchor element in the parent view for this embedded view.\n *\n * The data-binding and injection contexts of embedded views created from this `TemplateRef`\n * inherit from the contexts of this location.\n *\n * Typically new embedded views are attached to the view container of this location, but in\n * advanced use-cases, the view can be attached to a different container while keeping the\n * data-binding and injection context from the original location.\n *\n */\n // TODO(i): rename to anchor or location\n abstract get elementRef(): ElementRef;\n\n /**\n * Instantiates an embedded view based on this template,\n * and attaches it to the view container.\n * @param context The data-binding context of the embedded view, as declared\n * in the `<ng-template>` usage.\n * @returns The new embedded view object.\n */\n abstract createEmbeddedView(context: C): EmbeddedViewRef<C>;\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__: () => TemplateRef<any>| null = SWITCH_TEMPLATE_REF_FACTORY;\n}\n\nconst ViewEngineTemplateRef = TemplateRef;\n\nconst R3TemplateRef = class TemplateRef<T> extends ViewEngineTemplateRef<T> {\n constructor(\n private _declarationLView: LView, private _declarationTContainer: TContainerNode,\n public elementRef: ElementRef) {\n super();\n }\n\n override createEmbeddedView(context: T): EmbeddedViewRef<T> {\n const embeddedTView = this._declarationTContainer.tViews as TView;\n const embeddedLView = createLView(\n this._declarationLView, embeddedTView, context, LViewFlags.CheckAlways, null,\n embeddedTView.declTNode, null, null, null, null);\n\n const declarationLContainer = this._declarationLView[this._declarationTContainer.index];\n ngDevMode && assertLContainer(declarationLContainer);\n embeddedLView[DECLARATION_LCONTAINER] = declarationLContainer;\n\n const declarationViewLQueries = this._declarationLView[QUERIES];\n if (declarationViewLQueries !== null) {\n embeddedLView[QUERIES] = declarationViewLQueries.createEmbeddedView(embeddedTView);\n }\n\n renderView(embeddedTView, embeddedLView, context);\n\n return new R3_ViewRef<T>(embeddedLView);\n }\n};\n\n/**\n * Creates a TemplateRef given a node.\n *\n * @returns The TemplateRef instance to use\n */\nexport function injectTemplateRef<T>(): TemplateRef<T>|null {\n return createTemplateRef<T>(getCurrentTNode()!, getLView());\n}\n\n/**\n * Creates a TemplateRef and stores it on the injector.\n *\n * @param hostTNode The node on which a TemplateRef is requested\n * @param hostLView The `LView` to which the node belongs\n * @returns The TemplateRef instance or null if we can't create a TemplateRef on a given node type\n */\nexport function createTemplateRef<T>(hostTNode: TNode, hostLView: LView): TemplateRef<T>|null {\n if (hostTNode.type & TNodeType.Container) {\n ngDevMode && assertDefined(hostTNode.tViews, 'TView must be allocated');\n return new R3TemplateRef(\n hostLView, hostTNode as TContainerNode, createElementRef(hostTNode, hostLView));\n }\n return null;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '../di/injector';\nimport {Type} from '../interface/type';\n\nimport {ComponentFactoryResolver} from './component_factory_resolver';\n\n\n/**\n * Represents an instance of an `NgModule` created by an `NgModuleFactory`.\n * Provides access to the `NgModule` instance and related objects.\n *\n * @publicApi\n */\nexport abstract class NgModuleRef<T> {\n /**\n * The injector that contains all of the providers of the `NgModule`.\n */\n abstract get injector(): Injector;\n\n /**\n * The resolver that can retrieve the component factories\n * declared in the `entryComponents` property of the module.\n */\n abstract get componentFactoryResolver(): ComponentFactoryResolver;\n\n /**\n * The `NgModule` instance.\n */\n abstract get instance(): T;\n\n /**\n * Destroys the module instance and all of the data structures associated with it.\n */\n abstract destroy(): void;\n\n /**\n * Registers a callback to be executed when the module is destroyed.\n */\n abstract onDestroy(callback: () => void): void;\n}\n\nexport interface InternalNgModuleRef<T> extends NgModuleRef<T> {\n // Note: we are using the prefix _ as NgModuleData is an NgModuleRef and therefore directly\n // exposed to the user.\n _bootstrapComponents: Type<any>[];\n}\n\n/**\n * @publicApi\n */\nexport abstract class NgModuleFactory<T> {\n abstract get moduleType(): Type<T>;\n abstract create(parentInjector: Injector|null): NgModuleRef<T>;\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 '../di/injector';\nimport {assertNodeInjector} from '../render3/assert';\nimport {getParentInjectorLocation, NodeInjector} from '../render3/di';\nimport {addToViewTree, createLContainer} from '../render3/instructions/shared';\nimport {CONTAINER_HEADER_OFFSET, LContainer, NATIVE, VIEW_REFS} from '../render3/interfaces/container';\nimport {NodeInjectorOffset} from '../render3/interfaces/injector';\nimport {TContainerNode, TDirectiveHostNode, TElementContainerNode, TElementNode, TNodeType} from '../render3/interfaces/node';\nimport {RComment, RElement} from '../render3/interfaces/renderer_dom';\nimport {isLContainer} from '../render3/interfaces/type_checks';\nimport {LView, PARENT, RENDERER, T_HOST, TVIEW} from '../render3/interfaces/view';\nimport {assertTNodeType} from '../render3/node_assert';\nimport {addViewToContainer, destroyLView, detachView, getBeforeNodeForView, insertView, nativeInsertBefore, nativeNextSibling, nativeParentNode} from '../render3/node_manipulation';\nimport {getCurrentTNode, getLView} from '../render3/state';\nimport {getParentInjectorIndex, getParentInjectorView, hasParentInjector} from '../render3/util/injector_utils';\nimport {getNativeByTNode, unwrapRNode, viewAttachedToContainer} from '../render3/util/view_utils';\nimport {ViewRef as R3ViewRef} from '../render3/view_ref';\nimport {addToArray, removeFromArray} from '../util/array_utils';\nimport {assertEqual, assertGreaterThan, assertLessThan} from '../util/assert';\nimport {noop} from '../util/noop';\nimport {ComponentFactory, ComponentRef} from './component_factory';\nimport {createElementRef, ElementRef} from './element_ref';\nimport {NgModuleRef} from './ng_module_factory';\nimport {TemplateRef} from './template_ref';\nimport {EmbeddedViewRef, ViewRef} from './view_ref';\n\n\nexport const SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__ = injectViewContainerRef;\nconst SWITCH_VIEW_CONTAINER_REF_FACTORY__PRE_R3__ = noop as typeof injectViewContainerRef;\nconst SWITCH_VIEW_CONTAINER_REF_FACTORY: typeof injectViewContainerRef =\n SWITCH_VIEW_CONTAINER_REF_FACTORY__PRE_R3__;\n\n/**\n * Represents a container where one or more views can be attached to a component.\n *\n * Can contain *host views* (created by instantiating a\n * component with the `createComponent()` method), and *embedded views*\n * (created by instantiating a `TemplateRef` with the `createEmbeddedView()` method).\n *\n * A view container instance can contain other view containers,\n * creating a [view hierarchy](guide/glossary#view-tree).\n *\n * @see `ComponentRef`\n * @see `EmbeddedViewRef`\n *\n * @publicApi\n */\nexport abstract class ViewContainerRef {\n /**\n * Anchor element that specifies the location of this container in the containing view.\n * Each view container can have only one anchor element, and each anchor element\n * can have only a single view container.\n *\n * Root elements of views attached to this container become siblings of the anchor element in\n * the rendered view.\n *\n * Access the `ViewContainerRef` of an element by placing a `Directive` injected\n * with `ViewContainerRef` on the element, or use a `ViewChild` query.\n *\n * <!-- TODO: rename to anchorElement -->\n */\n abstract get element(): ElementRef;\n\n /**\n * The [dependency injector](guide/glossary#injector) for this view container.\n */\n abstract get injector(): Injector;\n\n /** @deprecated No replacement */\n abstract get parentInjector(): Injector;\n\n /**\n * Destroys all views in this container.\n */\n abstract clear(): void;\n\n /**\n * Retrieves a view from this container.\n * @param index The 0-based index of the view to retrieve.\n * @returns The `ViewRef` instance, or null if the index is out of range.\n */\n abstract get(index: number): ViewRef|null;\n\n /**\n * Reports how many views are currently attached to this container.\n * @returns The number of views.\n */\n abstract get length(): number;\n\n /**\n * Instantiates an embedded view and inserts it\n * into this container.\n * @param templateRef The HTML template that defines the view.\n * @param context The data-binding context of the embedded view, as declared\n * in the `<ng-template>` usage.\n * @param index The 0-based index at which to insert the new view into this container.\n * If not specified, appends the new view as the last entry.\n *\n * @returns The `ViewRef` instance for the newly created view.\n */\n abstract createEmbeddedView<C>(templateRef: TemplateRef<C>, context?: C, index?: number):\n EmbeddedViewRef<C>;\n\n /**\n * Instantiates a single component and inserts its host view into this container.\n *\n * @param componentFactory The factory to use.\n * @param index The index at which to insert the new component's host view into this container.\n * If not specified, appends the new view as the last entry.\n * @param injector The injector to use as the parent for the new component.\n * @param projectableNodes\n * @param ngModule\n *\n * @returns The new component instance, containing the host view.\n *\n */\n abstract createComponent<C>(\n componentFactory: ComponentFactory<C>, index?: number, injector?: Injector,\n projectableNodes?: any[][], ngModule?: NgModuleRef<any>): ComponentRef<C>;\n\n /**\n * Inserts a view into this container.\n * @param viewRef The view to insert.\n * @param index The 0-based index at which to insert the view.\n * If not specified, appends the new view as the last entry.\n * @returns The inserted `ViewRef` instance.\n *\n */\n abstract insert(viewRef: ViewRef, index?: number): ViewRef;\n\n /**\n * Moves a view to a new location in this container.\n * @param viewRef The view to move.\n * @param index The 0-based index of the new location.\n * @returns The moved `ViewRef` instance.\n */\n abstract move(viewRef: ViewRef, currentIndex: number): ViewRef;\n\n /**\n * Returns the index of a view within the current container.\n * @param viewRef The view to query.\n * @returns The 0-based index of the view's position in this container,\n * or `-1` if this container doesn't contain the view.\n */\n abstract indexOf(viewRef: ViewRef): number;\n\n /**\n * Destroys a view attached to this container\n * @param index The 0-based index of the view to destroy.\n * If not specified, the last view in the container is removed.\n */\n abstract remove(index?: number): void;\n\n /**\n * Detaches a view from this container without destroying it.\n * Use along with `insert()` to move a view within the current container.\n * @param index The 0-based index of the view to detach.\n * If not specified, the last view in the container is detached.\n */\n abstract detach(index?: number): ViewRef|null;\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__: () => ViewContainerRef = SWITCH_VIEW_CONTAINER_REF_FACTORY;\n}\n\n/**\n * Creates a ViewContainerRef and stores it on the injector. Or, if the ViewContainerRef\n * already exists, retrieves the existing ViewContainerRef.\n *\n * @returns The ViewContainerRef instance to use\n */\nexport function injectViewContainerRef(): ViewContainerRef {\n const previousTNode = getCurrentTNode() as TElementNode | TElementContainerNode | TContainerNode;\n return createContainerRef(previousTNode, getLView());\n}\n\nconst VE_ViewContainerRef = ViewContainerRef;\n\nconst R3ViewContainerRef = class ViewContainerRef extends VE_ViewContainerRef {\n constructor(\n private _lContainer: LContainer,\n private _hostTNode: TElementNode|TContainerNode|TElementContainerNode,\n private _hostLView: LView) {\n super();\n }\n\n override get element(): ElementRef {\n return createElementRef(this._hostTNode, this._hostLView);\n }\n\n override get injector(): Injector {\n return new NodeInjector(this._hostTNode, this._hostLView);\n }\n\n /** @deprecated No replacement */\n override get parentInjector(): Injector {\n const parentLocation = getParentInjectorLocation(this._hostTNode, this._hostLView);\n if (hasParentInjector(parentLocation)) {\n const parentView = getParentInjectorView(parentLocation, this._hostLView);\n const injectorIndex = getParentInjectorIndex(parentLocation);\n ngDevMode && assertNodeInjector(parentView, injectorIndex);\n const parentTNode =\n parentView[TVIEW].data[injectorIndex + NodeInjectorOffset.TNODE] as TElementNode;\n return new NodeInjector(parentTNode, parentView);\n } else {\n return new NodeInjector(null, this._hostLView);\n }\n }\n\n override clear(): void {\n while (this.length > 0) {\n this.remove(this.length - 1);\n }\n }\n\n override get(index: number): ViewRef|null {\n const viewRefs = getViewRefs(this._lContainer);\n return viewRefs !== null && viewRefs[index] || null;\n }\n\n override get length(): number {\n return this._lContainer.length - CONTAINER_HEADER_OFFSET;\n }\n\n override createEmbeddedView<C>(templateRef: TemplateRef<C>, context?: C, index?: number):\n EmbeddedViewRef<C> {\n const viewRef = templateRef.createEmbeddedView(context || <any>{});\n this.insert(viewRef, index);\n return viewRef;\n }\n\n override createComponent<C>(\n componentFactory: ComponentFactory<C>, index?: number|undefined,\n injector?: Injector|undefined, projectableNodes?: any[][]|undefined,\n ngModuleRef?: NgModuleRef<any>|undefined): ComponentRef<C> {\n const contextInjector = injector || this.parentInjector;\n if (!ngModuleRef && (componentFactory as any).ngModule == null && contextInjector) {\n // DO NOT REFACTOR. The code here used to have a `value || undefined` expression\n // which seems to cause internal google apps to fail. This is documented in the\n // following internal bug issue: go/b/142967802\n const result = contextInjector.get(NgModuleRef, null);\n if (result) {\n ngModuleRef = result;\n }\n }\n\n const componentRef =\n componentFactory.create(contextInjector, projectableNodes, undefined, ngModuleRef);\n this.insert(componentRef.hostView, index);\n return componentRef;\n }\n\n override insert(viewRef: ViewRef, index?: number): ViewRef {\n const lView = (viewRef as R3ViewRef<any>)._lView!;\n const tView = lView[TVIEW];\n\n if (ngDevMode && viewRef.destroyed) {\n throw new Error('Cannot insert a destroyed View in a ViewContainer!');\n }\n\n if (viewAttachedToContainer(lView)) {\n // If view is already attached, detach it first so we clean up references appropriately.\n\n const prevIdx = this.indexOf(viewRef);\n\n // A view might be attached either to this or a different container. The `prevIdx` for\n // those cases will be:\n // equal to -1 for views attached to this ViewContainerRef\n // >= 0 for views attached to a different ViewContainerRef\n if (prevIdx !== -1) {\n this.detach(prevIdx);\n } else {\n const prevLContainer = lView[PARENT] as LContainer;\n ngDevMode &&\n assertEqual(\n isLContainer(prevLContainer), true,\n 'An attached view should have its PARENT point to a container.');\n\n\n // We need to re-create a R3ViewContainerRef instance since those are not stored on\n // LView (nor anywhere else).\n const prevVCRef = new R3ViewContainerRef(\n prevLContainer, prevLContainer[T_HOST] as TDirectiveHostNode, prevLContainer[PARENT]);\n\n prevVCRef.detach(prevVCRef.indexOf(viewRef));\n }\n }\n\n // Logical operation of adding `LView` to `LContainer`\n const adjustedIdx = this._adjustIndex(index);\n const lContainer = this._lContainer;\n insertView(tView, lView, lContainer, adjustedIdx);\n\n // Physical operation of adding the DOM nodes.\n const beforeNode = getBeforeNodeForView(adjustedIdx, lContainer);\n const renderer = lView[RENDERER];\n const parentRNode = nativeParentNode(renderer, lContainer[NATIVE] as RElement | RComment);\n if (parentRNode !== null) {\n addViewToContainer(tView, lContainer[T_HOST], renderer, lView, parentRNode, beforeNode);\n }\n\n (viewRef as R3ViewRef<any>).attachToViewContainerRef();\n addToArray(getOrCreateViewRefs(lContainer), adjustedIdx, viewRef);\n\n return viewRef;\n }\n\n override move(viewRef: ViewRef, newIndex: number): ViewRef {\n if (ngDevMode && viewRef.destroyed) {\n throw new Error('Cannot move a destroyed View in a ViewContainer!');\n }\n return this.insert(viewRef, newIndex);\n }\n\n override indexOf(viewRef: ViewRef): number {\n const viewRefsArr = getViewRefs(this._lContainer);\n return viewRefsArr !== null ? viewRefsArr.indexOf(viewRef) : -1;\n }\n\n override remove(index?: number): void {\n const adjustedIdx = this._adjustIndex(index, -1);\n const detachedView = detachView(this._lContainer, adjustedIdx);\n\n if (detachedView) {\n // Before destroying the view, remove it from the container's array of `ViewRef`s.\n // This ensures the view container length is updated before calling\n // `destroyLView`, which could recursively call view container methods that\n // rely on an accurate container length.\n // (e.g. a method on this view container being called by a child directive's OnDestroy\n // lifecycle hook)\n removeFromArray(getOrCreateViewRefs(this._lContainer), adjustedIdx);\n destroyLView(detachedView[TVIEW], detachedView);\n }\n }\n\n override detach(index?: number): ViewRef|null {\n const adjustedIdx = this._adjustIndex(index, -1);\n const view = detachView(this._lContainer, adjustedIdx);\n\n const wasDetached =\n view && removeFromArray(getOrCreateViewRefs(this._lContainer), adjustedIdx) != null;\n return wasDetached ? new R3ViewRef(view!) : null;\n }\n\n private _adjustIndex(index?: number, shift: number = 0) {\n if (index == null) {\n return this.length + shift;\n }\n if (ngDevMode) {\n assertGreaterThan(index, -1, `ViewRef index must be positive, got ${index}`);\n // +1 because it's legal to insert at the end.\n assertLessThan(index, this.length + 1 + shift, 'index');\n }\n return index;\n }\n};\n\nfunction getViewRefs(lContainer: LContainer): ViewRef[]|null {\n return lContainer[VIEW_REFS] as ViewRef[];\n}\n\nfunction getOrCreateViewRefs(lContainer: LContainer): ViewRef[] {\n return (lContainer[VIEW_REFS] || (lContainer[VIEW_REFS] = [])) as ViewRef[];\n}\n\n/**\n * Creates a ViewContainerRef and stores it on the injector.\n *\n * @param ViewContainerRefToken The ViewContainerRef type\n * @param ElementRefToken The ElementRef type\n * @param hostTNode The node that is requesting a ViewContainerRef\n * @param hostLView The view to which the node belongs\n * @returns The ViewContainerRef instance to use\n */\nexport function createContainerRef(\n hostTNode: TElementNode|TContainerNode|TElementContainerNode,\n hostLView: LView): ViewContainerRef {\n ngDevMode && assertTNodeType(hostTNode, TNodeType.AnyContainer | TNodeType.AnyRNode);\n\n let lContainer: LContainer;\n const slotValue = hostLView[hostTNode.index];\n if (isLContainer(slotValue)) {\n // If the host is a container, we don't need to create a new LContainer\n lContainer = slotValue;\n } else {\n let commentNode: RComment;\n // If the host is an element container, the native host element is guaranteed to be a\n // comment and we can reuse that comment as anchor element for the new LContainer.\n // The comment node in question is already part of the DOM structure so we don't need to append\n // it again.\n if (hostTNode.type & TNodeType.ElementContainer) {\n commentNode = unwrapRNode(slotValue) as RComment;\n } else {\n // If the host is a regular element, we have to insert a comment node manually which will\n // be used as an anchor when inserting elements. In this specific case we use low-level DOM\n // manipulation to insert it.\n const renderer = hostLView[RENDERER];\n ngDevMode && ngDevMode.rendererCreateComment++;\n commentNode = renderer.createComment(ngDevMode ? 'container' : '');\n\n const hostNative = getNativeByTNode(hostTNode, hostLView)!;\n const parentOfHostNative = nativeParentNode(renderer, hostNative);\n nativeInsertBefore(\n renderer, parentOfHostNative!, commentNode, nativeNextSibling(renderer, hostNative),\n false);\n }\n\n hostLView[hostTNode.index] = lContainer =\n createLContainer(slotValue, hostLView, commentNode, hostTNode);\n\n addToViewTree(hostLView, lContainer);\n }\n\n return new R3ViewContainerRef(lContainer, hostTNode, hostLView);\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 {getDebugContext} from '../errors';\nimport {ERROR_DEBUG_CONTEXT, ERROR_LOGGER} from '../util/errors';\n\nimport {DebugContext} from './types';\n\nexport function expressionChangedAfterItHasBeenCheckedError(\n context: DebugContext, oldValue: any, currValue: any, isFirstCheck: boolean): Error {\n let msg =\n `ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '${\n oldValue}'. Current value: '${currValue}'.`;\n if (isFirstCheck) {\n msg +=\n ` It seems like the view has been created after its parent and its children have been dirty checked.` +\n ` Has it been created in a change detection hook ?`;\n }\n return viewDebugError(msg, context);\n}\n\nexport function viewWrappedDebugError(err: any, context: DebugContext): Error {\n if (!(err instanceof Error)) {\n // errors that are not Error instances don't have a stack,\n // so it is ok to wrap them into a new Error object...\n err = new Error(err.toString());\n }\n _addDebugContext(err, context);\n return err;\n}\n\nexport function viewDebugError(msg: string, context: DebugContext): Error {\n const err = new Error(msg);\n _addDebugContext(err, context);\n return err;\n}\n\nfunction _addDebugContext(err: Error, context: DebugContext) {\n (err as any)[ERROR_DEBUG_CONTEXT] = context;\n (err as any)[ERROR_LOGGER] = context.logError.bind(context);\n}\n\nexport function isViewDebugError(err: Error): boolean {\n return !!getDebugContext(err);\n}\n\nexport function viewDestroyedError(action: string): Error {\n return new Error(`ViewDestroyedError: Attempt to use a destroyed view: ${action}`);\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 '../di';\nimport {ErrorHandler} from '../error_handler';\nimport {Type} from '../interface/type';\nimport {ComponentFactory} from '../linker/component_factory';\nimport {NgModuleRef} from '../linker/ng_module_factory';\nimport {QueryList} from '../linker/query_list';\nimport {TemplateRef} from '../linker/template_ref';\nimport {ViewContainerRef} from '../linker/view_container_ref';\nimport {Renderer2, RendererFactory2} from '../render/api';\nimport {RendererType2} from '../render/api_flags';\nimport {Sanitizer} from '../sanitization/sanitizer';\nimport {SecurityContext} from '../sanitization/security';\n\n\n\n// -------------------------------------\n// Defs\n// -------------------------------------\n\n/**\n * Factory for ViewDefinitions/NgModuleDefinitions.\n * We use a function so we can reexeute it in case an error happens and use the given logger\n * function to log the error from the definition of the node, which is shown in all browser\n * logs.\n */\nexport interface DefinitionFactory<D extends Definition<any>> {\n (logger: NodeLogger): D;\n}\n\n/**\n * Function to call console.error at the right source location. This is an indirection\n * via another function as browser will log the location that actually called\n * `console.error`.\n */\nexport interface NodeLogger {\n (): () => void;\n}\n\nexport interface Definition<DF extends DefinitionFactory<any>> {\n factory: DF|null;\n}\n\nexport interface NgModuleDefinition extends Definition<NgModuleDefinitionFactory> {\n providers: NgModuleProviderDef[];\n providersByKey: {[tokenKey: string]: NgModuleProviderDef};\n modules: any[];\n scope: 'root'|'platform'|null;\n}\n\nexport interface NgModuleDefinitionFactory extends DefinitionFactory<NgModuleDefinition> {}\n\nexport interface ViewDefinition extends Definition<ViewDefinitionFactory> {\n flags: ViewFlags;\n updateDirectives: ViewUpdateFn;\n updateRenderer: ViewUpdateFn;\n handleEvent: ViewHandleEventFn;\n /**\n * Order: Depth first.\n * Especially providers are before elements / anchors.\n */\n nodes: NodeDef[];\n /** aggregated NodeFlags for all nodes **/\n nodeFlags: NodeFlags;\n rootNodeFlags: NodeFlags;\n lastRenderRootNode: NodeDef|null;\n bindingCount: number;\n outputCount: number;\n /**\n * Binary or of all query ids that are matched by one of the nodes.\n * This includes query ids from templates as well.\n * Used as a bloom filter.\n */\n nodeMatchedQueries: number;\n}\n\nexport interface ViewDefinitionFactory extends DefinitionFactory<ViewDefinition> {}\n\n\nexport interface ViewUpdateFn {\n (check: NodeCheckFn, view: ViewData): void;\n}\n\n// helper functions to create an overloaded function type.\nexport interface NodeCheckFn {\n (view: ViewData, nodeIndex: number, argStyle: ArgumentType.Dynamic, values: any[]): any;\n\n (view: ViewData, nodeIndex: number, argStyle: ArgumentType.Inline, v0?: any, v1?: any, v2?: any,\n v3?: any, v4?: any, v5?: any, v6?: any, v7?: any, v8?: any, v9?: any): any;\n}\n\nexport const enum ArgumentType {\n Inline = 0,\n Dynamic = 1\n}\n\nexport interface ViewHandleEventFn {\n (view: ViewData, nodeIndex: number, eventName: string, event: any): boolean;\n}\n\n/**\n * Bitmask for ViewDefinition.flags.\n */\nexport const enum ViewFlags {\n None = 0,\n OnPush = 1 << 1,\n}\n\n/**\n * A node definition in the view.\n *\n * Note: We use one type for all nodes so that loops that loop over all nodes\n * of a ViewDefinition stay monomorphic!\n */\nexport interface NodeDef {\n flags: NodeFlags;\n // Index of the node in view data and view definition (those are the same)\n nodeIndex: number;\n // Index of the node in the check functions\n // Differ from nodeIndex when nodes are added or removed at runtime (ie after compilation)\n checkIndex: number;\n parent: NodeDef|null;\n renderParent: NodeDef|null;\n /** this is checked against NgContentDef.index to find matched nodes */\n ngContentIndex: number|null;\n /** number of transitive children */\n childCount: number;\n /** aggregated NodeFlags for all transitive children (does not include self) **/\n childFlags: NodeFlags;\n /** aggregated NodeFlags for all direct children (does not include self) **/\n directChildFlags: NodeFlags;\n\n bindingIndex: number;\n bindings: BindingDef[];\n bindingFlags: BindingFlags;\n outputIndex: number;\n outputs: OutputDef[];\n /**\n * references that the user placed on the element\n */\n references: {[refId: string]: QueryValueType};\n /**\n * ids and value types of all queries that are matched by this node.\n */\n matchedQueries: {[queryId: number]: QueryValueType};\n /** Binary or of all matched query ids of this node. */\n matchedQueryIds: number;\n /**\n * Binary or of all query ids that are matched by one of the children.\n * This includes query ids from templates as well.\n * Used as a bloom filter.\n */\n childMatchedQueries: number;\n element: ElementDef|null;\n provider: ProviderDef|null;\n text: TextDef|null;\n query: QueryDef|null;\n ngContent: NgContentDef|null;\n}\n\n/**\n * Bitmask for NodeDef.flags.\n * Naming convention:\n * - `Type...`: flags that are mutually exclusive\n * - `Cat...`: union of multiple `Type...` (short for category).\n */\nexport const enum NodeFlags {\n None = 0,\n TypeElement = 1 << 0,\n TypeText = 1 << 1,\n ProjectedTemplate = 1 << 2,\n CatRenderNode = TypeElement | TypeText,\n TypeNgContent = 1 << 3,\n TypePipe = 1 << 4,\n TypePureArray = 1 << 5,\n TypePureObject = 1 << 6,\n TypePurePipe = 1 << 7,\n CatPureExpression = TypePureArray | TypePureObject | TypePurePipe,\n TypeValueProvider = 1 << 8,\n TypeClassProvider = 1 << 9,\n TypeFactoryProvider = 1 << 10,\n TypeUseExistingProvider = 1 << 11,\n LazyProvider = 1 << 12,\n PrivateProvider = 1 << 13,\n TypeDirective = 1 << 14,\n Component = 1 << 15,\n CatProviderNoDirective =\n TypeValueProvider | TypeClassProvider | TypeFactoryProvider | TypeUseExistingProvider,\n CatProvider = CatProviderNoDirective | TypeDirective,\n OnInit = 1 << 16,\n OnDestroy = 1 << 17,\n DoCheck = 1 << 18,\n OnChanges = 1 << 19,\n AfterContentInit = 1 << 20,\n AfterContentChecked = 1 << 21,\n AfterViewInit = 1 << 22,\n AfterViewChecked = 1 << 23,\n EmbeddedViews = 1 << 24,\n ComponentView = 1 << 25,\n TypeContentQuery = 1 << 26,\n TypeViewQuery = 1 << 27,\n StaticQuery = 1 << 28,\n DynamicQuery = 1 << 29,\n TypeNgModule = 1 << 30,\n EmitDistinctChangesOnly = 1 << 31,\n CatQuery = TypeContentQuery | TypeViewQuery,\n\n // mutually exclusive values...\n Types = CatRenderNode | TypeNgContent | TypePipe | CatPureExpression | CatProvider | CatQuery\n}\n\nexport interface BindingDef {\n flags: BindingFlags;\n ns: string|null;\n name: string|null;\n nonMinifiedName: string|null;\n securityContext: SecurityContext|null;\n suffix: string|null;\n}\n\nexport const enum BindingFlags {\n TypeElementAttribute = 1 << 0,\n TypeElementClass = 1 << 1,\n TypeElementStyle = 1 << 2,\n TypeProperty = 1 << 3,\n SyntheticProperty = 1 << 4,\n SyntheticHostProperty = 1 << 5,\n CatSyntheticProperty = SyntheticProperty | SyntheticHostProperty,\n\n // mutually exclusive values...\n Types = TypeElementAttribute | TypeElementClass | TypeElementStyle | TypeProperty\n}\n\nexport interface OutputDef {\n type: OutputType;\n target: 'window'|'document'|'body'|'component'|null;\n eventName: string;\n propName: string|null;\n}\n\nexport const enum OutputType {\n ElementOutput,\n DirectiveOutput\n}\n\nexport const enum QueryValueType {\n ElementRef = 0,\n RenderElement = 1,\n TemplateRef = 2,\n ViewContainerRef = 3,\n Provider = 4\n}\n\nexport interface ElementDef {\n // set to null for `<ng-container>`\n name: string|null;\n ns: string|null;\n /** ns, name, value */\n attrs: [string, string, string][]|null;\n template: ViewDefinition|null;\n componentProvider: NodeDef|null;\n componentRendererType: RendererType2|null;\n // closure to allow recursive components\n componentView: ViewDefinitionFactory|null;\n /**\n * visible public providers for DI in the view,\n * as see from this element. This does not include private providers.\n */\n publicProviders: {[tokenKey: string]: NodeDef}|null;\n /**\n * same as visiblePublicProviders, but also includes private providers\n * that are located on this element.\n */\n allProviders: {[tokenKey: string]: NodeDef}|null;\n handleEvent: ElementHandleEventFn|null;\n}\n\nexport interface ElementHandleEventFn {\n (view: ViewData, eventName: string, event: any): boolean;\n}\n\nexport interface ProviderDef {\n token: any;\n value: any;\n deps: DepDef[];\n}\n\nexport interface NgModuleProviderDef {\n flags: NodeFlags;\n index: number;\n token: any;\n value: any;\n deps: DepDef[];\n}\n\nexport interface DepDef {\n flags: DepFlags;\n token: any;\n tokenKey: string;\n}\n\n/**\n * Bitmask for DI flags\n */\nexport const enum DepFlags {\n None = 0,\n SkipSelf = 1 << 0,\n Optional = 1 << 1,\n Self = 1 << 2,\n Value = 1 << 3,\n}\n\nexport interface TextDef {\n prefix: string;\n}\n\nexport interface QueryDef {\n id: number;\n // variant of the id that can be used to check against NodeDef.matchedQueryIds, ...\n filterId: number;\n bindings: QueryBindingDef[];\n}\n\nexport interface QueryBindingDef {\n propName: string;\n bindingType: QueryBindingType;\n}\n\nexport const enum QueryBindingType {\n First = 0,\n All = 1\n}\n\nexport interface NgContentDef {\n /**\n * this index is checked against NodeDef.ngContentIndex to find the nodes\n * that are matched by this ng-content.\n * Note that a NodeDef with an ng-content can be reprojected, i.e.\n * have a ngContentIndex on its own.\n */\n index: number;\n}\n\n// -------------------------------------\n// Data\n// -------------------------------------\n\nexport interface NgModuleData extends Injector, NgModuleRef<any> {\n // Note: we are using the prefix _ as NgModuleData is an NgModuleRef and therefore directly\n // exposed to the user.\n _def: NgModuleDefinition;\n _parent: Injector;\n _providers: any[];\n}\n\n/**\n * View instance data.\n * Attention: Adding fields to this is performance sensitive!\n */\nexport interface ViewData {\n def: ViewDefinition;\n root: RootData;\n renderer: Renderer2;\n // index of component provider / anchor.\n parentNodeDef: NodeDef|null;\n parent: ViewData|null;\n viewContainerParent: ViewData|null;\n component: any;\n context: any;\n // Attention: Never loop over this, as this will\n // create a polymorphic usage site.\n // Instead: Always loop over ViewDefinition.nodes,\n // and call the right accessor (e.g. `elementData`) based on\n // the NodeType.\n nodes: {[key: number]: NodeData};\n state: ViewState;\n oldValues: any[];\n disposables: DisposableFn[]|null;\n initIndex: number;\n}\n\n/**\n * Bitmask of states\n */\nexport const enum ViewState {\n BeforeFirstCheck = 1 << 0,\n FirstCheck = 1 << 1,\n Attached = 1 << 2,\n ChecksEnabled = 1 << 3,\n IsProjectedView = 1 << 4,\n CheckProjectedView = 1 << 5,\n CheckProjectedViews = 1 << 6,\n Destroyed = 1 << 7,\n\n // InitState Uses 3 bits\n InitState_Mask = 7 << 8,\n InitState_BeforeInit = 0 << 8,\n InitState_CallingOnInit = 1 << 8,\n InitState_CallingAfterContentInit = 2 << 8,\n InitState_CallingAfterViewInit = 3 << 8,\n InitState_AfterInit = 4 << 8,\n\n CatDetectChanges = Attached | ChecksEnabled,\n CatInit = BeforeFirstCheck | CatDetectChanges | InitState_BeforeInit\n}\n\n// Called before each cycle of a view's check to detect whether this is in the\n// initState for which we need to call ngOnInit, ngAfterContentInit or ngAfterViewInit\n// lifecycle methods. Returns true if this check cycle should call lifecycle\n// methods.\nexport function shiftInitState(\n view: ViewData, priorInitState: ViewState, newInitState: ViewState): boolean {\n // Only update the InitState if we are currently in the prior state.\n // For example, only move into CallingInit if we are in BeforeInit. Only\n // move into CallingContentInit if we are in CallingInit. Normally this will\n // always be true because of how checkCycle is called in checkAndUpdateView.\n // However, if checkAndUpdateView is called recursively or if an exception is\n // thrown while checkAndUpdateView is running, checkAndUpdateView starts over\n // from the beginning. This ensures the state is monotonically increasing,\n // terminating in the AfterInit state, which ensures the Init methods are called\n // at least once and only once.\n const state = view.state;\n const initState = state & ViewState.InitState_Mask;\n if (initState === priorInitState) {\n view.state = (state & ~ViewState.InitState_Mask) | newInitState;\n view.initIndex = -1;\n return true;\n }\n return initState === newInitState;\n}\n\n// Returns true if the lifecycle init method should be called for the node with\n// the given init index.\nexport function shouldCallLifecycleInitHook(\n view: ViewData, initState: ViewState, index: number): boolean {\n if ((view.state & ViewState.InitState_Mask) === initState && view.initIndex <= index) {\n view.initIndex = index + 1;\n return true;\n }\n return false;\n}\n\nexport interface DisposableFn {\n (): void;\n}\n\n/**\n * Node instance data.\n *\n * We have a separate type per NodeType to save memory\n * (TextData | ElementData | ProviderData | PureExpressionData | QueryList<any>)\n *\n * To keep our code monomorphic,\n * we prohibit using `NodeData` directly but enforce the use of accessors (`asElementData`, ...).\n * This way, no usage site can get a `NodeData` from view.nodes and then use it for different\n * purposes.\n */\nexport class NodeData {\n private __brand: any;\n}\n\n/**\n * Data for an instantiated NodeType.Text.\n *\n * Attention: Adding fields to this is performance sensitive!\n */\nexport interface TextData {\n renderText: any;\n}\n\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nexport function asTextData(view: ViewData, index: number): TextData {\n return <any>view.nodes[index];\n}\n\n/**\n * Data for an instantiated NodeType.Element.\n *\n * Attention: Adding fields to this is performance sensitive!\n */\nexport interface ElementData {\n renderElement: any;\n componentView: ViewData;\n viewContainer: ViewContainerData|null;\n template: TemplateData;\n}\n\nexport interface ViewContainerData extends ViewContainerRef {\n // Note: we are using the prefix _ as ViewContainerData is a ViewContainerRef and therefore\n // directly\n // exposed to the user.\n _embeddedViews: ViewData[];\n}\n\nexport interface TemplateData extends TemplateRef<any> {\n // views that have been created from the template\n // of this element,\n // but inserted into the embeddedViews of another element.\n // By default, this is undefined.\n // Note: we are using the prefix _ as TemplateData is a TemplateRef and therefore directly\n // exposed to the user.\n _projectedViews: ViewData[];\n}\n\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nexport function asElementData(view: ViewData, index: number): ElementData {\n return <any>view.nodes[index];\n}\n\n/**\n * Data for an instantiated NodeType.Provider.\n *\n * Attention: Adding fields to this is performance sensitive!\n */\nexport interface ProviderData {\n instance: any;\n}\n\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nexport function asProviderData(view: ViewData, index: number): ProviderData {\n return <any>view.nodes[index];\n}\n\n/**\n * Data for an instantiated NodeType.PureExpression.\n *\n * Attention: Adding fields to this is performance sensitive!\n */\nexport interface PureExpressionData {\n value: any;\n}\n\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nexport function asPureExpressionData(view: ViewData, index: number): PureExpressionData {\n return <any>view.nodes[index];\n}\n\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nexport function asQueryList(view: ViewData, index: number): QueryList<any> {\n return <any>view.nodes[index];\n}\n\nexport interface RootData {\n injector: Injector;\n ngModule: NgModuleRef<any>;\n projectableNodes: any[][];\n selectorOrNode: any;\n renderer: Renderer2;\n rendererFactory: RendererFactory2;\n errorHandler: ErrorHandler;\n sanitizer: Sanitizer;\n}\n\nexport abstract class DebugContext {\n abstract get view(): ViewData;\n abstract get nodeIndex(): number|null;\n abstract get injector(): Injector;\n abstract get component(): any;\n abstract get providerTokens(): any[];\n abstract get references(): {[key: string]: any};\n abstract get context(): any;\n abstract get componentRenderElement(): any;\n abstract get renderNode(): any;\n abstract logError(console: Console, ...values: any[]): void;\n}\n\n// -------------------------------------\n// Other\n// -------------------------------------\n\nexport const enum CheckType {\n CheckAndUpdate,\n CheckNoChanges\n}\n\nexport interface ProviderOverride {\n token: any;\n flags: NodeFlags;\n value: any;\n deps: ([DepFlags, any]|any)[];\n deprecatedBehavior: boolean;\n}\n\nexport interface Services {\n setCurrentNode(view: ViewData, nodeIndex: number): void;\n createRootView(\n injector: Injector, projectableNodes: any[][], rootSelectorOrNode: string|any,\n def: ViewDefinition, ngModule: NgModuleRef<any>, context?: any): ViewData;\n createEmbeddedView(parent: ViewData, anchorDef: NodeDef, viewDef: ViewDefinition, context?: any):\n ViewData;\n createComponentView(\n parentView: ViewData, nodeDef: NodeDef, viewDef: ViewDefinition, hostElement: any): ViewData;\n createNgModuleRef(\n moduleType: Type<any>, parent: Injector, bootstrapComponents: Type<any>[],\n def: NgModuleDefinition): NgModuleRef<any>;\n overrideProvider(override: ProviderOverride): void;\n overrideComponentView(compType: Type<any>, compFactory: ComponentFactory<any>): void;\n clearOverrides(): void;\n checkAndUpdateView(view: ViewData): void;\n checkNoChangesView(view: ViewData): void;\n destroyView(view: ViewData): void;\n resolveDep(\n view: ViewData, elDef: NodeDef|null, allowPrivateServices: boolean, depDef: DepDef,\n notFoundValue?: any): any;\n createDebugContext(view: ViewData, nodeIndex: number): DebugContext;\n handleEvent: ViewHandleEventFn;\n updateDirectives: (view: ViewData, checkType: CheckType) => void;\n updateRenderer: (view: ViewData, checkType: CheckType) => void;\n dirtyParentQueries: (view: ViewData) => void;\n}\n\n/**\n * This object is used to prevent cycles in the source files and to have a place where\n * debug mode can hook it. It is lazily filled when `isDevMode` is known.\n */\nexport const Services: Services = {\n setCurrentNode: undefined!,\n createRootView: undefined!,\n createEmbeddedView: undefined!,\n createComponentView: undefined!,\n createNgModuleRef: undefined!,\n overrideProvider: undefined!,\n overrideComponentView: undefined!,\n clearOverrides: undefined!,\n checkAndUpdateView: undefined!,\n checkNoChangesView: undefined!,\n destroyView: undefined!,\n resolveDep: undefined!,\n createDebugContext: undefined!,\n handleEvent: undefined!,\n updateDirectives: undefined!,\n updateRenderer: undefined!,\n dirtyParentQueries: undefined!,\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 {devModeEqual, WrappedValue} from '../change_detection/change_detection';\nimport {SOURCE} from '../di/injector_compatibility';\nimport {ViewEncapsulation} from '../metadata/view';\nimport {RendererType2} from '../render/api_flags';\nimport {stringify} from '../util/stringify';\n\nimport {expressionChangedAfterItHasBeenCheckedError} from './errors';\nimport {asElementData, asTextData, BindingDef, BindingFlags, Definition, DefinitionFactory, DepDef, DepFlags, ElementData, NodeDef, NodeFlags, QueryValueType, Services, ViewData, ViewDefinition, ViewDefinitionFactory, ViewFlags, ViewState} from './types';\n\nexport const NOOP: any = () => {};\n\nconst _tokenKeyCache = new Map<any, string>();\n\nexport function tokenKey(token: any): string {\n let key = _tokenKeyCache.get(token);\n if (!key) {\n key = stringify(token) + '_' + _tokenKeyCache.size;\n _tokenKeyCache.set(token, key);\n }\n return key;\n}\n\nexport function unwrapValue(view: ViewData, nodeIdx: number, bindingIdx: number, value: any): any {\n if (WrappedValue.isWrapped(value)) {\n value = WrappedValue.unwrap(value);\n const globalBindingIdx = view.def.nodes[nodeIdx].bindingIndex + bindingIdx;\n const oldValue = WrappedValue.unwrap(view.oldValues[globalBindingIdx]);\n view.oldValues[globalBindingIdx] = new WrappedValue(oldValue);\n }\n return value;\n}\n\nconst UNDEFINED_RENDERER_TYPE_ID = '$$undefined';\nconst EMPTY_RENDERER_TYPE_ID = '$$empty';\n\n// Attention: this function is called as top level function.\n// Putting any logic in here will destroy closure tree shaking!\nexport function createRendererType2(values: {\n styles: (string|any[])[],\n encapsulation: ViewEncapsulation,\n data: {[kind: string]: any[]}\n}): RendererType2 {\n return {\n id: UNDEFINED_RENDERER_TYPE_ID,\n styles: values.styles,\n encapsulation: values.encapsulation,\n data: values.data\n };\n}\n\nlet _renderCompCount = 0;\n\nexport function resolveRendererType2(type?: RendererType2|null): RendererType2|null {\n if (type && type.id === UNDEFINED_RENDERER_TYPE_ID) {\n // first time we see this RendererType2. Initialize it...\n const isFilled =\n ((type.encapsulation != null && type.encapsulation !== ViewEncapsulation.None) ||\n type.styles.length || Object.keys(type.data).length);\n if (isFilled) {\n type.id = `c${_renderCompCount++}`;\n } else {\n type.id = EMPTY_RENDERER_TYPE_ID;\n }\n }\n if (type && type.id === EMPTY_RENDERER_TYPE_ID) {\n type = null;\n }\n return type || null;\n}\n\nexport function checkBinding(\n view: ViewData, def: NodeDef, bindingIdx: number, value: any): boolean {\n const oldValues = view.oldValues;\n if ((view.state & ViewState.FirstCheck) ||\n !Object.is(oldValues[def.bindingIndex + bindingIdx], value)) {\n return true;\n }\n return false;\n}\n\nexport function checkAndUpdateBinding(\n view: ViewData, def: NodeDef, bindingIdx: number, value: any): boolean {\n if (checkBinding(view, def, bindingIdx, value)) {\n view.oldValues[def.bindingIndex + bindingIdx] = value;\n return true;\n }\n return false;\n}\n\nexport function checkBindingNoChanges(\n view: ViewData, def: NodeDef, bindingIdx: number, value: any) {\n const oldValue = view.oldValues[def.bindingIndex + bindingIdx];\n if ((view.state & ViewState.BeforeFirstCheck) || !devModeEqual(oldValue, value)) {\n const bindingName = def.bindings[bindingIdx].name;\n throw expressionChangedAfterItHasBeenCheckedError(\n Services.createDebugContext(view, def.nodeIndex), `${bindingName}: ${oldValue}`,\n `${bindingName}: ${value}`, (view.state & ViewState.BeforeFirstCheck) !== 0);\n }\n}\n\nexport function markParentViewsForCheck(view: ViewData) {\n let currView: ViewData|null = view;\n while (currView) {\n if (currView.def.flags & ViewFlags.OnPush) {\n currView.state |= ViewState.ChecksEnabled;\n }\n currView = currView.viewContainerParent || currView.parent;\n }\n}\n\nexport function markParentViewsForCheckProjectedViews(view: ViewData, endView: ViewData) {\n let currView: ViewData|null = view;\n while (currView && currView !== endView) {\n currView.state |= ViewState.CheckProjectedViews;\n currView = currView.viewContainerParent || currView.parent;\n }\n}\n\nexport function dispatchEvent(\n view: ViewData, nodeIndex: number, eventName: string, event: any): boolean|undefined {\n try {\n const nodeDef = view.def.nodes[nodeIndex];\n const startView = nodeDef.flags & NodeFlags.ComponentView ?\n asElementData(view, nodeIndex).componentView :\n view;\n markParentViewsForCheck(startView);\n return Services.handleEvent(view, nodeIndex, eventName, event);\n } catch (e) {\n // Attention: Don't rethrow, as it would cancel Observable subscriptions!\n view.root.errorHandler.handleError(e);\n }\n}\n\nexport function declaredViewContainer(view: ViewData): ElementData|null {\n if (view.parent) {\n const parentView = view.parent;\n return asElementData(parentView, view.parentNodeDef!.nodeIndex);\n }\n return null;\n}\n\n/**\n * for component views, this is the host element.\n * for embedded views, this is the index of the parent node\n * that contains the view container.\n */\nexport function viewParentEl(view: ViewData): NodeDef|null {\n const parentView = view.parent;\n if (parentView) {\n return view.parentNodeDef!.parent;\n } else {\n return null;\n }\n}\n\nexport function renderNode(view: ViewData, def: NodeDef): any {\n switch (def.flags & NodeFlags.Types) {\n case NodeFlags.TypeElement:\n return asElementData(view, def.nodeIndex).renderElement;\n case NodeFlags.TypeText:\n return asTextData(view, def.nodeIndex).renderText;\n }\n}\n\nexport function elementEventFullName(target: string|null, name: string): string {\n return target ? `${target}:${name}` : name;\n}\n\nexport function isComponentView(view: ViewData): boolean {\n return !!view.parent && !!(view.parentNodeDef!.flags & NodeFlags.Component);\n}\n\nexport function isEmbeddedView(view: ViewData): boolean {\n return !!view.parent && !(view.parentNodeDef!.flags & NodeFlags.Component);\n}\n\nexport function filterQueryId(queryId: number): number {\n return 1 << (queryId % 32);\n}\n\nexport function splitMatchedQueriesDsl(matchedQueriesDsl: [string|number, QueryValueType][]|null): {\n matchedQueries: {[queryId: string]: QueryValueType},\n references: {[refId: string]: QueryValueType},\n matchedQueryIds: number\n} {\n const matchedQueries: {[queryId: string]: QueryValueType} = {};\n let matchedQueryIds = 0;\n const references: {[refId: string]: QueryValueType} = {};\n if (matchedQueriesDsl) {\n matchedQueriesDsl.forEach(([queryId, valueType]) => {\n if (typeof queryId === 'number') {\n matchedQueries[queryId] = valueType;\n matchedQueryIds |= filterQueryId(queryId);\n } else {\n references[queryId] = valueType;\n }\n });\n }\n return {matchedQueries, references, matchedQueryIds};\n}\n\nexport function splitDepsDsl(deps: ([DepFlags, any]|any)[], sourceName?: string): DepDef[] {\n return deps.map(value => {\n let token: any;\n let flags: DepFlags;\n if (Array.isArray(value)) {\n [flags, token] = value;\n } else {\n flags = DepFlags.None;\n token = value;\n }\n if (token && (typeof token === 'function' || typeof token === 'object') && sourceName) {\n Object.defineProperty(token, SOURCE, {value: sourceName, configurable: true});\n }\n return {flags, token, tokenKey: tokenKey(token)};\n });\n}\n\nexport function getParentRenderElement(view: ViewData, renderHost: any, def: NodeDef): any {\n let renderParent = def.renderParent;\n if (renderParent) {\n if ((renderParent.flags & NodeFlags.TypeElement) === 0 ||\n (renderParent.flags & NodeFlags.ComponentView) === 0 ||\n (renderParent.element!.componentRendererType &&\n (renderParent.element!.componentRendererType!.encapsulation ===\n ViewEncapsulation.ShadowDom ||\n // TODO(FW-2290): remove the `encapsulation === 1` fallback logic in v12.\n // @ts-ignore TODO: Remove as part of FW-2290. TS complains about us dealing with an enum\n // value that is not known (but previously was the value for ViewEncapsulation.Native)\n renderParent.element!.componentRendererType!.encapsulation === 1))) {\n // only children of non components, or children of components with native encapsulation should\n // be attached.\n return asElementData(view, def.renderParent!.nodeIndex).renderElement;\n }\n } else {\n return renderHost;\n }\n}\n\nconst DEFINITION_CACHE = new WeakMap<any, Definition<any>>();\n\nexport function resolveDefinition<D extends Definition<any>>(factory: DefinitionFactory<D>): D {\n let value = DEFINITION_CACHE.get(factory)! as D;\n if (!value) {\n value = factory(() => NOOP);\n value.factory = factory;\n DEFINITION_CACHE.set(factory, value);\n }\n return value;\n}\n\nexport function rootRenderNodes(view: ViewData): any[] {\n const renderNodes: any[] = [];\n visitRootRenderNodes(view, RenderNodeAction.Collect, undefined, undefined, renderNodes);\n return renderNodes;\n}\n\nexport const enum RenderNodeAction {\n Collect,\n AppendChild,\n InsertBefore,\n RemoveChild\n}\n\nexport function visitRootRenderNodes(\n view: ViewData, action: RenderNodeAction, parentNode: any, nextSibling: any, target?: any[]) {\n // We need to re-compute the parent node in case the nodes have been moved around manually\n if (action === RenderNodeAction.RemoveChild) {\n parentNode = view.renderer.parentNode(renderNode(view, view.def.lastRenderRootNode!));\n }\n visitSiblingRenderNodes(\n view, action, 0, view.def.nodes.length - 1, parentNode, nextSibling, target);\n}\n\nexport function visitSiblingRenderNodes(\n view: ViewData, action: RenderNodeAction, startIndex: number, endIndex: number, parentNode: any,\n nextSibling: any, target?: any[]) {\n for (let i = startIndex; i <= endIndex; i++) {\n const nodeDef = view.def.nodes[i];\n if (nodeDef.flags & (NodeFlags.TypeElement | NodeFlags.TypeText | NodeFlags.TypeNgContent)) {\n visitRenderNode(view, nodeDef, action, parentNode, nextSibling, target);\n }\n // jump to next sibling\n i += nodeDef.childCount;\n }\n}\n\nexport function visitProjectedRenderNodes(\n view: ViewData, ngContentIndex: number, action: RenderNodeAction, parentNode: any,\n nextSibling: any, target?: any[]) {\n let compView: ViewData|null = view;\n while (compView && !isComponentView(compView)) {\n compView = compView.parent;\n }\n const hostView = compView!.parent;\n const hostElDef = viewParentEl(compView!);\n const startIndex = hostElDef!.nodeIndex + 1;\n const endIndex = hostElDef!.nodeIndex + hostElDef!.childCount;\n for (let i = startIndex; i <= endIndex; i++) {\n const nodeDef = hostView!.def.nodes[i];\n if (nodeDef.ngContentIndex === ngContentIndex) {\n visitRenderNode(hostView!, nodeDef, action, parentNode, nextSibling, target);\n }\n // jump to next sibling\n i += nodeDef.childCount;\n }\n if (!hostView!.parent) {\n // a root view\n const projectedNodes = view.root.projectableNodes[ngContentIndex];\n if (projectedNodes) {\n for (let i = 0; i < projectedNodes.length; i++) {\n execRenderNodeAction(view, projectedNodes[i], action, parentNode, nextSibling, target);\n }\n }\n }\n}\n\nfunction visitRenderNode(\n view: ViewData, nodeDef: NodeDef, action: RenderNodeAction, parentNode: any, nextSibling: any,\n target?: any[]) {\n if (nodeDef.flags & NodeFlags.TypeNgContent) {\n visitProjectedRenderNodes(\n view, nodeDef.ngContent!.index, action, parentNode, nextSibling, target);\n } else {\n const rn = renderNode(view, nodeDef);\n if (action === RenderNodeAction.RemoveChild && (nodeDef.flags & NodeFlags.ComponentView) &&\n (nodeDef.bindingFlags & BindingFlags.CatSyntheticProperty)) {\n // Note: we might need to do both actions.\n if (nodeDef.bindingFlags & (BindingFlags.SyntheticProperty)) {\n execRenderNodeAction(view, rn, action, parentNode, nextSibling, target);\n }\n if (nodeDef.bindingFlags & (BindingFlags.SyntheticHostProperty)) {\n const compView = asElementData(view, nodeDef.nodeIndex).componentView;\n execRenderNodeAction(compView, rn, action, parentNode, nextSibling, target);\n }\n } else {\n execRenderNodeAction(view, rn, action, parentNode, nextSibling, target);\n }\n if (nodeDef.flags & NodeFlags.EmbeddedViews) {\n const embeddedViews = asElementData(view, nodeDef.nodeIndex).viewContainer!._embeddedViews;\n for (let k = 0; k < embeddedViews.length; k++) {\n visitRootRenderNodes(embeddedViews[k], action, parentNode, nextSibling, target);\n }\n }\n if (nodeDef.flags & NodeFlags.TypeElement && !nodeDef.element!.name) {\n visitSiblingRenderNodes(\n view, action, nodeDef.nodeIndex + 1, nodeDef.nodeIndex + nodeDef.childCount, parentNode,\n nextSibling, target);\n }\n }\n}\n\nfunction execRenderNodeAction(\n view: ViewData, renderNode: any, action: RenderNodeAction, parentNode: any, nextSibling: any,\n target?: any[]) {\n const renderer = view.renderer;\n switch (action) {\n case RenderNodeAction.AppendChild:\n renderer.appendChild(parentNode, renderNode);\n break;\n case RenderNodeAction.InsertBefore:\n renderer.insertBefore(parentNode, renderNode, nextSibling);\n break;\n case RenderNodeAction.RemoveChild:\n renderer.removeChild(parentNode, renderNode);\n break;\n case RenderNodeAction.Collect:\n target!.push(renderNode);\n break;\n }\n}\n\nconst NS_PREFIX_RE = /^:([^:]+):(.+)$/;\n\nexport function splitNamespace(name: string): string[] {\n if (name[0] === ':') {\n const match = name.match(NS_PREFIX_RE)!;\n return [match[1], match[2]];\n }\n return ['', name];\n}\n\nexport function calcBindingFlags(bindings: BindingDef[]): BindingFlags {\n let flags = 0;\n for (let i = 0; i < bindings.length; i++) {\n flags |= bindings[i].flags;\n }\n return flags;\n}\n\nexport function interpolate(valueCount: number, constAndInterp: string[]): string {\n let result = '';\n for (let i = 0; i < valueCount * 2; i = i + 2) {\n result = result + constAndInterp[i] + _toStringWithNull(constAndInterp[i + 1]);\n }\n return result + constAndInterp[valueCount * 2];\n}\n\nexport function inlineInterpolate(\n valueCount: number, c0: string, a1: any, c1: string, a2?: any, c2?: string, a3?: any,\n c3?: string, a4?: any, c4?: string, a5?: any, c5?: string, a6?: any, c6?: string, a7?: any,\n c7?: string, a8?: any, c8?: string, a9?: any, c9?: string): string {\n switch (valueCount) {\n case 1:\n return c0 + _toStringWithNull(a1) + c1;\n case 2:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2;\n case 3:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3;\n case 4:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4;\n case 5:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5;\n case 6:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) + c6;\n case 7:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) +\n c6 + _toStringWithNull(a7) + c7;\n case 8:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) +\n c6 + _toStringWithNull(a7) + c7 + _toStringWithNull(a8) + c8;\n case 9:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) +\n c6 + _toStringWithNull(a7) + c7 + _toStringWithNull(a8) + c8 + _toStringWithNull(a9) + c9;\n default:\n throw new Error(`Does not support more than 9 expressions`);\n }\n}\n\nfunction _toStringWithNull(v: any): string {\n return v != null ? v.toString() : '';\n}\n\nexport const EMPTY_MAP: {[key: string]: any} = {};\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 {resolveForwardRef} from '../di/forward_ref';\nimport {Injector} from '../di/injector';\nimport {setCurrentInjector} from '../di/injector_compatibility';\nimport {INJECTOR} from '../di/injector_token';\nimport {getInjectableDef, ɵɵInjectableDeclaration} from '../di/interface/defs';\nimport {INJECTOR_SCOPE} from '../di/scope';\nimport {NgModuleRef} from '../linker/ng_module_factory';\nimport {newArray} from '../util/array_utils';\nimport {stringify} from '../util/stringify';\n\nimport {DepDef, DepFlags, NgModuleData, NgModuleDefinition, NgModuleProviderDef, NodeFlags} from './types';\nimport {splitDepsDsl, tokenKey} from './util';\n\nconst UNDEFINED_VALUE = {};\n\nconst InjectorRefTokenKey = tokenKey(Injector);\nconst INJECTORRefTokenKey = tokenKey(INJECTOR);\nconst NgModuleRefTokenKey = tokenKey(NgModuleRef);\n\nexport function moduleProvideDef(\n flags: NodeFlags, token: any, value: any, deps: ([DepFlags, any]|any)[]): NgModuleProviderDef {\n // Need to resolve forwardRefs as e.g. for `useValue` we\n // lowered the expression and then stopped evaluating it,\n // i.e. also didn't unwrap it.\n value = resolveForwardRef(value);\n const depDefs = splitDepsDsl(deps, stringify(token));\n return {\n // will bet set by the module definition\n index: -1,\n deps: depDefs,\n flags,\n token,\n value\n };\n}\n\nexport function moduleDef(providers: NgModuleProviderDef[]): NgModuleDefinition {\n const providersByKey: {[key: string]: NgModuleProviderDef} = {};\n const modules = [];\n let scope: 'root'|'platform'|null = null;\n for (let i = 0; i < providers.length; i++) {\n const provider = providers[i];\n if (provider.token === INJECTOR_SCOPE) {\n scope = provider.value;\n }\n if (provider.flags & NodeFlags.TypeNgModule) {\n modules.push(provider.token);\n }\n provider.index = i;\n providersByKey[tokenKey(provider.token)] = provider;\n }\n return {\n // Will be filled later...\n factory: null,\n providersByKey,\n providers,\n modules,\n scope: scope,\n };\n}\n\nexport function initNgModule(data: NgModuleData) {\n const def = data._def;\n const providers = data._providers = newArray(def.providers.length);\n for (let i = 0; i < def.providers.length; i++) {\n const provDef = def.providers[i];\n if (!(provDef.flags & NodeFlags.LazyProvider)) {\n // Make sure the provider has not been already initialized outside this loop.\n if (providers[i] === undefined) {\n providers[i] = _createProviderInstance(data, provDef);\n }\n }\n }\n}\n\nexport function resolveNgModuleDep(\n data: NgModuleData, depDef: DepDef, notFoundValue: any = Injector.THROW_IF_NOT_FOUND): any {\n const former = setCurrentInjector(data);\n try {\n if (depDef.flags & DepFlags.Value) {\n return depDef.token;\n }\n if (depDef.flags & DepFlags.Optional) {\n notFoundValue = null;\n }\n if (depDef.flags & DepFlags.SkipSelf) {\n return data._parent.get(depDef.token, notFoundValue);\n }\n const tokenKey = depDef.tokenKey;\n switch (tokenKey) {\n case InjectorRefTokenKey:\n case INJECTORRefTokenKey:\n case NgModuleRefTokenKey:\n return data;\n }\n const providerDef = data._def.providersByKey[tokenKey];\n let injectableDef: ɵɵInjectableDeclaration<any>|null;\n if (providerDef) {\n let providerInstance = data._providers[providerDef.index];\n if (providerInstance === undefined) {\n providerInstance = data._providers[providerDef.index] =\n _createProviderInstance(data, providerDef);\n }\n return providerInstance === UNDEFINED_VALUE ? undefined : providerInstance;\n } else if (\n (injectableDef = getInjectableDef(depDef.token)) && targetsModule(data, injectableDef)) {\n const index = data._providers.length;\n data._def.providers[index] = data._def.providersByKey[depDef.tokenKey] = {\n flags: NodeFlags.TypeFactoryProvider | NodeFlags.LazyProvider,\n value: injectableDef.factory,\n deps: [],\n index,\n token: depDef.token,\n };\n data._providers[index] = UNDEFINED_VALUE;\n return (\n data._providers[index] =\n _createProviderInstance(data, data._def.providersByKey[depDef.tokenKey]));\n } else if (depDef.flags & DepFlags.Self) {\n return notFoundValue;\n }\n return data._parent.get(depDef.token, notFoundValue);\n } finally {\n setCurrentInjector(former);\n }\n}\n\nfunction moduleTransitivelyPresent(ngModule: NgModuleData, scope: any): boolean {\n return ngModule._def.modules.indexOf(scope) > -1;\n}\n\nfunction targetsModule(ngModule: NgModuleData, def: ɵɵInjectableDeclaration<any>): boolean {\n const providedIn = resolveForwardRef(def.providedIn);\n return providedIn != null &&\n (providedIn === 'any' || providedIn === ngModule._def.scope ||\n moduleTransitivelyPresent(ngModule, providedIn));\n}\n\nfunction _createProviderInstance(ngModule: NgModuleData, providerDef: NgModuleProviderDef): any {\n let injectable: any;\n switch (providerDef.flags & NodeFlags.Types) {\n case NodeFlags.TypeClassProvider:\n injectable = _createClass(ngModule, providerDef.value, providerDef.deps);\n break;\n case NodeFlags.TypeFactoryProvider:\n injectable = _callFactory(ngModule, providerDef.value, providerDef.deps);\n break;\n case NodeFlags.TypeUseExistingProvider:\n injectable = resolveNgModuleDep(ngModule, providerDef.deps[0]);\n break;\n case NodeFlags.TypeValueProvider:\n injectable = providerDef.value;\n break;\n }\n\n // The read of `ngOnDestroy` here is slightly expensive as it's megamorphic, so it should be\n // avoided if possible. The sequence of checks here determines whether ngOnDestroy needs to be\n // checked. It might not if the `injectable` isn't an object or if NodeFlags.OnDestroy is already\n // set (ngOnDestroy was detected statically).\n if (injectable !== UNDEFINED_VALUE && injectable !== null && typeof injectable === 'object' &&\n !(providerDef.flags & NodeFlags.OnDestroy) && typeof injectable.ngOnDestroy === 'function') {\n providerDef.flags |= NodeFlags.OnDestroy;\n }\n return injectable === undefined ? UNDEFINED_VALUE : injectable;\n}\n\nfunction _createClass(ngModule: NgModuleData, ctor: any, deps: DepDef[]): any {\n const len = deps.length;\n switch (len) {\n case 0:\n return new ctor();\n case 1:\n return new ctor(resolveNgModuleDep(ngModule, deps[0]));\n case 2:\n return new ctor(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]));\n case 3:\n return new ctor(\n resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]),\n resolveNgModuleDep(ngModule, deps[2]));\n default:\n const depValues = [];\n for (let i = 0; i < len; i++) {\n depValues[i] = resolveNgModuleDep(ngModule, deps[i]);\n }\n return new ctor(...depValues);\n }\n}\n\nfunction _callFactory(ngModule: NgModuleData, factory: any, deps: DepDef[]): any {\n const len = deps.length;\n switch (len) {\n case 0:\n return factory();\n case 1:\n return factory(resolveNgModuleDep(ngModule, deps[0]));\n case 2:\n return factory(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]));\n case 3:\n return factory(\n resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]),\n resolveNgModuleDep(ngModule, deps[2]));\n default:\n const depValues = [];\n for (let i = 0; i < len; i++) {\n depValues[i] = resolveNgModuleDep(ngModule, deps[i]);\n }\n return factory(...depValues);\n }\n}\n\nexport function callNgModuleLifecycle(ngModule: NgModuleData, lifecycles: NodeFlags) {\n const def = ngModule._def;\n const destroyed = new Set<any>();\n for (let i = 0; i < def.providers.length; i++) {\n const provDef = def.providers[i];\n if (provDef.flags & NodeFlags.OnDestroy) {\n const instance = ngModule._providers[i];\n if (instance && instance !== UNDEFINED_VALUE) {\n const onDestroy: Function|undefined = instance.ngOnDestroy;\n if (typeof onDestroy === 'function' && !destroyed.has(instance)) {\n onDestroy.apply(instance);\n destroyed.add(instance);\n }\n }\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {addToArray, removeFromArray} from '../util/array_utils';\n\nimport {ElementData, NodeDef, NodeFlags, Services, ViewData, ViewDefinition, ViewState} from './types';\nimport {declaredViewContainer, renderNode, RenderNodeAction, visitRootRenderNodes} from './util';\n\nexport function attachEmbeddedView(\n parentView: ViewData, elementData: ElementData, viewIndex: number|undefined|null,\n view: ViewData) {\n let embeddedViews = elementData.viewContainer!._embeddedViews;\n if (viewIndex === null || viewIndex === undefined) {\n viewIndex = embeddedViews.length;\n }\n view.viewContainerParent = parentView;\n addToArray(embeddedViews, viewIndex!, view);\n attachProjectedView(elementData, view);\n\n Services.dirtyParentQueries(view);\n\n const prevView = viewIndex! > 0 ? embeddedViews[viewIndex! - 1] : null;\n renderAttachEmbeddedView(elementData, prevView, view);\n}\n\nfunction attachProjectedView(vcElementData: ElementData, view: ViewData) {\n const dvcElementData = declaredViewContainer(view);\n if (!dvcElementData || dvcElementData === vcElementData ||\n view.state & ViewState.IsProjectedView) {\n return;\n }\n // Note: For performance reasons, we\n // - add a view to template._projectedViews only 1x throughout its lifetime,\n // and remove it not until the view is destroyed.\n // (hard, as when a parent view is attached/detached we would need to attach/detach all\n // nested projected views as well, even across component boundaries).\n // - don't track the insertion order of views in the projected views array\n // (hard, as when the views of the same template are inserted different view containers)\n view.state |= ViewState.IsProjectedView;\n let projectedViews = dvcElementData.template._projectedViews;\n if (!projectedViews) {\n projectedViews = dvcElementData.template._projectedViews = [];\n }\n projectedViews.push(view);\n // Note: we are changing the NodeDef here as we cannot calculate\n // the fact whether a template is used for projection during compilation.\n markNodeAsProjectedTemplate(view.parent!.def, view.parentNodeDef!);\n}\n\nfunction markNodeAsProjectedTemplate(viewDef: ViewDefinition, nodeDef: NodeDef) {\n if (nodeDef.flags & NodeFlags.ProjectedTemplate) {\n return;\n }\n viewDef.nodeFlags |= NodeFlags.ProjectedTemplate;\n nodeDef.flags |= NodeFlags.ProjectedTemplate;\n let parentNodeDef = nodeDef.parent;\n while (parentNodeDef) {\n parentNodeDef.childFlags |= NodeFlags.ProjectedTemplate;\n parentNodeDef = parentNodeDef.parent;\n }\n}\n\nexport function detachEmbeddedView(elementData: ElementData, viewIndex?: number): ViewData|null {\n const embeddedViews = elementData.viewContainer!._embeddedViews;\n if (viewIndex == null || viewIndex >= embeddedViews.length) {\n viewIndex = embeddedViews.length - 1;\n }\n if (viewIndex < 0) {\n return null;\n }\n const view = embeddedViews[viewIndex];\n view.viewContainerParent = null;\n removeFromArray(embeddedViews, viewIndex);\n\n // See attachProjectedView for why we don't update projectedViews here.\n Services.dirtyParentQueries(view);\n\n renderDetachView(view);\n\n return view;\n}\n\nexport function detachProjectedView(view: ViewData) {\n if (!(view.state & ViewState.IsProjectedView)) {\n return;\n }\n const dvcElementData = declaredViewContainer(view);\n if (dvcElementData) {\n const projectedViews = dvcElementData.template._projectedViews;\n if (projectedViews) {\n removeFromArray(projectedViews, projectedViews.indexOf(view));\n Services.dirtyParentQueries(view);\n }\n }\n}\n\nexport function moveEmbeddedView(\n elementData: ElementData, oldViewIndex: number, newViewIndex: number): ViewData {\n const embeddedViews = elementData.viewContainer!._embeddedViews;\n const view = embeddedViews[oldViewIndex];\n removeFromArray(embeddedViews, oldViewIndex);\n if (newViewIndex == null) {\n newViewIndex = embeddedViews.length;\n }\n addToArray(embeddedViews, newViewIndex, view);\n\n // Note: Don't need to change projectedViews as the order in there\n // as always invalid...\n\n Services.dirtyParentQueries(view);\n\n renderDetachView(view);\n const prevView = newViewIndex > 0 ? embeddedViews[newViewIndex - 1] : null;\n renderAttachEmbeddedView(elementData, prevView, view);\n\n return view;\n}\n\nfunction renderAttachEmbeddedView(\n elementData: ElementData, prevView: ViewData|null, view: ViewData) {\n const prevRenderNode =\n prevView ? renderNode(prevView, prevView.def.lastRenderRootNode!) : elementData.renderElement;\n const parentNode = view.renderer.parentNode(prevRenderNode);\n const nextSibling = view.renderer.nextSibling(prevRenderNode);\n // Note: We can't check if `nextSibling` is present, as on WebWorkers it will always be!\n // However, browsers automatically do `appendChild` when there is no `nextSibling`.\n visitRootRenderNodes(view, RenderNodeAction.InsertBefore, parentNode, nextSibling, undefined);\n}\n\nexport function renderDetachView(view: ViewData) {\n visitRootRenderNodes(view, RenderNodeAction.RemoveChild, null, null, undefined);\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 {ChangeDetectorRef} from '../change_detection/change_detection';\nimport {Injector} from '../di/injector';\nimport {InjectFlags} from '../di/interface/injector';\nimport {Type} from '../interface/type';\nimport {ComponentFactory, ComponentRef} from '../linker/component_factory';\nimport {ComponentFactoryBoundToModule, ComponentFactoryResolver} from '../linker/component_factory_resolver';\nimport {ElementRef} from '../linker/element_ref';\nimport {InternalNgModuleRef, NgModuleRef} from '../linker/ng_module_factory';\nimport {TemplateRef} from '../linker/template_ref';\nimport {ViewContainerRef} from '../linker/view_container_ref';\nimport {EmbeddedViewRef, InternalViewRef, ViewRef, ViewRefTracker} from '../linker/view_ref';\nimport {stringify} from '../util/stringify';\nimport {VERSION} from '../version';\n\nimport {callNgModuleLifecycle, initNgModule, resolveNgModuleDep} from './ng_module';\nimport {asElementData, asProviderData, asTextData, DepFlags, ElementData, NgModuleData, NgModuleDefinition, NodeDef, NodeFlags, Services, TemplateData, ViewContainerData, ViewData, ViewDefinitionFactory, ViewState} from './types';\nimport {markParentViewsForCheck, resolveDefinition, rootRenderNodes, tokenKey, viewParentEl} from './util';\nimport {attachEmbeddedView, detachEmbeddedView, moveEmbeddedView, renderDetachView} from './view_attach';\n\nconst EMPTY_CONTEXT = {};\n\n// Attention: this function is called as top level function.\n// Putting any logic in here will destroy closure tree shaking!\nexport function createComponentFactory(\n selector: string, componentType: Type<any>, viewDefFactory: ViewDefinitionFactory,\n inputs: {[propName: string]: string}|null, outputs: {[propName: string]: string},\n ngContentSelectors: string[]): ComponentFactory<any> {\n return new ComponentFactory_(\n selector, componentType, viewDefFactory, inputs, outputs, ngContentSelectors);\n}\n\nexport function getComponentViewDefinitionFactory(componentFactory: ComponentFactory<any>):\n ViewDefinitionFactory {\n return (componentFactory as ComponentFactory_).viewDefFactory;\n}\n\nclass ComponentFactory_ extends ComponentFactory<any> {\n /**\n * @internal\n */\n viewDefFactory: ViewDefinitionFactory;\n\n constructor(\n public selector: string, public componentType: Type<any>,\n viewDefFactory: ViewDefinitionFactory, private _inputs: {[propName: string]: string}|null,\n private _outputs: {[propName: string]: string}, public ngContentSelectors: string[]) {\n // Attention: this ctor is called as top level function.\n // Putting any logic in here will destroy closure tree shaking!\n super();\n this.viewDefFactory = viewDefFactory;\n }\n\n override get inputs() {\n const inputsArr: {propName: string, templateName: string}[] = [];\n const inputs = this._inputs!;\n for (let propName in inputs) {\n const templateName = inputs[propName];\n inputsArr.push({propName, templateName});\n }\n return inputsArr;\n }\n\n override get outputs() {\n const outputsArr: {propName: string, templateName: string}[] = [];\n for (let propName in this._outputs) {\n const templateName = this._outputs[propName];\n outputsArr.push({propName, templateName});\n }\n return outputsArr;\n }\n\n /**\n * Creates a new component.\n */\n override create(\n injector: Injector, projectableNodes?: any[][], rootSelectorOrNode?: string|any,\n ngModule?: NgModuleRef<any>): ComponentRef<any> {\n if (!ngModule) {\n throw new Error('ngModule should be provided');\n }\n const viewDef = resolveDefinition(this.viewDefFactory);\n const componentNodeIndex = viewDef.nodes[0].element!.componentProvider!.nodeIndex;\n const view = Services.createRootView(\n injector, projectableNodes || [], rootSelectorOrNode, viewDef, ngModule, EMPTY_CONTEXT);\n const component = asProviderData(view, componentNodeIndex).instance;\n if (rootSelectorOrNode) {\n view.renderer.setAttribute(asElementData(view, 0).renderElement, 'ng-version', VERSION.full);\n }\n\n return new ComponentRef_(view, new ViewRef_(view), component);\n }\n}\n\nclass ComponentRef_ extends ComponentRef<any> {\n public override readonly hostView: ViewRef;\n public override readonly instance: any;\n public override readonly changeDetectorRef: ChangeDetectorRef;\n private _elDef: NodeDef;\n constructor(private _view: ViewData, private _viewRef: ViewRef, private _component: any) {\n super();\n this._elDef = this._view.def.nodes[0];\n this.hostView = _viewRef;\n this.changeDetectorRef = _viewRef;\n this.instance = _component;\n }\n override get location(): ElementRef {\n return new ElementRef(asElementData(this._view, this._elDef.nodeIndex).renderElement);\n }\n override get injector(): Injector {\n return new Injector_(this._view, this._elDef);\n }\n override get componentType(): Type<any> {\n return <any>this._component.constructor;\n }\n\n override destroy(): void {\n this._viewRef.destroy();\n }\n override onDestroy(callback: Function): void {\n this._viewRef.onDestroy(callback);\n }\n}\n\nexport function createViewContainerData(\n view: ViewData, elDef: NodeDef, elData: ElementData): ViewContainerData {\n return new ViewContainerRef_(view, elDef, elData);\n}\n\nclass ViewContainerRef_ implements ViewContainerData {\n /**\n * @internal\n */\n _embeddedViews: ViewData[] = [];\n constructor(private _view: ViewData, private _elDef: NodeDef, private _data: ElementData) {}\n\n get element(): ElementRef {\n return new ElementRef(this._data.renderElement);\n }\n\n get injector(): Injector {\n return new Injector_(this._view, this._elDef);\n }\n\n /** @deprecated No replacement */\n get parentInjector(): Injector {\n let view = this._view;\n let elDef = this._elDef.parent;\n while (!elDef && view) {\n elDef = viewParentEl(view);\n view = view.parent!;\n }\n\n return view ? new Injector_(view, elDef) : new Injector_(this._view, null);\n }\n\n clear(): void {\n const len = this._embeddedViews.length;\n for (let i = len - 1; i >= 0; i--) {\n const view = detachEmbeddedView(this._data, i)!;\n Services.destroyView(view);\n }\n }\n\n get(index: number): ViewRef|null {\n const view = this._embeddedViews[index];\n if (view) {\n const ref = new ViewRef_(view);\n ref.attachToViewContainerRef(this);\n return ref;\n }\n return null;\n }\n\n get length(): number {\n return this._embeddedViews.length;\n }\n\n createEmbeddedView<C>(templateRef: TemplateRef<C>, context?: C, index?: number):\n EmbeddedViewRef<C> {\n const viewRef = templateRef.createEmbeddedView(context || <any>{});\n this.insert(viewRef, index);\n return viewRef;\n }\n\n createComponent<C>(\n componentFactory: ComponentFactory<C>, index?: number, injector?: Injector,\n projectableNodes?: any[][], ngModuleRef?: NgModuleRef<any>): ComponentRef<C> {\n const contextInjector = injector || this.parentInjector;\n if (!ngModuleRef && !(componentFactory instanceof ComponentFactoryBoundToModule)) {\n ngModuleRef = contextInjector.get(NgModuleRef);\n }\n const componentRef =\n componentFactory.create(contextInjector, projectableNodes, undefined, ngModuleRef);\n this.insert(componentRef.hostView, index);\n return componentRef;\n }\n\n insert(viewRef: ViewRef, index?: number): ViewRef {\n if (viewRef.destroyed) {\n throw new Error('Cannot insert a destroyed View in a ViewContainer!');\n }\n const viewRef_ = <ViewRef_>viewRef;\n const viewData = viewRef_._view;\n attachEmbeddedView(this._view, this._data, index, viewData);\n viewRef_.attachToViewContainerRef(this);\n return viewRef;\n }\n\n move(viewRef: ViewRef_, currentIndex: number): ViewRef {\n if (viewRef.destroyed) {\n throw new Error('Cannot move a destroyed View in a ViewContainer!');\n }\n const previousIndex = this._embeddedViews.indexOf(viewRef._view);\n moveEmbeddedView(this._data, previousIndex, currentIndex);\n return viewRef;\n }\n\n indexOf(viewRef: ViewRef): number {\n return this._embeddedViews.indexOf((<ViewRef_>viewRef)._view);\n }\n\n remove(index?: number): void {\n const viewData = detachEmbeddedView(this._data, index);\n if (viewData) {\n Services.destroyView(viewData);\n }\n }\n\n detach(index?: number): ViewRef|null {\n const view = detachEmbeddedView(this._data, index);\n return view ? new ViewRef_(view) : null;\n }\n}\n\nexport function createChangeDetectorRef(view: ViewData): ChangeDetectorRef {\n return new ViewRef_(view);\n}\n\nexport class ViewRef_ implements EmbeddedViewRef<any>, InternalViewRef {\n /** @internal */\n _view: ViewData;\n private _viewContainerRef: ViewContainerRef|null;\n private _appRef: ViewRefTracker|null;\n\n constructor(_view: ViewData) {\n this._view = _view;\n this._viewContainerRef = null;\n this._appRef = null;\n }\n\n get rootNodes(): any[] {\n return rootRenderNodes(this._view);\n }\n\n get context() {\n return this._view.context;\n }\n\n set context(value: any) {\n this._view.context = value;\n }\n\n get destroyed(): boolean {\n return (this._view.state & ViewState.Destroyed) !== 0;\n }\n\n markForCheck(): void {\n markParentViewsForCheck(this._view);\n }\n detach(): void {\n this._view.state &= ~ViewState.Attached;\n }\n detectChanges(): void {\n const fs = this._view.root.rendererFactory;\n if (fs.begin) {\n fs.begin();\n }\n try {\n Services.checkAndUpdateView(this._view);\n } finally {\n if (fs.end) {\n fs.end();\n }\n }\n }\n checkNoChanges(): void {\n Services.checkNoChangesView(this._view);\n }\n\n reattach(): void {\n this._view.state |= ViewState.Attached;\n }\n onDestroy(callback: Function) {\n if (!this._view.disposables) {\n this._view.disposables = [];\n }\n this._view.disposables.push(<any>callback);\n }\n\n destroy() {\n if (this._appRef) {\n this._appRef.detachView(this);\n } else if (this._viewContainerRef) {\n this._viewContainerRef.detach(this._viewContainerRef.indexOf(this));\n }\n Services.destroyView(this._view);\n }\n\n detachFromAppRef() {\n this._appRef = null;\n renderDetachView(this._view);\n Services.dirtyParentQueries(this._view);\n }\n\n attachToAppRef(appRef: ViewRefTracker) {\n if (this._viewContainerRef) {\n throw new Error('This view is already attached to a ViewContainer!');\n }\n this._appRef = appRef;\n }\n\n attachToViewContainerRef(vcRef: ViewContainerRef) {\n if (this._appRef) {\n throw new Error('This view is already attached directly to the ApplicationRef!');\n }\n this._viewContainerRef = vcRef;\n }\n}\n\nexport function createTemplateData(view: ViewData, def: NodeDef): TemplateData {\n return new TemplateRef_(view, def);\n}\n\nclass TemplateRef_ extends TemplateRef<any> implements TemplateData {\n /**\n * @internal\n */\n // TODO(issue/24571): remove '!'.\n _projectedViews!: ViewData[];\n\n constructor(private _parentView: ViewData, private _def: NodeDef) {\n super();\n }\n\n override createEmbeddedView(context: any): EmbeddedViewRef<any> {\n return new ViewRef_(Services.createEmbeddedView(\n this._parentView, this._def, this._def.element!.template !, context));\n }\n\n override get elementRef(): ElementRef {\n return new ElementRef(asElementData(this._parentView, this._def.nodeIndex).renderElement);\n }\n}\n\nexport function createInjector(view: ViewData, elDef: NodeDef): Injector {\n return new Injector_(view, elDef);\n}\n\nclass Injector_ implements Injector {\n constructor(private view: ViewData, private elDef: NodeDef|null) {}\n get(token: any, notFoundValue: any = Injector.THROW_IF_NOT_FOUND): any {\n const allowPrivateServices =\n this.elDef ? (this.elDef.flags & NodeFlags.ComponentView) !== 0 : false;\n return Services.resolveDep(\n this.view, this.elDef, allowPrivateServices,\n {flags: DepFlags.None, token, tokenKey: tokenKey(token)}, notFoundValue);\n }\n}\n\nexport function nodeValue(view: ViewData, index: number): any {\n const def = view.def.nodes[index];\n if (def.flags & NodeFlags.TypeElement) {\n const elData = asElementData(view, def.nodeIndex);\n return def.element!.template ? elData.template : elData.renderElement;\n } else if (def.flags & NodeFlags.TypeText) {\n return asTextData(view, def.nodeIndex).renderText;\n } else if (def.flags & (NodeFlags.CatProvider | NodeFlags.TypePipe)) {\n return asProviderData(view, def.nodeIndex).instance;\n }\n throw new Error(`Illegal state: read nodeValue for node index ${index}`);\n}\n\nexport function createNgModuleRef(\n moduleType: Type<any>, parent: Injector, bootstrapComponents: Type<any>[],\n def: NgModuleDefinition): NgModuleRef<any> {\n return new NgModuleRef_(moduleType, parent, bootstrapComponents, def);\n}\n\nclass NgModuleRef_ implements NgModuleData, InternalNgModuleRef<any> {\n private _destroyListeners: (() => void)[] = [];\n private _destroyed: boolean = false;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _providers!: any[];\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _modules!: any[];\n\n readonly injector: Injector = this;\n\n constructor(\n private _moduleType: Type<any>, public _parent: Injector,\n public _bootstrapComponents: Type<any>[], public _def: NgModuleDefinition) {\n initNgModule(this);\n }\n\n get(token: any, notFoundValue: any = Injector.THROW_IF_NOT_FOUND,\n injectFlags: InjectFlags = InjectFlags.Default): any {\n let flags = DepFlags.None;\n if (injectFlags & InjectFlags.SkipSelf) {\n flags |= DepFlags.SkipSelf;\n } else if (injectFlags & InjectFlags.Self) {\n flags |= DepFlags.Self;\n }\n return resolveNgModuleDep(\n this, {token: token, tokenKey: tokenKey(token), flags: flags}, notFoundValue);\n }\n\n get instance() {\n return this.get(this._moduleType);\n }\n\n get componentFactoryResolver() {\n return this.get(ComponentFactoryResolver);\n }\n\n destroy(): void {\n if (this._destroyed) {\n throw new Error(\n `The ng module ${stringify(this.instance.constructor)} has already been destroyed.`);\n }\n this._destroyed = true;\n callNgModuleLifecycle(this, NodeFlags.OnDestroy);\n this._destroyListeners.forEach((listener) => listener());\n }\n\n onDestroy(callback: () => void): void {\n this._destroyListeners.push(callback);\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 {ChangeDetectorRef, SimpleChange, SimpleChanges, WrappedValue} from '../change_detection/change_detection';\nimport {INJECTOR, Injector, resolveForwardRef} from '../di';\nimport {ElementRef} from '../linker/element_ref';\nimport {TemplateRef} from '../linker/template_ref';\nimport {ViewContainerRef} from '../linker/view_container_ref';\nimport {Renderer2} from '../render/api';\nimport {isObservable} from '../util/lang';\nimport {stringify} from '../util/stringify';\n\nimport {createChangeDetectorRef, createInjector} from './refs';\nimport {asElementData, asProviderData, BindingDef, BindingFlags, DepDef, DepFlags, NodeDef, NodeFlags, OutputDef, OutputType, ProviderData, QueryValueType, Services, shouldCallLifecycleInitHook, ViewData, ViewFlags, ViewState} from './types';\nimport {calcBindingFlags, checkBinding, dispatchEvent, isComponentView, splitDepsDsl, splitMatchedQueriesDsl, tokenKey, viewParentEl} from './util';\n\nconst Renderer2TokenKey = tokenKey(Renderer2);\nconst ElementRefTokenKey = tokenKey(ElementRef);\nconst ViewContainerRefTokenKey = tokenKey(ViewContainerRef);\nconst TemplateRefTokenKey = tokenKey(TemplateRef);\nconst ChangeDetectorRefTokenKey = tokenKey(ChangeDetectorRef);\nconst InjectorRefTokenKey = tokenKey(Injector);\nconst INJECTORRefTokenKey = tokenKey(INJECTOR);\n\nexport function directiveDef(\n checkIndex: number, flags: NodeFlags, matchedQueries: null|[string | number, QueryValueType][],\n childCount: number, ctor: any, deps: ([DepFlags, any]|any)[],\n props?: null|{[name: string]: [number, string]},\n outputs?: null|{[name: string]: string}): NodeDef {\n const bindings: BindingDef[] = [];\n if (props) {\n for (let prop in props) {\n const [bindingIndex, nonMinifiedName] = props[prop];\n bindings[bindingIndex] = {\n flags: BindingFlags.TypeProperty,\n name: prop,\n nonMinifiedName,\n ns: null,\n securityContext: null,\n suffix: null\n };\n }\n }\n const outputDefs: OutputDef[] = [];\n if (outputs) {\n for (let propName in outputs) {\n outputDefs.push(\n {type: OutputType.DirectiveOutput, propName, target: null, eventName: outputs[propName]});\n }\n }\n flags |= NodeFlags.TypeDirective;\n return _def(\n checkIndex, flags, matchedQueries, childCount, ctor, ctor, deps, bindings, outputDefs);\n}\n\nexport function pipeDef(flags: NodeFlags, ctor: any, deps: ([DepFlags, any]|any)[]): NodeDef {\n flags |= NodeFlags.TypePipe;\n return _def(-1, flags, null, 0, ctor, ctor, deps);\n}\n\nexport function providerDef(\n flags: NodeFlags, matchedQueries: null|[string | number, QueryValueType][], token: any,\n value: any, deps: ([DepFlags, any]|any)[]): NodeDef {\n return _def(-1, flags, matchedQueries, 0, token, value, deps);\n}\n\nexport function _def(\n checkIndex: number, flags: NodeFlags, matchedQueriesDsl: [string|number, QueryValueType][]|null,\n childCount: number, token: any, value: any, deps: ([DepFlags, any]|any)[],\n bindings?: BindingDef[], outputs?: OutputDef[]): NodeDef {\n const {matchedQueries, references, matchedQueryIds} = splitMatchedQueriesDsl(matchedQueriesDsl);\n if (!outputs) {\n outputs = [];\n }\n if (!bindings) {\n bindings = [];\n }\n // Need to resolve forwardRefs as e.g. for `useValue` we\n // lowered the expression and then stopped evaluating it,\n // i.e. also didn't unwrap it.\n value = resolveForwardRef(value);\n\n const depDefs = splitDepsDsl(deps, stringify(token));\n\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n checkIndex,\n flags,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n matchedQueries,\n matchedQueryIds,\n references,\n ngContentIndex: -1,\n childCount,\n bindings,\n bindingFlags: calcBindingFlags(bindings),\n outputs,\n element: null,\n provider: {token, value, deps: depDefs},\n text: null,\n query: null,\n ngContent: null\n };\n}\n\nexport function createProviderInstance(view: ViewData, def: NodeDef): any {\n return _createProviderInstance(view, def);\n}\n\nexport function createPipeInstance(view: ViewData, def: NodeDef): any {\n // deps are looked up from component.\n let compView = view;\n while (compView.parent && !isComponentView(compView)) {\n compView = compView.parent;\n }\n // pipes can see the private services of the component\n const allowPrivateServices = true;\n // pipes are always eager and classes!\n return createClass(\n compView.parent!, viewParentEl(compView)!, allowPrivateServices, def.provider!.value,\n def.provider!.deps);\n}\n\nexport function createDirectiveInstance(view: ViewData, def: NodeDef): any {\n // components can see other private services, other directives can't.\n const allowPrivateServices = (def.flags & NodeFlags.Component) > 0;\n // directives are always eager and classes!\n const instance =\n createClass(view, def.parent!, allowPrivateServices, def.provider!.value, def.provider!.deps);\n if (def.outputs.length) {\n for (let i = 0; i < def.outputs.length; i++) {\n const output = def.outputs[i];\n const outputObservable = instance[output.propName!];\n if (isObservable(outputObservable)) {\n const subscription = outputObservable.subscribe(\n eventHandlerClosure(view, def.parent!.nodeIndex, output.eventName));\n view.disposables![def.outputIndex + i] = subscription.unsubscribe.bind(subscription);\n } else {\n throw new Error(\n `@Output ${output.propName} not initialized in '${instance.constructor.name}'.`);\n }\n }\n }\n return instance;\n}\n\nfunction eventHandlerClosure(view: ViewData, index: number, eventName: string) {\n return (event: any) => dispatchEvent(view, index, eventName, event);\n}\n\nexport function checkAndUpdateDirectiveInline(\n view: ViewData, def: NodeDef, v0: any, v1: any, v2: any, v3: any, v4: any, v5: any, v6: any,\n v7: any, v8: any, v9: any): boolean {\n const providerData = asProviderData(view, def.nodeIndex);\n const directive = providerData.instance;\n let changed = false;\n let changes: SimpleChanges = undefined!;\n const bindLen = def.bindings.length;\n if (bindLen > 0 && checkBinding(view, def, 0, v0)) {\n changed = true;\n changes = updateProp(view, providerData, def, 0, v0, changes);\n }\n if (bindLen > 1 && checkBinding(view, def, 1, v1)) {\n changed = true;\n changes = updateProp(view, providerData, def, 1, v1, changes);\n }\n if (bindLen > 2 && checkBinding(view, def, 2, v2)) {\n changed = true;\n changes = updateProp(view, providerData, def, 2, v2, changes);\n }\n if (bindLen > 3 && checkBinding(view, def, 3, v3)) {\n changed = true;\n changes = updateProp(view, providerData, def, 3, v3, changes);\n }\n if (bindLen > 4 && checkBinding(view, def, 4, v4)) {\n changed = true;\n changes = updateProp(view, providerData, def, 4, v4, changes);\n }\n if (bindLen > 5 && checkBinding(view, def, 5, v5)) {\n changed = true;\n changes = updateProp(view, providerData, def, 5, v5, changes);\n }\n if (bindLen > 6 && checkBinding(view, def, 6, v6)) {\n changed = true;\n changes = updateProp(view, providerData, def, 6, v6, changes);\n }\n if (bindLen > 7 && checkBinding(view, def, 7, v7)) {\n changed = true;\n changes = updateProp(view, providerData, def, 7, v7, changes);\n }\n if (bindLen > 8 && checkBinding(view, def, 8, v8)) {\n changed = true;\n changes = updateProp(view, providerData, def, 8, v8, changes);\n }\n if (bindLen > 9 && checkBinding(view, def, 9, v9)) {\n changed = true;\n changes = updateProp(view, providerData, def, 9, v9, changes);\n }\n if (changes) {\n directive.ngOnChanges(changes);\n }\n if ((def.flags & NodeFlags.OnInit) &&\n shouldCallLifecycleInitHook(view, ViewState.InitState_CallingOnInit, def.nodeIndex)) {\n directive.ngOnInit();\n }\n if (def.flags & NodeFlags.DoCheck) {\n directive.ngDoCheck();\n }\n return changed;\n}\n\nexport function checkAndUpdateDirectiveDynamic(\n view: ViewData, def: NodeDef, values: any[]): boolean {\n const providerData = asProviderData(view, def.nodeIndex);\n const directive = providerData.instance;\n let changed = false;\n let changes: SimpleChanges = undefined!;\n for (let i = 0; i < values.length; i++) {\n if (checkBinding(view, def, i, values[i])) {\n changed = true;\n changes = updateProp(view, providerData, def, i, values[i], changes);\n }\n }\n if (changes) {\n directive.ngOnChanges(changes);\n }\n if ((def.flags & NodeFlags.OnInit) &&\n shouldCallLifecycleInitHook(view, ViewState.InitState_CallingOnInit, def.nodeIndex)) {\n directive.ngOnInit();\n }\n if (def.flags & NodeFlags.DoCheck) {\n directive.ngDoCheck();\n }\n return changed;\n}\n\nfunction _createProviderInstance(view: ViewData, def: NodeDef): any {\n // private services can see other private services\n const allowPrivateServices = (def.flags & NodeFlags.PrivateProvider) > 0;\n const providerDef = def.provider;\n switch (def.flags & NodeFlags.Types) {\n case NodeFlags.TypeClassProvider:\n return createClass(\n view, def.parent!, allowPrivateServices, providerDef!.value, providerDef!.deps);\n case NodeFlags.TypeFactoryProvider:\n return callFactory(\n view, def.parent!, allowPrivateServices, providerDef!.value, providerDef!.deps);\n case NodeFlags.TypeUseExistingProvider:\n return resolveDep(view, def.parent!, allowPrivateServices, providerDef!.deps[0]);\n case NodeFlags.TypeValueProvider:\n return providerDef!.value;\n }\n}\n\nfunction createClass(\n view: ViewData, elDef: NodeDef, allowPrivateServices: boolean, ctor: any, deps: DepDef[]): any {\n const len = deps.length;\n switch (len) {\n case 0:\n return new ctor();\n case 1:\n return new ctor(resolveDep(view, elDef, allowPrivateServices, deps[0]));\n case 2:\n return new ctor(\n resolveDep(view, elDef, allowPrivateServices, deps[0]),\n resolveDep(view, elDef, allowPrivateServices, deps[1]));\n case 3:\n return new ctor(\n resolveDep(view, elDef, allowPrivateServices, deps[0]),\n resolveDep(view, elDef, allowPrivateServices, deps[1]),\n resolveDep(view, elDef, allowPrivateServices, deps[2]));\n default:\n const depValues = [];\n for (let i = 0; i < len; i++) {\n depValues.push(resolveDep(view, elDef, allowPrivateServices, deps[i]));\n }\n return new ctor(...depValues);\n }\n}\n\nfunction callFactory(\n view: ViewData, elDef: NodeDef, allowPrivateServices: boolean, factory: any,\n deps: DepDef[]): any {\n const len = deps.length;\n switch (len) {\n case 0:\n return factory();\n case 1:\n return factory(resolveDep(view, elDef, allowPrivateServices, deps[0]));\n case 2:\n return factory(\n resolveDep(view, elDef, allowPrivateServices, deps[0]),\n resolveDep(view, elDef, allowPrivateServices, deps[1]));\n case 3:\n return factory(\n resolveDep(view, elDef, allowPrivateServices, deps[0]),\n resolveDep(view, elDef, allowPrivateServices, deps[1]),\n resolveDep(view, elDef, allowPrivateServices, deps[2]));\n default:\n const depValues = [];\n for (let i = 0; i < len; i++) {\n depValues.push(resolveDep(view, elDef, allowPrivateServices, deps[i]));\n }\n return factory(...depValues);\n }\n}\n\n// This default value is when checking the hierarchy for a token.\n//\n// It means both:\n// - the token is not provided by the current injector,\n// - only the element injectors should be checked (ie do not check module injectors\n//\n// mod1\n// /\n// el1 mod2\n// \\ /\n// el2\n//\n// When requesting el2.injector.get(token), we should check in the following order and return the\n// first found value:\n// - el2.injector.get(token, default)\n// - el1.injector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) -> do not check the module\n// - mod2.injector.get(token, default)\nexport const NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR = {};\n\nexport function resolveDep(\n view: ViewData, elDef: NodeDef, allowPrivateServices: boolean, depDef: DepDef,\n notFoundValue: any = Injector.THROW_IF_NOT_FOUND): any {\n if (depDef.flags & DepFlags.Value) {\n return depDef.token;\n }\n const startView = view;\n if (depDef.flags & DepFlags.Optional) {\n notFoundValue = null;\n }\n const tokenKey = depDef.tokenKey;\n\n if (tokenKey === ChangeDetectorRefTokenKey) {\n // directives on the same element as a component should be able to control the change detector\n // of that component as well.\n allowPrivateServices = !!(elDef && elDef.element!.componentView);\n }\n\n if (elDef && (depDef.flags & DepFlags.SkipSelf)) {\n allowPrivateServices = false;\n elDef = elDef.parent!;\n }\n\n let searchView: ViewData|null = view;\n while (searchView) {\n if (elDef) {\n switch (tokenKey) {\n case Renderer2TokenKey: {\n const compView = findCompView(searchView, elDef, allowPrivateServices);\n return compView.renderer;\n }\n case ElementRefTokenKey:\n return new ElementRef(asElementData(searchView, elDef.nodeIndex).renderElement);\n case ViewContainerRefTokenKey:\n return asElementData(searchView, elDef.nodeIndex).viewContainer;\n case TemplateRefTokenKey: {\n if (elDef.element!.template) {\n return asElementData(searchView, elDef.nodeIndex).template;\n }\n break;\n }\n case ChangeDetectorRefTokenKey: {\n let cdView = findCompView(searchView, elDef, allowPrivateServices);\n return createChangeDetectorRef(cdView);\n }\n case InjectorRefTokenKey:\n case INJECTORRefTokenKey:\n return createInjector(searchView, elDef);\n default:\n const providerDef =\n (allowPrivateServices ? elDef.element!.allProviders :\n elDef.element!.publicProviders)![tokenKey];\n if (providerDef) {\n let providerData = asProviderData(searchView, providerDef.nodeIndex);\n if (!providerData) {\n providerData = {instance: _createProviderInstance(searchView, providerDef)};\n searchView.nodes[providerDef.nodeIndex] = providerData as any;\n }\n return providerData.instance;\n }\n }\n }\n\n allowPrivateServices = isComponentView(searchView);\n elDef = viewParentEl(searchView)!;\n searchView = searchView.parent!;\n\n if (depDef.flags & DepFlags.Self) {\n searchView = null;\n }\n }\n\n const value = startView.root.injector.get(depDef.token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR);\n\n if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR ||\n notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) {\n // Return the value from the root element injector when\n // - it provides it\n // (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n // - the module injector should not be checked\n // (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n return value;\n }\n\n return startView.root.ngModule.injector.get(depDef.token, notFoundValue);\n}\n\nfunction findCompView(view: ViewData, elDef: NodeDef, allowPrivateServices: boolean) {\n let compView: ViewData;\n if (allowPrivateServices) {\n compView = asElementData(view, elDef.nodeIndex).componentView;\n } else {\n compView = view;\n while (compView.parent && !isComponentView(compView)) {\n compView = compView.parent;\n }\n }\n return compView;\n}\n\nfunction updateProp(\n view: ViewData, providerData: ProviderData, def: NodeDef, bindingIdx: number, value: any,\n changes: SimpleChanges): SimpleChanges {\n if (def.flags & NodeFlags.Component) {\n const compView = asElementData(view, def.parent!.nodeIndex).componentView;\n if (compView.def.flags & ViewFlags.OnPush) {\n compView.state |= ViewState.ChecksEnabled;\n }\n }\n const binding = def.bindings[bindingIdx];\n const propName = binding.name!;\n // Note: This is still safe with Closure Compiler as\n // the user passed in the property name as an object has to `providerDef`,\n // so Closure Compiler will have renamed the property correctly already.\n providerData.instance[propName] = value;\n if (def.flags & NodeFlags.OnChanges) {\n changes = changes || {};\n const oldValue = WrappedValue.unwrap(view.oldValues[def.bindingIndex + bindingIdx]);\n const binding = def.bindings[bindingIdx];\n changes[binding.nonMinifiedName!] =\n new SimpleChange(oldValue, value, (view.state & ViewState.FirstCheck) !== 0);\n }\n view.oldValues[def.bindingIndex + bindingIdx] = value;\n return changes;\n}\n\n// This function calls the ngAfterContentCheck, ngAfterContentInit,\n// ngAfterViewCheck, and ngAfterViewInit lifecycle hooks (depending on the node\n// flags in lifecycle). Unlike ngDoCheck, ngOnChanges and ngOnInit, which are\n// called during a pre-order traversal of the view tree (that is calling the\n// parent hooks before the child hooks) these events are sent in using a\n// post-order traversal of the tree (children before parents). This changes the\n// meaning of initIndex in the view state. For ngOnInit, initIndex tracks the\n// expected nodeIndex which a ngOnInit should be called. When sending\n// ngAfterContentInit and ngAfterViewInit it is the expected count of\n// ngAfterContentInit or ngAfterViewInit methods that have been called. This\n// ensure that despite being called recursively or after picking up after an\n// exception, the ngAfterContentInit or ngAfterViewInit will be called on the\n// correct nodes. Consider for example, the following (where E is an element\n// and D is a directive)\n// Tree: pre-order index post-order index\n// E1 0 6\n// E2 1 1\n// D3 2 0\n// E4 3 5\n// E5 4 4\n// E6 5 2\n// E7 6 3\n// As can be seen, the post-order index has an unclear relationship to the\n// pre-order index (postOrderIndex === preOrderIndex - parentCount +\n// childCount). Since number of calls to ngAfterContentInit and ngAfterViewInit\n// are stable (will be the same for the same view regardless of exceptions or\n// recursion) we just need to count them which will roughly correspond to the\n// post-order index (it skips elements and directives that do not have\n// lifecycle hooks).\n//\n// For example, if an exception is raised in the E6.onAfterViewInit() the\n// initIndex is left at 3 (by shouldCallLifecycleInitHook() which set it to\n// initIndex + 1). When checkAndUpdateView() is called again D3, E2 and E6 will\n// not have their ngAfterViewInit() called but, starting with E7, the rest of\n// the view will begin getting ngAfterViewInit() called until a check and\n// pass is complete.\n//\n// This algorthim also handles recursion. Consider if E4's ngAfterViewInit()\n// indirectly calls E1's ChangeDetectorRef.detectChanges(). The expected\n// initIndex is set to 6, the recusive checkAndUpdateView() starts walk again.\n// D3, E2, E6, E7, E5 and E4 are skipped, ngAfterViewInit() is called on E1.\n// When the recursion returns the initIndex will be 7 so E1 is skipped as it\n// has already been called in the recursively called checkAnUpdateView().\nexport function callLifecycleHooksChildrenFirst(view: ViewData, lifecycles: NodeFlags) {\n if (!(view.def.nodeFlags & lifecycles)) {\n return;\n }\n const nodes = view.def.nodes;\n let initIndex = 0;\n for (let i = 0; i < nodes.length; i++) {\n const nodeDef = nodes[i];\n let parent = nodeDef.parent;\n if (!parent && nodeDef.flags & lifecycles) {\n // matching root node (e.g. a pipe)\n callProviderLifecycles(view, i, nodeDef.flags & lifecycles, initIndex++);\n }\n if ((nodeDef.childFlags & lifecycles) === 0) {\n // no child matches one of the lifecycles\n i += nodeDef.childCount;\n }\n while (parent && (parent.flags & NodeFlags.TypeElement) &&\n i === parent.nodeIndex + parent.childCount) {\n // last child of an element\n if (parent.directChildFlags & lifecycles) {\n initIndex = callElementProvidersLifecycles(view, parent, lifecycles, initIndex);\n }\n parent = parent.parent;\n }\n }\n}\n\nfunction callElementProvidersLifecycles(\n view: ViewData, elDef: NodeDef, lifecycles: NodeFlags, initIndex: number): number {\n for (let i = elDef.nodeIndex + 1; i <= elDef.nodeIndex + elDef.childCount; i++) {\n const nodeDef = view.def.nodes[i];\n if (nodeDef.flags & lifecycles) {\n callProviderLifecycles(view, i, nodeDef.flags & lifecycles, initIndex++);\n }\n // only visit direct children\n i += nodeDef.childCount;\n }\n return initIndex;\n}\n\nfunction callProviderLifecycles(\n view: ViewData, index: number, lifecycles: NodeFlags, initIndex: number) {\n const providerData = asProviderData(view, index);\n if (!providerData) {\n return;\n }\n const provider = providerData.instance;\n if (!provider) {\n return;\n }\n Services.setCurrentNode(view, index);\n if (lifecycles & NodeFlags.AfterContentInit &&\n shouldCallLifecycleInitHook(view, ViewState.InitState_CallingAfterContentInit, initIndex)) {\n provider.ngAfterContentInit();\n }\n if (lifecycles & NodeFlags.AfterContentChecked) {\n provider.ngAfterContentChecked();\n }\n if (lifecycles & NodeFlags.AfterViewInit &&\n shouldCallLifecycleInitHook(view, ViewState.InitState_CallingAfterViewInit, initIndex)) {\n provider.ngAfterViewInit();\n }\n if (lifecycles & NodeFlags.AfterViewChecked) {\n provider.ngAfterViewChecked();\n }\n if (lifecycles & NodeFlags.OnDestroy) {\n provider.ngOnDestroy();\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 {ChangeDetectorRef as ViewEngine_ChangeDetectorRef} from '../change_detection/change_detector_ref';\nimport {InjectionToken} from '../di/injection_token';\nimport {Injector} from '../di/injector';\nimport {InjectFlags} from '../di/interface/injector';\nimport {ProviderToken} from '../di/provider_token';\nimport {Type} from '../interface/type';\nimport {ComponentFactory as viewEngine_ComponentFactory, ComponentRef as viewEngine_ComponentRef} from '../linker/component_factory';\nimport {ComponentFactoryResolver as viewEngine_ComponentFactoryResolver} from '../linker/component_factory_resolver';\nimport {createElementRef, ElementRef as viewEngine_ElementRef} from '../linker/element_ref';\nimport {NgModuleRef as viewEngine_NgModuleRef} from '../linker/ng_module_factory';\nimport {RendererFactory2} from '../render/api';\nimport {Sanitizer} from '../sanitization/sanitizer';\nimport {VERSION} from '../version';\nimport {NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR} from '../view/provider';\nimport {assertComponentType} from './assert';\nimport {createRootComponent, createRootComponentView, createRootContext, LifecycleHooksFeature} from './component';\nimport {getComponentDef} from './definition';\nimport {NodeInjector} from './di';\nimport {createLView, createTView, locateHostElement, renderView} from './instructions/shared';\nimport {ComponentDef} from './interfaces/definition';\nimport {TContainerNode, TElementContainerNode, TElementNode, TNode} from './interfaces/node';\nimport {domRendererFactory3, RendererFactory3} from './interfaces/renderer';\nimport {RNode} from './interfaces/renderer_dom';\nimport {HEADER_OFFSET, LView, LViewFlags, TViewType} from './interfaces/view';\nimport {MATH_ML_NAMESPACE, SVG_NAMESPACE} from './namespaces';\nimport {createElementNode, writeDirectClass} from './node_manipulation';\nimport {extractAttrsAndClassesFromSelector, stringifyCSSSelectorList} from './node_selector_matcher';\nimport {enterView, leaveView} from './state';\nimport {setUpAttributes} from './util/attrs_utils';\nimport {defaultScheduler} from './util/misc_utils';\nimport {getTNode} from './util/view_utils';\nimport {RootViewRef, ViewRef} from './view_ref';\n\nexport class ComponentFactoryResolver extends viewEngine_ComponentFactoryResolver {\n /**\n * @param ngModule The NgModuleRef to which all resolved factories are bound.\n */\n constructor(private ngModule?: viewEngine_NgModuleRef<any>) {\n super();\n }\n\n override resolveComponentFactory<T>(component: Type<T>): viewEngine_ComponentFactory<T> {\n ngDevMode && assertComponentType(component);\n const componentDef = getComponentDef(component)!;\n return new ComponentFactory(componentDef, this.ngModule);\n }\n}\n\nfunction toRefArray(map: {[key: string]: string}): {propName: string; templateName: string;}[] {\n const array: {propName: string; templateName: string;}[] = [];\n for (let nonMinified in map) {\n if (map.hasOwnProperty(nonMinified)) {\n const minified = map[nonMinified];\n array.push({propName: minified, templateName: nonMinified});\n }\n }\n return array;\n}\n\nfunction getNamespace(elementName: string): string|null {\n const name = elementName.toLowerCase();\n return name === 'svg' ? SVG_NAMESPACE : (name === 'math' ? MATH_ML_NAMESPACE : null);\n}\n\n/**\n * A change detection scheduler token for {@link RootContext}. This token is the default value used\n * for the default `RootContext` found in the {@link ROOT_CONTEXT} token.\n */\nexport const SCHEDULER = new InjectionToken<((fn: () => void) => void)>('SCHEDULER_TOKEN', {\n providedIn: 'root',\n factory: () => defaultScheduler,\n});\n\nfunction createChainedInjector(rootViewInjector: Injector, moduleInjector: Injector): Injector {\n return {\n get: <T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): T => {\n const value = rootViewInjector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as T, flags);\n\n if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR ||\n notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) {\n // Return the value from the root element injector when\n // - it provides it\n // (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n // - the module injector should not be checked\n // (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n return value;\n }\n\n return moduleInjector.get(token, notFoundValue, flags);\n }\n };\n}\n\n/**\n * Render3 implementation of {@link viewEngine_ComponentFactory}.\n */\nexport class ComponentFactory<T> extends viewEngine_ComponentFactory<T> {\n override selector: string;\n override componentType: Type<any>;\n override ngContentSelectors: string[];\n isBoundToModule: boolean;\n\n override get inputs(): {propName: string; templateName: string;}[] {\n return toRefArray(this.componentDef.inputs);\n }\n\n override get outputs(): {propName: string; templateName: string;}[] {\n return toRefArray(this.componentDef.outputs);\n }\n\n /**\n * @param componentDef The component definition.\n * @param ngModule The NgModuleRef to which the factory is bound.\n */\n constructor(\n private componentDef: ComponentDef<any>, private ngModule?: viewEngine_NgModuleRef<any>) {\n super();\n this.componentType = componentDef.type;\n this.selector = stringifyCSSSelectorList(componentDef.selectors);\n this.ngContentSelectors =\n componentDef.ngContentSelectors ? componentDef.ngContentSelectors : [];\n this.isBoundToModule = !!ngModule;\n }\n\n override create(\n injector: Injector, projectableNodes?: any[][]|undefined, rootSelectorOrNode?: any,\n ngModule?: viewEngine_NgModuleRef<any>|undefined): viewEngine_ComponentRef<T> {\n ngModule = ngModule || this.ngModule;\n\n const rootViewInjector =\n ngModule ? createChainedInjector(injector, ngModule.injector) : injector;\n\n const rendererFactory =\n rootViewInjector.get(RendererFactory2, domRendererFactory3) as RendererFactory3;\n const sanitizer = rootViewInjector.get(Sanitizer, null);\n\n const hostRenderer = rendererFactory.createRenderer(null, this.componentDef);\n // Determine a tag name used for creating host elements when this component is created\n // dynamically. Default to 'div' if this component did not specify any tag name in its selector.\n const elementName = this.componentDef.selectors[0][0] as string || 'div';\n const hostRNode = rootSelectorOrNode ?\n locateHostElement(hostRenderer, rootSelectorOrNode, this.componentDef.encapsulation) :\n createElementNode(\n rendererFactory.createRenderer(null, this.componentDef), elementName,\n getNamespace(elementName));\n\n const rootFlags = this.componentDef.onPush ? LViewFlags.Dirty | LViewFlags.IsRoot :\n LViewFlags.CheckAlways | LViewFlags.IsRoot;\n const rootContext = createRootContext();\n\n // Create the root view. Uses empty TView and ContentTemplate.\n const rootTView = createTView(TViewType.Root, null, null, 1, 0, null, null, null, null, null);\n const rootLView = createLView(\n null, rootTView, rootContext, rootFlags, null, null, rendererFactory, hostRenderer,\n sanitizer, rootViewInjector);\n\n // rootView is the parent when bootstrapping\n // TODO(misko): it looks like we are entering view here but we don't really need to as\n // `renderView` does that. However as the code is written it is needed because\n // `createRootComponentView` and `createRootComponent` both read global state. Fixing those\n // issues would allow us to drop this.\n enterView(rootLView);\n\n let component: T;\n let tElementNode: TElementNode;\n\n try {\n const componentView = createRootComponentView(\n hostRNode, this.componentDef, rootLView, rendererFactory, hostRenderer);\n if (hostRNode) {\n if (rootSelectorOrNode) {\n setUpAttributes(hostRenderer, hostRNode, ['ng-version', VERSION.full]);\n } else {\n // If host element is created as a part of this function call (i.e. `rootSelectorOrNode`\n // is not defined), also apply attributes and classes extracted from component selector.\n // Extract attributes and classes from the first selector only to match VE behavior.\n const {attrs, classes} =\n extractAttrsAndClassesFromSelector(this.componentDef.selectors[0]);\n if (attrs) {\n setUpAttributes(hostRenderer, hostRNode, attrs);\n }\n if (classes && classes.length > 0) {\n writeDirectClass(hostRenderer, hostRNode, classes.join(' '));\n }\n }\n }\n\n tElementNode = getTNode(rootTView, HEADER_OFFSET) as TElementNode;\n\n if (projectableNodes !== undefined) {\n const projection: (TNode|RNode[]|null)[] = tElementNode.projection = [];\n for (let i = 0; i < this.ngContentSelectors.length; i++) {\n const nodesforSlot = projectableNodes[i];\n // Projectable nodes can be passed as array of arrays or an array of iterables (ngUpgrade\n // case). Here we do normalize passed data structure to be an array of arrays to avoid\n // complex checks down the line.\n // We also normalize the length of the passed in projectable nodes (to match the number of\n // <ng-container> slots defined by a component).\n projection.push(nodesforSlot != null ? Array.from(nodesforSlot) : null);\n }\n }\n\n // TODO: should LifecycleHooksFeature and other host features be generated by the compiler and\n // executed here?\n // Angular 5 reference: https://stackblitz.com/edit/lifecycle-hooks-vcref\n component = createRootComponent(\n componentView, this.componentDef, rootLView, rootContext, [LifecycleHooksFeature]);\n\n renderView(rootTView, rootLView, null);\n } finally {\n leaveView();\n }\n\n return new ComponentRef(\n this.componentType, component, createElementRef(tElementNode, rootLView), rootLView,\n tElementNode);\n }\n}\n\nconst componentFactoryResolver: ComponentFactoryResolver = new ComponentFactoryResolver();\n\n/**\n * Creates a ComponentFactoryResolver and stores it on the injector. Or, if the\n * ComponentFactoryResolver\n * already exists, retrieves the existing ComponentFactoryResolver.\n *\n * @returns The ComponentFactoryResolver instance to use\n */\nexport function injectComponentFactoryResolver(): viewEngine_ComponentFactoryResolver {\n return componentFactoryResolver;\n}\n\n/**\n * Represents an instance of a Component created via a {@link ComponentFactory}.\n *\n * `ComponentRef` provides access to the Component Instance as well other objects related to this\n * Component Instance and allows you to destroy the Component Instance via the {@link #destroy}\n * method.\n *\n */\nexport class ComponentRef<T> extends viewEngine_ComponentRef<T> {\n override instance: T;\n override hostView: ViewRef<T>;\n override changeDetectorRef: ViewEngine_ChangeDetectorRef;\n override componentType: Type<T>;\n\n constructor(\n componentType: Type<T>, instance: T, public location: viewEngine_ElementRef,\n private _rootLView: LView,\n private _tNode: TElementNode|TContainerNode|TElementContainerNode) {\n super();\n this.instance = instance;\n this.hostView = this.changeDetectorRef = new RootViewRef<T>(_rootLView);\n this.componentType = componentType;\n }\n\n override get injector(): Injector {\n return new NodeInjector(this._tNode, this._rootLView);\n }\n\n override destroy(): void {\n this.hostView.destroy();\n }\n\n override onDestroy(callback: () => void): void {\n this.hostView.onDestroy(callback);\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 {Type} from '../interface/type';\nimport {noSideEffects} from '../util/closure';\n\ninterface TypeWithMetadata extends Type<any> {\n decorators?: any[];\n ctorParameters?: () => any[];\n propDecorators?: {[field: string]: any};\n}\n\n/**\n * Adds decorator, constructor, and property metadata to a given type via static metadata fields\n * on the type.\n *\n * These metadata fields can later be read with Angular's `ReflectionCapabilities` API.\n *\n * Calls to `setClassMetadata` can be guarded by ngDevMode, resulting in the metadata assignments\n * being tree-shaken away during production builds.\n */\nexport function setClassMetadata(\n type: Type<any>, decorators: any[]|null, ctorParameters: (() => any[])|null,\n propDecorators: {[field: string]: any}|null): void {\n return noSideEffects(() => {\n const clazz = type as TypeWithMetadata;\n\n if (decorators !== null) {\n if (clazz.hasOwnProperty('decorators') && clazz.decorators !== undefined) {\n clazz.decorators.push(...decorators);\n } else {\n clazz.decorators = decorators;\n }\n }\n if (ctorParameters !== null) {\n // Rather than merging, clobber the existing parameters. If other projects exist which\n // use tsickle-style annotations and reflect over them in the same way, this could\n // cause issues, but that is vanishingly unlikely.\n clazz.ctorParameters = ctorParameters;\n }\n if (propDecorators !== null) {\n // The property decorator objects are merged as it is possible different fields have\n // different decorator types. Decorators on individual fields are not merged, as it's\n // also incredibly unlikely that a field will be decorated both with an Angular\n // decorator and a non-Angular decorator that's also been downleveled.\n if (clazz.hasOwnProperty('propDecorators') && clazz.propDecorators !== undefined) {\n clazz.propDecorators = {...clazz.propDecorators, ...propDecorators};\n } else {\n clazz.propDecorators = propDecorators;\n }\n }\n }) as never;\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\nimport {Type} from '../interface/type';\nimport {NgModuleType} from '../metadata/ng_module_def';\nimport {autoRegisterModuleById, getNgModuleDef} from '../render3/definition';\nimport {maybeUnwrapFn} from '../render3/util/misc_utils';\nimport {stringify} from '../util/stringify';\n\nimport {NgModuleFactory} from './ng_module_factory';\n\n\n/**\n * Map of module-id to the corresponding NgModule.\n * - In pre Ivy we track NgModuleFactory,\n * - In post Ivy we track the NgModuleType\n */\nconst modules = new Map<string, NgModuleFactory<any>|NgModuleType>();\n\n/**\n * Registers a loaded module. Should only be called from generated NgModuleFactory code.\n * @publicApi\n */\nexport function registerModuleFactory(id: string, factory: NgModuleFactory<any>) {\n const existing = modules.get(id) as NgModuleFactory<any>;\n assertSameOrNotExisting(id, existing && existing.moduleType, factory.moduleType);\n modules.set(id, factory);\n}\n\nfunction assertSameOrNotExisting(id: string, type: Type<any>|null, incoming: Type<any>): void {\n if (type && type !== incoming) {\n throw new Error(\n `Duplicate module registered for ${id} - ${stringify(type)} vs ${stringify(type.name)}`);\n }\n}\n\nexport function registerNgModuleType(ngModuleType: NgModuleType): void {\n const visited = new Set<NgModuleType>();\n recurse(ngModuleType);\n function recurse(ngModuleType: NgModuleType): void {\n // The imports array of an NgModule must refer to other NgModules,\n // so an error is thrown if no module definition is available.\n const def = getNgModuleDef(ngModuleType, /* throwNotFound */ true);\n const id = def.id;\n if (id !== null) {\n const existing = modules.get(id) as NgModuleType | null;\n assertSameOrNotExisting(id, existing, ngModuleType);\n modules.set(id, ngModuleType);\n }\n\n const imports = maybeUnwrapFn(def.imports) as NgModuleType[];\n for (const i of imports) {\n if (!visited.has(i)) {\n visited.add(i);\n recurse(i);\n }\n }\n }\n}\n\nexport function clearModulesForTest(): void {\n modules.clear();\n}\n\nexport function getRegisteredNgModuleType(id: string) {\n return modules.get(id) || autoRegisterModuleById[id];\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 '../di/injector';\nimport {INJECTOR} from '../di/injector_token';\nimport {InjectFlags} from '../di/interface/injector';\nimport {createInjectorWithoutInjectorInstances, R3Injector} from '../di/r3_injector';\nimport {Type} from '../interface/type';\nimport {ComponentFactoryResolver as viewEngine_ComponentFactoryResolver} from '../linker/component_factory_resolver';\nimport {InternalNgModuleRef, NgModuleFactory as viewEngine_NgModuleFactory, NgModuleRef as viewEngine_NgModuleRef} from '../linker/ng_module_factory';\nimport {registerNgModuleType} from '../linker/ng_module_factory_registration';\nimport {NgModuleType} from '../metadata/ng_module_def';\nimport {assertDefined} from '../util/assert';\nimport {stringify} from '../util/stringify';\n\nimport {ComponentFactoryResolver} from './component_ref';\nimport {getNgLocaleIdDef, getNgModuleDef} from './definition';\nimport {setLocaleId} from './i18n/i18n_locale_id';\nimport {maybeUnwrapFn} from './util/misc_utils';\n\nexport class NgModuleRef<T> extends viewEngine_NgModuleRef<T> implements InternalNgModuleRef<T> {\n // tslint:disable-next-line:require-internal-with-underscore\n _bootstrapComponents: Type<any>[] = [];\n // tslint:disable-next-line:require-internal-with-underscore\n _r3Injector: R3Injector;\n override injector: Injector = this;\n override instance: T;\n destroyCbs: (() => void)[]|null = [];\n\n // When bootstrapping a module we have a dependency graph that looks like this:\n // ApplicationRef -> ComponentFactoryResolver -> NgModuleRef. The problem is that if the\n // module being resolved tries to inject the ComponentFactoryResolver, it'll create a\n // circular dependency which will result in a runtime error, because the injector doesn't\n // exist yet. We work around the issue by creating the ComponentFactoryResolver ourselves\n // and providing it, rather than letting the injector resolve it.\n override readonly componentFactoryResolver: ComponentFactoryResolver =\n new ComponentFactoryResolver(this);\n\n constructor(ngModuleType: Type<T>, public _parent: Injector|null) {\n super();\n const ngModuleDef = getNgModuleDef(ngModuleType);\n ngDevMode &&\n assertDefined(\n ngModuleDef,\n `NgModule '${stringify(ngModuleType)}' is not a subtype of 'NgModuleType'.`);\n\n const ngLocaleIdDef = getNgLocaleIdDef(ngModuleType);\n ngLocaleIdDef && setLocaleId(ngLocaleIdDef);\n this._bootstrapComponents = maybeUnwrapFn(ngModuleDef!.bootstrap);\n this._r3Injector = createInjectorWithoutInjectorInstances(\n ngModuleType, _parent,\n [\n {provide: viewEngine_NgModuleRef, useValue: this}, {\n provide: viewEngine_ComponentFactoryResolver,\n useValue: this.componentFactoryResolver\n }\n ],\n stringify(ngModuleType)) as R3Injector;\n\n // We need to resolve the injector types separately from the injector creation, because\n // the module might be trying to use this ref in its contructor for DI which will cause a\n // circular error that will eventually error out, because the injector isn't created yet.\n this._r3Injector._resolveInjectorDefTypes();\n this.instance = this.get(ngModuleType);\n }\n\n get(token: any, notFoundValue: any = Injector.THROW_IF_NOT_FOUND,\n injectFlags: InjectFlags = InjectFlags.Default): any {\n if (token === Injector || token === viewEngine_NgModuleRef || token === INJECTOR) {\n return this;\n }\n return this._r3Injector.get(token, notFoundValue, injectFlags);\n }\n\n override destroy(): void {\n ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');\n const injector = this._r3Injector;\n !injector.destroyed && injector.destroy();\n this.destroyCbs!.forEach(fn => fn());\n this.destroyCbs = null;\n }\n override onDestroy(callback: () => void): void {\n ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');\n this.destroyCbs!.push(callback);\n }\n}\n\nexport class NgModuleFactory<T> extends viewEngine_NgModuleFactory<T> {\n constructor(public moduleType: Type<T>) {\n super();\n\n const ngModuleDef = getNgModuleDef(moduleType);\n if (ngModuleDef !== null) {\n // Register the NgModule with Angular's module registry. The location (and hence timing) of\n // this call is critical to ensure this works correctly (modules get registered when expected)\n // without bloating bundles (modules are registered when otherwise not referenced).\n //\n // In View Engine, registration occurs in the .ngfactory.js file as a side effect. This has\n // several practical consequences:\n //\n // - If an .ngfactory file is not imported from, the module won't be registered (and can be\n // tree shaken).\n // - If an .ngfactory file is imported from, the module will be registered even if an instance\n // is not actually created (via `create` below).\n // - Since an .ngfactory file in View Engine references the .ngfactory files of the NgModule's\n // imports,\n //\n // In Ivy, things are a bit different. .ngfactory files still exist for compatibility, but are\n // not a required API to use - there are other ways to obtain an NgModuleFactory for a given\n // NgModule. Thus, relying on a side effect in the .ngfactory file is not sufficient. Instead,\n // the side effect of registration is added here, in the constructor of NgModuleFactory,\n // ensuring no matter how a factory is created, the module is registered correctly.\n //\n // An alternative would be to include the registration side effect inline following the actual\n // NgModule definition. This also has the correct timing, but breaks tree-shaking - modules\n // will be registered and retained even if they're otherwise never referenced.\n registerNgModuleType(moduleType as NgModuleType);\n }\n }\n\n override create(parentInjector: Injector|null): viewEngine_NgModuleRef<T> {\n return new NgModuleRef(this.moduleType, parentInjector);\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 {assertIndexInRange} from '../util/assert';\nimport {bindingUpdated, bindingUpdated2, bindingUpdated3, bindingUpdated4, getBinding, updateBinding} from './bindings';\nimport {LView} from './interfaces/view';\nimport {getBindingRoot, getLView} from './state';\nimport {NO_CHANGE} from './tokens';\n\n\n/**\n * Bindings for pure functions are stored after regular bindings.\n *\n * |-------decls------|---------vars---------| |----- hostVars (dir1) ------|\n * ------------------------------------------------------------------------------------------\n * | nodes/refs/pipes | bindings | fn slots | injector | dir1 | host bindings | host slots |\n * ------------------------------------------------------------------------------------------\n * ^ ^\n * TView.bindingStartIndex TView.expandoStartIndex\n *\n * Pure function instructions are given an offset from the binding root. Adding the offset to the\n * binding root gives the first index where the bindings are stored. In component views, the binding\n * root is the bindingStartIndex. In host bindings, the binding root is the expandoStartIndex +\n * any directive instances + any hostVars in directives evaluated before it.\n *\n * See VIEW_DATA.md for more information about host binding resolution.\n */\n\n/**\n * If the value hasn't been saved, calls the pure function to store and return the\n * value. If it has been saved, returns the saved value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn Function that returns a value\n * @param thisArg Optional calling context of pureFn\n * @returns value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction0<T>(slotOffset: number, pureFn: () => T, thisArg?: any): T {\n const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n return lView[bindingIndex] === NO_CHANGE ?\n updateBinding(lView, bindingIndex, thisArg ? pureFn.call(thisArg) : pureFn()) :\n getBinding(lView, bindingIndex);\n}\n\n/**\n * If the value of the provided exp has changed, calls the pure function to return\n * an updated value. Or if the value has not changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn Function that returns an updated value\n * @param exp Updated expression value\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction1(\n slotOffset: number, pureFn: (v: any) => any, exp: any, thisArg?: any): any {\n return pureFunction1Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp, thisArg);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction2(\n slotOffset: number, pureFn: (v1: any, v2: any) => any, exp1: any, exp2: any,\n thisArg?: any): any {\n return pureFunction2Internal(\n getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, thisArg);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction3(\n slotOffset: number, pureFn: (v1: any, v2: any, v3: any) => any, exp1: any, exp2: any, exp3: any,\n thisArg?: any): any {\n return pureFunction3Internal(\n getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, exp3, thisArg);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction4(\n slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any) => any, exp1: any, exp2: any,\n exp3: any, exp4: any, thisArg?: any): any {\n return pureFunction4Internal(\n getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, exp3, exp4, thisArg);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction5(\n slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any) => any, exp1: any,\n exp2: any, exp3: any, exp4: any, exp5: any, thisArg?: any): any {\n const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n return bindingUpdated(lView, bindingIndex + 4, exp5) || different ?\n updateBinding(\n lView, bindingIndex + 5,\n thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5) :\n pureFn(exp1, exp2, exp3, exp4, exp5)) :\n getBinding(lView, bindingIndex + 5);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction6(\n slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any) => any,\n exp1: any, exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, thisArg?: any): any {\n const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n return bindingUpdated2(lView, bindingIndex + 4, exp5, exp6) || different ?\n updateBinding(\n lView, bindingIndex + 6,\n thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6) :\n pureFn(exp1, exp2, exp3, exp4, exp5, exp6)) :\n getBinding(lView, bindingIndex + 6);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param exp7\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction7(\n slotOffset: number,\n pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any, v7: any) => any, exp1: any,\n exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, exp7: any, thisArg?: any): any {\n const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n let different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n return bindingUpdated3(lView, bindingIndex + 4, exp5, exp6, exp7) || different ?\n updateBinding(\n lView, bindingIndex + 7,\n thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7) :\n pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7)) :\n getBinding(lView, bindingIndex + 7);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param exp7\n * @param exp8\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction8(\n slotOffset: number,\n pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any, v7: any, v8: any) => any,\n exp1: any, exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, exp7: any, exp8: any,\n thisArg?: any): any {\n const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n return bindingUpdated4(lView, bindingIndex + 4, exp5, exp6, exp7, exp8) || different ?\n updateBinding(\n lView, bindingIndex + 8,\n thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8) :\n pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8)) :\n getBinding(lView, bindingIndex + 8);\n}\n\n/**\n * pureFunction instruction that can support any number of bindings.\n *\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn A pure function that takes binding values and builds an object or array\n * containing those values.\n * @param exps An array of binding values\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunctionV(\n slotOffset: number, pureFn: (...v: any[]) => any, exps: any[], thisArg?: any): any {\n return pureFunctionVInternal(getLView(), getBindingRoot(), slotOffset, pureFn, exps, thisArg);\n}\n\n/**\n * Results of a pure function invocation are stored in LView in a dedicated slot that is initialized\n * to NO_CHANGE. In rare situations a pure pipe might throw an exception on the very first\n * invocation and not produce any valid results. In this case LView would keep holding the NO_CHANGE\n * value. The NO_CHANGE is not something that we can use in expressions / bindings thus we convert\n * it to `undefined`.\n */\nfunction getPureFunctionReturnValue(lView: LView, returnValueIndex: number) {\n ngDevMode && assertIndexInRange(lView, returnValueIndex);\n const lastReturnValue = lView[returnValueIndex];\n return lastReturnValue === NO_CHANGE ? undefined : lastReturnValue;\n}\n\n/**\n * If the value of the provided exp has changed, calls the pure function to return\n * an updated value. Or if the value has not changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn Function that returns an updated value\n * @param exp Updated expression value\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\nexport function pureFunction1Internal(\n lView: LView, bindingRoot: number, slotOffset: number, pureFn: (v: any) => any, exp: any,\n thisArg?: any): any {\n const bindingIndex = bindingRoot + slotOffset;\n return bindingUpdated(lView, bindingIndex, exp) ?\n updateBinding(lView, bindingIndex + 1, thisArg ? pureFn.call(thisArg, exp) : pureFn(exp)) :\n getPureFunctionReturnValue(lView, bindingIndex + 1);\n}\n\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\nexport function pureFunction2Internal(\n lView: LView, bindingRoot: number, slotOffset: number, pureFn: (v1: any, v2: any) => any,\n exp1: any, exp2: any, thisArg?: any): any {\n const bindingIndex = bindingRoot + slotOffset;\n return bindingUpdated2(lView, bindingIndex, exp1, exp2) ?\n updateBinding(\n lView, bindingIndex + 2,\n thisArg ? pureFn.call(thisArg, exp1, exp2) : pureFn(exp1, exp2)) :\n getPureFunctionReturnValue(lView, bindingIndex + 2);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\nexport function pureFunction3Internal(\n lView: LView, bindingRoot: number, slotOffset: number,\n pureFn: (v1: any, v2: any, v3: any) => any, exp1: any, exp2: any, exp3: any,\n thisArg?: any): any {\n const bindingIndex = bindingRoot + slotOffset;\n return bindingUpdated3(lView, bindingIndex, exp1, exp2, exp3) ?\n updateBinding(\n lView, bindingIndex + 3,\n thisArg ? pureFn.call(thisArg, exp1, exp2, exp3) : pureFn(exp1, exp2, exp3)) :\n getPureFunctionReturnValue(lView, bindingIndex + 3);\n}\n\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n */\nexport function pureFunction4Internal(\n lView: LView, bindingRoot: number, slotOffset: number,\n pureFn: (v1: any, v2: any, v3: any, v4: any) => any, exp1: any, exp2: any, exp3: any, exp4: any,\n thisArg?: any): any {\n const bindingIndex = bindingRoot + slotOffset;\n return bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4) ?\n updateBinding(\n lView, bindingIndex + 4,\n thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4) : pureFn(exp1, exp2, exp3, exp4)) :\n getPureFunctionReturnValue(lView, bindingIndex + 4);\n}\n\n/**\n * pureFunction instruction that can support any number of bindings.\n *\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn A pure function that takes binding values and builds an object or array\n * containing those values.\n * @param exps An array of binding values\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\nexport function pureFunctionVInternal(\n lView: LView, bindingRoot: number, slotOffset: number, pureFn: (...v: any[]) => any,\n exps: any[], thisArg?: any): any {\n let bindingIndex = bindingRoot + slotOffset;\n let different = false;\n for (let i = 0; i < exps.length; i++) {\n bindingUpdated(lView, bindingIndex++, exps[i]) && (different = true);\n }\n return different ? updateBinding(lView, bindingIndex, pureFn.apply(thisArg, exps)) :\n getPureFunctionReturnValue(lView, bindingIndex);\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 {WrappedValue} from '../change_detection/change_detection_util';\nimport {PipeTransform} from '../change_detection/pipe_transform';\nimport {setInjectImplementation} from '../di/inject_switch';\nimport {getFactoryDef} from './definition_factory';\nimport {setIncludeViewProviders} from './di';\nimport {RuntimeError, RuntimeErrorCode} from './error_code';\nimport {store, ɵɵdirectiveInject} from './instructions/all';\nimport {PipeDef, PipeDefList} from './interfaces/definition';\nimport {HEADER_OFFSET, LView, TVIEW} from './interfaces/view';\nimport {pureFunction1Internal, pureFunction2Internal, pureFunction3Internal, pureFunction4Internal, pureFunctionVInternal} from './pure_function';\nimport {getBindingIndex, getBindingRoot, getLView, getTView} from './state';\nimport {NO_CHANGE} from './tokens';\nimport {load} from './util/view_utils';\n\n\n\n/**\n * Create a pipe.\n *\n * @param index Pipe index where the pipe will be stored.\n * @param pipeName The name of the pipe\n * @returns T the instance of the pipe.\n *\n * @codeGenApi\n */\nexport function ɵɵpipe(index: number, pipeName: string): any {\n const tView = getTView();\n let pipeDef: PipeDef<any>;\n const adjustedIndex = index + HEADER_OFFSET;\n\n if (tView.firstCreatePass) {\n pipeDef = getPipeDef(pipeName, tView.pipeRegistry);\n tView.data[adjustedIndex] = pipeDef;\n if (pipeDef.onDestroy) {\n (tView.destroyHooks || (tView.destroyHooks = [])).push(adjustedIndex, pipeDef.onDestroy);\n }\n } else {\n pipeDef = tView.data[adjustedIndex] as PipeDef<any>;\n }\n\n const pipeFactory = pipeDef.factory || (pipeDef.factory = getFactoryDef(pipeDef.type, true));\n const previousInjectImplementation = setInjectImplementation(ɵɵdirectiveInject);\n try {\n // DI for pipes is supposed to behave like directives when placed on a component\n // host node, which means that we have to disable access to `viewProviders`.\n const previousIncludeViewProviders = setIncludeViewProviders(false);\n const pipeInstance = pipeFactory();\n setIncludeViewProviders(previousIncludeViewProviders);\n store(tView, getLView(), adjustedIndex, pipeInstance);\n return pipeInstance;\n } finally {\n // we have to restore the injector implementation in finally, just in case the creation of the\n // pipe throws an error.\n setInjectImplementation(previousInjectImplementation);\n }\n}\n\n/**\n * Searches the pipe registry for a pipe with the given name. If one is found,\n * returns the pipe. Otherwise, an error is thrown because the pipe cannot be resolved.\n *\n * @param name Name of pipe to resolve\n * @param registry Full list of available pipes\n * @returns Matching PipeDef\n */\nfunction getPipeDef(name: string, registry: PipeDefList|null): PipeDef<any> {\n if (registry) {\n for (let i = registry.length - 1; i >= 0; i--) {\n const pipeDef = registry[i];\n if (name === pipeDef.name) {\n return pipeDef;\n }\n }\n }\n throw new RuntimeError(RuntimeErrorCode.PIPE_NOT_FOUND, `The pipe '${name}' could not be found!`);\n}\n\n/**\n * Invokes a pipe with 1 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nexport function ɵɵpipeBind1(index: number, slotOffset: number, v1: any): any {\n const adjustedIndex = index + HEADER_OFFSET;\n const lView = getLView();\n const pipeInstance = load<PipeTransform>(lView, adjustedIndex);\n return unwrapValue(\n lView,\n isPure(lView, adjustedIndex) ?\n pureFunction1Internal(\n lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, pipeInstance) :\n pipeInstance.transform(v1));\n}\n\n/**\n * Invokes a pipe with 2 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nexport function ɵɵpipeBind2(index: number, slotOffset: number, v1: any, v2: any): any {\n const adjustedIndex = index + HEADER_OFFSET;\n const lView = getLView();\n const pipeInstance = load<PipeTransform>(lView, adjustedIndex);\n return unwrapValue(\n lView,\n isPure(lView, adjustedIndex) ?\n pureFunction2Internal(\n lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, v2, pipeInstance) :\n pipeInstance.transform(v1, v2));\n}\n\n/**\n * Invokes a pipe with 3 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n * @param v3 4rd argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nexport function ɵɵpipeBind3(index: number, slotOffset: number, v1: any, v2: any, v3: any): any {\n const adjustedIndex = index + HEADER_OFFSET;\n const lView = getLView();\n const pipeInstance = load<PipeTransform>(lView, adjustedIndex);\n return unwrapValue(\n lView,\n isPure(lView, adjustedIndex) ? pureFunction3Internal(\n lView, getBindingRoot(), slotOffset,\n pipeInstance.transform, v1, v2, v3, pipeInstance) :\n pipeInstance.transform(v1, v2, v3));\n}\n\n/**\n * Invokes a pipe with 4 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n * @param v3 3rd argument to {@link PipeTransform#transform}.\n * @param v4 4th argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nexport function ɵɵpipeBind4(\n index: number, slotOffset: number, v1: any, v2: any, v3: any, v4: any): any {\n const adjustedIndex = index + HEADER_OFFSET;\n const lView = getLView();\n const pipeInstance = load<PipeTransform>(lView, adjustedIndex);\n return unwrapValue(\n lView,\n isPure(lView, adjustedIndex) ? pureFunction4Internal(\n lView, getBindingRoot(), slotOffset,\n pipeInstance.transform, v1, v2, v3, v4, pipeInstance) :\n pipeInstance.transform(v1, v2, v3, v4));\n}\n\n/**\n * Invokes a pipe with variable number of arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param values Array of arguments to pass to {@link PipeTransform#transform} method.\n *\n * @codeGenApi\n */\nexport function ɵɵpipeBindV(index: number, slotOffset: number, values: [any, ...any[]]): any {\n const adjustedIndex = index + HEADER_OFFSET;\n const lView = getLView();\n const pipeInstance = load<PipeTransform>(lView, adjustedIndex);\n return unwrapValue(\n lView,\n isPure(lView, adjustedIndex) ?\n pureFunctionVInternal(\n lView, getBindingRoot(), slotOffset, pipeInstance.transform, values, pipeInstance) :\n pipeInstance.transform.apply(pipeInstance, values));\n}\n\nfunction isPure(lView: LView, index: number): boolean {\n return (<PipeDef<any>>lView[TVIEW].data[index]).pure;\n}\n\n/**\n * Unwrap the output of a pipe transformation.\n * In order to trick change detection into considering that the new value is always different from\n * the old one, the old value is overwritten by NO_CHANGE.\n *\n * @param newValue the pipe transformation output.\n */\nfunction unwrapValue(lView: LView, newValue: any): any {\n if (WrappedValue.isWrapped(newValue)) {\n newValue = WrappedValue.unwrap(newValue);\n // The NO_CHANGE value needs to be written at the index where the impacted binding value is\n // stored\n const bindingToInvalidateIdx = getBindingIndex();\n lView[bindingToInvalidateIdx] = NO_CHANGE;\n }\n return newValue;\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/// <reference types=\"rxjs\" />\n\nimport {PartialObserver, Subject, Subscription} from 'rxjs';\n\n/**\n * Use in components with the `@Output` directive to emit custom events\n * synchronously or asynchronously, and register handlers for those events\n * by subscribing to an instance.\n *\n * @usageNotes\n *\n * Extends\n * [RxJS `Subject`](https://rxjs.dev/api/index/class/Subject)\n * for Angular by adding the `emit()` method.\n *\n * In the following example, a component defines two output properties\n * that create event emitters. When the title is clicked, the emitter\n * emits an open or close event to toggle the current visibility state.\n *\n * ```html\n * @Component({\n * selector: 'zippy',\n * template: `\n * <div class=\"zippy\">\n * <div (click)=\"toggle()\">Toggle</div>\n * <div [hidden]=\"!visible\">\n * <ng-content></ng-content>\n * </div>\n * </div>`})\n * export class Zippy {\n * visible: boolean = true;\n * @Output() open: EventEmitter<any> = new EventEmitter();\n * @Output() close: EventEmitter<any> = new EventEmitter();\n *\n * toggle() {\n * this.visible = !this.visible;\n * if (this.visible) {\n * this.open.emit(null);\n * } else {\n * this.close.emit(null);\n * }\n * }\n * }\n * ```\n *\n * Access the event object with the `$event` argument passed to the output event\n * handler:\n *\n * ```html\n * <zippy (open)=\"onOpen($event)\" (close)=\"onClose($event)\"></zippy>\n * ```\n *\n * @see [Observables in Angular](guide/observables-in-angular)\n * @publicApi\n */\nexport interface EventEmitter<T> extends Subject<T> {\n /**\n * @internal\n */\n __isAsync: boolean;\n\n /**\n * Creates an instance of this class that can\n * deliver events synchronously or asynchronously.\n *\n * @param [isAsync=false] When true, deliver events asynchronously.\n *\n */\n new(isAsync?: boolean): EventEmitter<T>;\n\n /**\n * Emits an event containing a given value.\n * @param value The value to emit.\n */\n emit(value?: T): void;\n\n /**\n * Registers handlers for events emitted by this instance.\n * @param next When supplied, a custom handler for emitted events.\n * @param error When supplied, a custom handler for an error notification from this emitter.\n * @param complete When supplied, a custom handler for a completion notification from this\n * emitter.\n */\n subscribe(next?: (value: T) => void, error?: (error: any) => void, complete?: () => void):\n Subscription;\n /**\n * Registers handlers for events emitted by this instance.\n * @param observerOrNext When supplied, a custom handler for emitted events, or an observer\n * object.\n * @param error When supplied, a custom handler for an error notification from this emitter.\n * @param complete When supplied, a custom handler for a completion notification from this\n * emitter.\n */\n subscribe(observerOrNext?: any, error?: any, complete?: any): Subscription;\n}\n\nclass EventEmitter_ extends Subject<any> {\n __isAsync: boolean; // tslint:disable-line\n\n constructor(isAsync: boolean = false) {\n super();\n this.__isAsync = isAsync;\n }\n\n emit(value?: any) {\n super.next(value);\n }\n\n override subscribe(observerOrNext?: any, error?: any, complete?: any): Subscription {\n let nextFn = observerOrNext;\n let errorFn = error || (() => null);\n let completeFn = complete;\n\n if (observerOrNext && typeof observerOrNext === 'object') {\n const observer = observerOrNext as PartialObserver<unknown>;\n nextFn = observer.next?.bind(observer);\n errorFn = observer.error?.bind(observer);\n completeFn = observer.complete?.bind(observer);\n }\n\n if (this.__isAsync) {\n errorFn = _wrapInTimeout(errorFn);\n\n if (nextFn) {\n nextFn = _wrapInTimeout(nextFn);\n }\n\n if (completeFn) {\n completeFn = _wrapInTimeout(completeFn);\n }\n }\n\n const sink = super.subscribe({next: nextFn, error: errorFn, complete: completeFn});\n\n if (observerOrNext instanceof Subscription) {\n observerOrNext.add(sink);\n }\n\n return sink;\n }\n}\n\nfunction _wrapInTimeout(fn: (value: unknown) => any) {\n return (value: unknown) => {\n setTimeout(fn, undefined, value);\n };\n}\n\n/**\n * @publicApi\n */\nexport const EventEmitter: {\n new (isAsync?: boolean): EventEmitter<any>; new<T>(isAsync?: boolean): EventEmitter<T>;\n readonly prototype: EventEmitter<any>;\n} = EventEmitter_ as any;\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 {Observable} from 'rxjs';\n\nimport {EventEmitter} from '../event_emitter';\nimport {arrayEquals, flatten} from '../util/array_utils';\nimport {getSymbolIterator} from '../util/symbol';\n\nfunction symbolIterator<T>(this: QueryList<T>): Iterator<T> {\n return ((this as any as {_results: Array<T>})._results as any)[getSymbolIterator()]();\n}\n\n/**\n * An unmodifiable list of items that Angular keeps up to date when the state\n * of the application changes.\n *\n * The type of object that {@link ViewChildren}, {@link ContentChildren}, and {@link QueryList}\n * provide.\n *\n * Implements an iterable interface, therefore it can be used in both ES6\n * javascript `for (var i of items)` loops as well as in Angular templates with\n * `*ngFor=\"let i of myList\"`.\n *\n * Changes can be observed by subscribing to the changes `Observable`.\n *\n * NOTE: In the future this class will implement an `Observable` interface.\n *\n * @usageNotes\n * ### Example\n * ```typescript\n * @Component({...})\n * class Container {\n * @ViewChildren(Item) items:QueryList<Item>;\n * }\n * ```\n *\n * @publicApi\n */\nexport class QueryList<T> implements Iterable<T> {\n public readonly dirty = true;\n private _results: Array<T> = [];\n private _changesDetected: boolean = false;\n private _changes: EventEmitter<QueryList<T>>|null = null;\n\n readonly length: number = 0;\n readonly first: T = undefined!;\n readonly last: T = undefined!;\n\n /**\n * Returns `Observable` of `QueryList` notifying the subscriber of changes.\n */\n get changes(): Observable<any> {\n return this._changes || (this._changes = new EventEmitter());\n }\n\n /**\n * @param emitDistinctChangesOnly Whether `QueryList.changes` should fire only when actual change\n * has occurred. Or if it should fire when query is recomputed. (recomputing could resolve in\n * the same result)\n */\n constructor(private _emitDistinctChangesOnly: boolean = false) {\n // This function should be declared on the prototype, but doing so there will cause the class\n // declaration to have side-effects and become not tree-shakable. For this reason we do it in\n // the constructor.\n // [getSymbolIterator()](): Iterator<T> { ... }\n const symbol = getSymbolIterator();\n const proto = QueryList.prototype as any;\n if (!proto[symbol]) proto[symbol] = symbolIterator;\n }\n\n /**\n * Returns the QueryList entry at `index`.\n */\n get(index: number): T|undefined {\n return this._results[index];\n }\n\n /**\n * See\n * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\n */\n map<U>(fn: (item: T, index: number, array: T[]) => U): U[] {\n return this._results.map(fn);\n }\n\n /**\n * See\n * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)\n */\n filter(fn: (item: T, index: number, array: T[]) => boolean): T[] {\n return this._results.filter(fn);\n }\n\n /**\n * See\n * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)\n */\n find(fn: (item: T, index: number, array: T[]) => boolean): T|undefined {\n return this._results.find(fn);\n }\n\n /**\n * See\n * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)\n */\n reduce<U>(fn: (prevValue: U, curValue: T, curIndex: number, array: T[]) => U, init: U): U {\n return this._results.reduce(fn, init);\n }\n\n /**\n * See\n * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)\n */\n forEach(fn: (item: T, index: number, array: T[]) => void): void {\n this._results.forEach(fn);\n }\n\n /**\n * See\n * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)\n */\n some(fn: (value: T, index: number, array: T[]) => boolean): boolean {\n return this._results.some(fn);\n }\n\n /**\n * Returns a copy of the internal results list as an Array.\n */\n toArray(): T[] {\n return this._results.slice();\n }\n\n toString(): string {\n return this._results.toString();\n }\n\n /**\n * Updates the stored data of the query list, and resets the `dirty` flag to `false`, so that\n * on change detection, it will not notify of changes to the queries, unless a new change\n * occurs.\n *\n * @param resultsTree The query results to store\n * @param identityAccessor Optional function for extracting stable object identity from a value\n * in the array. This function is executed for each element of the query result list while\n * comparing current query list with the new one (provided as a first argument of the `reset`\n * function) to detect if the lists are different. If the function is not provided, elements\n * are compared as is (without any pre-processing).\n */\n reset(resultsTree: Array<T|any[]>, identityAccessor?: (value: T) => unknown): void {\n // Cast to `QueryListInternal` so that we can mutate fields which are readonly for the usage of\n // QueryList (but not for QueryList itself.)\n const self = this as QueryListInternal<T>;\n (self as {dirty: boolean}).dirty = false;\n const newResultFlat = flatten(resultsTree);\n if (this._changesDetected = !arrayEquals(self._results, newResultFlat, identityAccessor)) {\n self._results = newResultFlat;\n self.length = newResultFlat.length;\n self.last = newResultFlat[this.length - 1];\n self.first = newResultFlat[0];\n }\n }\n\n /**\n * Triggers a change event by emitting on the `changes` {@link EventEmitter}.\n */\n notifyOnChanges(): void {\n if (this._changes && (this._changesDetected || !this._emitDistinctChangesOnly))\n this._changes.emit(this);\n }\n\n /** internal */\n setDirty() {\n (this as {dirty: boolean}).dirty = true;\n }\n\n /** internal */\n destroy(): void {\n (this.changes as EventEmitter<any>).complete();\n (this.changes as EventEmitter<any>).unsubscribe();\n }\n\n // The implementation of `Symbol.iterator` should be declared here, but this would cause\n // tree-shaking issues with `QueryList. So instead, it's added in the constructor (see comments\n // there) and this declaration is left here to ensure that TypeScript considers QueryList to\n // implement the Iterable interface. This is required for template type-checking of NgFor loops\n // over QueryLists to work correctly, since QueryList must be assignable to NgIterable.\n [Symbol.iterator]!: () => Iterator<T>;\n}\n\n/**\n * Internal set of APIs used by the framework. (not to be made public)\n */\ninterface QueryListInternal<T> extends QueryList<T> {\n reset(a: any[]): void;\n notifyOnChanges(): void;\n length: number;\n last: T;\n first: T;\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 {ProcessProvidersFunction} from '../../di/interface/provider';\nimport {Type} from '../../interface/type';\nimport {SchemaMetadata} from '../../metadata/schema';\nimport {ViewEncapsulation} from '../../metadata/view';\nimport {FactoryFn} from '../definition_factory';\n\nimport {TAttributes, TConstantsOrFactory} from './node';\nimport {CssSelectorList} from './projection';\nimport {TView} from './view';\n\n\n/**\n * Definition of what a template rendering function should look like for a component.\n */\nexport type ComponentTemplate<T> = {\n // Note: the ctx parameter is typed as T|U, as using only U would prevent a template with\n // e.g. ctx: {} from being assigned to ComponentTemplate<any> as TypeScript won't infer U = any\n // in that scenario. By including T this incompatibility is resolved.\n <U extends T>(rf: RenderFlags, ctx: T|U): void;\n};\n\n/**\n * Definition of what a view queries function should look like.\n */\nexport type ViewQueriesFunction<T> = <U extends T>(rf: RenderFlags, ctx: U) => void;\n\n/**\n * Definition of what a content queries function should look like.\n */\nexport type ContentQueriesFunction<T> =\n <U extends T>(rf: RenderFlags, ctx: U, directiveIndex: number) => void;\n\n/**\n * Flags passed into template functions to determine which blocks (i.e. creation, update)\n * should be executed.\n *\n * Typically, a template runs both the creation block and the update block on initialization and\n * subsequent runs only execute the update block. However, dynamically created views require that\n * the creation block be executed separately from the update block (for backwards compat).\n */\nexport const enum RenderFlags {\n /* Whether to run the creation block (e.g. create elements and directives) */\n Create = 0b01,\n\n /* Whether to run the update block (e.g. refresh bindings) */\n Update = 0b10\n}\n\n/**\n * A subclass of `Type` which has a static `ɵcmp`:`ComponentDef` field making it\n * consumable for rendering.\n */\nexport interface ComponentType<T> extends Type<T> {\n ɵcmp: unknown;\n}\n\n/**\n * A subclass of `Type` which has a static `ɵdir`:`DirectiveDef` field making it\n * consumable for rendering.\n */\nexport interface DirectiveType<T> extends Type<T> {\n ɵdir: unknown;\n ɵfac: unknown;\n}\n\n/**\n * A subclass of `Type` which has a static `ɵpipe`:`PipeDef` field making it\n * consumable for rendering.\n */\nexport interface PipeType<T> extends Type<T> {\n ɵpipe: unknown;\n}\n\n\n\n/**\n * Runtime link information for Directives.\n *\n * This is an internal data structure used by the render to link\n * directives into templates.\n *\n * NOTE: Always use `defineDirective` function to create this object,\n * never create the object directly since the shape of this object\n * can change between versions.\n *\n * @param Selector type metadata specifying the selector of the directive or component\n *\n * See: {@link defineDirective}\n */\nexport interface DirectiveDef<T> {\n /**\n * A dictionary mapping the inputs' minified property names to their public API names, which\n * are their aliases if any, or their original unminified property names\n * (as in `@Input('alias') propertyName: any;`).\n */\n readonly inputs: {[P in keyof T]: string};\n\n /**\n * @deprecated This is only here because `NgOnChanges` incorrectly uses declared name instead of\n * public or minified name.\n */\n readonly declaredInputs: {[P in keyof T]: string};\n\n /**\n * A dictionary mapping the outputs' minified property names to their public API names, which\n * are their aliases if any, or their original unminified property names\n * (as in `@Output('alias') propertyName: any;`).\n */\n readonly outputs: {[P in keyof T]: string};\n\n /**\n * Function to create and refresh content queries associated with a given directive.\n */\n contentQueries: ContentQueriesFunction<T>|null;\n\n /**\n * Query-related instructions for a directive. Note that while directives don't have a\n * view and as such view queries won't necessarily do anything, there might be\n * components that extend the directive.\n */\n viewQuery: ViewQueriesFunction<T>|null;\n\n /**\n * Refreshes host bindings on the associated directive.\n */\n readonly hostBindings: HostBindingsFunction<T>|null;\n\n /**\n * The number of bindings in this directive `hostBindings` (including pure fn bindings).\n *\n * Used to calculate the length of the component's LView array, so we\n * can pre-fill the array and set the host binding start index.\n */\n readonly hostVars: number;\n\n /**\n * Assign static attribute values to a host element.\n *\n * This property will assign static attribute values as well as class and style\n * values to a host element. Since attribute values can consist of different types of values, the\n * `hostAttrs` array must include the values in the following format:\n *\n * attrs = [\n * // static attributes (like `title`, `name`, `id`...)\n * attr1, value1, attr2, value,\n *\n * // a single namespace value (like `x:id`)\n * NAMESPACE_MARKER, namespaceUri1, name1, value1,\n *\n * // another single namespace value (like `x:name`)\n * NAMESPACE_MARKER, namespaceUri2, name2, value2,\n *\n * // a series of CSS classes that will be applied to the element (no spaces)\n * CLASSES_MARKER, class1, class2, class3,\n *\n * // a series of CSS styles (property + value) that will be applied to the element\n * STYLES_MARKER, prop1, value1, prop2, value2\n * ]\n *\n * All non-class and non-style attributes must be defined at the start of the list\n * first before all class and style values are set. When there is a change in value\n * type (like when classes and styles are introduced) a marker must be used to separate\n * the entries. The marker values themselves are set via entries found in the\n * [AttributeMarker] enum.\n */\n readonly hostAttrs: TAttributes|null;\n\n /** Token representing the directive. Used by DI. */\n readonly type: Type<T>;\n\n /** Function that resolves providers and publishes them into the DI system. */\n providersResolver:\n (<U extends T>(def: DirectiveDef<U>, processProvidersFn?: ProcessProvidersFunction) =>\n void)|null;\n\n /** The selectors that will be used to match nodes to this directive. */\n readonly selectors: CssSelectorList;\n\n /**\n * Name under which the directive is exported (for use with local references in template)\n */\n readonly exportAs: string[]|null;\n\n /**\n * Factory function used to create a new directive instance. Will be null initially.\n * Populated when the factory is first requested by directive instantiation logic.\n */\n readonly factory: FactoryFn<T>|null;\n\n /**\n * The features applied to this directive\n */\n readonly features: DirectiveDefFeature[]|null;\n\n setInput:\n (<U extends T>(\n this: DirectiveDef<U>, instance: U, value: any, publicName: string,\n privateName: string) => void)|null;\n}\n\n/**\n * Runtime link information for Components.\n *\n * This is an internal data structure used by the render to link\n * components into templates.\n *\n * NOTE: Always use `defineComponent` function to create this object,\n * never create the object directly since the shape of this object\n * can change between versions.\n *\n * See: {@link defineComponent}\n */\nexport interface ComponentDef<T> extends DirectiveDef<T> {\n /**\n * Runtime unique component ID.\n */\n readonly id: string;\n\n /**\n * The View template of the component.\n */\n readonly template: ComponentTemplate<T>;\n\n /** Constants associated with the component's view. */\n readonly consts: TConstantsOrFactory|null;\n\n /**\n * An array of `ngContent[selector]` values that were found in the template.\n */\n readonly ngContentSelectors?: string[];\n\n /**\n * A set of styles that the component needs to be present for component to render correctly.\n */\n readonly styles: string[];\n\n /**\n * The number of nodes, local refs, and pipes in this component template.\n *\n * Used to calculate the length of the component's LView array, so we\n * can pre-fill the array and set the binding start index.\n */\n // TODO(kara): remove queries from this count\n readonly decls: number;\n\n /**\n * The number of bindings in this component template (including pure fn bindings).\n *\n * Used to calculate the length of the component's LView array, so we\n * can pre-fill the array and set the host binding start index.\n */\n readonly vars: number;\n\n /**\n * Query-related instructions for a component.\n */\n viewQuery: ViewQueriesFunction<T>|null;\n\n /**\n * The view encapsulation type, which determines how styles are applied to\n * DOM elements. One of\n * - `Emulated` (default): Emulate native scoping of styles.\n * - `Native`: Use the native encapsulation mechanism of the renderer.\n * - `ShadowDom`: Use modern [ShadowDOM](https://w3c.github.io/webcomponents/spec/shadow/) and\n * create a ShadowRoot for component's host element.\n * - `None`: Do not provide any template or style encapsulation.\n */\n readonly encapsulation: ViewEncapsulation;\n\n /**\n * Defines arbitrary developer-defined data to be stored on a renderer instance.\n * This is useful for renderers that delegate to other renderers.\n */\n readonly data: {[kind: string]: any};\n\n /** Whether or not this component's ChangeDetectionStrategy is OnPush */\n readonly onPush: boolean;\n\n /**\n * Registry of directives and components that may be found in this view.\n *\n * The property is either an array of `DirectiveDef`s or a function which returns the array of\n * `DirectiveDef`s. The function is necessary to be able to support forward declarations.\n */\n directiveDefs: DirectiveDefListOrFactory|null;\n\n /**\n * Registry of pipes that may be found in this view.\n *\n * The property is either an array of `PipeDefs`s or a function which returns the array of\n * `PipeDefs`s. The function is necessary to be able to support forward declarations.\n */\n pipeDefs: PipeDefListOrFactory|null;\n\n /**\n * The set of schemas that declare elements to be allowed in the component's template.\n */\n schemas: SchemaMetadata[]|null;\n\n /**\n * Ivy runtime uses this place to store the computed tView for the component. This gets filled on\n * the first run of component.\n */\n tView: TView|null;\n\n /**\n * Used to store the result of `noSideEffects` function so that it is not removed by closure\n * compiler. The property should never be read.\n */\n readonly _?: unknown;\n}\n\n/**\n * Runtime link information for Pipes.\n *\n * This is an internal data structure used by the renderer to link\n * pipes into templates.\n *\n * NOTE: Always use `definePipe` function to create this object,\n * never create the object directly since the shape of this object\n * can change between versions.\n *\n * See: {@link definePipe}\n */\nexport interface PipeDef<T> {\n /** Token representing the pipe. */\n type: Type<T>;\n\n /**\n * Pipe name.\n *\n * Used to resolve pipe in templates.\n */\n readonly name: string;\n\n /**\n * Factory function used to create a new pipe instance. Will be null initially.\n * Populated when the factory is first requested by pipe instantiation logic.\n */\n factory: FactoryFn<T>|null;\n\n /**\n * Whether or not the pipe is pure.\n *\n * Pure pipes result only depends on the pipe input and not on internal\n * state of the pipe.\n */\n readonly pure: boolean;\n\n /* The following are lifecycle hooks for this pipe */\n onDestroy: (() => void)|null;\n}\n\nexport interface DirectiveDefFeature {\n <T>(directiveDef: DirectiveDef<T>): void;\n /**\n * Marks a feature as something that {@link InheritDefinitionFeature} will execute\n * during inheritance.\n *\n * NOTE: DO NOT SET IN ROOT OF MODULE! Doing so will result in tree-shakers/bundlers\n * identifying the change as a side effect, and the feature will be included in\n * every bundle.\n */\n ngInherit?: true;\n}\n\nexport interface ComponentDefFeature {\n <T>(componentDef: ComponentDef<T>): void;\n /**\n * Marks a feature as something that {@link InheritDefinitionFeature} will execute\n * during inheritance.\n *\n * NOTE: DO NOT SET IN ROOT OF MODULE! Doing so will result in tree-shakers/bundlers\n * identifying the change as a side effect, and the feature will be included in\n * every bundle.\n */\n ngInherit?: true;\n}\n\n\n/**\n * Type used for directiveDefs on component definition.\n *\n * The function is necessary to be able to support forward declarations.\n */\nexport type DirectiveDefListOrFactory = (() => DirectiveDefList)|DirectiveDefList;\n\nexport type DirectiveDefList = (DirectiveDef<any>|ComponentDef<any>)[];\n\nexport type DirectiveTypesOrFactory = (() => DirectiveTypeList)|DirectiveTypeList;\n\nexport type DirectiveTypeList =\n (DirectiveType<any>|ComponentType<any>|\n Type<any>/* Type as workaround for: Microsoft/TypeScript/issues/4881 */)[];\n\nexport type HostBindingsFunction<T> = <U extends T>(rf: RenderFlags, ctx: U) => void;\n\n/**\n * Type used for PipeDefs on component definition.\n *\n * The function is necessary to be able to support forward declarations.\n */\nexport type PipeDefListOrFactory = (() => PipeDefList)|PipeDefList;\n\nexport type PipeDefList = PipeDef<any>[];\n\nexport type PipeTypesOrFactory = (() => PipeTypeList)|PipeTypeList;\n\nexport type PipeTypeList =\n (PipeType<any>|Type<any>/* Type as workaround for: Microsoft/TypeScript/issues/4881 */)[];\n\n\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nexport const unusedValueExportToPlacateAjd = 1;\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 {ProviderToken} from '../../di/provider_token';\nimport {QueryList} from '../../linker/query_list';\n\nimport {TNode} from './node';\nimport {TView} from './view';\n\n/**\n * An object representing query metadata extracted from query annotations.\n */\nexport interface TQueryMetadata {\n predicate: ProviderToken<unknown>|string[];\n read: any;\n flags: QueryFlags;\n}\n\n/**\n * A set of flags to be used with Queries.\n *\n * NOTE: Ensure changes here are reflected in `packages/compiler/src/render3/view/compiler.ts`\n */\nexport const enum QueryFlags {\n /**\n * No flags\n */\n none = 0b0000,\n\n /**\n * Whether or not the query should descend into children.\n */\n descendants = 0b0001,\n\n /**\n * The query can be computed statically and hence can be assigned eagerly.\n *\n * NOTE: Backwards compatibility with ViewEngine.\n */\n isStatic = 0b0010,\n\n /**\n * If the `QueryList` should fire change event only if actual change to query was computed (vs old\n * behavior where the change was fired whenever the query was recomputed, even if the recomputed\n * query resulted in the same list.)\n */\n emitDistinctChangesOnly = 0b0100,\n}\n\n/**\n * TQuery objects represent all the query-related data that remain the same from one view instance\n * to another and can be determined on the very first template pass. Most notably TQuery holds all\n * the matches for a given view.\n */\nexport interface TQuery {\n /**\n * Query metadata extracted from query annotations.\n */\n metadata: TQueryMetadata;\n\n /**\n * Index of a query in a declaration view in case of queries propagated to en embedded view, -1\n * for queries declared in a given view. We are storing this index so we can find a parent query\n * to clone for an embedded view (when an embedded view is created).\n */\n indexInDeclarationView: number;\n\n /**\n * Matches collected on the first template pass. Each match is a pair of:\n * - TNode index;\n * - match index;\n *\n * A TNode index can be either:\n * - a positive number (the most common case) to indicate a matching TNode;\n * - a negative number to indicate that a given query is crossing a <ng-template> element and\n * results from views created based on TemplateRef should be inserted at this place.\n *\n * A match index is a number used to find an actual value (for a given node) when query results\n * are materialized. This index can have one of the following values:\n * - -2 - indicates that we need to read a special token (TemplateRef, ViewContainerRef etc.);\n * - -1 - indicates that we need to read a default value based on the node type (TemplateRef for\n * ng-template and ElementRef for other elements);\n * - a positive number - index of an injectable to be read from the element injector.\n */\n matches: number[]|null;\n\n /**\n * A flag indicating if a given query crosses an <ng-template> element. This flag exists for\n * performance reasons: we can notice that queries not crossing any <ng-template> elements will\n * have matches from a given view only (and adapt processing accordingly).\n */\n crossesNgTemplate: boolean;\n\n /**\n * A method call when a given query is crossing an element (or element container). This is where a\n * given TNode is matched against a query predicate.\n * @param tView\n * @param tNode\n */\n elementStart(tView: TView, tNode: TNode): void;\n\n /**\n * A method called when processing the elementEnd instruction - this is mostly useful to determine\n * if a given content query should match any nodes past this point.\n * @param tNode\n */\n elementEnd(tNode: TNode): void;\n\n /**\n * A method called when processing the template instruction. This is where a\n * given TContainerNode is matched against a query predicate.\n * @param tView\n * @param tNode\n */\n template(tView: TView, tNode: TNode): void;\n\n /**\n * A query-related method called when an embedded TView is created based on the content of a\n * <ng-template> element. We call this method to determine if a given query should be propagated\n * to the embedded view and if so - return a cloned TQuery for this embedded view.\n * @param tNode\n * @param childQueryIndex\n */\n embeddedTView(tNode: TNode, childQueryIndex: number): TQuery|null;\n}\n\n/**\n * TQueries represent a collection of individual TQuery objects tracked in a given view. Most of the\n * methods on this interface are simple proxy methods to the corresponding functionality on TQuery.\n */\nexport interface TQueries {\n /**\n * Adds a new TQuery to a collection of queries tracked in a given view.\n * @param tQuery\n */\n track(tQuery: TQuery): void;\n\n /**\n * Returns a TQuery instance for at the given index in the queries array.\n * @param index\n */\n getByIndex(index: number): TQuery;\n\n /**\n * Returns the number of queries tracked in a given view.\n */\n length: number;\n\n /**\n * A proxy method that iterates over all the TQueries in a given TView and calls the corresponding\n * `elementStart` on each and every TQuery.\n * @param tView\n * @param tNode\n */\n elementStart(tView: TView, tNode: TNode): void;\n\n /**\n * A proxy method that iterates over all the TQueries in a given TView and calls the corresponding\n * `elementEnd` on each and every TQuery.\n * @param tNode\n */\n elementEnd(tNode: TNode): void;\n\n /**\n * A proxy method that iterates over all the TQueries in a given TView and calls the corresponding\n * `template` on each and every TQuery.\n * @param tView\n * @param tNode\n */\n template(tView: TView, tNode: TNode): void;\n\n /**\n * A proxy method that iterates over all the TQueries in a given TView and calls the corresponding\n * `embeddedTView` on each and every TQuery.\n * @param tNode\n */\n embeddedTView(tNode: TNode): TQueries|null;\n}\n\n/**\n * An interface that represents query-related information specific to a view instance. Most notably\n * it contains:\n * - materialized query matches;\n * - a pointer to a QueryList where materialized query results should be reported.\n */\nexport interface LQuery<T> {\n /**\n * Materialized query matches for a given view only (!). Results are initialized lazily so the\n * array of matches is set to `null` initially.\n */\n matches: (T|null)[]|null;\n\n /**\n * A QueryList where materialized query results should be reported.\n */\n queryList: QueryList<T>;\n\n /**\n * Clones an LQuery for an embedded view. A cloned query shares the same `QueryList` but has a\n * separate collection of materialized matches.\n */\n clone(): LQuery<T>;\n\n /**\n * Called when an embedded view, impacting results of this query, is inserted or removed.\n */\n setDirty(): void;\n}\n\n/**\n * lQueries represent a collection of individual LQuery objects tracked in a given view.\n */\nexport interface LQueries {\n /**\n * A collection of queries tracked in a given view.\n */\n queries: LQuery<any>[];\n\n /**\n * A method called when a new embedded view is created. As a result a set of LQueries applicable\n * for a new embedded view is instantiated (cloned) from the declaration view.\n * @param tView\n */\n createEmbeddedView(tView: TView): LQueries|null;\n\n /**\n * A method called when an embedded view is inserted into a container. As a result all impacted\n * `LQuery` objects (and associated `QueryList`) are marked as dirty.\n * @param tView\n */\n insertView(tView: TView): void;\n\n /**\n * A method called when an embedded view is detached from a container. As a result all impacted\n * `LQuery` objects (and associated `QueryList`) are marked as dirty.\n * @param tView\n */\n detachView(tView: TView): void;\n}\n\n\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nexport const unusedValueExportToPlacateAjd = 1;\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// We are temporarily importing the existing viewEngine_from core so we can be sure we are\n// correctly implementing its interfaces for backwards compatibility.\n\nimport {ProviderToken} from '../di/provider_token';\nimport {createElementRef, ElementRef as ViewEngine_ElementRef, unwrapElementRef} from '../linker/element_ref';\nimport {QueryList} from '../linker/query_list';\nimport {createTemplateRef, TemplateRef as ViewEngine_TemplateRef} from '../linker/template_ref';\nimport {createContainerRef, ViewContainerRef} from '../linker/view_container_ref';\nimport {assertDefined, assertIndexInRange, assertNumber, throwError} from '../util/assert';\nimport {stringify} from '../util/stringify';\nimport {assertFirstCreatePass, assertLContainer} from './assert';\nimport {getNodeInjectable, locateDirectiveOrProvider} from './di';\nimport {storeCleanupWithContext} from './instructions/shared';\nimport {CONTAINER_HEADER_OFFSET, LContainer, MOVED_VIEWS} from './interfaces/container';\nimport {unusedValueExportToPlacateAjd as unused1} from './interfaces/definition';\nimport {unusedValueExportToPlacateAjd as unused2} from './interfaces/injector';\nimport {TContainerNode, TElementContainerNode, TElementNode, TNode, TNodeType, unusedValueExportToPlacateAjd as unused3} from './interfaces/node';\nimport {LQueries, LQuery, QueryFlags, TQueries, TQuery, TQueryMetadata, unusedValueExportToPlacateAjd as unused4} from './interfaces/query';\nimport {DECLARATION_LCONTAINER, LView, PARENT, QUERIES, TVIEW, TView} from './interfaces/view';\nimport {assertTNodeType} from './node_assert';\nimport {getCurrentQueryIndex, getCurrentTNode, getLView, getTView, setCurrentQueryIndex} from './state';\nimport {isCreationMode} from './util/view_utils';\n\nconst unusedValueToPlacateAjd = unused1 + unused2 + unused3 + unused4;\n\nclass LQuery_<T> implements LQuery<T> {\n matches: (T|null)[]|null = null;\n constructor(public queryList: QueryList<T>) {}\n clone(): LQuery<T> {\n return new LQuery_(this.queryList);\n }\n setDirty(): void {\n this.queryList.setDirty();\n }\n}\n\nclass LQueries_ implements LQueries {\n constructor(public queries: LQuery<any>[] = []) {}\n\n createEmbeddedView(tView: TView): LQueries|null {\n const tQueries = tView.queries;\n if (tQueries !== null) {\n const noOfInheritedQueries =\n tView.contentQueries !== null ? tView.contentQueries[0] : tQueries.length;\n const viewLQueries: LQuery<any>[] = [];\n\n // An embedded view has queries propagated from a declaration view at the beginning of the\n // TQueries collection and up until a first content query declared in the embedded view. Only\n // propagated LQueries are created at this point (LQuery corresponding to declared content\n // queries will be instantiated from the content query instructions for each directive).\n for (let i = 0; i < noOfInheritedQueries; i++) {\n const tQuery = tQueries.getByIndex(i);\n const parentLQuery = this.queries[tQuery.indexInDeclarationView];\n viewLQueries.push(parentLQuery.clone());\n }\n\n return new LQueries_(viewLQueries);\n }\n\n return null;\n }\n\n insertView(tView: TView): void {\n this.dirtyQueriesWithMatches(tView);\n }\n\n detachView(tView: TView): void {\n this.dirtyQueriesWithMatches(tView);\n }\n\n private dirtyQueriesWithMatches(tView: TView) {\n for (let i = 0; i < this.queries.length; i++) {\n if (getTQuery(tView, i).matches !== null) {\n this.queries[i].setDirty();\n }\n }\n }\n}\n\nclass TQueryMetadata_ implements TQueryMetadata {\n constructor(\n public predicate: ProviderToken<unknown>|string[], public flags: QueryFlags,\n public read: any = null) {}\n}\n\nclass TQueries_ implements TQueries {\n constructor(private queries: TQuery[] = []) {}\n\n elementStart(tView: TView, tNode: TNode): void {\n ngDevMode &&\n assertFirstCreatePass(\n tView, 'Queries should collect results on the first template pass only');\n for (let i = 0; i < this.queries.length; i++) {\n this.queries[i].elementStart(tView, tNode);\n }\n }\n elementEnd(tNode: TNode): void {\n for (let i = 0; i < this.queries.length; i++) {\n this.queries[i].elementEnd(tNode);\n }\n }\n embeddedTView(tNode: TNode): TQueries|null {\n let queriesForTemplateRef: TQuery[]|null = null;\n\n for (let i = 0; i < this.length; i++) {\n const childQueryIndex = queriesForTemplateRef !== null ? queriesForTemplateRef.length : 0;\n const tqueryClone = this.getByIndex(i).embeddedTView(tNode, childQueryIndex);\n\n if (tqueryClone) {\n tqueryClone.indexInDeclarationView = i;\n if (queriesForTemplateRef !== null) {\n queriesForTemplateRef.push(tqueryClone);\n } else {\n queriesForTemplateRef = [tqueryClone];\n }\n }\n }\n\n return queriesForTemplateRef !== null ? new TQueries_(queriesForTemplateRef) : null;\n }\n\n template(tView: TView, tNode: TNode): void {\n ngDevMode &&\n assertFirstCreatePass(\n tView, 'Queries should collect results on the first template pass only');\n for (let i = 0; i < this.queries.length; i++) {\n this.queries[i].template(tView, tNode);\n }\n }\n\n getByIndex(index: number): TQuery {\n ngDevMode && assertIndexInRange(this.queries, index);\n return this.queries[index];\n }\n\n get length(): number {\n return this.queries.length;\n }\n\n track(tquery: TQuery): void {\n this.queries.push(tquery);\n }\n}\n\nclass TQuery_ implements TQuery {\n matches: number[]|null = null;\n indexInDeclarationView = -1;\n crossesNgTemplate = false;\n\n /**\n * A node index on which a query was declared (-1 for view queries and ones inherited from the\n * declaration template). We use this index (alongside with _appliesToNextNode flag) to know\n * when to apply content queries to elements in a template.\n */\n private _declarationNodeIndex: number;\n\n /**\n * A flag indicating if a given query still applies to nodes it is crossing. We use this flag\n * (alongside with _declarationNodeIndex) to know when to stop applying content queries to\n * elements in a template.\n */\n private _appliesToNextNode = true;\n\n constructor(public metadata: TQueryMetadata, nodeIndex: number = -1) {\n this._declarationNodeIndex = nodeIndex;\n }\n\n elementStart(tView: TView, tNode: TNode): void {\n if (this.isApplyingToNode(tNode)) {\n this.matchTNode(tView, tNode);\n }\n }\n\n elementEnd(tNode: TNode): void {\n if (this._declarationNodeIndex === tNode.index) {\n this._appliesToNextNode = false;\n }\n }\n\n template(tView: TView, tNode: TNode): void {\n this.elementStart(tView, tNode);\n }\n\n embeddedTView(tNode: TNode, childQueryIndex: number): TQuery|null {\n if (this.isApplyingToNode(tNode)) {\n this.crossesNgTemplate = true;\n // A marker indicating a `<ng-template>` element (a placeholder for query results from\n // embedded views created based on this `<ng-template>`).\n this.addMatch(-tNode.index, childQueryIndex);\n return new TQuery_(this.metadata);\n }\n return null;\n }\n\n private isApplyingToNode(tNode: TNode): boolean {\n if (this._appliesToNextNode &&\n (this.metadata.flags & QueryFlags.descendants) !== QueryFlags.descendants) {\n const declarationNodeIdx = this._declarationNodeIndex;\n let parent = tNode.parent;\n // Determine if a given TNode is a \"direct\" child of a node on which a content query was\n // declared (only direct children of query's host node can match with the descendants: false\n // option). There are 3 main use-case / conditions to consider here:\n // - <needs-target><i #target></i></needs-target>: here <i #target> parent node is a query\n // host node;\n // - <needs-target><ng-template [ngIf]=\"true\"><i #target></i></ng-template></needs-target>:\n // here <i #target> parent node is null;\n // - <needs-target><ng-container><i #target></i></ng-container></needs-target>: here we need\n // to go past `<ng-container>` to determine <i #target> parent node (but we shouldn't traverse\n // up past the query's host node!).\n while (parent !== null && (parent.type & TNodeType.ElementContainer) &&\n parent.index !== declarationNodeIdx) {\n parent = parent.parent;\n }\n return declarationNodeIdx === (parent !== null ? parent.index : -1);\n }\n return this._appliesToNextNode;\n }\n\n private matchTNode(tView: TView, tNode: TNode): void {\n const predicate = this.metadata.predicate;\n if (Array.isArray(predicate)) {\n for (let i = 0; i < predicate.length; i++) {\n const name = predicate[i];\n this.matchTNodeWithReadOption(tView, tNode, getIdxOfMatchingSelector(tNode, name));\n // Also try matching the name to a provider since strings can be used as DI tokens too.\n this.matchTNodeWithReadOption(\n tView, tNode, locateDirectiveOrProvider(tNode, tView, name, false, false));\n }\n } else {\n if ((predicate as any) === ViewEngine_TemplateRef) {\n if (tNode.type & TNodeType.Container) {\n this.matchTNodeWithReadOption(tView, tNode, -1);\n }\n } else {\n this.matchTNodeWithReadOption(\n tView, tNode, locateDirectiveOrProvider(tNode, tView, predicate, false, false));\n }\n }\n }\n\n private matchTNodeWithReadOption(tView: TView, tNode: TNode, nodeMatchIdx: number|null): void {\n if (nodeMatchIdx !== null) {\n const read = this.metadata.read;\n if (read !== null) {\n if (read === ViewEngine_ElementRef || read === ViewContainerRef ||\n read === ViewEngine_TemplateRef && (tNode.type & TNodeType.Container)) {\n this.addMatch(tNode.index, -2);\n } else {\n const directiveOrProviderIdx =\n locateDirectiveOrProvider(tNode, tView, read, false, false);\n if (directiveOrProviderIdx !== null) {\n this.addMatch(tNode.index, directiveOrProviderIdx);\n }\n }\n } else {\n this.addMatch(tNode.index, nodeMatchIdx);\n }\n }\n }\n\n private addMatch(tNodeIdx: number, matchIdx: number) {\n if (this.matches === null) {\n this.matches = [tNodeIdx, matchIdx];\n } else {\n this.matches.push(tNodeIdx, matchIdx);\n }\n }\n}\n\n/**\n * Iterates over local names for a given node and returns directive index\n * (or -1 if a local name points to an element).\n *\n * @param tNode static data of a node to check\n * @param selector selector to match\n * @returns directive index, -1 or null if a selector didn't match any of the local names\n */\nfunction getIdxOfMatchingSelector(tNode: TNode, selector: string): number|null {\n const localNames = tNode.localNames;\n if (localNames !== null) {\n for (let i = 0; i < localNames.length; i += 2) {\n if (localNames[i] === selector) {\n return localNames[i + 1] as number;\n }\n }\n }\n return null;\n}\n\n\nfunction createResultByTNodeType(tNode: TNode, currentView: LView): any {\n if (tNode.type & (TNodeType.AnyRNode | TNodeType.ElementContainer)) {\n return createElementRef(tNode, currentView);\n } else if (tNode.type & TNodeType.Container) {\n return createTemplateRef(tNode, currentView);\n }\n return null;\n}\n\n\nfunction createResultForNode(lView: LView, tNode: TNode, matchingIdx: number, read: any): any {\n if (matchingIdx === -1) {\n // if read token and / or strategy is not specified, detect it using appropriate tNode type\n return createResultByTNodeType(tNode, lView);\n } else if (matchingIdx === -2) {\n // read a special token from a node injector\n return createSpecialToken(lView, tNode, read);\n } else {\n // read a token\n return getNodeInjectable(lView, lView[TVIEW], matchingIdx, tNode as TElementNode);\n }\n}\n\nfunction createSpecialToken(lView: LView, tNode: TNode, read: any): any {\n if (read === ViewEngine_ElementRef) {\n return createElementRef(tNode, lView);\n } else if (read === ViewEngine_TemplateRef) {\n return createTemplateRef(tNode, lView);\n } else if (read === ViewContainerRef) {\n ngDevMode && assertTNodeType(tNode, TNodeType.AnyRNode | TNodeType.AnyContainer);\n return createContainerRef(\n tNode as TElementNode | TContainerNode | TElementContainerNode, lView);\n } else {\n ngDevMode &&\n throwError(\n `Special token to read should be one of ElementRef, TemplateRef or ViewContainerRef but got ${\n stringify(read)}.`);\n }\n}\n\n/**\n * A helper function that creates query results for a given view. This function is meant to do the\n * processing once and only once for a given view instance (a set of results for a given view\n * doesn't change).\n */\nfunction materializeViewResults<T>(\n tView: TView, lView: LView, tQuery: TQuery, queryIndex: number): (T|null)[] {\n const lQuery = lView[QUERIES]!.queries![queryIndex];\n if (lQuery.matches === null) {\n const tViewData = tView.data;\n const tQueryMatches = tQuery.matches!;\n const result: T|null[] = [];\n for (let i = 0; i < tQueryMatches.length; i += 2) {\n const matchedNodeIdx = tQueryMatches[i];\n if (matchedNodeIdx < 0) {\n // we at the <ng-template> marker which might have results in views created based on this\n // <ng-template> - those results will be in separate views though, so here we just leave\n // null as a placeholder\n result.push(null);\n } else {\n ngDevMode && assertIndexInRange(tViewData, matchedNodeIdx);\n const tNode = tViewData[matchedNodeIdx] as TNode;\n result.push(createResultForNode(lView, tNode, tQueryMatches[i + 1], tQuery.metadata.read));\n }\n }\n lQuery.matches = result;\n }\n\n return lQuery.matches;\n}\n\n/**\n * A helper function that collects (already materialized) query results from a tree of views,\n * starting with a provided LView.\n */\nfunction collectQueryResults<T>(tView: TView, lView: LView, queryIndex: number, result: T[]): T[] {\n const tQuery = tView.queries!.getByIndex(queryIndex);\n const tQueryMatches = tQuery.matches;\n if (tQueryMatches !== null) {\n const lViewResults = materializeViewResults<T>(tView, lView, tQuery, queryIndex);\n\n for (let i = 0; i < tQueryMatches.length; i += 2) {\n const tNodeIdx = tQueryMatches[i];\n if (tNodeIdx > 0) {\n result.push(lViewResults[i / 2] as T);\n } else {\n const childQueryIndex = tQueryMatches[i + 1];\n\n const declarationLContainer = lView[-tNodeIdx] as LContainer;\n ngDevMode && assertLContainer(declarationLContainer);\n\n // collect matches for views inserted in this container\n for (let i = CONTAINER_HEADER_OFFSET; i < declarationLContainer.length; i++) {\n const embeddedLView = declarationLContainer[i];\n if (embeddedLView[DECLARATION_LCONTAINER] === embeddedLView[PARENT]) {\n collectQueryResults(embeddedLView[TVIEW], embeddedLView, childQueryIndex, result);\n }\n }\n\n // collect matches for views created from this declaration container and inserted into\n // different containers\n if (declarationLContainer[MOVED_VIEWS] !== null) {\n const embeddedLViews = declarationLContainer[MOVED_VIEWS]!;\n for (let i = 0; i < embeddedLViews.length; i++) {\n const embeddedLView = embeddedLViews[i];\n collectQueryResults(embeddedLView[TVIEW], embeddedLView, childQueryIndex, result);\n }\n }\n }\n }\n }\n return result;\n}\n\n/**\n * Refreshes a query by combining matches from all active views and removing matches from deleted\n * views.\n *\n * @returns `true` if a query got dirty during change detection or if this is a static query\n * resolving in creation mode, `false` otherwise.\n *\n * @codeGenApi\n */\nexport function ɵɵqueryRefresh(queryList: QueryList<any>): boolean {\n const lView = getLView();\n const tView = getTView();\n const queryIndex = getCurrentQueryIndex();\n\n setCurrentQueryIndex(queryIndex + 1);\n\n const tQuery = getTQuery(tView, queryIndex);\n if (queryList.dirty &&\n (isCreationMode(lView) ===\n ((tQuery.metadata.flags & QueryFlags.isStatic) === QueryFlags.isStatic))) {\n if (tQuery.matches === null) {\n queryList.reset([]);\n } else {\n const result = tQuery.crossesNgTemplate ?\n collectQueryResults(tView, lView, queryIndex, []) :\n materializeViewResults(tView, lView, tQuery, queryIndex);\n queryList.reset(result, unwrapElementRef);\n queryList.notifyOnChanges();\n }\n return true;\n }\n\n return false;\n}\n\n/**\n * Creates new QueryList, stores the reference in LView and returns QueryList.\n *\n * @param predicate The type for which the query will search\n * @param flags Flags associated with the query\n * @param read What to save in the query\n *\n * @codeGenApi\n */\nexport function ɵɵviewQuery<T>(\n predicate: ProviderToken<unknown>|string[], flags: QueryFlags, read?: any): void {\n ngDevMode && assertNumber(flags, 'Expecting flags');\n const tView = getTView();\n if (tView.firstCreatePass) {\n createTQuery(tView, new TQueryMetadata_(predicate, flags, read), -1);\n if ((flags & QueryFlags.isStatic) === QueryFlags.isStatic) {\n tView.staticViewQueries = true;\n }\n }\n createLQuery<T>(tView, getLView(), flags);\n}\n\n/**\n * Registers a QueryList, associated with a content query, for later refresh (part of a view\n * refresh).\n *\n * @param directiveIndex Current directive index\n * @param predicate The type for which the query will search\n * @param flags Flags associated with the query\n * @param read What to save in the query\n * @returns QueryList<T>\n *\n * @codeGenApi\n */\nexport function ɵɵcontentQuery<T>(\n directiveIndex: number, predicate: ProviderToken<unknown>|string[], flags: QueryFlags,\n read?: any): void {\n ngDevMode && assertNumber(flags, 'Expecting flags');\n const tView = getTView();\n if (tView.firstCreatePass) {\n const tNode = getCurrentTNode()!;\n createTQuery(tView, new TQueryMetadata_(predicate, flags, read), tNode.index);\n saveContentQueryAndDirectiveIndex(tView, directiveIndex);\n if ((flags & QueryFlags.isStatic) === QueryFlags.isStatic) {\n tView.staticContentQueries = true;\n }\n }\n\n createLQuery<T>(tView, getLView(), flags);\n}\n\n/**\n * Loads a QueryList corresponding to the current view or content query.\n *\n * @codeGenApi\n */\nexport function ɵɵloadQuery<T>(): QueryList<T> {\n return loadQueryInternal<T>(getLView(), getCurrentQueryIndex());\n}\n\nfunction loadQueryInternal<T>(lView: LView, queryIndex: number): QueryList<T> {\n ngDevMode &&\n assertDefined(lView[QUERIES], 'LQueries should be defined when trying to load a query');\n ngDevMode && assertIndexInRange(lView[QUERIES]!.queries, queryIndex);\n return lView[QUERIES]!.queries[queryIndex].queryList;\n}\n\nfunction createLQuery<T>(tView: TView, lView: LView, flags: QueryFlags) {\n const queryList = new QueryList<T>(\n (flags & QueryFlags.emitDistinctChangesOnly) === QueryFlags.emitDistinctChangesOnly);\n storeCleanupWithContext(tView, lView, queryList, queryList.destroy);\n\n if (lView[QUERIES] === null) lView[QUERIES] = new LQueries_();\n lView[QUERIES]!.queries.push(new LQuery_(queryList));\n}\n\nfunction createTQuery(tView: TView, metadata: TQueryMetadata, nodeIndex: number): void {\n if (tView.queries === null) tView.queries = new TQueries_();\n tView.queries.track(new TQuery_(metadata, nodeIndex));\n}\n\nfunction saveContentQueryAndDirectiveIndex(tView: TView, directiveIndex: number) {\n const tViewContentQueries = tView.contentQueries || (tView.contentQueries = []);\n const lastSavedDirectiveIndex =\n tViewContentQueries.length ? tViewContentQueries[tViewContentQueries.length - 1] : -1;\n if (directiveIndex !== lastSavedDirectiveIndex) {\n tViewContentQueries.push(tView.queries!.length - 1, directiveIndex);\n }\n}\n\nfunction getTQuery(tView: TView, index: number): TQuery {\n ngDevMode && assertDefined(tView.queries, 'TQueries must be defined to retrieve a TQuery');\n return tView.queries!.getByIndex(index);\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\nimport {ChangeDetectorRef, injectChangeDetectorRef} from '../change_detection/change_detector_ref';\nimport {InjectFlags} from '../di/interface/injector';\nimport {createTemplateRef, TemplateRef} from '../linker/template_ref';\nimport {throwProviderNotFoundError} from './errors_di';\nimport {TNode} from './interfaces/node';\nimport {LView} from './interfaces/view';\n\n\n/**\n * Retrieves `TemplateRef` instance from `Injector` when a local reference is placed on the\n * `<ng-template>` element.\n *\n * @codeGenApi\n */\nexport function ɵɵtemplateRefExtractor(tNode: TNode, lView: LView): TemplateRef<any>|null {\n return createTemplateRef(tNode, lView);\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 */\nimport {LifecycleHooksFeature, renderComponent, whenRendered} from './component';\nimport {ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdefineNgModule, ɵɵdefinePipe, ɵɵsetComponentScope, ɵɵsetNgModuleScope} from './definition';\nimport {ɵɵCopyDefinitionFeature} from './features/copy_definition_feature';\nimport {ɵɵInheritDefinitionFeature} from './features/inherit_definition_feature';\nimport {ɵɵNgOnChangesFeature} from './features/ng_onchanges_feature';\nimport {ɵɵProvidersFeature} from './features/providers_feature';\nimport {ComponentDef, ComponentTemplate, ComponentType, DirectiveDef, DirectiveType, PipeDef} from './interfaces/definition';\nimport {ɵɵComponentDeclaration, ɵɵDirectiveDeclaration, ɵɵFactoryDeclaration, ɵɵInjectorDeclaration, ɵɵNgModuleDeclaration, ɵɵPipeDeclaration} from './interfaces/public_definitions';\nimport {ComponentDebugMetadata, DirectiveDebugMetadata, getComponent, getDirectiveMetadata, getDirectives, getHostElement, getRenderedText} from './util/discovery_utils';\n\nexport {NgModuleType} from '../metadata/ng_module_def';\nexport {ComponentFactory, ComponentFactoryResolver, ComponentRef, injectComponentFactoryResolver} from './component_ref';\nexport {ɵɵgetInheritedFactory} from './di';\nexport {getLocaleId, setLocaleId} from './i18n/i18n_locale_id';\n// clang-format off\nexport {\n detectChanges,\n markDirty,\n store,\n tick,\n ɵɵadvance,\n\n ɵɵattribute,\n ɵɵattributeInterpolate1,\n ɵɵattributeInterpolate2,\n ɵɵattributeInterpolate3,\n ɵɵattributeInterpolate4,\n ɵɵattributeInterpolate5,\n ɵɵattributeInterpolate6,\n ɵɵattributeInterpolate7,\n ɵɵattributeInterpolate8,\n ɵɵattributeInterpolateV,\n\n ɵɵclassMap,\n ɵɵclassMapInterpolate1,\n ɵɵclassMapInterpolate2,\n ɵɵclassMapInterpolate3,\n ɵɵclassMapInterpolate4,\n ɵɵclassMapInterpolate5,\n ɵɵclassMapInterpolate6,\n ɵɵclassMapInterpolate7,\n ɵɵclassMapInterpolate8,\n ɵɵclassMapInterpolateV,\n\n ɵɵclassProp,\n\n ɵɵdirectiveInject,\n\n ɵɵelement,\n\n ɵɵelementContainer,\n ɵɵelementContainerEnd,\n ɵɵelementContainerStart,\n ɵɵelementEnd,\n ɵɵelementStart,\n\n ɵɵgetCurrentView,\n ɵɵhostProperty,\n ɵɵinjectAttribute,\n ɵɵinvalidFactory,\n\n ɵɵlistener,\n\n ɵɵnamespaceHTML,\n ɵɵnamespaceMathML,\n ɵɵnamespaceSVG,\n\n ɵɵnextContext,\n\n ɵɵprojection,\n ɵɵprojectionDef,\n ɵɵproperty,\n ɵɵpropertyInterpolate,\n ɵɵpropertyInterpolate1,\n ɵɵpropertyInterpolate2,\n ɵɵpropertyInterpolate3,\n ɵɵpropertyInterpolate4,\n ɵɵpropertyInterpolate5,\n ɵɵpropertyInterpolate6,\n ɵɵpropertyInterpolate7,\n ɵɵpropertyInterpolate8,\n ɵɵpropertyInterpolateV,\n\n ɵɵreference,\n\n ɵɵstyleMap,\n ɵɵstyleMapInterpolate1,\n ɵɵstyleMapInterpolate2,\n ɵɵstyleMapInterpolate3,\n ɵɵstyleMapInterpolate4,\n ɵɵstyleMapInterpolate5,\n ɵɵstyleMapInterpolate6,\n ɵɵstyleMapInterpolate7,\n ɵɵstyleMapInterpolate8,\n ɵɵstyleMapInterpolateV,\n\n ɵɵstyleProp,\n ɵɵstylePropInterpolate1,\n ɵɵstylePropInterpolate2,\n ɵɵstylePropInterpolate3,\n ɵɵstylePropInterpolate4,\n ɵɵstylePropInterpolate5,\n ɵɵstylePropInterpolate6,\n ɵɵstylePropInterpolate7,\n ɵɵstylePropInterpolate8,\n ɵɵstylePropInterpolateV,\n\n ɵɵsyntheticHostListener,\n ɵɵsyntheticHostProperty,\n\n ɵɵtemplate,\n\n ɵɵtext,\n ɵɵtextInterpolate,\n ɵɵtextInterpolate1,\n ɵɵtextInterpolate2,\n ɵɵtextInterpolate3,\n ɵɵtextInterpolate4,\n ɵɵtextInterpolate5,\n ɵɵtextInterpolate6,\n ɵɵtextInterpolate7,\n ɵɵtextInterpolate8,\n ɵɵtextInterpolateV,\n} from './instructions/all';\nexport {ɵɵi18n, ɵɵi18nApply, ɵɵi18nAttributes, ɵɵi18nEnd, ɵɵi18nExp,ɵɵi18nPostprocess, ɵɵi18nStart} from './instructions/i18n';\nexport {RenderFlags} from './interfaces/definition';\nexport {\n AttributeMarker\n} from './interfaces/node';\nexport {CssSelectorList, ProjectionSlots} from './interfaces/projection';\nexport {\n setClassMetadata,\n} from './metadata';\nexport {NgModuleFactory, NgModuleRef} from './ng_module_ref';\nexport {\n ɵɵpipe,\n ɵɵpipeBind1,\n ɵɵpipeBind2,\n ɵɵpipeBind3,\n ɵɵpipeBind4,\n ɵɵpipeBindV,\n} from './pipe';\nexport {\n ɵɵpureFunction0,\n ɵɵpureFunction1,\n ɵɵpureFunction2,\n ɵɵpureFunction3,\n ɵɵpureFunction4,\n ɵɵpureFunction5,\n ɵɵpureFunction6,\n ɵɵpureFunction7,\n ɵɵpureFunction8,\n ɵɵpureFunctionV,\n} from './pure_function';\nexport {\n ɵɵcontentQuery,\n ɵɵloadQuery,\n ɵɵqueryRefresh,\n ɵɵviewQuery} from './query';\nexport {\n ɵɵdisableBindings,\n\n ɵɵenableBindings,\n ɵɵrestoreView,\n} from './state';\nexport {NO_CHANGE} from './tokens';\nexport { ɵɵresolveBody, ɵɵresolveDocument,ɵɵresolveWindow} from './util/misc_utils';\nexport { ɵɵtemplateRefExtractor} from './view_engine_compatibility_prebound';\n// clang-format on\n\nexport {\n ComponentDebugMetadata,\n ComponentDef,\n ComponentTemplate,\n ComponentType,\n DirectiveDebugMetadata,\n DirectiveDef,\n DirectiveType,\n getComponent,\n getDirectiveMetadata,\n getDirectives,\n getHostElement,\n getRenderedText,\n LifecycleHooksFeature,\n PipeDef,\n renderComponent,\n whenRendered,\n ɵɵComponentDeclaration,\n ɵɵCopyDefinitionFeature,\n ɵɵdefineComponent,\n ɵɵdefineDirective,\n ɵɵdefineNgModule,\n ɵɵdefinePipe,\n ɵɵDirectiveDeclaration,\n ɵɵFactoryDeclaration,\n ɵɵInheritDefinitionFeature,\n ɵɵInjectorDeclaration,\n ɵɵNgModuleDeclaration,\n ɵɵNgOnChangesFeature,\n ɵɵPipeDeclaration,\n ɵɵProvidersFeature,\n ɵɵsetComponentScope,\n ɵɵsetNgModuleScope,\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 {forwardRef, resolveForwardRef} from '../../di/forward_ref';\nimport {ɵɵinject, ɵɵinvalidFactoryDep} from '../../di/injector_compatibility';\nimport {ɵɵdefineInjectable, ɵɵdefineInjector} from '../../di/interface/defs';\nimport * as sanitization from '../../sanitization/sanitization';\nimport * as r3 from '../index';\n\n\n/**\n * A mapping of the @angular/core API surface used in generated expressions to the actual symbols.\n *\n * This should be kept up to date with the public exports of @angular/core.\n */\nexport const angularCoreEnv: {[name: string]: Function} =\n (() => ({\n 'ɵɵattribute': r3.ɵɵattribute,\n 'ɵɵattributeInterpolate1': r3.ɵɵattributeInterpolate1,\n 'ɵɵattributeInterpolate2': r3.ɵɵattributeInterpolate2,\n 'ɵɵattributeInterpolate3': r3.ɵɵattributeInterpolate3,\n 'ɵɵattributeInterpolate4': r3.ɵɵattributeInterpolate4,\n 'ɵɵattributeInterpolate5': r3.ɵɵattributeInterpolate5,\n 'ɵɵattributeInterpolate6': r3.ɵɵattributeInterpolate6,\n 'ɵɵattributeInterpolate7': r3.ɵɵattributeInterpolate7,\n 'ɵɵattributeInterpolate8': r3.ɵɵattributeInterpolate8,\n 'ɵɵattributeInterpolateV': r3.ɵɵattributeInterpolateV,\n 'ɵɵdefineComponent': r3.ɵɵdefineComponent,\n 'ɵɵdefineDirective': r3.ɵɵdefineDirective,\n 'ɵɵdefineInjectable': ɵɵdefineInjectable,\n 'ɵɵdefineInjector': ɵɵdefineInjector,\n 'ɵɵdefineNgModule': r3.ɵɵdefineNgModule,\n 'ɵɵdefinePipe': r3.ɵɵdefinePipe,\n 'ɵɵdirectiveInject': r3.ɵɵdirectiveInject,\n 'ɵɵgetInheritedFactory': r3.ɵɵgetInheritedFactory,\n 'ɵɵinject': ɵɵinject,\n 'ɵɵinjectAttribute': r3.ɵɵinjectAttribute,\n 'ɵɵinvalidFactory': r3.ɵɵinvalidFactory,\n 'ɵɵinvalidFactoryDep': ɵɵinvalidFactoryDep,\n 'ɵɵtemplateRefExtractor': r3.ɵɵtemplateRefExtractor,\n 'ɵɵNgOnChangesFeature': r3.ɵɵNgOnChangesFeature,\n 'ɵɵProvidersFeature': r3.ɵɵProvidersFeature,\n 'ɵɵCopyDefinitionFeature': r3.ɵɵCopyDefinitionFeature,\n 'ɵɵInheritDefinitionFeature': r3.ɵɵInheritDefinitionFeature,\n 'ɵɵnextContext': r3.ɵɵnextContext,\n 'ɵɵnamespaceHTML': r3.ɵɵnamespaceHTML,\n 'ɵɵnamespaceMathML': r3.ɵɵnamespaceMathML,\n 'ɵɵnamespaceSVG': r3.ɵɵnamespaceSVG,\n 'ɵɵenableBindings': r3.ɵɵenableBindings,\n 'ɵɵdisableBindings': r3.ɵɵdisableBindings,\n 'ɵɵelementStart': r3.ɵɵelementStart,\n 'ɵɵelementEnd': r3.ɵɵelementEnd,\n 'ɵɵelement': r3.ɵɵelement,\n 'ɵɵelementContainerStart': r3.ɵɵelementContainerStart,\n 'ɵɵelementContainerEnd': r3.ɵɵelementContainerEnd,\n 'ɵɵelementContainer': r3.ɵɵelementContainer,\n 'ɵɵpureFunction0': r3.ɵɵpureFunction0,\n 'ɵɵpureFunction1': r3.ɵɵpureFunction1,\n 'ɵɵpureFunction2': r3.ɵɵpureFunction2,\n 'ɵɵpureFunction3': r3.ɵɵpureFunction3,\n 'ɵɵpureFunction4': r3.ɵɵpureFunction4,\n 'ɵɵpureFunction5': r3.ɵɵpureFunction5,\n 'ɵɵpureFunction6': r3.ɵɵpureFunction6,\n 'ɵɵpureFunction7': r3.ɵɵpureFunction7,\n 'ɵɵpureFunction8': r3.ɵɵpureFunction8,\n 'ɵɵpureFunctionV': r3.ɵɵpureFunctionV,\n 'ɵɵgetCurrentView': r3.ɵɵgetCurrentView,\n 'ɵɵrestoreView': r3.ɵɵrestoreView,\n 'ɵɵlistener': r3.ɵɵlistener,\n 'ɵɵprojection': r3.ɵɵprojection,\n 'ɵɵsyntheticHostProperty': r3.ɵɵsyntheticHostProperty,\n 'ɵɵsyntheticHostListener': r3.ɵɵsyntheticHostListener,\n 'ɵɵpipeBind1': r3.ɵɵpipeBind1,\n 'ɵɵpipeBind2': r3.ɵɵpipeBind2,\n 'ɵɵpipeBind3': r3.ɵɵpipeBind3,\n 'ɵɵpipeBind4': r3.ɵɵpipeBind4,\n 'ɵɵpipeBindV': r3.ɵɵpipeBindV,\n 'ɵɵprojectionDef': r3.ɵɵprojectionDef,\n 'ɵɵhostProperty': r3.ɵɵhostProperty,\n 'ɵɵproperty': r3.ɵɵproperty,\n 'ɵɵpropertyInterpolate': r3.ɵɵpropertyInterpolate,\n 'ɵɵpropertyInterpolate1': r3.ɵɵpropertyInterpolate1,\n 'ɵɵpropertyInterpolate2': r3.ɵɵpropertyInterpolate2,\n 'ɵɵpropertyInterpolate3': r3.ɵɵpropertyInterpolate3,\n 'ɵɵpropertyInterpolate4': r3.ɵɵpropertyInterpolate4,\n 'ɵɵpropertyInterpolate5': r3.ɵɵpropertyInterpolate5,\n 'ɵɵpropertyInterpolate6': r3.ɵɵpropertyInterpolate6,\n 'ɵɵpropertyInterpolate7': r3.ɵɵpropertyInterpolate7,\n 'ɵɵpropertyInterpolate8': r3.ɵɵpropertyInterpolate8,\n 'ɵɵpropertyInterpolateV': r3.ɵɵpropertyInterpolateV,\n 'ɵɵpipe': r3.ɵɵpipe,\n 'ɵɵqueryRefresh': r3.ɵɵqueryRefresh,\n 'ɵɵviewQuery': r3.ɵɵviewQuery,\n 'ɵɵloadQuery': r3.ɵɵloadQuery,\n 'ɵɵcontentQuery': r3.ɵɵcontentQuery,\n 'ɵɵreference': r3.ɵɵreference,\n 'ɵɵclassMap': r3.ɵɵclassMap,\n 'ɵɵclassMapInterpolate1': r3.ɵɵclassMapInterpolate1,\n 'ɵɵclassMapInterpolate2': r3.ɵɵclassMapInterpolate2,\n 'ɵɵclassMapInterpolate3': r3.ɵɵclassMapInterpolate3,\n 'ɵɵclassMapInterpolate4': r3.ɵɵclassMapInterpolate4,\n 'ɵɵclassMapInterpolate5': r3.ɵɵclassMapInterpolate5,\n 'ɵɵclassMapInterpolate6': r3.ɵɵclassMapInterpolate6,\n 'ɵɵclassMapInterpolate7': r3.ɵɵclassMapInterpolate7,\n 'ɵɵclassMapInterpolate8': r3.ɵɵclassMapInterpolate8,\n 'ɵɵclassMapInterpolateV': r3.ɵɵclassMapInterpolateV,\n 'ɵɵstyleMap': r3.ɵɵstyleMap,\n 'ɵɵstyleMapInterpolate1': r3.ɵɵstyleMapInterpolate1,\n 'ɵɵstyleMapInterpolate2': r3.ɵɵstyleMapInterpolate2,\n 'ɵɵstyleMapInterpolate3': r3.ɵɵstyleMapInterpolate3,\n 'ɵɵstyleMapInterpolate4': r3.ɵɵstyleMapInterpolate4,\n 'ɵɵstyleMapInterpolate5': r3.ɵɵstyleMapInterpolate5,\n 'ɵɵstyleMapInterpolate6': r3.ɵɵstyleMapInterpolate6,\n 'ɵɵstyleMapInterpolate7': r3.ɵɵstyleMapInterpolate7,\n 'ɵɵstyleMapInterpolate8': r3.ɵɵstyleMapInterpolate8,\n 'ɵɵstyleMapInterpolateV': r3.ɵɵstyleMapInterpolateV,\n 'ɵɵstyleProp': r3.ɵɵstyleProp,\n 'ɵɵstylePropInterpolate1': r3.ɵɵstylePropInterpolate1,\n 'ɵɵstylePropInterpolate2': r3.ɵɵstylePropInterpolate2,\n 'ɵɵstylePropInterpolate3': r3.ɵɵstylePropInterpolate3,\n 'ɵɵstylePropInterpolate4': r3.ɵɵstylePropInterpolate4,\n 'ɵɵstylePropInterpolate5': r3.ɵɵstylePropInterpolate5,\n 'ɵɵstylePropInterpolate6': r3.ɵɵstylePropInterpolate6,\n 'ɵɵstylePropInterpolate7': r3.ɵɵstylePropInterpolate7,\n 'ɵɵstylePropInterpolate8': r3.ɵɵstylePropInterpolate8,\n 'ɵɵstylePropInterpolateV': r3.ɵɵstylePropInterpolateV,\n 'ɵɵclassProp': r3.ɵɵclassProp,\n 'ɵɵadvance': r3.ɵɵadvance,\n 'ɵɵtemplate': r3.ɵɵtemplate,\n 'ɵɵtext': r3.ɵɵtext,\n 'ɵɵtextInterpolate': r3.ɵɵtextInterpolate,\n 'ɵɵtextInterpolate1': r3.ɵɵtextInterpolate1,\n 'ɵɵtextInterpolate2': r3.ɵɵtextInterpolate2,\n 'ɵɵtextInterpolate3': r3.ɵɵtextInterpolate3,\n 'ɵɵtextInterpolate4': r3.ɵɵtextInterpolate4,\n 'ɵɵtextInterpolate5': r3.ɵɵtextInterpolate5,\n 'ɵɵtextInterpolate6': r3.ɵɵtextInterpolate6,\n 'ɵɵtextInterpolate7': r3.ɵɵtextInterpolate7,\n 'ɵɵtextInterpolate8': r3.ɵɵtextInterpolate8,\n 'ɵɵtextInterpolateV': r3.ɵɵtextInterpolateV,\n 'ɵɵi18n': r3.ɵɵi18n,\n 'ɵɵi18nAttributes': r3.ɵɵi18nAttributes,\n 'ɵɵi18nExp': r3.ɵɵi18nExp,\n 'ɵɵi18nStart': r3.ɵɵi18nStart,\n 'ɵɵi18nEnd': r3.ɵɵi18nEnd,\n 'ɵɵi18nApply': r3.ɵɵi18nApply,\n 'ɵɵi18nPostprocess': r3.ɵɵi18nPostprocess,\n 'ɵɵresolveWindow': r3.ɵɵresolveWindow,\n 'ɵɵresolveDocument': r3.ɵɵresolveDocument,\n 'ɵɵresolveBody': r3.ɵɵresolveBody,\n 'ɵɵsetComponentScope': r3.ɵɵsetComponentScope,\n 'ɵɵsetNgModuleScope': r3.ɵɵsetNgModuleScope,\n\n 'ɵɵsanitizeHtml': sanitization.ɵɵsanitizeHtml,\n 'ɵɵsanitizeStyle': sanitization.ɵɵsanitizeStyle,\n 'ɵɵsanitizeResourceUrl': sanitization.ɵɵsanitizeResourceUrl,\n 'ɵɵsanitizeScript': sanitization.ɵɵsanitizeScript,\n 'ɵɵsanitizeUrl': sanitization.ɵɵsanitizeUrl,\n 'ɵɵsanitizeUrlOrResourceUrl': sanitization.ɵɵsanitizeUrlOrResourceUrl,\n 'ɵɵtrustConstantHtml': sanitization.ɵɵtrustConstantHtml,\n 'ɵɵtrustConstantResourceUrl': sanitization.ɵɵtrustConstantResourceUrl,\n\n 'forwardRef': forwardRef,\n 'resolveForwardRef': resolveForwardRef,\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 */\nimport {ViewEncapsulation} from '../../metadata/view';\n\nexport interface JitCompilerOptions {\n defaultEncapsulation?: ViewEncapsulation;\n preserveWhitespaces?: boolean;\n}\n\nlet jitOptions: JitCompilerOptions|null = null;\n\nexport function setJitOptions(options: JitCompilerOptions): void {\n if (jitOptions !== null) {\n if (options.defaultEncapsulation !== jitOptions.defaultEncapsulation) {\n ngDevMode &&\n console.error(\n 'Provided value for `defaultEncapsulation` can not be changed once it has been set.');\n return;\n }\n if (options.preserveWhitespaces !== jitOptions.preserveWhitespaces) {\n ngDevMode &&\n console.error(\n 'Provided value for `preserveWhitespaces` can not be changed once it has been set.');\n return;\n }\n }\n jitOptions = options;\n}\n\nexport function getJitOptions(): JitCompilerOptions|null {\n return jitOptions;\n}\n\nexport function resetJitOptions(): void {\n jitOptions = null;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {getCompilerFacade, JitCompilerUsage, R3InjectorMetadataFacade} from '../../compiler/compiler_facade';\nimport {resolveForwardRef} from '../../di/forward_ref';\nimport {NG_INJ_DEF} from '../../di/interface/defs';\nimport {reflectDependencies} from '../../di/jit/util';\nimport {Type} from '../../interface/type';\nimport {Component} from '../../metadata/directives';\nimport {ModuleWithProviders, NgModule} from '../../metadata/ng_module';\nimport {NgModuleDef, NgModuleTransitiveScopes, NgModuleType} from '../../metadata/ng_module_def';\nimport {deepForEach, flatten} from '../../util/array_utils';\nimport {assertDefined} from '../../util/assert';\nimport {EMPTY_ARRAY} from '../../util/empty';\nimport {getComponentDef, getDirectiveDef, getNgModuleDef, getPipeDef} from '../definition';\nimport {NG_COMP_DEF, NG_DIR_DEF, NG_FACTORY_DEF, NG_MOD_DEF, NG_PIPE_DEF} from '../fields';\nimport {ComponentDef} from '../interfaces/definition';\nimport {maybeUnwrapFn} from '../util/misc_utils';\nimport {stringifyForError} from '../util/stringify_utils';\n\nimport {angularCoreEnv} from './environment';\n\ninterface ModuleQueueItem {\n moduleType: Type<any>;\n ngModule: NgModule;\n}\n\nconst moduleQueue: ModuleQueueItem[] = [];\n\n/**\n * Enqueues moduleDef to be checked later to see if scope can be set on its\n * component declarations.\n */\nfunction enqueueModuleForDelayedScoping(moduleType: Type<any>, ngModule: NgModule) {\n moduleQueue.push({moduleType, ngModule});\n}\n\nlet flushingModuleQueue = false;\n/**\n * Loops over queued module definitions, if a given module definition has all of its\n * declarations resolved, it dequeues that module definition and sets the scope on\n * its declarations.\n */\nexport function flushModuleScopingQueueAsMuchAsPossible() {\n if (!flushingModuleQueue) {\n flushingModuleQueue = true;\n try {\n for (let i = moduleQueue.length - 1; i >= 0; i--) {\n const {moduleType, ngModule} = moduleQueue[i];\n\n if (ngModule.declarations && ngModule.declarations.every(isResolvedDeclaration)) {\n // dequeue\n moduleQueue.splice(i, 1);\n setScopeOnDeclaredComponents(moduleType, ngModule);\n }\n }\n } finally {\n flushingModuleQueue = false;\n }\n }\n}\n\n/**\n * Returns truthy if a declaration has resolved. If the declaration happens to be\n * an array of declarations, it will recurse to check each declaration in that array\n * (which may also be arrays).\n */\nfunction isResolvedDeclaration(declaration: any[]|Type<any>): boolean {\n if (Array.isArray(declaration)) {\n return declaration.every(isResolvedDeclaration);\n }\n return !!resolveForwardRef(declaration);\n}\n\n/**\n * Compiles a module in JIT mode.\n *\n * This function automatically gets called when a class has a `@NgModule` decorator.\n */\nexport function compileNgModule(moduleType: Type<any>, ngModule: NgModule = {}): void {\n compileNgModuleDefs(moduleType as NgModuleType, ngModule);\n\n // Because we don't know if all declarations have resolved yet at the moment the\n // NgModule decorator is executing, we're enqueueing the setting of module scope\n // on its declarations to be run at a later time when all declarations for the module,\n // including forward refs, have resolved.\n enqueueModuleForDelayedScoping(moduleType, ngModule);\n}\n\n/**\n * Compiles and adds the `ɵmod`, `ɵfac` and `ɵinj` properties to the module class.\n *\n * It's possible to compile a module via this API which will allow duplicate declarations in its\n * root.\n */\nexport function compileNgModuleDefs(\n moduleType: NgModuleType, ngModule: NgModule,\n allowDuplicateDeclarationsInRoot: boolean = false): void {\n ngDevMode && assertDefined(moduleType, 'Required value moduleType');\n ngDevMode && assertDefined(ngModule, 'Required value ngModule');\n const declarations: Type<any>[] = flatten(ngModule.declarations || EMPTY_ARRAY);\n let ngModuleDef: any = null;\n Object.defineProperty(moduleType, NG_MOD_DEF, {\n configurable: true,\n get: () => {\n if (ngModuleDef === null) {\n if (ngDevMode && ngModule.imports && ngModule.imports.indexOf(moduleType) > -1) {\n // We need to assert this immediately, because allowing it to continue will cause it to\n // go into an infinite loop before we've reached the point where we throw all the errors.\n throw new Error(`'${stringifyForError(moduleType)}' module can't import itself`);\n }\n const compiler = getCompilerFacade(\n {usage: JitCompilerUsage.Decorator, kind: 'NgModule', type: moduleType});\n ngModuleDef = compiler.compileNgModule(angularCoreEnv, `ng:///${moduleType.name}/ɵmod.js`, {\n type: moduleType,\n bootstrap: flatten(ngModule.bootstrap || EMPTY_ARRAY).map(resolveForwardRef),\n declarations: declarations.map(resolveForwardRef),\n imports: flatten(ngModule.imports || EMPTY_ARRAY)\n .map(resolveForwardRef)\n .map(expandModuleWithProviders),\n exports: flatten(ngModule.exports || EMPTY_ARRAY)\n .map(resolveForwardRef)\n .map(expandModuleWithProviders),\n schemas: ngModule.schemas ? flatten(ngModule.schemas) : null,\n id: ngModule.id || null,\n });\n // Set `schemas` on ngModuleDef to an empty array in JIT mode to indicate that runtime\n // should verify that there are no unknown elements in a template. In AOT mode, that check\n // happens at compile time and `schemas` information is not present on Component and Module\n // defs after compilation (so the check doesn't happen the second time at runtime).\n if (!ngModuleDef.schemas) {\n ngModuleDef.schemas = [];\n }\n }\n return ngModuleDef;\n }\n });\n\n let ngFactoryDef: any = null;\n Object.defineProperty(moduleType, NG_FACTORY_DEF, {\n get: () => {\n if (ngFactoryDef === null) {\n const compiler = getCompilerFacade(\n {usage: JitCompilerUsage.Decorator, kind: 'NgModule', type: moduleType});\n ngFactoryDef = compiler.compileFactory(angularCoreEnv, `ng:///${moduleType.name}/ɵfac.js`, {\n name: moduleType.name,\n type: moduleType,\n deps: reflectDependencies(moduleType),\n target: compiler.FactoryTarget.NgModule,\n typeArgumentCount: 0,\n });\n }\n return ngFactoryDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n\n let ngInjectorDef: any = null;\n Object.defineProperty(moduleType, NG_INJ_DEF, {\n get: () => {\n if (ngInjectorDef === null) {\n ngDevMode &&\n verifySemanticsOfNgModuleDef(\n moduleType as any as NgModuleType, allowDuplicateDeclarationsInRoot);\n const meta: R3InjectorMetadataFacade = {\n name: moduleType.name,\n type: moduleType,\n providers: ngModule.providers || EMPTY_ARRAY,\n imports: [\n (ngModule.imports || EMPTY_ARRAY).map(resolveForwardRef),\n (ngModule.exports || EMPTY_ARRAY).map(resolveForwardRef),\n ],\n };\n const compiler = getCompilerFacade(\n {usage: JitCompilerUsage.Decorator, kind: 'NgModule', type: moduleType});\n ngInjectorDef =\n compiler.compileInjector(angularCoreEnv, `ng:///${moduleType.name}/ɵinj.js`, meta);\n }\n return ngInjectorDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n}\n\nfunction verifySemanticsOfNgModuleDef(\n moduleType: NgModuleType, allowDuplicateDeclarationsInRoot: boolean,\n importingModule?: NgModuleType): void {\n if (verifiedNgModule.get(moduleType)) return;\n verifiedNgModule.set(moduleType, true);\n moduleType = resolveForwardRef(moduleType);\n let ngModuleDef: NgModuleDef<any>;\n if (importingModule) {\n ngModuleDef = getNgModuleDef(moduleType)!;\n if (!ngModuleDef) {\n throw new Error(`Unexpected value '${moduleType.name}' imported by the module '${\n importingModule.name}'. Please add an @NgModule annotation.`);\n }\n } else {\n ngModuleDef = getNgModuleDef(moduleType, true);\n }\n const errors: string[] = [];\n const declarations = maybeUnwrapFn(ngModuleDef.declarations);\n const imports = maybeUnwrapFn(ngModuleDef.imports);\n flatten(imports).map(unwrapModuleWithProvidersImports).forEach(mod => {\n verifySemanticsOfNgModuleImport(mod, moduleType);\n verifySemanticsOfNgModuleDef(mod, false, moduleType);\n });\n const exports = maybeUnwrapFn(ngModuleDef.exports);\n declarations.forEach(verifyDeclarationsHaveDefinitions);\n declarations.forEach(verifyDirectivesHaveSelector);\n const combinedDeclarations: Type<any>[] = [\n ...declarations.map(resolveForwardRef),\n ...flatten(imports.map(computeCombinedExports)).map(resolveForwardRef),\n ];\n exports.forEach(verifyExportsAreDeclaredOrReExported);\n declarations.forEach(decl => verifyDeclarationIsUnique(decl, allowDuplicateDeclarationsInRoot));\n declarations.forEach(verifyComponentEntryComponentsIsPartOfNgModule);\n\n const ngModule = getAnnotation<NgModule>(moduleType, 'NgModule');\n if (ngModule) {\n ngModule.imports &&\n flatten(ngModule.imports).map(unwrapModuleWithProvidersImports).forEach(mod => {\n verifySemanticsOfNgModuleImport(mod, moduleType);\n verifySemanticsOfNgModuleDef(mod, false, moduleType);\n });\n ngModule.bootstrap && deepForEach(ngModule.bootstrap, verifyCorrectBootstrapType);\n ngModule.bootstrap && deepForEach(ngModule.bootstrap, verifyComponentIsPartOfNgModule);\n ngModule.entryComponents &&\n deepForEach(ngModule.entryComponents, verifyComponentIsPartOfNgModule);\n }\n\n // Throw Error if any errors were detected.\n if (errors.length) {\n throw new Error(errors.join('\\n'));\n }\n ////////////////////////////////////////////////////////////////////////////////////////////////\n function verifyDeclarationsHaveDefinitions(type: Type<any>): void {\n type = resolveForwardRef(type);\n const def = getComponentDef(type) || getDirectiveDef(type) || getPipeDef(type);\n if (!def) {\n errors.push(`Unexpected value '${stringifyForError(type)}' declared by the module '${\n stringifyForError(moduleType)}'. Please add a @Pipe/@Directive/@Component annotation.`);\n }\n }\n\n function verifyDirectivesHaveSelector(type: Type<any>): void {\n type = resolveForwardRef(type);\n const def = getDirectiveDef(type);\n if (!getComponentDef(type) && def && def.selectors.length == 0) {\n errors.push(`Directive ${stringifyForError(type)} has no selector, please add it!`);\n }\n }\n\n function verifyExportsAreDeclaredOrReExported(type: Type<any>) {\n type = resolveForwardRef(type);\n const kind = getComponentDef(type) && 'component' || getDirectiveDef(type) && 'directive' ||\n getPipeDef(type) && 'pipe';\n if (kind) {\n // only checked if we are declared as Component, Directive, or Pipe\n // Modules don't need to be declared or imported.\n if (combinedDeclarations.lastIndexOf(type) === -1) {\n // We are exporting something which we don't explicitly declare or import.\n errors.push(`Can't export ${kind} ${stringifyForError(type)} from ${\n stringifyForError(moduleType)} as it was neither declared nor imported!`);\n }\n }\n }\n\n function verifyDeclarationIsUnique(type: Type<any>, suppressErrors: boolean) {\n type = resolveForwardRef(type);\n const existingModule = ownerNgModule.get(type);\n if (existingModule && existingModule !== moduleType) {\n if (!suppressErrors) {\n const modules = [existingModule, moduleType].map(stringifyForError).sort();\n errors.push(\n `Type ${stringifyForError(type)} is part of the declarations of 2 modules: ${\n modules[0]} and ${modules[1]}! ` +\n `Please consider moving ${stringifyForError(type)} to a higher module that imports ${\n modules[0]} and ${modules[1]}. ` +\n `You can also create a new NgModule that exports and includes ${\n stringifyForError(\n type)} then import that NgModule in ${modules[0]} and ${modules[1]}.`);\n }\n } else {\n // Mark type as having owner.\n ownerNgModule.set(type, moduleType);\n }\n }\n\n function verifyComponentIsPartOfNgModule(type: Type<any>) {\n type = resolveForwardRef(type);\n const existingModule = ownerNgModule.get(type);\n if (!existingModule) {\n errors.push(`Component ${\n stringifyForError(\n type)} is not part of any NgModule or the module has not been imported into your module.`);\n }\n }\n\n function verifyCorrectBootstrapType(type: Type<any>) {\n type = resolveForwardRef(type);\n if (!getComponentDef(type)) {\n errors.push(`${stringifyForError(type)} cannot be used as an entry component.`);\n }\n }\n\n function verifyComponentEntryComponentsIsPartOfNgModule(type: Type<any>) {\n type = resolveForwardRef(type);\n if (getComponentDef(type)) {\n // We know we are component\n const component = getAnnotation<Component>(type, 'Component');\n if (component && component.entryComponents) {\n deepForEach(component.entryComponents, verifyComponentIsPartOfNgModule);\n }\n }\n }\n\n function verifySemanticsOfNgModuleImport(type: Type<any>, importingModule: Type<any>) {\n type = resolveForwardRef(type);\n\n if (getComponentDef(type) || getDirectiveDef(type)) {\n throw new Error(`Unexpected directive '${type.name}' imported by the module '${\n importingModule.name}'. Please add an @NgModule annotation.`);\n }\n\n if (getPipeDef(type)) {\n throw new Error(`Unexpected pipe '${type.name}' imported by the module '${\n importingModule.name}'. Please add an @NgModule annotation.`);\n }\n }\n}\n\nfunction unwrapModuleWithProvidersImports(typeOrWithProviders: NgModuleType<any>|\n {ngModule: NgModuleType<any>}): NgModuleType<any> {\n typeOrWithProviders = resolveForwardRef(typeOrWithProviders);\n return (typeOrWithProviders as any).ngModule || typeOrWithProviders;\n}\n\nfunction getAnnotation<T>(type: any, name: string): T|null {\n let annotation: T|null = null;\n collect(type.__annotations__);\n collect(type.decorators);\n return annotation;\n\n function collect(annotations: any[]|null) {\n if (annotations) {\n annotations.forEach(readAnnotation);\n }\n }\n\n function readAnnotation(\n decorator: {type: {prototype: {ngMetadataName: string}, args: any[]}, args: any}): void {\n if (!annotation) {\n const proto = Object.getPrototypeOf(decorator);\n if (proto.ngMetadataName == name) {\n annotation = decorator as any;\n } else if (decorator.type) {\n const proto = Object.getPrototypeOf(decorator.type);\n if (proto.ngMetadataName == name) {\n annotation = decorator.args[0];\n }\n }\n }\n }\n}\n\n/**\n * Keep track of compiled components. This is needed because in tests we often want to compile the\n * same component with more than one NgModule. This would cause an error unless we reset which\n * NgModule the component belongs to. We keep the list of compiled components here so that the\n * TestBed can reset it later.\n */\nlet ownerNgModule = new WeakMap<Type<any>, NgModuleType<any>>();\nlet verifiedNgModule = new WeakMap<NgModuleType<any>, boolean>();\n\nexport function resetCompiledComponents(): void {\n ownerNgModule = new WeakMap<Type<any>, NgModuleType<any>>();\n verifiedNgModule = new WeakMap<NgModuleType<any>, boolean>();\n moduleQueue.length = 0;\n}\n\n/**\n * Computes the combined declarations of explicit declarations, as well as declarations inherited by\n * traversing the exports of imported modules.\n * @param type\n */\nfunction computeCombinedExports(type: Type<any>): Type<any>[] {\n type = resolveForwardRef(type);\n const ngModuleDef = getNgModuleDef(type, true);\n return [...flatten(maybeUnwrapFn(ngModuleDef.exports).map((type) => {\n const ngModuleDef = getNgModuleDef(type);\n if (ngModuleDef) {\n verifySemanticsOfNgModuleDef(type as any as NgModuleType, false);\n return computeCombinedExports(type);\n } else {\n return type;\n }\n }))];\n}\n\n/**\n * Some declared components may be compiled asynchronously, and thus may not have their\n * ɵcmp set yet. If this is the case, then a reference to the module is written into\n * the `ngSelectorScope` property of the declared type.\n */\nfunction setScopeOnDeclaredComponents(moduleType: Type<any>, ngModule: NgModule) {\n const declarations: Type<any>[] = flatten(ngModule.declarations || EMPTY_ARRAY);\n\n const transitiveScopes = transitiveScopesFor(moduleType);\n\n declarations.forEach(declaration => {\n if (declaration.hasOwnProperty(NG_COMP_DEF)) {\n // A `ɵcmp` field exists - go ahead and patch the component directly.\n const component = declaration as Type<any>& {ɵcmp: ComponentDef<any>};\n const componentDef = getComponentDef(component)!;\n patchComponentDefWithScope(componentDef, transitiveScopes);\n } else if (\n !declaration.hasOwnProperty(NG_DIR_DEF) && !declaration.hasOwnProperty(NG_PIPE_DEF)) {\n // Set `ngSelectorScope` for future reference when the component compilation finishes.\n (declaration as Type<any>& {ngSelectorScope?: any}).ngSelectorScope = moduleType;\n }\n });\n}\n\n/**\n * Patch the definition of a component with directives and pipes from the compilation scope of\n * a given module.\n */\nexport function patchComponentDefWithScope<C>(\n componentDef: ComponentDef<C>, transitiveScopes: NgModuleTransitiveScopes) {\n componentDef.directiveDefs = () =>\n Array.from(transitiveScopes.compilation.directives)\n .map(\n dir => dir.hasOwnProperty(NG_COMP_DEF) ? getComponentDef(dir)! : getDirectiveDef(dir)!\n )\n .filter(def => !!def);\n componentDef.pipeDefs = () =>\n Array.from(transitiveScopes.compilation.pipes).map(pipe => getPipeDef(pipe)!);\n componentDef.schemas = transitiveScopes.schemas;\n\n // Since we avoid Components/Directives/Pipes recompiling in case there are no overrides, we\n // may face a problem where previously compiled defs available to a given Component/Directive\n // are cached in TView and may become stale (in case any of these defs gets recompiled). In\n // order to avoid this problem, we force fresh TView to be created.\n componentDef.tView = null;\n}\n\n/**\n * Compute the pair of transitive scopes (compilation scope and exported scope) for a given module.\n *\n * This operation is memoized and the result is cached on the module's definition. This function can\n * be called on modules with components that have not fully compiled yet, but the result should not\n * be used until they have.\n *\n * @param moduleType module that transitive scope should be calculated for.\n */\nexport function transitiveScopesFor<T>(moduleType: Type<T>): NgModuleTransitiveScopes {\n if (!isNgModule(moduleType)) {\n throw new Error(`${moduleType.name} does not have a module def (ɵmod property)`);\n }\n const def = getNgModuleDef(moduleType)!;\n\n if (def.transitiveCompileScopes !== null) {\n return def.transitiveCompileScopes;\n }\n\n const scopes: NgModuleTransitiveScopes = {\n schemas: def.schemas || null,\n compilation: {\n directives: new Set<any>(),\n pipes: new Set<any>(),\n },\n exported: {\n directives: new Set<any>(),\n pipes: new Set<any>(),\n },\n };\n\n maybeUnwrapFn(def.imports).forEach(<I>(imported: Type<I>) => {\n const importedType = imported as Type<I>& {\n // If imported is an @NgModule:\n ɵmod?: NgModuleDef<I>;\n };\n\n if (!isNgModule<I>(importedType)) {\n throw new Error(`Importing ${importedType.name} which does not have a ɵmod property`);\n }\n\n // When this module imports another, the imported module's exported directives and pipes are\n // added to the compilation scope of this module.\n const importedScope = transitiveScopesFor(importedType);\n importedScope.exported.directives.forEach(entry => scopes.compilation.directives.add(entry));\n importedScope.exported.pipes.forEach(entry => scopes.compilation.pipes.add(entry));\n });\n\n maybeUnwrapFn(def.declarations).forEach(declared => {\n const declaredWithDefs = declared as Type<any>& {\n ɵpipe?: any;\n };\n\n if (getPipeDef(declaredWithDefs)) {\n scopes.compilation.pipes.add(declared);\n } else {\n // Either declared has a ɵcmp or ɵdir, or it's a component which hasn't\n // had its template compiled yet. In either case, it gets added to the compilation's\n // directives.\n scopes.compilation.directives.add(declared);\n }\n });\n\n maybeUnwrapFn(def.exports).forEach(<E>(exported: Type<E>) => {\n const exportedType = exported as Type<E>& {\n // Components, Directives, NgModules, and Pipes can all be exported.\n ɵcmp?: any;\n ɵdir?: any;\n ɵmod?: NgModuleDef<E>;\n ɵpipe?: any;\n };\n\n // Either the type is a module, a pipe, or a component/directive (which may not have a\n // ɵcmp as it might be compiled asynchronously).\n if (isNgModule(exportedType)) {\n // When this module exports another, the exported module's exported directives and pipes are\n // added to both the compilation and exported scopes of this module.\n const exportedScope = transitiveScopesFor(exportedType);\n exportedScope.exported.directives.forEach(entry => {\n scopes.compilation.directives.add(entry);\n scopes.exported.directives.add(entry);\n });\n exportedScope.exported.pipes.forEach(entry => {\n scopes.compilation.pipes.add(entry);\n scopes.exported.pipes.add(entry);\n });\n } else if (getPipeDef(exportedType)) {\n scopes.exported.pipes.add(exportedType);\n } else {\n scopes.exported.directives.add(exportedType);\n }\n });\n\n def.transitiveCompileScopes = scopes;\n return scopes;\n}\n\nfunction expandModuleWithProviders(value: Type<any>|ModuleWithProviders<{}>): Type<any> {\n if (isModuleWithProviders(value)) {\n return value.ngModule;\n }\n return value;\n}\n\nfunction isModuleWithProviders(value: any): value is ModuleWithProviders<{}> {\n return (value as {ngModule?: any}).ngModule !== undefined;\n}\n\nfunction isNgModule<T>(value: Type<T>): value is Type<T>&{ɵmod: NgModuleDef<T>} {\n return !!getNgModuleDef(value);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {getCompilerFacade, JitCompilerUsage, R3DirectiveMetadataFacade} from '../../compiler/compiler_facade';\nimport {R3ComponentMetadataFacade, R3QueryMetadataFacade} from '../../compiler/compiler_facade_interface';\nimport {resolveForwardRef} from '../../di/forward_ref';\nimport {getReflect, reflectDependencies} from '../../di/jit/util';\nimport {Type} from '../../interface/type';\nimport {Query} from '../../metadata/di';\nimport {Component, Directive, Input} from '../../metadata/directives';\nimport {componentNeedsResolution, maybeQueueResolutionOfComponentResources} from '../../metadata/resource_loading';\nimport {ViewEncapsulation} from '../../metadata/view';\nimport {EMPTY_ARRAY, EMPTY_OBJ} from '../../util/empty';\nimport {initNgDevMode} from '../../util/ng_dev_mode';\nimport {getComponentDef, getDirectiveDef} from '../definition';\nimport {NG_COMP_DEF, NG_DIR_DEF, NG_FACTORY_DEF} from '../fields';\nimport {ComponentType} from '../interfaces/definition';\nimport {stringifyForError} from '../util/stringify_utils';\n\nimport {angularCoreEnv} from './environment';\nimport {getJitOptions} from './jit_options';\nimport {flushModuleScopingQueueAsMuchAsPossible, patchComponentDefWithScope, transitiveScopesFor} from './module';\n\n/**\n * Keep track of the compilation depth to avoid reentrancy issues during JIT compilation. This\n * matters in the following scenario:\n *\n * Consider a component 'A' that extends component 'B', both declared in module 'M'. During\n * the compilation of 'A' the definition of 'B' is requested to capture the inheritance chain,\n * potentially triggering compilation of 'B'. If this nested compilation were to trigger\n * `flushModuleScopingQueueAsMuchAsPossible` it may happen that module 'M' is still pending in the\n * queue, resulting in 'A' and 'B' to be patched with the NgModule scope. As the compilation of\n * 'A' is still in progress, this would introduce a circular dependency on its compilation. To avoid\n * this issue, the module scope queue is only flushed for compilations at the depth 0, to ensure\n * all compilations have finished.\n */\nlet compilationDepth = 0;\n\n/**\n * Compile an Angular component according to its decorator metadata, and patch the resulting\n * component def (ɵcmp) onto the component type.\n *\n * Compilation may be asynchronous (due to the need to resolve URLs for the component template or\n * other resources, for example). In the event that compilation is not immediate, `compileComponent`\n * will enqueue resource resolution into a global queue and will fail to return the `ɵcmp`\n * until the global queue has been resolved with a call to `resolveComponentResources`.\n */\nexport function compileComponent(type: Type<any>, metadata: Component): void {\n // Initialize ngDevMode. This must be the first statement in compileComponent.\n // See the `initNgDevMode` docstring for more information.\n (typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode();\n\n let ngComponentDef: any = null;\n\n // Metadata may have resources which need to be resolved.\n maybeQueueResolutionOfComponentResources(type, metadata);\n\n // Note that we're using the same function as `Directive`, because that's only subset of metadata\n // that we need to create the ngFactoryDef. We're avoiding using the component metadata\n // because we'd have to resolve the asynchronous templates.\n addDirectiveFactoryDef(type, metadata);\n\n Object.defineProperty(type, NG_COMP_DEF, {\n get: () => {\n if (ngComponentDef === null) {\n const compiler =\n getCompilerFacade({usage: JitCompilerUsage.Decorator, kind: 'component', type: type});\n\n if (componentNeedsResolution(metadata)) {\n const error = [`Component '${type.name}' is not resolved:`];\n if (metadata.templateUrl) {\n error.push(` - templateUrl: ${metadata.templateUrl}`);\n }\n if (metadata.styleUrls && metadata.styleUrls.length) {\n error.push(` - styleUrls: ${JSON.stringify(metadata.styleUrls)}`);\n }\n error.push(`Did you run and wait for 'resolveComponentResources()'?`);\n throw new Error(error.join('\\n'));\n }\n\n // This const was called `jitOptions` previously but had to be renamed to `options` because\n // of a bug with Terser that caused optimized JIT builds to throw a `ReferenceError`.\n // This bug was investigated in https://github.com/angular/angular-cli/issues/17264.\n // We should not rename it back until https://github.com/terser/terser/issues/615 is fixed.\n const options = getJitOptions();\n let preserveWhitespaces = metadata.preserveWhitespaces;\n if (preserveWhitespaces === undefined) {\n if (options !== null && options.preserveWhitespaces !== undefined) {\n preserveWhitespaces = options.preserveWhitespaces;\n } else {\n preserveWhitespaces = false;\n }\n }\n let encapsulation = metadata.encapsulation;\n if (encapsulation === undefined) {\n if (options !== null && options.defaultEncapsulation !== undefined) {\n encapsulation = options.defaultEncapsulation;\n } else {\n encapsulation = ViewEncapsulation.Emulated;\n }\n }\n\n const templateUrl = metadata.templateUrl || `ng:///${type.name}/template.html`;\n const meta: R3ComponentMetadataFacade = {\n ...directiveMetadata(type, metadata),\n typeSourceSpan: compiler.createParseSourceSpan('Component', type.name, templateUrl),\n template: metadata.template || '',\n preserveWhitespaces,\n styles: metadata.styles || EMPTY_ARRAY,\n animations: metadata.animations,\n directives: [],\n changeDetection: metadata.changeDetection,\n pipes: new Map(),\n encapsulation,\n interpolation: metadata.interpolation,\n viewProviders: metadata.viewProviders || null,\n };\n\n compilationDepth++;\n try {\n if (meta.usesInheritance) {\n addDirectiveDefToUndecoratedParents(type);\n }\n ngComponentDef = compiler.compileComponent(angularCoreEnv, templateUrl, meta);\n } finally {\n // Ensure that the compilation depth is decremented even when the compilation failed.\n compilationDepth--;\n }\n\n if (compilationDepth === 0) {\n // When NgModule decorator executed, we enqueued the module definition such that\n // it would only dequeue and add itself as module scope to all of its declarations,\n // but only if if all of its declarations had resolved. This call runs the check\n // to see if any modules that are in the queue can be dequeued and add scope to\n // their declarations.\n flushModuleScopingQueueAsMuchAsPossible();\n }\n\n // If component compilation is async, then the @NgModule annotation which declares the\n // component may execute and set an ngSelectorScope property on the component type. This\n // allows the component to patch itself with directiveDefs from the module after it\n // finishes compiling.\n if (hasSelectorScope(type)) {\n const scopes = transitiveScopesFor(type.ngSelectorScope);\n patchComponentDefWithScope(ngComponentDef, scopes);\n }\n }\n return ngComponentDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n}\n\nfunction hasSelectorScope<T>(component: Type<T>): component is Type<T>&\n {ngSelectorScope: Type<any>} {\n return (component as {ngSelectorScope?: any}).ngSelectorScope !== undefined;\n}\n\n/**\n * Compile an Angular directive according to its decorator metadata, and patch the resulting\n * directive def onto the component type.\n *\n * In the event that compilation is not immediate, `compileDirective` will return a `Promise` which\n * will resolve when compilation completes and the directive becomes usable.\n */\nexport function compileDirective(type: Type<any>, directive: Directive|null): void {\n let ngDirectiveDef: any = null;\n\n addDirectiveFactoryDef(type, directive || {});\n\n Object.defineProperty(type, NG_DIR_DEF, {\n get: () => {\n if (ngDirectiveDef === null) {\n // `directive` can be null in the case of abstract directives as a base class\n // that use `@Directive()` with no selector. In that case, pass empty object to the\n // `directiveMetadata` function instead of null.\n const meta = getDirectiveMetadata(type, directive || {});\n const compiler =\n getCompilerFacade({usage: JitCompilerUsage.Decorator, kind: 'directive', type});\n ngDirectiveDef =\n compiler.compileDirective(angularCoreEnv, meta.sourceMapUrl, meta.metadata);\n }\n return ngDirectiveDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n}\n\nfunction getDirectiveMetadata(type: Type<any>, metadata: Directive) {\n const name = type && type.name;\n const sourceMapUrl = `ng:///${name}/ɵdir.js`;\n const compiler = getCompilerFacade({usage: JitCompilerUsage.Decorator, kind: 'directive', type});\n const facade = directiveMetadata(type as ComponentType<any>, metadata);\n facade.typeSourceSpan = compiler.createParseSourceSpan('Directive', name, sourceMapUrl);\n if (facade.usesInheritance) {\n addDirectiveDefToUndecoratedParents(type);\n }\n return {metadata: facade, sourceMapUrl};\n}\n\nfunction addDirectiveFactoryDef(type: Type<any>, metadata: Directive|Component) {\n let ngFactoryDef: any = null;\n\n Object.defineProperty(type, NG_FACTORY_DEF, {\n get: () => {\n if (ngFactoryDef === null) {\n const meta = getDirectiveMetadata(type, metadata);\n const compiler =\n getCompilerFacade({usage: JitCompilerUsage.Decorator, kind: 'directive', type});\n ngFactoryDef = compiler.compileFactory(angularCoreEnv, `ng:///${type.name}/ɵfac.js`, {\n name: meta.metadata.name,\n type: meta.metadata.type,\n typeArgumentCount: 0,\n deps: reflectDependencies(type),\n target: compiler.FactoryTarget.Directive\n });\n }\n return ngFactoryDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n}\n\nexport function extendsDirectlyFromObject(type: Type<any>): boolean {\n return Object.getPrototypeOf(type.prototype) === Object.prototype;\n}\n\n/**\n * Extract the `R3DirectiveMetadata` for a particular directive (either a `Directive` or a\n * `Component`).\n */\nexport function directiveMetadata(type: Type<any>, metadata: Directive): R3DirectiveMetadataFacade {\n // Reflect inputs and outputs.\n const reflect = getReflect();\n const propMetadata = reflect.ownPropMetadata(type);\n\n return {\n name: type.name,\n type: type,\n selector: metadata.selector !== undefined ? metadata.selector : null,\n host: metadata.host || EMPTY_OBJ,\n propMetadata: propMetadata,\n inputs: metadata.inputs || EMPTY_ARRAY,\n outputs: metadata.outputs || EMPTY_ARRAY,\n queries: extractQueriesMetadata(type, propMetadata, isContentQuery),\n lifecycle: {usesOnChanges: reflect.hasLifecycleHook(type, 'ngOnChanges')},\n typeSourceSpan: null!,\n usesInheritance: !extendsDirectlyFromObject(type),\n exportAs: extractExportAs(metadata.exportAs),\n providers: metadata.providers || null,\n viewQueries: extractQueriesMetadata(type, propMetadata, isViewQuery)\n };\n}\n\n/**\n * Adds a directive definition to all parent classes of a type that don't have an Angular decorator.\n */\nfunction addDirectiveDefToUndecoratedParents(type: Type<any>) {\n const objPrototype = Object.prototype;\n let parent = Object.getPrototypeOf(type.prototype).constructor;\n\n // Go up the prototype until we hit `Object`.\n while (parent && parent !== objPrototype) {\n // Since inheritance works if the class was annotated already, we only need to add\n // the def if there are no annotations and the def hasn't been created already.\n if (!getDirectiveDef(parent) && !getComponentDef(parent) &&\n shouldAddAbstractDirective(parent)) {\n compileDirective(parent, null);\n }\n parent = Object.getPrototypeOf(parent);\n }\n}\n\nfunction convertToR3QueryPredicate(selector: any): any|string[] {\n return typeof selector === 'string' ? splitByComma(selector) : resolveForwardRef(selector);\n}\n\nexport function convertToR3QueryMetadata(propertyName: string, ann: Query): R3QueryMetadataFacade {\n return {\n propertyName: propertyName,\n predicate: convertToR3QueryPredicate(ann.selector),\n descendants: ann.descendants,\n first: ann.first,\n read: ann.read ? ann.read : null,\n static: !!ann.static,\n emitDistinctChangesOnly: !!ann.emitDistinctChangesOnly,\n };\n}\nfunction extractQueriesMetadata(\n type: Type<any>, propMetadata: {[key: string]: any[]},\n isQueryAnn: (ann: any) => ann is Query): R3QueryMetadataFacade[] {\n const queriesMeta: R3QueryMetadataFacade[] = [];\n for (const field in propMetadata) {\n if (propMetadata.hasOwnProperty(field)) {\n const annotations = propMetadata[field];\n annotations.forEach(ann => {\n if (isQueryAnn(ann)) {\n if (!ann.selector) {\n throw new Error(\n `Can't construct a query for the property \"${field}\" of ` +\n `\"${stringifyForError(type)}\" since the query selector wasn't defined.`);\n }\n if (annotations.some(isInputAnnotation)) {\n throw new Error(`Cannot combine @Input decorators with query decorators`);\n }\n queriesMeta.push(convertToR3QueryMetadata(field, ann));\n }\n });\n }\n }\n return queriesMeta;\n}\n\nfunction extractExportAs(exportAs: string|undefined): string[]|null {\n return exportAs === undefined ? null : splitByComma(exportAs);\n}\n\nfunction isContentQuery(value: any): value is Query {\n const name = value.ngMetadataName;\n return name === 'ContentChild' || name === 'ContentChildren';\n}\n\nfunction isViewQuery(value: any): value is Query {\n const name = value.ngMetadataName;\n return name === 'ViewChild' || name === 'ViewChildren';\n}\n\nfunction isInputAnnotation(value: any): value is Input {\n return value.ngMetadataName === 'Input';\n}\n\nfunction splitByComma(value: string): string[] {\n return value.split(',').map(piece => piece.trim());\n}\n\nconst LIFECYCLE_HOOKS = [\n 'ngOnChanges', 'ngOnInit', 'ngOnDestroy', 'ngDoCheck', 'ngAfterViewInit', 'ngAfterViewChecked',\n 'ngAfterContentInit', 'ngAfterContentChecked'\n];\n\nfunction shouldAddAbstractDirective(type: Type<any>): boolean {\n const reflect = getReflect();\n\n if (LIFECYCLE_HOOKS.some(hookName => reflect.hasLifecycleHook(type, hookName))) {\n return true;\n }\n\n const propMetadata = reflect.propMetadata(type);\n\n for (const field in propMetadata) {\n const annotations = propMetadata[field];\n\n for (let i = 0; i < annotations.length; i++) {\n const current = annotations[i];\n const metadataName = current.ngMetadataName;\n\n if (isInputAnnotation(current) || isContentQuery(current) || isViewQuery(current) ||\n metadataName === 'Output' || metadataName === 'HostBinding' ||\n metadataName === 'HostListener') {\n return true;\n }\n }\n }\n\n return 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 {getCompilerFacade, JitCompilerUsage, R3PipeMetadataFacade} from '../../compiler/compiler_facade';\nimport {reflectDependencies} from '../../di/jit/util';\nimport {Type} from '../../interface/type';\nimport {Pipe} from '../../metadata/directives';\nimport {NG_FACTORY_DEF, NG_PIPE_DEF} from '../fields';\n\nimport {angularCoreEnv} from './environment';\n\nexport function compilePipe(type: Type<any>, meta: Pipe): void {\n let ngPipeDef: any = null;\n let ngFactoryDef: any = null;\n\n Object.defineProperty(type, NG_FACTORY_DEF, {\n get: () => {\n if (ngFactoryDef === null) {\n const metadata = getPipeMetadata(type, meta);\n const compiler = getCompilerFacade(\n {usage: JitCompilerUsage.Decorator, kind: 'pipe', type: metadata.type});\n ngFactoryDef = compiler.compileFactory(angularCoreEnv, `ng:///${metadata.name}/ɵfac.js`, {\n name: metadata.name,\n type: metadata.type,\n typeArgumentCount: 0,\n deps: reflectDependencies(type),\n target: compiler.FactoryTarget.Pipe\n });\n }\n return ngFactoryDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n\n Object.defineProperty(type, NG_PIPE_DEF, {\n get: () => {\n if (ngPipeDef === null) {\n const metadata = getPipeMetadata(type, meta);\n const compiler = getCompilerFacade(\n {usage: JitCompilerUsage.Decorator, kind: 'pipe', type: metadata.type});\n ngPipeDef =\n compiler.compilePipe(angularCoreEnv, `ng:///${metadata.name}/ɵpipe.js`, metadata);\n }\n return ngPipeDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n}\n\nfunction getPipeMetadata(type: Type<any>, meta: Pipe): R3PipeMetadataFacade {\n return {\n type: type,\n name: type.name,\n pipeName: meta.name,\n pure: meta.pure !== undefined ? meta.pure : true\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 {ChangeDetectionStrategy} from '../change_detection/constants';\nimport {Provider} from '../di/interface/provider';\nimport {Type} from '../interface/type';\nimport {compileComponent as render3CompileComponent, compileDirective as render3CompileDirective} from '../render3/jit/directive';\nimport {compilePipe as render3CompilePipe} from '../render3/jit/pipe';\nimport {makeDecorator, makePropDecorator, TypeDecorator} from '../util/decorators';\nimport {noop} from '../util/noop';\n\nimport {ViewEncapsulation} from './view';\n\n\n\n/**\n * Type of the Directive decorator / constructor function.\n * @publicApi\n */\nexport interface DirectiveDecorator {\n /**\n * Decorator that marks a class as an Angular directive.\n * You can define your own directives to attach custom behavior to elements in the DOM.\n *\n * The options provide configuration metadata that determines\n * how the directive should be processed, instantiated and used at\n * runtime.\n *\n * Directive classes, like component classes, can implement\n * [life-cycle hooks](guide/lifecycle-hooks) to influence their configuration and behavior.\n *\n *\n * @usageNotes\n * To define a directive, mark the class with the decorator and provide metadata.\n *\n * ```ts\n * import {Directive} from '@angular/core';\n *\n * @Directive({\n * selector: 'my-directive',\n * })\n * export class MyDirective {\n * ...\n * }\n * ```\n *\n * ### Declaring directives\n *\n * Directives are [declarables](guide/glossary#declarable).\n * They must be declared by an NgModule\n * in order to be usable in an app.\n *\n * A directive must belong to exactly one NgModule. Do not re-declare\n * a directive imported from another module.\n * List the directive class in the `declarations` field of an NgModule.\n *\n * ```ts\n * declarations: [\n * AppComponent,\n * MyDirective\n * ],\n * ```\n *\n * @Annotation\n */\n (obj?: Directive): TypeDecorator;\n\n /**\n * See the `Directive` decorator.\n */\n new(obj?: Directive): Directive;\n}\n\n/**\n * Directive decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport interface Directive {\n /**\n * The CSS selector that identifies this directive in a template\n * and triggers instantiation of the directive.\n *\n * Declare as one of the following:\n *\n * - `element-name`: Select by element name.\n * - `.class`: Select by class name.\n * - `[attribute]`: Select by attribute name.\n * - `[attribute=value]`: Select by attribute name and value.\n * - `:not(sub_selector)`: Select only if the element does not match the `sub_selector`.\n * - `selector1, selector2`: Select if either `selector1` or `selector2` matches.\n *\n * Angular only allows directives to apply on CSS selectors that do not cross\n * element boundaries.\n *\n * For the following template HTML, a directive with an `input[type=text]` selector,\n * would be instantiated only on the `<input type=\"text\">` element.\n *\n * ```html\n * <form>\n * <input type=\"text\">\n * <input type=\"radio\">\n * <form>\n * ```\n *\n */\n selector?: string;\n\n /**\n * Enumerates the set of data-bound input properties for a directive\n *\n * Angular automatically updates input properties during change detection.\n * The `inputs` property defines a set of `directiveProperty` to `bindingProperty`\n * configuration:\n *\n * - `directiveProperty` specifies the component property where the value is written.\n * - `bindingProperty` specifies the DOM property where the value is read from.\n *\n * When `bindingProperty` is not provided, it is assumed to be equal to `directiveProperty`.\n *\n * @usageNotes\n *\n * The following example creates a component with two data-bound properties.\n *\n * ```typescript\n * @Component({\n * selector: 'bank-account',\n * inputs: ['bankName', 'id: account-id'],\n * template: `\n * Bank Name: {{bankName}}\n * Account Id: {{id}}\n * `\n * })\n * class BankAccount {\n * bankName: string;\n * id: string;\n * }\n * ```\n *\n */\n inputs?: string[];\n\n /**\n * Enumerates the set of event-bound output properties.\n *\n * When an output property emits an event, an event handler attached to that event\n * in the template is invoked.\n *\n * The `outputs` property defines a set of `directiveProperty` to `bindingProperty`\n * configuration:\n *\n * - `directiveProperty` specifies the component property that emits events.\n * - `bindingProperty` specifies the DOM property the event handler is attached to.\n *\n * @usageNotes\n *\n * ```typescript\n * @Component({\n * selector: 'child-dir',\n * outputs: [ 'bankNameChange' ]\n * template: `<input (input)=\"bankNameChange.emit($event.target.value)\" />`\n * })\n * class ChildDir {\n * bankNameChange: EventEmitter<string> = new EventEmitter<string>();\n * }\n *\n * @Component({\n * selector: 'main',\n * template: `\n * {{ bankName }} <child-dir (bankNameChange)=\"onBankNameChange($event)\"></child-dir>\n * `\n * })\n * class MainComponent {\n * bankName: string;\n *\n * onBankNameChange(bankName: string) {\n * this.bankName = bankName;\n * }\n * }\n * ```\n *\n */\n outputs?: string[];\n\n /**\n * Configures the [injector](guide/glossary#injector) of this\n * directive or component with a [token](guide/glossary#di-token)\n * that maps to a [provider](guide/glossary#provider) of a dependency.\n */\n providers?: Provider[];\n\n /**\n * Defines the name that can be used in the template to assign this directive to a variable.\n *\n * @usageNotes\n *\n * ```ts\n * @Directive({\n * selector: 'child-dir',\n * exportAs: 'child'\n * })\n * class ChildDir {\n * }\n *\n * @Component({\n * selector: 'main',\n * template: `<child-dir #c=\"child\"></child-dir>`\n * })\n * class MainComponent {\n * }\n * ```\n *\n */\n exportAs?: string;\n\n /**\n * Configures the queries that will be injected into the directive.\n *\n * Content queries are set before the `ngAfterContentInit` callback is called.\n * View queries are set before the `ngAfterViewInit` callback is called.\n *\n * @usageNotes\n *\n * The following example shows how queries are defined\n * and when their results are available in lifecycle hooks:\n *\n * ```ts\n * @Component({\n * selector: 'someDir',\n * queries: {\n * contentChildren: new ContentChildren(ChildDirective),\n * viewChildren: new ViewChildren(ChildDirective)\n * },\n * template: '<child-directive></child-directive>'\n * })\n * class SomeDir {\n * contentChildren: QueryList<ChildDirective>,\n * viewChildren: QueryList<ChildDirective>\n *\n * ngAfterContentInit() {\n * // contentChildren is set\n * }\n *\n * ngAfterViewInit() {\n * // viewChildren is set\n * }\n * }\n * ```\n *\n * @Annotation\n */\n queries?: {[key: string]: any};\n\n /**\n * Maps class properties to host element bindings for properties,\n * attributes, and events, using a set of key-value pairs.\n *\n * Angular automatically checks host property bindings during change detection.\n * If a binding changes, Angular updates the directive's host element.\n *\n * When the key is a property of the host element, the property value is\n * the propagated to the specified DOM property.\n *\n * When the key is a static attribute in the DOM, the attribute value\n * is propagated to the specified property in the host element.\n *\n * For event handling:\n * - The key is the DOM event that the directive listens to.\n * To listen to global events, add the target to the event name.\n * The target can be `window`, `document` or `body`.\n * - The value is the statement to execute when the event occurs. If the\n * statement evaluates to `false`, then `preventDefault` is applied on the DOM\n * event. A handler method can refer to the `$event` local variable.\n *\n */\n host?: {[key: string]: string};\n\n /**\n * When present, this directive/component is ignored by the AOT compiler.\n * It remains in distributed code, and the JIT compiler attempts to compile it\n * at run time, in the browser.\n * To ensure the correct behavior, the app must import `@angular/compiler`.\n */\n jit?: true;\n}\n\n/**\n * Type of the Directive metadata.\n *\n * @publicApi\n */\nexport const Directive: DirectiveDecorator = makeDecorator(\n 'Directive', (dir: Directive = {}) => dir, undefined, undefined,\n (type: Type<any>, meta: Directive) => SWITCH_COMPILE_DIRECTIVE(type, meta));\n\n/**\n * Component decorator interface\n *\n * @publicApi\n */\nexport interface ComponentDecorator {\n /**\n * Decorator that marks a class as an Angular component and provides configuration\n * metadata that determines how the component should be processed,\n * instantiated, and used at runtime.\n *\n * Components are the most basic UI building block of an Angular app.\n * An Angular app contains a tree of Angular components.\n *\n * Angular components are a subset of directives, always associated with a template.\n * Unlike other directives, only one component can be instantiated for a given element in a\n * template.\n *\n * A component must belong to an NgModule in order for it to be available\n * to another component or application. To make it a member of an NgModule,\n * list it in the `declarations` field of the `NgModule` metadata.\n *\n * Note that, in addition to these options for configuring a directive,\n * you can control a component's runtime behavior by implementing\n * life-cycle hooks. For more information, see the\n * [Lifecycle Hooks](guide/lifecycle-hooks) guide.\n *\n * @usageNotes\n *\n * ### Setting component inputs\n *\n * The following example creates a component with two data-bound properties,\n * specified by the `inputs` value.\n *\n * <code-example path=\"core/ts/metadata/directives.ts\" region=\"component-input\"></code-example>\n *\n *\n * ### Setting component outputs\n *\n * The following example shows two event emitters that emit on an interval. One\n * emits an output every second, while the other emits every five seconds.\n *\n * {@example core/ts/metadata/directives.ts region='component-output-interval'}\n *\n * ### Injecting a class with a view provider\n *\n * The following simple example injects a class into a component\n * using the view provider specified in component metadata:\n *\n * ```ts\n * class Greeter {\n * greet(name:string) {\n * return 'Hello ' + name + '!';\n * }\n * }\n *\n * @Directive({\n * selector: 'needs-greeter'\n * })\n * class NeedsGreeter {\n * greeter:Greeter;\n *\n * constructor(greeter:Greeter) {\n * this.greeter = greeter;\n * }\n * }\n *\n * @Component({\n * selector: 'greet',\n * viewProviders: [\n * Greeter\n * ],\n * template: `<needs-greeter></needs-greeter>`\n * })\n * class HelloWorld {\n * }\n *\n * ```\n *\n * ### Preserving whitespace\n *\n * Removing whitespace can greatly reduce AOT-generated code size and speed up view creation.\n * As of Angular 6, the default for `preserveWhitespaces` is false (whitespace is removed).\n * To change the default setting for all components in your application, set\n * the `preserveWhitespaces` option of the AOT compiler.\n *\n * By default, the AOT compiler removes whitespace characters as follows:\n * * Trims all whitespaces at the beginning and the end of a template.\n * * Removes whitespace-only text nodes. For example,\n *\n * ```html\n * <button>Action 1</button> <button>Action 2</button>\n * ```\n *\n * becomes:\n *\n * ```html\n * <button>Action 1</button><button>Action 2</button>\n * ```\n *\n * * Replaces a series of whitespace characters in text nodes with a single space.\n * For example, `<span>\\n some text\\n</span>` becomes `<span> some text </span>`.\n * * Does NOT alter text nodes inside HTML tags such as `<pre>` or `<textarea>`,\n * where whitespace characters are significant.\n *\n * Note that these transformations can influence DOM nodes layout, although impact\n * should be minimal.\n *\n * You can override the default behavior to preserve whitespace characters\n * in certain fragments of a template. For example, you can exclude an entire\n * DOM sub-tree by using the `ngPreserveWhitespaces` attribute:\n *\n * ```html\n * <div ngPreserveWhitespaces>\n * whitespaces are preserved here\n * <span> and here </span>\n * </div>\n * ```\n *\n * You can force a single space to be preserved in a text node by using `&ngsp;`,\n * which is replaced with a space character by Angular's template\n * compiler:\n *\n * ```html\n * <a>Spaces</a>&ngsp;<a>between</a>&ngsp;<a>links.</a>\n * <!-- compiled to be equivalent to:\n * <a>Spaces</a> <a>between</a> <a>links.</a> -->\n * ```\n *\n * Note that sequences of `&ngsp;` are still collapsed to just one space character when\n * the `preserveWhitespaces` option is set to `false`.\n *\n * ```html\n * <a>before</a>&ngsp;&ngsp;&ngsp;<a>after</a>\n * <!-- compiled to be equivalent to:\n * <a>before</a> <a>after</a> -->\n * ```\n *\n * To preserve sequences of whitespace characters, use the\n * `ngPreserveWhitespaces` attribute.\n *\n * @Annotation\n */\n (obj: Component): TypeDecorator;\n /**\n * See the `Component` decorator.\n */\n new(obj: Component): Component;\n}\n\n/**\n * Supplies configuration metadata for an Angular component.\n *\n * @publicApi\n */\nexport interface Component extends Directive {\n /**\n * The change-detection strategy to use for this component.\n *\n * When a component is instantiated, Angular creates a change detector,\n * which is responsible for propagating the component's bindings.\n * The strategy is one of:\n * - `ChangeDetectionStrategy#OnPush` sets the strategy to `CheckOnce` (on demand).\n * - `ChangeDetectionStrategy#Default` sets the strategy to `CheckAlways`.\n */\n changeDetection?: ChangeDetectionStrategy;\n\n /**\n * Defines the set of injectable objects that are visible to its view DOM children.\n * See [example](#injecting-a-class-with-a-view-provider).\n *\n */\n viewProviders?: Provider[];\n\n /**\n * The module ID of the module that contains the component.\n * The component must be able to resolve relative URLs for templates and styles.\n * SystemJS exposes the `__moduleName` variable within each module.\n * In CommonJS, this can be set to `module.id`.\n *\n */\n moduleId?: string;\n\n /**\n * The relative path or absolute URL of a template file for an Angular component.\n * If provided, do not supply an inline template using `template`.\n *\n */\n templateUrl?: string;\n\n /**\n * An inline template for an Angular component. If provided,\n * do not supply a template file using `templateUrl`.\n *\n */\n template?: string;\n\n /**\n * One or more relative paths or absolute URLs for files containing CSS stylesheets to use\n * in this component.\n */\n styleUrls?: string[];\n\n /**\n * One or more inline CSS stylesheets to use\n * in this component.\n */\n styles?: string[];\n\n /**\n * One or more animation `trigger()` calls, containing\n * `state()` and `transition()` definitions.\n * See the [Animations guide](/guide/animations) and animations API documentation.\n *\n */\n animations?: any[];\n\n /**\n * An encapsulation policy for the template and CSS styles. One of:\n * - `ViewEncapsulation.Emulated`: Use shimmed CSS that\n * emulates the native behavior.\n * - `ViewEncapsulation.None`: Use global CSS without any\n * encapsulation.\n * - `ViewEncapsulation.ShadowDom`: Use Shadow DOM v1 to encapsulate styles.\n *\n * If not supplied, the value is taken from `CompilerOptions`. The default compiler option is\n * `ViewEncapsulation.Emulated`.\n *\n * If the policy is set to `ViewEncapsulation.Emulated` and the component has no `styles`\n * or `styleUrls` specified, the policy is automatically switched to `ViewEncapsulation.None`.\n */\n encapsulation?: ViewEncapsulation;\n\n /**\n * Overrides the default interpolation start and end delimiters (`{{` and `}}`).\n */\n interpolation?: [string, string];\n\n /**\n * A set of components that should be compiled along with\n * this component. For each component listed here,\n * Angular creates a {@link ComponentFactory} and stores it in the\n * {@link ComponentFactoryResolver}.\n * @deprecated Since 9.0.0. With Ivy, this property is no longer necessary.\n */\n entryComponents?: Array<Type<any>|any[]>;\n\n /**\n * True to preserve or false to remove potentially superfluous whitespace characters\n * from the compiled template. Whitespace characters are those matching the `\\s`\n * character class in JavaScript regular expressions. Default is false, unless\n * overridden in compiler options.\n */\n preserveWhitespaces?: boolean;\n}\n\n/**\n * Component decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Component: ComponentDecorator = makeDecorator(\n 'Component', (c: Component = {}) => ({changeDetection: ChangeDetectionStrategy.Default, ...c}),\n Directive, undefined,\n (type: Type<any>, meta: Component) => SWITCH_COMPILE_COMPONENT(type, meta));\n\n/**\n * Type of the Pipe decorator / constructor function.\n *\n * @publicApi\n */\nexport interface PipeDecorator {\n /**\n *\n * Decorator that marks a class as pipe and supplies configuration metadata.\n *\n * A pipe class must implement the `PipeTransform` interface.\n * For example, if the name is \"myPipe\", use a template binding expression\n * such as the following:\n *\n * ```\n * {{ exp | myPipe }}\n * ```\n *\n * The result of the expression is passed to the pipe's `transform()` method.\n *\n * A pipe must belong to an NgModule in order for it to be available\n * to a template. To make it a member of an NgModule,\n * list it in the `declarations` field of the `NgModule` metadata.\n *\n * @see [Style Guide: Pipe Names](guide/styleguide#02-09)\n *\n */\n (obj: Pipe): TypeDecorator;\n\n /**\n * See the `Pipe` decorator.\n */\n new(obj: Pipe): Pipe;\n}\n\n/**\n * Type of the Pipe metadata.\n *\n * @publicApi\n */\nexport interface Pipe {\n /**\n * The pipe name to use in template bindings.\n * Typically uses [lowerCamelCase](guide/glossary#case-types)\n * because the name cannot contain hyphens.\n */\n name: string;\n\n /**\n * When true, the pipe is pure, meaning that the\n * `transform()` method is invoked only when its input arguments\n * change. Pipes are pure by default.\n *\n * If the pipe has internal state (that is, the result\n * depends on state other than its arguments), set `pure` to false.\n * In this case, the pipe is invoked on each change-detection cycle,\n * even if the arguments have not changed.\n */\n pure?: boolean;\n}\n\n/**\n * @Annotation\n * @publicApi\n */\nexport const Pipe: PipeDecorator = makeDecorator(\n 'Pipe', (p: Pipe) => ({pure: true, ...p}), undefined, undefined,\n (type: Type<any>, meta: Pipe) => SWITCH_COMPILE_PIPE(type, meta));\n\n\n/**\n * @publicApi\n */\nexport interface InputDecorator {\n /**\n * Decorator that marks a class field as an input property and supplies configuration metadata.\n * The input property is bound to a DOM property in the template. During change detection,\n * Angular automatically updates the data property with the DOM property's value.\n *\n * @usageNotes\n *\n * You can supply an optional name to use in templates when the\n * component is instantiated, that maps to the\n * name of the bound property. By default, the original\n * name of the bound property is used for input binding.\n *\n * The following example creates a component with two input properties,\n * one of which is given a special binding name.\n *\n * ```typescript\n * @Component({\n * selector: 'bank-account',\n * template: `\n * Bank Name: {{bankName}}\n * Account Id: {{id}}\n * `\n * })\n * class BankAccount {\n * // This property is bound using its original name.\n * @Input() bankName: string;\n * // this property value is bound to a different property name\n * // when this component is instantiated in a template.\n * @Input('account-id') id: string;\n *\n * // this property is not bound, and is not automatically updated by Angular\n * normalizedBankName: string;\n * }\n *\n * @Component({\n * selector: 'app',\n * template: `\n * <bank-account bankName=\"RBC\" account-id=\"4747\"></bank-account>\n * `\n * })\n * class App {}\n * ```\n *\n * @see [Input and Output properties](guide/inputs-outputs)\n */\n (bindingPropertyName?: string): any;\n new(bindingPropertyName?: string): any;\n}\n\n/**\n * Type of metadata for an `Input` property.\n *\n * @publicApi\n */\nexport interface Input {\n /**\n * The name of the DOM property to which the input property is bound.\n */\n bindingPropertyName?: string;\n}\n\n/**\n * @Annotation\n * @publicApi\n */\nexport const Input: InputDecorator =\n makePropDecorator('Input', (bindingPropertyName?: string) => ({bindingPropertyName}));\n\n/**\n * Type of the Output decorator / constructor function.\n *\n * @publicApi\n */\nexport interface OutputDecorator {\n /**\n * Decorator that marks a class field as an output property and supplies configuration metadata.\n * The DOM property bound to the output property is automatically updated during change detection.\n *\n * @usageNotes\n *\n * You can supply an optional name to use in templates when the\n * component is instantiated, that maps to the\n * name of the bound property. By default, the original\n * name of the bound property is used for output binding.\n *\n * See `Input` decorator for an example of providing a binding name.\n *\n * @see [Input and Output properties](guide/inputs-outputs)\n *\n */\n (bindingPropertyName?: string): any;\n new(bindingPropertyName?: string): any;\n}\n\n/**\n * Type of the Output metadata.\n *\n * @publicApi\n */\nexport interface Output {\n /**\n * The name of the DOM property to which the output property is bound.\n */\n bindingPropertyName?: string;\n}\n\n/**\n * @Annotation\n * @publicApi\n */\nexport const Output: OutputDecorator =\n makePropDecorator('Output', (bindingPropertyName?: string) => ({bindingPropertyName}));\n\n\n\n/**\n * Type of the HostBinding decorator / constructor function.\n *\n * @publicApi\n */\nexport interface HostBindingDecorator {\n /**\n * Decorator that marks a DOM property as a host-binding property and supplies configuration\n * metadata.\n * Angular automatically checks host property bindings during change detection, and\n * if a binding changes it updates the host element of the directive.\n *\n * @usageNotes\n *\n * The following example creates a directive that sets the `valid` and `invalid`\n * properties on the DOM element that has an `ngModel` directive on it.\n *\n * ```typescript\n * @Directive({selector: '[ngModel]'})\n * class NgModelStatus {\n * constructor(public control: NgModel) {}\n * @HostBinding('class.valid') get valid() { return this.control.valid; }\n * @HostBinding('class.invalid') get invalid() { return this.control.invalid; }\n * }\n *\n * @Component({\n * selector: 'app',\n * template: `<input [(ngModel)]=\"prop\">`,\n * })\n * class App {\n * prop;\n * }\n * ```\n *\n */\n (hostPropertyName?: string): any;\n new(hostPropertyName?: string): any;\n}\n\n/**\n * Type of the HostBinding metadata.\n *\n * @publicApi\n */\nexport interface HostBinding {\n /**\n * The DOM property that is bound to a data property.\n */\n hostPropertyName?: string;\n}\n\n/**\n * @Annotation\n * @publicApi\n */\nexport const HostBinding: HostBindingDecorator =\n makePropDecorator('HostBinding', (hostPropertyName?: string) => ({hostPropertyName}));\n\n\n/**\n * Type of the HostListener decorator / constructor function.\n *\n * @publicApi\n */\nexport interface HostListenerDecorator {\n /**\n * Decorator that declares a DOM event to listen for,\n * and provides a handler method to run when that event occurs.\n *\n * Angular invokes the supplied handler method when the host element emits the specified event,\n * and updates the bound element with the result.\n *\n * If the handler method returns false, applies `preventDefault` on the bound element.\n */\n (eventName: string, args?: string[]): any;\n new(eventName: string, args?: string[]): any;\n}\n\n/**\n * Type of the HostListener metadata.\n *\n * @publicApi\n */\nexport interface HostListener {\n /**\n * The DOM event to listen for.\n */\n eventName?: string;\n /**\n * A set of arguments to pass to the handler method when the event occurs.\n */\n args?: string[];\n}\n\n/**\n * Decorator that binds a DOM event to a host listener and supplies configuration metadata.\n * Angular invokes the supplied handler method when the host element emits the specified event,\n * and updates the bound element with the result.\n *\n * If the handler method returns false, applies `preventDefault` on the bound element.\n *\n * @usageNotes\n *\n * The following example declares a directive\n * that attaches a click listener to a button and counts clicks.\n *\n * ```ts\n * @Directive({selector: 'button[counting]'})\n * class CountClicks {\n * numberOfClicks = 0;\n *\n * @HostListener('click', ['$event.target'])\n * onClick(btn) {\n * console.log('button', btn, 'number of clicks:', this.numberOfClicks++);\n * }\n * }\n *\n * @Component({\n * selector: 'app',\n * template: '<button counting>Increment</button>',\n * })\n * class App {}\n *\n * ```\n *\n * The following example registers another DOM event handler that listens for key-press events.\n * ``` ts\n * import { HostListener, Component } from \"@angular/core\";\n *\n * @Component({\n * selector: 'app',\n * template: `<h1>Hello, you have pressed keys {{counter}} number of times!</h1> Press any key to\n * increment the counter.\n * <button (click)=\"resetCounter()\">Reset Counter</button>`\n * })\n * class AppComponent {\n * counter = 0;\n * @HostListener('window:keydown', ['$event'])\n * handleKeyDown(event: KeyboardEvent) {\n * this.counter++;\n * }\n * resetCounter() {\n * this.counter = 0;\n * }\n * }\n * ```\n *\n * @Annotation\n * @publicApi\n */\nexport const HostListener: HostListenerDecorator =\n makePropDecorator('HostListener', (eventName?: string, args?: string[]) => ({eventName, args}));\n\n\n\nexport const SWITCH_COMPILE_COMPONENT__POST_R3__ = render3CompileComponent;\nexport const SWITCH_COMPILE_DIRECTIVE__POST_R3__ = render3CompileDirective;\nexport const SWITCH_COMPILE_PIPE__POST_R3__ = render3CompilePipe;\n\nconst SWITCH_COMPILE_COMPONENT__PRE_R3__ = noop;\nconst SWITCH_COMPILE_DIRECTIVE__PRE_R3__ = noop;\nconst SWITCH_COMPILE_PIPE__PRE_R3__ = noop;\n\nconst SWITCH_COMPILE_COMPONENT: typeof render3CompileComponent = SWITCH_COMPILE_COMPONENT__PRE_R3__;\nconst SWITCH_COMPILE_DIRECTIVE: typeof render3CompileDirective = SWITCH_COMPILE_DIRECTIVE__PRE_R3__;\nconst SWITCH_COMPILE_PIPE: typeof render3CompilePipe = SWITCH_COMPILE_PIPE__PRE_R3__;\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 {InjectorType, ɵɵdefineInjector} from '../di/interface/defs';\nimport {Provider} from '../di/interface/provider';\nimport {convertInjectableProviderToFactory} from '../di/util';\nimport {Type} from '../interface/type';\nimport {SchemaMetadata} from '../metadata/schema';\nimport {compileNgModule as render3CompileNgModule} from '../render3/jit/module';\nimport {makeDecorator, TypeDecorator} from '../util/decorators';\n\n\n/**\n * A wrapper around an NgModule that associates it with [providers](guide/glossary#provider\n * \"Definition\"). Usage without a generic type is deprecated.\n *\n * @see [Deprecations](guide/deprecations#modulewithproviders-type-without-a-generic)\n *\n * @publicApi\n */\nexport interface ModuleWithProviders<T> {\n ngModule: Type<T>;\n providers?: Provider[];\n}\n\n\n/**\n * Type of the NgModule decorator / constructor function.\n *\n * @publicApi\n */\nexport interface NgModuleDecorator {\n /**\n * Decorator that marks a class as an NgModule and supplies configuration metadata.\n */\n (obj?: NgModule): TypeDecorator;\n new(obj?: NgModule): NgModule;\n}\n\n/**\n * Type of the NgModule metadata.\n *\n * @publicApi\n */\nexport interface NgModule {\n /**\n * The set of injectable objects that are available in the injector\n * of this module.\n *\n * @see [Dependency Injection guide](guide/dependency-injection)\n * @see [NgModule guide](guide/providers)\n *\n * @usageNotes\n *\n * Dependencies whose providers are listed here become available for injection\n * into any component, directive, pipe or service that is a child of this injector.\n * The NgModule used for bootstrapping uses the root injector, and can provide dependencies\n * to any part of the app.\n *\n * A lazy-loaded module has its own injector, typically a child of the app root injector.\n * Lazy-loaded services are scoped to the lazy-loaded module's injector.\n * If a lazy-loaded module also provides the `UserService`, any component created\n * within that module's context (such as by router navigation) gets the local instance\n * of the service, not the instance in the root injector.\n * Components in external modules continue to receive the instance provided by their injectors.\n *\n * ### Example\n *\n * The following example defines a class that is injected in\n * the HelloWorld NgModule:\n *\n * ```\n * class Greeter {\n * greet(name:string) {\n * return 'Hello ' + name + '!';\n * }\n * }\n *\n * @NgModule({\n * providers: [\n * Greeter\n * ]\n * })\n * class HelloWorld {\n * greeter:Greeter;\n *\n * constructor(greeter:Greeter) {\n * this.greeter = greeter;\n * }\n * }\n * ```\n */\n providers?: Provider[];\n\n /**\n * The set of components, directives, and pipes ([declarables](guide/glossary#declarable))\n * that belong to this module.\n *\n * @usageNotes\n *\n * The set of selectors that are available to a template include those declared here, and\n * those that are exported from imported NgModules.\n *\n * Declarables must belong to exactly one module.\n * The compiler emits an error if you try to declare the same class in more than one module.\n * Be careful not to declare a class that is imported from another module.\n *\n * ### Example\n *\n * The following example allows the CommonModule to use the `NgFor`\n * directive.\n *\n * ```javascript\n * @NgModule({\n * declarations: [NgFor]\n * })\n * class CommonModule {\n * }\n * ```\n */\n declarations?: Array<Type<any>|any[]>;\n\n /**\n * The set of NgModules whose exported [declarables](guide/glossary#declarable)\n * are available to templates in this module.\n *\n * @usageNotes\n *\n * A template can use exported declarables from any\n * imported module, including those from modules that are imported indirectly\n * and re-exported.\n * For example, `ModuleA` imports `ModuleB`, and also exports\n * it, which makes the declarables from `ModuleB` available\n * wherever `ModuleA` is imported.\n *\n * ### Example\n *\n * The following example allows MainModule to use anything exported by\n * `CommonModule`:\n *\n * ```javascript\n * @NgModule({\n * imports: [CommonModule]\n * })\n * class MainModule {\n * }\n * ```\n *\n */\n imports?: Array<Type<any>|ModuleWithProviders<{}>|any[]>;\n\n /**\n * The set of components, directives, and pipes declared in this\n * NgModule that can be used in the template of any component that is part of an\n * NgModule that imports this NgModule. Exported declarations are the module's public API.\n *\n * A declarable belongs to one and only one NgModule.\n * A module can list another module among its exports, in which case all of that module's\n * public declaration are exported.\n *\n * @usageNotes\n *\n * Declarations are private by default.\n * If this ModuleA does not export UserComponent, then only the components within this\n * ModuleA can use UserComponent.\n *\n * ModuleA can import ModuleB and also export it, making exports from ModuleB\n * available to an NgModule that imports ModuleA.\n *\n * ### Example\n *\n * The following example exports the `NgFor` directive from CommonModule.\n *\n * ```javascript\n * @NgModule({\n * exports: [NgFor]\n * })\n * class CommonModule {\n * }\n * ```\n */\n exports?: Array<Type<any>|any[]>;\n\n /**\n * The set of components to compile when this NgModule is defined,\n * so that they can be dynamically loaded into the view.\n *\n * For each component listed here, Angular creates a `ComponentFactory`\n * and stores it in the `ComponentFactoryResolver`.\n *\n * Angular automatically adds components in the module's bootstrap\n * and route definitions into the `entryComponents` list. Use this\n * option to add components that are bootstrapped\n * using one of the imperative techniques, such as `ViewContainerRef.createComponent()`.\n *\n * @see [Entry Components](guide/entry-components)\n * @deprecated\n * Since 9.0.0. With Ivy, this property is no longer necessary.\n * (You may need to keep these if building a library that will be consumed by a View Engine\n * application.)\n */\n entryComponents?: Array<Type<any>|any[]>;\n\n /**\n * The set of components that are bootstrapped when\n * this module is bootstrapped. The components listed here\n * are automatically added to `entryComponents`.\n */\n bootstrap?: Array<Type<any>|any[]>;\n\n /**\n * The set of schemas that declare elements to be allowed in the NgModule.\n * Elements and properties that are neither Angular components nor directives\n * must be declared in a schema.\n *\n * Allowed value are `NO_ERRORS_SCHEMA` and `CUSTOM_ELEMENTS_SCHEMA`.\n *\n * @security When using one of `NO_ERRORS_SCHEMA` or `CUSTOM_ELEMENTS_SCHEMA`\n * you must ensure that allowed elements and properties securely escape inputs.\n */\n schemas?: Array<SchemaMetadata|any[]>;\n\n /**\n * A name or path that uniquely identifies this NgModule in `getModuleFactory`.\n * If left `undefined`, the NgModule is not registered with\n * `getModuleFactory`.\n */\n id?: string;\n\n /**\n * When present, this module is ignored by the AOT compiler.\n * It remains in distributed code, and the JIT compiler attempts to compile it\n * at run time, in the browser.\n * To ensure the correct behavior, the app must import `@angular/compiler`.\n */\n jit?: true;\n}\n\n/**\n * @Annotation\n * @publicApi\n */\nexport const NgModule: NgModuleDecorator = makeDecorator(\n 'NgModule', (ngModule: NgModule) => ngModule, undefined, undefined,\n /**\n * Decorator that marks the following class as an NgModule, and supplies\n * configuration metadata for it.\n *\n * * The `declarations` and `entryComponents` options configure the compiler\n * with information about what belongs to the NgModule.\n * * The `providers` options configures the NgModule's injector to provide\n * dependencies the NgModule members.\n * * The `imports` and `exports` options bring in members from other modules, and make\n * this module's members available to others.\n */\n (type: Type<any>, meta: NgModule) => SWITCH_COMPILE_NGMODULE(type, meta));\n\n\nfunction preR3NgModuleCompile(moduleType: Type<any>, metadata?: NgModule): void {\n let imports = (metadata && metadata.imports) || [];\n if (metadata && metadata.exports) {\n imports = [...imports, metadata.exports];\n }\n\n const moduleInjectorType = moduleType as InjectorType<any>;\n moduleInjectorType.ɵfac = convertInjectableProviderToFactory(moduleType, {useClass: moduleType});\n moduleInjectorType.ɵinj =\n ɵɵdefineInjector({providers: metadata && metadata.providers, imports: imports});\n}\n\n\nexport const SWITCH_COMPILE_NGMODULE__POST_R3__ = render3CompileNgModule;\nconst SWITCH_COMPILE_NGMODULE__PRE_R3__ = preR3NgModuleCompile;\nconst SWITCH_COMPILE_NGMODULE: typeof render3CompileNgModule = SWITCH_COMPILE_NGMODULE__PRE_R3__;\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 * This indirection is needed to free up Component, etc symbols in the public API\n * to be used by the decorator versions of these annotations.\n */\n\n\nexport {Attribute, AttributeDecorator} from './di/metadata_attr';\nexport {AfterContentChecked, AfterContentInit, AfterViewChecked, AfterViewInit, DoCheck, OnChanges, OnDestroy, OnInit} from './interface/lifecycle_hooks';\nexport {ANALYZE_FOR_ENTRY_COMPONENTS, ContentChild, ContentChildDecorator, ContentChildren, ContentChildrenDecorator, Query, ViewChild, ViewChildDecorator, ViewChildren, ViewChildrenDecorator} from './metadata/di';\nexport {Component, ComponentDecorator, Directive, DirectiveDecorator, HostBinding, HostBindingDecorator, HostListener, HostListenerDecorator, Input, InputDecorator, Output, OutputDecorator, Pipe, PipeDecorator} from './metadata/directives';\nexport {DoBootstrap} from './metadata/do_boostrap';\nexport {ModuleWithProviders, NgModule, NgModuleDecorator} from './metadata/ng_module';\nexport {CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA, SchemaMetadata} from './metadata/schema';\nexport {ViewEncapsulation} from './metadata/view';\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 {Observable} from 'rxjs';\nimport {Inject, Injectable, InjectionToken, Optional} from './di';\nimport {isObservable, isPromise} from './util/lang';\nimport {noop} from './util/noop';\n\n\n/**\n * A [DI token](guide/glossary#di-token \"DI token definition\") that you can use to provide\n * one or more initialization functions.\n *\n * The provided functions are injected at application startup and executed during\n * app initialization. If any of these functions returns a Promise or an Observable, initialization\n * does not complete until the Promise is resolved or the Observable is completed.\n *\n * You can, for example, create a factory function that loads language data\n * or an external configuration, and provide that function to the `APP_INITIALIZER` token.\n * The function is executed during the application bootstrap process,\n * and the needed data is available on startup.\n *\n * @see `ApplicationInitStatus`\n *\n * @usageNotes\n *\n * The following example illustrates how to configure a multi-provider using `APP_INITIALIZER` token\n * and a function returning a promise.\n *\n * ```\n * function initializeApp(): Promise<any> {\n * return new Promise((resolve, reject) => {\n * // Do some asynchronous stuff\n * resolve();\n * });\n * }\n *\n * @NgModule({\n * imports: [BrowserModule],\n * declarations: [AppComponent],\n * bootstrap: [AppComponent],\n * providers: [{\n * provide: APP_INITIALIZER,\n * useFactory: () => initializeApp,\n * multi: true\n * }]\n * })\n * export class AppModule {}\n * ```\n *\n * It's also possible to configure a multi-provider using `APP_INITIALIZER` token and a function\n * returning an observable, see an example below. Note: the `HttpClient` in this example is used for\n * demo purposes to illustrate how the factory function can work with other providers available\n * through DI.\n *\n * ```\n * function initializeAppFactory(httpClient: HttpClient): () => Observable<any> {\n * return () => httpClient.get(\"https://someUrl.com/api/user\")\n * .pipe(\n * tap(user => { ... })\n * );\n * }\n *\n * @NgModule({\n * imports: [BrowserModule, HttpClientModule],\n * declarations: [AppComponent],\n * bootstrap: [AppComponent],\n * providers: [{\n * provide: APP_INITIALIZER,\n * useFactory: initializeAppFactory,\n * deps: [HttpClient],\n * multi: true\n * }]\n * })\n * export class AppModule {}\n * ```\n *\n * @publicApi\n */\nexport const APP_INITIALIZER =\n new InjectionToken<ReadonlyArray<() => Observable<unknown>| Promise<unknown>| void>>(\n 'Application Initializer');\n\n/**\n * A class that reflects the state of running {@link APP_INITIALIZER} functions.\n *\n * @publicApi\n */\n@Injectable()\nexport class ApplicationInitStatus {\n private resolve = noop;\n private reject = noop;\n private initialized = false;\n public readonly donePromise: Promise<any>;\n public readonly done = false;\n\n constructor(@Inject(APP_INITIALIZER) @Optional() private readonly appInits:\n ReadonlyArray<() => Observable<unknown>| Promise<unknown>| void>) {\n this.donePromise = new Promise((res, rej) => {\n this.resolve = res;\n this.reject = rej;\n });\n }\n\n /** @internal */\n runInitializers() {\n if (this.initialized) {\n return;\n }\n\n const asyncInitPromises: Promise<any>[] = [];\n\n const complete = () => {\n (this as {done: boolean}).done = true;\n this.resolve();\n };\n\n if (this.appInits) {\n for (let i = 0; i < this.appInits.length; i++) {\n const initResult = this.appInits[i]();\n if (isPromise(initResult)) {\n asyncInitPromises.push(initResult);\n } else if (isObservable(initResult)) {\n const observableAsPromise = new Promise<void>((resolve, reject) => {\n initResult.subscribe({complete: resolve, error: reject});\n });\n asyncInitPromises.push(observableAsPromise);\n }\n }\n }\n\n Promise.all(asyncInitPromises)\n .then(() => {\n complete();\n })\n .catch(e => {\n this.reject(e);\n });\n\n if (asyncInitPromises.length === 0) {\n complete();\n }\n this.initialized = true;\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 {InjectionToken} from './di';\nimport {ComponentRef} from './linker/component_factory';\n\n\n/**\n * A [DI token](guide/glossary#di-token \"DI token definition\") representing a unique string ID, used\n * primarily for prefixing application attributes and CSS styles when\n * {@link ViewEncapsulation#Emulated ViewEncapsulation.Emulated} is being used.\n *\n * BY default, the value is randomly generated and assigned to the application by Angular.\n * To provide a custom ID value, use a DI provider <!-- TODO: provider --> to configure\n * the root {@link Injector} that uses this token.\n *\n * @publicApi\n */\nexport const APP_ID = new InjectionToken<string>('AppId');\n\nexport function _appIdRandomProviderFactory() {\n return `${_randomChar()}${_randomChar()}${_randomChar()}`;\n}\n\n/**\n * Providers that generate a random `APP_ID_TOKEN`.\n * @publicApi\n */\nexport const APP_ID_RANDOM_PROVIDER = {\n provide: APP_ID,\n useFactory: _appIdRandomProviderFactory,\n deps: <any[]>[],\n};\n\nfunction _randomChar(): string {\n return String.fromCharCode(97 + Math.floor(Math.random() * 25));\n}\n\n/**\n * A function that is executed when a platform is initialized.\n * @publicApi\n */\nexport const PLATFORM_INITIALIZER = new InjectionToken<Array<() => void>>('Platform Initializer');\n\n/**\n * A token that indicates an opaque platform ID.\n * @publicApi\n */\nexport const PLATFORM_ID = new InjectionToken<Object>('Platform ID');\n\n/**\n * A [DI token](guide/glossary#di-token \"DI token definition\") that provides a set of callbacks to\n * be called for every component that is bootstrapped.\n *\n * Each callback must take a `ComponentRef` instance and return nothing.\n *\n * `(componentRef: ComponentRef) => void`\n *\n * @publicApi\n */\nexport const APP_BOOTSTRAP_LISTENER =\n new InjectionToken<Array<(compRef: ComponentRef<any>) => void>>('appBootstrapListener');\n\n/**\n * A [DI token](guide/glossary#di-token \"DI token definition\") that indicates the root directory of\n * the application\n * @publicApi\n */\nexport const PACKAGE_ROOT_URL = new InjectionToken<string>('Application Packages Root URL');\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 {Injectable} from './di';\n\n@Injectable()\nexport class Console {\n log(message: string): void {\n // tslint:disable-next-line:no-console\n console.log(message);\n }\n // Note: for reporting errors use `DOM.logError()` as it is platform specific\n warn(message: string): void {\n // tslint:disable-next-line:no-console\n console.warn(message);\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 {InjectionToken} from '../di/injection_token';\n\n/**\n * Provide this token to set the locale of your application.\n * It is used for i18n extraction, by i18n pipes (DatePipe, I18nPluralPipe, CurrencyPipe,\n * DecimalPipe and PercentPipe) and by ICU expressions.\n *\n * See the [i18n guide](guide/i18n-common-locale-id) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { LOCALE_ID } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: LOCALE_ID, useValue: 'en-US' }]\n * });\n * ```\n *\n * @publicApi\n */\nexport const LOCALE_ID = new InjectionToken<string>('LocaleId');\n\n/**\n * Provide this token to set the default currency code your application uses for\n * CurrencyPipe when there is no currency code passed into it. This is only used by\n * CurrencyPipe and has no relation to locale currency. Defaults to USD if not configured.\n *\n * See the [i18n guide](guide/i18n-common-locale-id) for more information.\n *\n * <div class=\"alert is-helpful\">\n *\n * **Deprecation notice:**\n *\n * The default currency code is currently always `USD` but this is deprecated from v9.\n *\n * **In v10 the default currency code will be taken from the current locale.**\n *\n * If you need the previous behavior then set it by creating a `DEFAULT_CURRENCY_CODE` provider in\n * your application `NgModule`:\n *\n * ```ts\n * {provide: DEFAULT_CURRENCY_CODE, useValue: 'USD'}\n * ```\n *\n * </div>\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: DEFAULT_CURRENCY_CODE, useValue: 'EUR' }]\n * });\n * ```\n *\n * @publicApi\n */\nexport const DEFAULT_CURRENCY_CODE = new InjectionToken<string>('DefaultCurrencyCode');\n\n/**\n * Use this token at bootstrap to provide the content of your translation file (`xtb`,\n * `xlf` or `xlf2`) when you want to translate your application in another language.\n *\n * See the [i18n guide](guide/i18n-common-merge) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { TRANSLATIONS } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * // content of your translation file\n * const translations = '....';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: TRANSLATIONS, useValue: translations }]\n * });\n * ```\n *\n * @publicApi\n */\nexport const TRANSLATIONS = new InjectionToken<string>('Translations');\n\n/**\n * Provide this token at bootstrap to set the format of your {@link TRANSLATIONS}: `xtb`,\n * `xlf` or `xlf2`.\n *\n * See the [i18n guide](guide/i18n-common-merge) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { TRANSLATIONS_FORMAT } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: TRANSLATIONS_FORMAT, useValue: 'xlf' }]\n * });\n * ```\n *\n * @publicApi\n */\nexport const TRANSLATIONS_FORMAT = new InjectionToken<string>('TranslationsFormat');\n\n/**\n * Use this enum at bootstrap as an option of `bootstrapModule` to define the strategy\n * that the compiler should use in case of missing translations:\n * - Error: throw if you have missing translations.\n * - Warning (default): show a warning in the console and/or shell.\n * - Ignore: do nothing.\n *\n * See the [i18n guide](guide/i18n-common-merge#report-missing-translations) for more information.\n *\n * @usageNotes\n * ### Example\n * ```typescript\n * import { MissingTranslationStrategy } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * missingTranslation: MissingTranslationStrategy.Error\n * });\n * ```\n *\n * @publicApi\n */\nexport enum MissingTranslationStrategy {\n Error = 0,\n Warning = 1,\n Ignore = 2,\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport const SWITCH_IVY_ENABLED__POST_R3__ = true;\nconst SWITCH_IVY_ENABLED__PRE_R3__ = false;\nexport const ivyEnabled = SWITCH_IVY_ENABLED__PRE_R3__;\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 {Injectable} from '../di/injectable';\nimport {InjectionToken} from '../di/injection_token';\nimport {StaticProvider} from '../di/interface/provider';\nimport {MissingTranslationStrategy} from '../i18n/tokens';\nimport {Type} from '../interface/type';\nimport {ViewEncapsulation} from '../metadata/view';\nimport {ComponentFactory as ComponentFactoryR3} from '../render3/component_ref';\nimport {getComponentDef, getNgModuleDef} from '../render3/definition';\nimport {NgModuleFactory as NgModuleFactoryR3} from '../render3/ng_module_ref';\nimport {maybeUnwrapFn} from '../render3/util/misc_utils';\n\nimport {ComponentFactory} from './component_factory';\nimport {NgModuleFactory} from './ng_module_factory';\n\n\n\n/**\n * Combination of NgModuleFactory and ComponentFactories.\n *\n * @publicApi\n */\nexport class ModuleWithComponentFactories<T> {\n constructor(\n public ngModuleFactory: NgModuleFactory<T>,\n public componentFactories: ComponentFactory<any>[]) {}\n}\n\n\nfunction _throwError() {\n throw new Error(`Runtime compiler is not loaded`);\n}\n\nconst Compiler_compileModuleSync__PRE_R3__: <T>(moduleType: Type<T>) => NgModuleFactory<T> =\n _throwError as any;\nexport const Compiler_compileModuleSync__POST_R3__: <T>(moduleType: Type<T>) =>\n NgModuleFactory<T> = function<T>(moduleType: Type<T>): NgModuleFactory<T> {\n return new NgModuleFactoryR3(moduleType);\n};\nconst Compiler_compileModuleSync = Compiler_compileModuleSync__PRE_R3__;\n\nconst Compiler_compileModuleAsync__PRE_R3__: <T>(moduleType: Type<T>) =>\n Promise<NgModuleFactory<T>> = _throwError as any;\nexport const Compiler_compileModuleAsync__POST_R3__: <T>(moduleType: Type<T>) =>\n Promise<NgModuleFactory<T>> = function<T>(moduleType: Type<T>): Promise<NgModuleFactory<T>> {\n return Promise.resolve(Compiler_compileModuleSync__POST_R3__(moduleType));\n};\nconst Compiler_compileModuleAsync = Compiler_compileModuleAsync__PRE_R3__;\n\nconst Compiler_compileModuleAndAllComponentsSync__PRE_R3__: <T>(moduleType: Type<T>) =>\n ModuleWithComponentFactories<T> = _throwError as any;\nexport const Compiler_compileModuleAndAllComponentsSync__POST_R3__: <T>(moduleType: Type<T>) =>\n ModuleWithComponentFactories<T> = function<T>(moduleType: Type<T>):\n ModuleWithComponentFactories<T> {\n const ngModuleFactory = Compiler_compileModuleSync__POST_R3__(moduleType);\n const moduleDef = getNgModuleDef(moduleType)!;\n const componentFactories =\n maybeUnwrapFn(moduleDef.declarations)\n .reduce((factories: ComponentFactory<any>[], declaration: Type<any>) => {\n const componentDef = getComponentDef(declaration);\n componentDef && factories.push(new ComponentFactoryR3(componentDef));\n return factories;\n }, [] as ComponentFactory<any>[]);\n return new ModuleWithComponentFactories(ngModuleFactory, componentFactories);\n};\nconst Compiler_compileModuleAndAllComponentsSync =\n Compiler_compileModuleAndAllComponentsSync__PRE_R3__;\n\nconst Compiler_compileModuleAndAllComponentsAsync__PRE_R3__: <T>(moduleType: Type<T>) =>\n Promise<ModuleWithComponentFactories<T>> = _throwError as any;\nexport const Compiler_compileModuleAndAllComponentsAsync__POST_R3__: <T>(moduleType: Type<T>) =>\n Promise<ModuleWithComponentFactories<T>> = function<T>(moduleType: Type<T>):\n Promise<ModuleWithComponentFactories<T>> {\n return Promise.resolve(Compiler_compileModuleAndAllComponentsSync__POST_R3__(moduleType));\n};\nconst Compiler_compileModuleAndAllComponentsAsync =\n Compiler_compileModuleAndAllComponentsAsync__PRE_R3__;\n\n/**\n * Low-level service for running the angular compiler during runtime\n * to create {@link ComponentFactory}s, which\n * can later be used to create and render a Component instance.\n *\n * Each `@NgModule` provides an own `Compiler` to its injector,\n * that will use the directives/pipes of the ng module for compilation\n * of components.\n *\n * @publicApi\n */\n@Injectable()\nexport class Compiler {\n /**\n * Compiles the given NgModule and all of its components. All templates of the components listed\n * in `entryComponents` have to be inlined.\n */\n compileModuleSync: <T>(moduleType: Type<T>) => NgModuleFactory<T> = Compiler_compileModuleSync;\n\n /**\n * Compiles the given NgModule and all of its components\n */\n compileModuleAsync:\n <T>(moduleType: Type<T>) => Promise<NgModuleFactory<T>> = Compiler_compileModuleAsync;\n\n /**\n * Same as {@link #compileModuleSync} but also creates ComponentFactories for all components.\n */\n compileModuleAndAllComponentsSync: <T>(moduleType: Type<T>) => ModuleWithComponentFactories<T> =\n Compiler_compileModuleAndAllComponentsSync;\n\n /**\n * Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components.\n */\n compileModuleAndAllComponentsAsync: <T>(moduleType: Type<T>) =>\n Promise<ModuleWithComponentFactories<T>> = Compiler_compileModuleAndAllComponentsAsync;\n\n /**\n * Clears all caches.\n */\n clearCache(): void {}\n\n /**\n * Clears the cache for the given component/ngModule.\n */\n clearCacheFor(type: Type<any>) {}\n\n /**\n * Returns the id for a given NgModule, if one is defined and known to the compiler.\n */\n getModuleId(moduleType: Type<any>): string|undefined {\n return undefined;\n }\n}\n\n/**\n * Options for creating a compiler\n *\n * @publicApi\n */\nexport type CompilerOptions = {\n useJit?: boolean,\n defaultEncapsulation?: ViewEncapsulation,\n providers?: StaticProvider[],\n missingTranslation?: MissingTranslationStrategy,\n preserveWhitespaces?: boolean,\n};\n\n/**\n * Token to provide CompilerOptions in the platform injector.\n *\n * @publicApi\n */\nexport const COMPILER_OPTIONS = new InjectionToken<CompilerOptions[]>('compilerOptions');\n\n/**\n * A factory for creating a Compiler\n *\n * @publicApi\n */\nexport abstract class CompilerFactory {\n abstract createCompiler(options?: CompilerOptions[]): Compiler;\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\nconst promise: Promise<any> = (() => Promise.resolve(0))();\n\ndeclare const Zone: any;\n\nexport function scheduleMicroTask(fn: Function) {\n if (typeof Zone === 'undefined') {\n // use promise to schedule microTask instead of use Zone\n promise.then(() => {\n fn && fn.apply(null, null);\n });\n } else {\n Zone.current.scheduleMicroTask('scheduleMicrotask', fn);\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 */\nimport {global} from './global';\n\nexport function getNativeRequestAnimationFrame() {\n let nativeRequestAnimationFrame: (callback: FrameRequestCallback) => number =\n global['requestAnimationFrame'];\n let nativeCancelAnimationFrame: (handle: number) => void = global['cancelAnimationFrame'];\n if (typeof Zone !== 'undefined' && nativeRequestAnimationFrame && nativeCancelAnimationFrame) {\n // use unpatched version of requestAnimationFrame(native delegate) if possible\n // to avoid another Change detection\n const unpatchedRequestAnimationFrame =\n (nativeRequestAnimationFrame as any)[(Zone as any).__symbol__('OriginalDelegate')];\n if (unpatchedRequestAnimationFrame) {\n nativeRequestAnimationFrame = unpatchedRequestAnimationFrame;\n }\n const unpatchedCancelAnimationFrame =\n (nativeCancelAnimationFrame as any)[(Zone as any).__symbol__('OriginalDelegate')];\n if (unpatchedCancelAnimationFrame) {\n nativeCancelAnimationFrame = unpatchedCancelAnimationFrame;\n }\n }\n return {nativeRequestAnimationFrame, nativeCancelAnimationFrame};\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 {EventEmitter} from '../event_emitter';\nimport {global} from '../util/global';\nimport {noop} from '../util/noop';\nimport {getNativeRequestAnimationFrame} from '../util/raf';\n\n\n/**\n * An injectable service for executing work inside or outside of the Angular zone.\n *\n * The most common use of this service is to optimize performance when starting a work consisting of\n * one or more asynchronous tasks that don't require UI updates or error handling to be handled by\n * Angular. Such tasks can be kicked off via {@link #runOutsideAngular} and if needed, these tasks\n * can reenter the Angular zone via {@link #run}.\n *\n * <!-- TODO: add/fix links to:\n * - docs explaining zones and the use of zones in Angular and change-detection\n * - link to runOutsideAngular/run (throughout this file!)\n * -->\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * import {Component, NgZone} from '@angular/core';\n * import {NgIf} from '@angular/common';\n *\n * @Component({\n * selector: 'ng-zone-demo',\n * template: `\n * <h2>Demo: NgZone</h2>\n *\n * <p>Progress: {{progress}}%</p>\n * <p *ngIf=\"progress >= 100\">Done processing {{label}} of Angular zone!</p>\n *\n * <button (click)=\"processWithinAngularZone()\">Process within Angular zone</button>\n * <button (click)=\"processOutsideOfAngularZone()\">Process outside of Angular zone</button>\n * `,\n * })\n * export class NgZoneDemo {\n * progress: number = 0;\n * label: string;\n *\n * constructor(private _ngZone: NgZone) {}\n *\n * // Loop inside the Angular zone\n * // so the UI DOES refresh after each setTimeout cycle\n * processWithinAngularZone() {\n * this.label = 'inside';\n * this.progress = 0;\n * this._increaseProgress(() => console.log('Inside Done!'));\n * }\n *\n * // Loop outside of the Angular zone\n * // so the UI DOES NOT refresh after each setTimeout cycle\n * processOutsideOfAngularZone() {\n * this.label = 'outside';\n * this.progress = 0;\n * this._ngZone.runOutsideAngular(() => {\n * this._increaseProgress(() => {\n * // reenter the Angular zone and display done\n * this._ngZone.run(() => { console.log('Outside Done!'); });\n * });\n * });\n * }\n *\n * _increaseProgress(doneCallback: () => void) {\n * this.progress += 1;\n * console.log(`Current progress: ${this.progress}%`);\n *\n * if (this.progress < 100) {\n * window.setTimeout(() => this._increaseProgress(doneCallback), 10);\n * } else {\n * doneCallback();\n * }\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class NgZone {\n readonly hasPendingMacrotasks: boolean = false;\n readonly hasPendingMicrotasks: boolean = false;\n\n /**\n * Whether there are no outstanding microtasks or macrotasks.\n */\n readonly isStable: boolean = true;\n\n /**\n * Notifies when code enters Angular Zone. This gets fired first on VM Turn.\n */\n readonly onUnstable: EventEmitter<any> = new EventEmitter(false);\n\n /**\n * Notifies when there is no more microtasks enqueued in the current VM Turn.\n * This is a hint for Angular to do change detection, which may enqueue more microtasks.\n * For this reason this event can fire multiple times per VM Turn.\n */\n readonly onMicrotaskEmpty: EventEmitter<any> = new EventEmitter(false);\n\n /**\n * Notifies when the last `onMicrotaskEmpty` has run and there are no more microtasks, which\n * implies we are about to relinquish VM turn.\n * This event gets called just once.\n */\n readonly onStable: EventEmitter<any> = new EventEmitter(false);\n\n /**\n * Notifies that an error has been delivered.\n */\n readonly onError: EventEmitter<any> = new EventEmitter(false);\n\n\n constructor({\n enableLongStackTrace = false,\n shouldCoalesceEventChangeDetection = false,\n shouldCoalesceRunChangeDetection = false\n }) {\n if (typeof Zone == 'undefined') {\n throw new Error(`In this configuration Angular requires Zone.js`);\n }\n\n Zone.assertZonePatched();\n const self = this as any as NgZonePrivate;\n self._nesting = 0;\n\n self._outer = self._inner = Zone.current;\n\n if ((Zone as any)['TaskTrackingZoneSpec']) {\n self._inner = self._inner.fork(new ((Zone as any)['TaskTrackingZoneSpec'] as any));\n }\n\n if (enableLongStackTrace && (Zone as any)['longStackTraceZoneSpec']) {\n self._inner = self._inner.fork((Zone as any)['longStackTraceZoneSpec']);\n }\n // if shouldCoalesceRunChangeDetection is true, all tasks including event tasks will be\n // coalesced, so shouldCoalesceEventChangeDetection option is not necessary and can be skipped.\n self.shouldCoalesceEventChangeDetection =\n !shouldCoalesceRunChangeDetection && shouldCoalesceEventChangeDetection;\n self.shouldCoalesceRunChangeDetection = shouldCoalesceRunChangeDetection;\n self.lastRequestAnimationFrameId = -1;\n self.nativeRequestAnimationFrame = getNativeRequestAnimationFrame().nativeRequestAnimationFrame;\n forkInnerZoneWithAngularBehavior(self);\n }\n\n static isInAngularZone(): boolean {\n return Zone.current.get('isAngularZone') === true;\n }\n\n static assertInAngularZone(): void {\n if (!NgZone.isInAngularZone()) {\n throw new Error('Expected to be in Angular Zone, but it is not!');\n }\n }\n\n static assertNotInAngularZone(): void {\n if (NgZone.isInAngularZone()) {\n throw new Error('Expected to not be in Angular Zone, but it is!');\n }\n }\n\n /**\n * Executes the `fn` function synchronously within the Angular zone and returns value returned by\n * the function.\n *\n * Running functions via `run` allows you to reenter Angular zone from a task that was executed\n * outside of the Angular zone (typically started via {@link #runOutsideAngular}).\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * within the Angular zone.\n *\n * If a synchronous error happens it will be rethrown and not reported via `onError`.\n */\n run<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T {\n return (this as any as NgZonePrivate)._inner.run(fn, applyThis, applyArgs);\n }\n\n /**\n * Executes the `fn` function synchronously within the Angular zone as a task and returns value\n * returned by the function.\n *\n * Running functions via `run` allows you to reenter Angular zone from a task that was executed\n * outside of the Angular zone (typically started via {@link #runOutsideAngular}).\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * within the Angular zone.\n *\n * If a synchronous error happens it will be rethrown and not reported via `onError`.\n */\n runTask<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[], name?: string): T {\n const zone = (this as any as NgZonePrivate)._inner;\n const task = zone.scheduleEventTask('NgZoneEvent: ' + name, fn, EMPTY_PAYLOAD, noop, noop);\n try {\n return zone.runTask(task, applyThis, applyArgs);\n } finally {\n zone.cancelTask(task);\n }\n }\n\n /**\n * Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not\n * rethrown.\n */\n runGuarded<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T {\n return (this as any as NgZonePrivate)._inner.runGuarded(fn, applyThis, applyArgs);\n }\n\n /**\n * Executes the `fn` function synchronously in Angular's parent zone and returns value returned by\n * the function.\n *\n * Running functions via {@link #runOutsideAngular} allows you to escape Angular's zone and do\n * work that\n * doesn't trigger Angular change-detection or is subject to Angular's error handling.\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * outside of the Angular zone.\n *\n * Use {@link #run} to reenter the Angular zone and do work that updates the application model.\n */\n runOutsideAngular<T>(fn: (...args: any[]) => T): T {\n return (this as any as NgZonePrivate)._outer.run(fn);\n }\n}\n\nconst EMPTY_PAYLOAD = {};\n\ninterface NgZonePrivate extends NgZone {\n _outer: Zone;\n _inner: Zone;\n _nesting: number;\n _hasPendingMicrotasks: boolean;\n\n hasPendingMacrotasks: boolean;\n hasPendingMicrotasks: boolean;\n lastRequestAnimationFrameId: number;\n /**\n * A flag to indicate if NgZone is currently inside\n * checkStable and to prevent re-entry. The flag is\n * needed because it is possible to invoke the change\n * detection from within change detection leading to\n * incorrect behavior.\n *\n * For detail, please refer here,\n * https://github.com/angular/angular/pull/40540\n */\n isCheckStableRunning: boolean;\n isStable: boolean;\n /**\n * Optionally specify coalescing event change detections or not.\n * Consider the following case.\n *\n * <div (click)=\"doSomething()\">\n * <button (click)=\"doSomethingElse()\"></button>\n * </div>\n *\n * When button is clicked, because of the event bubbling, both\n * event handlers will be called and 2 change detections will be\n * triggered. We can coalesce such kind of events to trigger\n * change detection only once.\n *\n * By default, this option will be false. So the events will not be\n * coalesced and the change detection will be triggered multiple times.\n * And if this option be set to true, the change detection will be\n * triggered async by scheduling it in an animation frame. So in the case above,\n * the change detection will only be trigged once.\n */\n shouldCoalesceEventChangeDetection: boolean;\n /**\n * Optionally specify if `NgZone#run()` method invocations should be coalesced\n * into a single change detection.\n *\n * Consider the following case.\n *\n * for (let i = 0; i < 10; i ++) {\n * ngZone.run(() => {\n * // do something\n * });\n * }\n *\n * This case triggers the change detection multiple times.\n * With ngZoneRunCoalescing options, all change detections in an event loops trigger only once.\n * In addition, the change detection executes in requestAnimation.\n *\n */\n shouldCoalesceRunChangeDetection: boolean;\n\n nativeRequestAnimationFrame: (callback: FrameRequestCallback) => number;\n\n // Cache a \"fake\" top eventTask so you don't need to schedule a new task every\n // time you run a `checkStable`.\n fakeTopEventTask: Task;\n}\n\nfunction checkStable(zone: NgZonePrivate) {\n // TODO: @JiaLiPassion, should check zone.isCheckStableRunning to prevent\n // re-entry. The case is:\n //\n // @Component({...})\n // export class AppComponent {\n // constructor(private ngZone: NgZone) {\n // this.ngZone.onStable.subscribe(() => {\n // this.ngZone.run(() => console.log('stable'););\n // });\n // }\n //\n // The onStable subscriber run another function inside ngZone\n // which causes `checkStable()` re-entry.\n // But this fix causes some issues in g3, so this fix will be\n // launched in another PR.\n if (zone._nesting == 0 && !zone.hasPendingMicrotasks && !zone.isStable) {\n try {\n zone._nesting++;\n zone.onMicrotaskEmpty.emit(null);\n } finally {\n zone._nesting--;\n if (!zone.hasPendingMicrotasks) {\n try {\n zone.runOutsideAngular(() => zone.onStable.emit(null));\n } finally {\n zone.isStable = true;\n }\n }\n }\n }\n}\n\nfunction delayChangeDetectionForEvents(zone: NgZonePrivate) {\n /**\n * We also need to check _nesting here\n * Consider the following case with shouldCoalesceRunChangeDetection = true\n *\n * ngZone.run(() => {});\n * ngZone.run(() => {});\n *\n * We want the two `ngZone.run()` only trigger one change detection\n * when shouldCoalesceRunChangeDetection is true.\n * And because in this case, change detection run in async way(requestAnimationFrame),\n * so we also need to check the _nesting here to prevent multiple\n * change detections.\n */\n if (zone.isCheckStableRunning || zone.lastRequestAnimationFrameId !== -1) {\n return;\n }\n zone.lastRequestAnimationFrameId = zone.nativeRequestAnimationFrame.call(global, () => {\n // This is a work around for https://github.com/angular/angular/issues/36839.\n // The core issue is that when event coalescing is enabled it is possible for microtasks\n // to get flushed too early (As is the case with `Promise.then`) between the\n // coalescing eventTasks.\n //\n // To workaround this we schedule a \"fake\" eventTask before we process the\n // coalescing eventTasks. The benefit of this is that the \"fake\" container eventTask\n // will prevent the microtasks queue from getting drained in between the coalescing\n // eventTask execution.\n if (!zone.fakeTopEventTask) {\n zone.fakeTopEventTask = Zone.root.scheduleEventTask('fakeTopEventTask', () => {\n zone.lastRequestAnimationFrameId = -1;\n updateMicroTaskStatus(zone);\n zone.isCheckStableRunning = true;\n checkStable(zone);\n zone.isCheckStableRunning = false;\n }, undefined, () => {}, () => {});\n }\n zone.fakeTopEventTask.invoke();\n });\n updateMicroTaskStatus(zone);\n}\n\nfunction forkInnerZoneWithAngularBehavior(zone: NgZonePrivate) {\n const delayChangeDetectionForEventsDelegate = () => {\n delayChangeDetectionForEvents(zone);\n };\n zone._inner = zone._inner.fork({\n name: 'angular',\n properties: <any>{'isAngularZone': true},\n onInvokeTask:\n (delegate: ZoneDelegate, current: Zone, target: Zone, task: Task, applyThis: any,\n applyArgs: any): any => {\n try {\n onEnter(zone);\n return delegate.invokeTask(target, task, applyThis, applyArgs);\n } finally {\n if ((zone.shouldCoalesceEventChangeDetection && task.type === 'eventTask') ||\n zone.shouldCoalesceRunChangeDetection) {\n delayChangeDetectionForEventsDelegate();\n }\n onLeave(zone);\n }\n },\n\n onInvoke:\n (delegate: ZoneDelegate, current: Zone, target: Zone, callback: Function, applyThis: any,\n applyArgs?: any[], source?: string): any => {\n try {\n onEnter(zone);\n return delegate.invoke(target, callback, applyThis, applyArgs, source);\n } finally {\n if (zone.shouldCoalesceRunChangeDetection) {\n delayChangeDetectionForEventsDelegate();\n }\n onLeave(zone);\n }\n },\n\n onHasTask:\n (delegate: ZoneDelegate, current: Zone, target: Zone, hasTaskState: HasTaskState) => {\n delegate.hasTask(target, hasTaskState);\n if (current === target) {\n // We are only interested in hasTask events which originate from our zone\n // (A child hasTask event is not interesting to us)\n if (hasTaskState.change == 'microTask') {\n zone._hasPendingMicrotasks = hasTaskState.microTask;\n updateMicroTaskStatus(zone);\n checkStable(zone);\n } else if (hasTaskState.change == 'macroTask') {\n zone.hasPendingMacrotasks = hasTaskState.macroTask;\n }\n }\n },\n\n onHandleError: (delegate: ZoneDelegate, current: Zone, target: Zone, error: any): boolean => {\n delegate.handleError(target, error);\n zone.runOutsideAngular(() => zone.onError.emit(error));\n return false;\n }\n });\n}\n\nfunction updateMicroTaskStatus(zone: NgZonePrivate) {\n if (zone._hasPendingMicrotasks ||\n ((zone.shouldCoalesceEventChangeDetection || zone.shouldCoalesceRunChangeDetection) &&\n zone.lastRequestAnimationFrameId !== -1)) {\n zone.hasPendingMicrotasks = true;\n } else {\n zone.hasPendingMicrotasks = false;\n }\n}\n\nfunction onEnter(zone: NgZonePrivate) {\n zone._nesting++;\n if (zone.isStable) {\n zone.isStable = false;\n zone.onUnstable.emit(null);\n }\n}\n\nfunction onLeave(zone: NgZonePrivate) {\n zone._nesting--;\n checkStable(zone);\n}\n\n/**\n * Provides a noop implementation of `NgZone` which does nothing. This zone requires explicit calls\n * to framework to perform rendering.\n */\nexport class NoopNgZone implements NgZone {\n readonly hasPendingMicrotasks: boolean = false;\n readonly hasPendingMacrotasks: boolean = false;\n readonly isStable: boolean = true;\n readonly onUnstable: EventEmitter<any> = new EventEmitter();\n readonly onMicrotaskEmpty: EventEmitter<any> = new EventEmitter();\n readonly onStable: EventEmitter<any> = new EventEmitter();\n readonly onError: EventEmitter<any> = new EventEmitter();\n\n run<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any): T {\n return fn.apply(applyThis, applyArgs);\n }\n\n runGuarded<T>(fn: (...args: any[]) => any, applyThis?: any, applyArgs?: any): T {\n return fn.apply(applyThis, applyArgs);\n }\n\n runOutsideAngular<T>(fn: (...args: any[]) => T): T {\n return fn();\n }\n\n runTask<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any, name?: string): T {\n return fn.apply(applyThis, applyArgs);\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 {Injectable} from '../di';\nimport {scheduleMicroTask} from '../util/microtask';\nimport {NgZone} from '../zone/ng_zone';\n\n/**\n * Testability API.\n * `declare` keyword causes tsickle to generate externs, so these methods are\n * not renamed by Closure Compiler.\n * @publicApi\n */\nexport declare interface PublicTestability {\n isStable(): boolean;\n whenStable(callback: Function, timeout?: number, updateCallback?: Function): void;\n findProviders(using: any, provider: string, exactMatch: boolean): any[];\n}\n\n// Angular internal, not intended for public API.\nexport interface PendingMacrotask {\n source: string;\n creationLocation: Error;\n runCount?: number;\n data?: TaskData;\n}\n\nexport interface TaskData {\n target?: XMLHttpRequest;\n delay?: number;\n isPeriodic?: boolean;\n}\n\n// Angular internal, not intended for public API.\nexport type DoneCallback = (didWork: boolean, tasks?: PendingMacrotask[]) => void;\nexport type UpdateCallback = (tasks: PendingMacrotask[]) => boolean;\n\ninterface WaitCallback {\n // Needs to be 'any' - setTimeout returns a number according to ES6, but\n // on NodeJS it returns a Timer.\n timeoutId: any;\n doneCb: DoneCallback;\n updateCb?: UpdateCallback;\n}\n\n/**\n * The Testability service provides testing hooks that can be accessed from\n * the browser. Each bootstrapped Angular application on the page will have\n * an instance of Testability.\n * @publicApi\n */\n@Injectable()\nexport class Testability implements PublicTestability {\n private _pendingCount: number = 0;\n private _isZoneStable: boolean = true;\n /**\n * Whether any work was done since the last 'whenStable' callback. This is\n * useful to detect if this could have potentially destabilized another\n * component while it is stabilizing.\n * @internal\n */\n private _didWork: boolean = false;\n private _callbacks: WaitCallback[] = [];\n\n private taskTrackingZone: {macroTasks: Task[]}|null = null;\n\n constructor(private _ngZone: NgZone) {\n this._watchAngularEvents();\n _ngZone.run(() => {\n this.taskTrackingZone =\n typeof Zone == 'undefined' ? null : Zone.current.get('TaskTrackingZone');\n });\n }\n\n private _watchAngularEvents(): void {\n this._ngZone.onUnstable.subscribe({\n next: () => {\n this._didWork = true;\n this._isZoneStable = false;\n }\n });\n\n this._ngZone.runOutsideAngular(() => {\n this._ngZone.onStable.subscribe({\n next: () => {\n NgZone.assertNotInAngularZone();\n scheduleMicroTask(() => {\n this._isZoneStable = true;\n this._runCallbacksIfReady();\n });\n }\n });\n });\n }\n\n /**\n * Increases the number of pending request\n * @deprecated pending requests are now tracked with zones.\n */\n increasePendingRequestCount(): number {\n this._pendingCount += 1;\n this._didWork = true;\n return this._pendingCount;\n }\n\n /**\n * Decreases the number of pending request\n * @deprecated pending requests are now tracked with zones\n */\n decreasePendingRequestCount(): number {\n this._pendingCount -= 1;\n if (this._pendingCount < 0) {\n throw new Error('pending async requests below zero');\n }\n this._runCallbacksIfReady();\n return this._pendingCount;\n }\n\n /**\n * Whether an associated application is stable\n */\n isStable(): boolean {\n return this._isZoneStable && this._pendingCount === 0 && !this._ngZone.hasPendingMacrotasks;\n }\n\n private _runCallbacksIfReady(): void {\n if (this.isStable()) {\n // Schedules the call backs in a new frame so that it is always async.\n scheduleMicroTask(() => {\n while (this._callbacks.length !== 0) {\n let cb = this._callbacks.pop()!;\n clearTimeout(cb.timeoutId);\n cb.doneCb(this._didWork);\n }\n this._didWork = false;\n });\n } else {\n // Still not stable, send updates.\n let pending = this.getPendingTasks();\n this._callbacks = this._callbacks.filter((cb) => {\n if (cb.updateCb && cb.updateCb(pending)) {\n clearTimeout(cb.timeoutId);\n return false;\n }\n\n return true;\n });\n\n this._didWork = true;\n }\n }\n\n private getPendingTasks(): PendingMacrotask[] {\n if (!this.taskTrackingZone) {\n return [];\n }\n\n // Copy the tasks data so that we don't leak tasks.\n return this.taskTrackingZone.macroTasks.map((t: Task) => {\n return {\n source: t.source,\n // From TaskTrackingZone:\n // https://github.com/angular/zone.js/blob/master/lib/zone-spec/task-tracking.ts#L40\n creationLocation: (t as any).creationLocation as Error,\n data: t.data\n };\n });\n }\n\n private addCallback(cb: DoneCallback, timeout?: number, updateCb?: UpdateCallback) {\n let timeoutId: any = -1;\n if (timeout && timeout > 0) {\n timeoutId = setTimeout(() => {\n this._callbacks = this._callbacks.filter((cb) => cb.timeoutId !== timeoutId);\n cb(this._didWork, this.getPendingTasks());\n }, timeout);\n }\n this._callbacks.push(<WaitCallback>{doneCb: cb, timeoutId: timeoutId, updateCb: updateCb});\n }\n\n /**\n * Wait for the application to be stable with a timeout. If the timeout is reached before that\n * happens, the callback receives a list of the macro tasks that were pending, otherwise null.\n *\n * @param doneCb The callback to invoke when Angular is stable or the timeout expires\n * whichever comes first.\n * @param timeout Optional. The maximum time to wait for Angular to become stable. If not\n * specified, whenStable() will wait forever.\n * @param updateCb Optional. If specified, this callback will be invoked whenever the set of\n * pending macrotasks changes. If this callback returns true doneCb will not be invoked\n * and no further updates will be issued.\n */\n whenStable(doneCb: Function, timeout?: number, updateCb?: Function): void {\n if (updateCb && !this.taskTrackingZone) {\n throw new Error(\n 'Task tracking zone is required when passing an update callback to ' +\n 'whenStable(). Is \"zone.js/plugins/task-tracking\" loaded?');\n }\n // These arguments are 'Function' above to keep the public API simple.\n this.addCallback(doneCb as DoneCallback, timeout, updateCb as UpdateCallback);\n this._runCallbacksIfReady();\n }\n\n /**\n * Get the number of pending requests\n * @deprecated pending requests are now tracked with zones\n */\n getPendingRequestCount(): number {\n return this._pendingCount;\n }\n\n /**\n * Find providers by name\n * @param using The root element to search from\n * @param provider The name of binding variable\n * @param exactMatch Whether using exactMatch\n */\n findProviders(using: any, provider: string, exactMatch: boolean): any[] {\n // TODO(juliemr): implement.\n return [];\n }\n}\n\n/**\n * A global registry of {@link Testability} instances for specific elements.\n * @publicApi\n */\n@Injectable()\nexport class TestabilityRegistry {\n /** @internal */\n _applications = new Map<any, Testability>();\n\n constructor() {\n _testabilityGetter.addToWindow(this);\n }\n\n /**\n * Registers an application with a testability hook so that it can be tracked\n * @param token token of application, root element\n * @param testability Testability hook\n */\n registerApplication(token: any, testability: Testability) {\n this._applications.set(token, testability);\n }\n\n /**\n * Unregisters an application.\n * @param token token of application, root element\n */\n unregisterApplication(token: any) {\n this._applications.delete(token);\n }\n\n /**\n * Unregisters all applications\n */\n unregisterAllApplications() {\n this._applications.clear();\n }\n\n /**\n * Get a testability hook associated with the application\n * @param elem root element\n */\n getTestability(elem: any): Testability|null {\n return this._applications.get(elem) || null;\n }\n\n /**\n * Get all registered testabilities\n */\n getAllTestabilities(): Testability[] {\n return Array.from(this._applications.values());\n }\n\n /**\n * Get all registered applications(root elements)\n */\n getAllRootElements(): any[] {\n return Array.from(this._applications.keys());\n }\n\n /**\n * Find testability of a node in the Tree\n * @param elem node\n * @param findInAncestors whether finding testability in ancestors if testability was not found in\n * current node\n */\n findTestabilityInTree(elem: Node, findInAncestors: boolean = true): Testability|null {\n return _testabilityGetter.findTestabilityInTree(this, elem, findInAncestors);\n }\n}\n\n/**\n * Adapter interface for retrieving the `Testability` service associated for a\n * particular context.\n *\n * @publicApi\n */\nexport interface GetTestability {\n addToWindow(registry: TestabilityRegistry): void;\n findTestabilityInTree(registry: TestabilityRegistry, elem: any, findInAncestors: boolean):\n Testability|null;\n}\n\nclass _NoopGetTestability implements GetTestability {\n addToWindow(registry: TestabilityRegistry): void {}\n findTestabilityInTree(registry: TestabilityRegistry, elem: any, findInAncestors: boolean):\n Testability|null {\n return null;\n }\n}\n\n/**\n * Set the {@link GetTestability} implementation used by the Angular testing framework.\n * @publicApi\n */\nexport function setTestabilityGetter(getter: GetTestability): void {\n _testabilityGetter = getter;\n}\n\nlet _testabilityGetter: GetTestability = new _NoopGetTestability();\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 {global} from './global';\n\n/**\n * This file is used to control if the default rendering pipeline should be `ViewEngine` or `Ivy`.\n *\n * For more information on how to run and debug tests with either Ivy or View Engine (legacy),\n * please see [BAZEL.md](./docs/BAZEL.md).\n */\n\nlet _devMode: boolean = true;\nlet _runModeLocked: boolean = false;\n\n\n/**\n * Returns whether Angular is in development mode. After called once,\n * the value is locked and won't change any more.\n *\n * By default, this is true, unless a user calls `enableProdMode` before calling this.\n *\n * @publicApi\n */\nexport function isDevMode(): boolean {\n _runModeLocked = true;\n return _devMode;\n}\n\n/**\n * Disable Angular's development mode, which turns off assertions and other\n * checks within the framework.\n *\n * One important assertion this disables verifies that a change detection pass\n * does not result in additional changes to any bindings (also known as\n * unidirectional data flow).\n *\n * @publicApi\n */\nexport function enableProdMode(): void {\n if (_runModeLocked) {\n throw new Error('Cannot enable prod mode after platform setup.');\n }\n\n // The below check is there so when ngDevMode is set via terser\n // `global['ngDevMode'] = false;` is also dropped.\n if (typeof ngDevMode === undefined || !!ngDevMode) {\n global['ngDevMode'] = false;\n }\n\n _devMode = 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 './util/ng_jit_mode';\n\nimport {merge, Observable, Observer, Subscription} from 'rxjs';\nimport {share} from 'rxjs/operators';\n\nimport {ApplicationInitStatus} from './application_init';\nimport {APP_BOOTSTRAP_LISTENER, PLATFORM_INITIALIZER} from './application_tokens';\nimport {getCompilerFacade, JitCompilerUsage} from './compiler/compiler_facade';\nimport {Console} from './console';\nimport {Injectable} from './di/injectable';\nimport {InjectionToken} from './di/injection_token';\nimport {Injector} from './di/injector';\nimport {StaticProvider} from './di/interface/provider';\nimport {INJECTOR_SCOPE} from './di/scope';\nimport {ErrorHandler} from './error_handler';\nimport {DEFAULT_LOCALE_ID} from './i18n/localization';\nimport {LOCALE_ID} from './i18n/tokens';\nimport {Type} from './interface/type';\nimport {ivyEnabled} from './ivy_switch';\nimport {COMPILER_OPTIONS, CompilerFactory, CompilerOptions} from './linker/compiler';\nimport {ComponentFactory, ComponentRef} from './linker/component_factory';\nimport {ComponentFactoryBoundToModule, ComponentFactoryResolver} from './linker/component_factory_resolver';\nimport {InternalNgModuleRef, NgModuleFactory, NgModuleRef} from './linker/ng_module_factory';\nimport {InternalViewRef, ViewRef} from './linker/view_ref';\nimport {isComponentResourceResolutionQueueEmpty, resolveComponentResources} from './metadata/resource_loading';\nimport {assertNgModuleType} from './render3/assert';\nimport {ComponentFactory as R3ComponentFactory} from './render3/component_ref';\nimport {setLocaleId} from './render3/i18n/i18n_locale_id';\nimport {setJitOptions} from './render3/jit/jit_options';\nimport {NgModuleFactory as R3NgModuleFactory} from './render3/ng_module_ref';\nimport {publishDefaultGlobalUtils as _publishDefaultGlobalUtils} from './render3/util/global_utils';\nimport {Testability, TestabilityRegistry} from './testability/testability';\nimport {isDevMode} from './util/is_dev_mode';\nimport {isPromise} from './util/lang';\nimport {scheduleMicroTask} from './util/microtask';\nimport {stringify} from './util/stringify';\nimport {NgZone, NoopNgZone} from './zone/ng_zone';\n\nlet _platform: PlatformRef;\n\nlet compileNgModuleFactory:\n <M>(injector: Injector, options: CompilerOptions, moduleType: Type<M>) =>\n Promise<NgModuleFactory<M>> = compileNgModuleFactory__PRE_R3__;\n\nfunction compileNgModuleFactory__PRE_R3__<M>(\n injector: Injector, options: CompilerOptions,\n moduleType: Type<M>): Promise<NgModuleFactory<M>> {\n const compilerFactory: CompilerFactory = injector.get(CompilerFactory);\n const compiler = compilerFactory.createCompiler([options]);\n return compiler.compileModuleAsync(moduleType);\n}\n\nexport function compileNgModuleFactory__POST_R3__<M>(\n injector: Injector, options: CompilerOptions,\n moduleType: Type<M>): Promise<NgModuleFactory<M>> {\n ngDevMode && assertNgModuleType(moduleType);\n\n const moduleFactory = new R3NgModuleFactory(moduleType);\n\n // All of the logic below is irrelevant for AOT-compiled code.\n if (typeof ngJitMode !== 'undefined' && !ngJitMode) {\n return Promise.resolve(moduleFactory);\n }\n\n const compilerOptions = injector.get(COMPILER_OPTIONS, []).concat(options);\n\n // Configure the compiler to use the provided options. This call may fail when multiple modules\n // are bootstrapped with incompatible options, as a component can only be compiled according to\n // a single set of options.\n setJitOptions({\n defaultEncapsulation: _lastDefined(compilerOptions.map(opts => opts.defaultEncapsulation)),\n preserveWhitespaces: _lastDefined(compilerOptions.map(opts => opts.preserveWhitespaces)),\n });\n\n if (isComponentResourceResolutionQueueEmpty()) {\n return Promise.resolve(moduleFactory);\n }\n\n const compilerProviders = _mergeArrays(compilerOptions.map(o => o.providers!));\n\n // In case there are no compiler providers, we just return the module factory as\n // there won't be any resource loader. This can happen with Ivy, because AOT compiled\n // modules can be still passed through \"bootstrapModule\". In that case we shouldn't\n // unnecessarily require the JIT compiler.\n if (compilerProviders.length === 0) {\n return Promise.resolve(moduleFactory);\n }\n\n const compiler = getCompilerFacade({\n usage: JitCompilerUsage.Decorator,\n kind: 'NgModule',\n type: moduleType,\n });\n const compilerInjector = Injector.create({providers: compilerProviders});\n const resourceLoader = compilerInjector.get(compiler.ResourceLoader);\n // The resource loader can also return a string while the \"resolveComponentResources\"\n // always expects a promise. Therefore we need to wrap the returned value in a promise.\n return resolveComponentResources(url => Promise.resolve(resourceLoader.get(url)))\n .then(() => moduleFactory);\n}\n\n// the `window.ng` global utilities are only available in non-VE versions of\n// Angular. The function switch below will make sure that the code is not\n// included into Angular when PRE mode is active.\nexport function publishDefaultGlobalUtils__PRE_R3__() {}\nexport function publishDefaultGlobalUtils__POST_R3__() {\n ngDevMode && _publishDefaultGlobalUtils();\n}\n\nlet publishDefaultGlobalUtils: () => any = publishDefaultGlobalUtils__PRE_R3__;\n\nlet isBoundToModule: <C>(cf: ComponentFactory<C>) => boolean = isBoundToModule__PRE_R3__;\n\nexport function isBoundToModule__PRE_R3__<C>(cf: ComponentFactory<C>): boolean {\n return cf instanceof ComponentFactoryBoundToModule;\n}\n\nexport function isBoundToModule__POST_R3__<C>(cf: ComponentFactory<C>): boolean {\n return (cf as R3ComponentFactory<C>).isBoundToModule;\n}\n\nexport const ALLOW_MULTIPLE_PLATFORMS = new InjectionToken<boolean>('AllowMultipleToken');\n\n\n\n/**\n * A token for third-party components that can register themselves with NgProbe.\n *\n * @publicApi\n */\nexport class NgProbeToken {\n constructor(public name: string, public token: any) {}\n}\n\n/**\n * Creates a platform.\n * Platforms must be created on launch using this function.\n *\n * @publicApi\n */\nexport function createPlatform(injector: Injector): PlatformRef {\n if (_platform && !_platform.destroyed &&\n !_platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {\n throw new Error(\n 'There can be only one platform. Destroy the previous one to create a new one.');\n }\n publishDefaultGlobalUtils();\n _platform = injector.get(PlatformRef);\n const inits = injector.get(PLATFORM_INITIALIZER, null);\n if (inits) inits.forEach((init: any) => init());\n return _platform;\n}\n\n/**\n * Creates a factory for a platform. Can be used to provide or override `Providers` specific to\n * your application's runtime needs, such as `PLATFORM_INITIALIZER` and `PLATFORM_ID`.\n * @param parentPlatformFactory Another platform factory to modify. Allows you to compose factories\n * to build up configurations that might be required by different libraries or parts of the\n * application.\n * @param name Identifies the new platform factory.\n * @param providers A set of dependency providers for platforms created with the new factory.\n *\n * @publicApi\n */\nexport function createPlatformFactory(\n parentPlatformFactory: ((extraProviders?: StaticProvider[]) => PlatformRef)|null, name: string,\n providers: StaticProvider[] = []): (extraProviders?: StaticProvider[]) => PlatformRef {\n const desc = `Platform: ${name}`;\n const marker = new InjectionToken(desc);\n return (extraProviders: StaticProvider[] = []) => {\n let platform = getPlatform();\n if (!platform || platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {\n if (parentPlatformFactory) {\n parentPlatformFactory(\n providers.concat(extraProviders).concat({provide: marker, useValue: true}));\n } else {\n const injectedProviders: StaticProvider[] =\n providers.concat(extraProviders).concat({provide: marker, useValue: true}, {\n provide: INJECTOR_SCOPE,\n useValue: 'platform'\n });\n createPlatform(Injector.create({providers: injectedProviders, name: desc}));\n }\n }\n return assertPlatform(marker);\n };\n}\n\n/**\n * Checks that there is currently a platform that contains the given token as a provider.\n *\n * @publicApi\n */\nexport function assertPlatform(requiredToken: any): PlatformRef {\n const platform = getPlatform();\n\n if (!platform) {\n throw new Error('No platform exists!');\n }\n\n if (!platform.injector.get(requiredToken, null)) {\n throw new Error(\n 'A platform with a different configuration has been created. Please destroy it first.');\n }\n\n return platform;\n}\n\n/**\n * Destroys the current Angular platform and all Angular applications on the page.\n * Destroys all modules and listeners registered with the platform.\n *\n * @publicApi\n */\nexport function destroyPlatform(): void {\n if (_platform && !_platform.destroyed) {\n _platform.destroy();\n }\n}\n\n/**\n * Returns the current platform.\n *\n * @publicApi\n */\nexport function getPlatform(): PlatformRef|null {\n return _platform && !_platform.destroyed ? _platform : null;\n}\n\n/**\n * Provides additional options to the bootstraping process.\n *\n *\n */\nexport interface BootstrapOptions {\n /**\n * Optionally specify which `NgZone` should be used.\n *\n * - Provide your own `NgZone` instance.\n * - `zone.js` - Use default `NgZone` which requires `Zone.js`.\n * - `noop` - Use `NoopNgZone` which does nothing.\n */\n ngZone?: NgZone|'zone.js'|'noop';\n\n /**\n * Optionally specify coalescing event change detections or not.\n * Consider the following case.\n *\n * <div (click)=\"doSomething()\">\n * <button (click)=\"doSomethingElse()\"></button>\n * </div>\n *\n * When button is clicked, because of the event bubbling, both\n * event handlers will be called and 2 change detections will be\n * triggered. We can colesce such kind of events to only trigger\n * change detection only once.\n *\n * By default, this option will be false. So the events will not be\n * coalesced and the change detection will be triggered multiple times.\n * And if this option be set to true, the change detection will be\n * triggered async by scheduling a animation frame. So in the case above,\n * the change detection will only be triggered once.\n */\n ngZoneEventCoalescing?: boolean;\n\n /**\n * Optionally specify if `NgZone#run()` method invocations should be coalesced\n * into a single change detection.\n *\n * Consider the following case.\n *\n * for (let i = 0; i < 10; i ++) {\n * ngZone.run(() => {\n * // do something\n * });\n * }\n *\n * This case triggers the change detection multiple times.\n * With ngZoneRunCoalescing options, all change detections in an event loop trigger only once.\n * In addition, the change detection executes in requestAnimation.\n *\n */\n ngZoneRunCoalescing?: boolean;\n}\n\n/**\n * The Angular platform is the entry point for Angular on a web page.\n * Each page has exactly one platform. Services (such as reflection) which are common\n * to every Angular application running on the page are bound in its scope.\n * A page's platform is initialized implicitly when a platform is created using a platform\n * factory such as `PlatformBrowser`, or explicitly by calling the `createPlatform()` function.\n *\n * @publicApi\n */\n@Injectable()\nexport class PlatformRef {\n private _modules: NgModuleRef<any>[] = [];\n private _destroyListeners: Function[] = [];\n private _destroyed: boolean = false;\n\n /** @internal */\n constructor(private _injector: Injector) {}\n\n /**\n * Creates an instance of an `@NgModule` for the given platform for offline compilation.\n *\n * @usageNotes\n *\n * The following example creates the NgModule for a browser platform.\n *\n * ```typescript\n * my_module.ts:\n *\n * @NgModule({\n * imports: [BrowserModule]\n * })\n * class MyModule {}\n *\n * main.ts:\n * import {MyModuleNgFactory} from './my_module.ngfactory';\n * import {platformBrowser} from '@angular/platform-browser';\n *\n * let moduleRef = platformBrowser().bootstrapModuleFactory(MyModuleNgFactory);\n * ```\n */\n bootstrapModuleFactory<M>(moduleFactory: NgModuleFactory<M>, options?: BootstrapOptions):\n Promise<NgModuleRef<M>> {\n // Note: We need to create the NgZone _before_ we instantiate the module,\n // as instantiating the module creates some providers eagerly.\n // So we create a mini parent injector that just contains the new NgZone and\n // pass that as parent to the NgModuleFactory.\n const ngZoneOption = options ? options.ngZone : undefined;\n const ngZoneEventCoalescing = (options && options.ngZoneEventCoalescing) || false;\n const ngZoneRunCoalescing = (options && options.ngZoneRunCoalescing) || false;\n const ngZone = getNgZone(ngZoneOption, {ngZoneEventCoalescing, ngZoneRunCoalescing});\n const providers: StaticProvider[] = [{provide: NgZone, useValue: ngZone}];\n // Note: Create ngZoneInjector within ngZone.run so that all of the instantiated services are\n // created within the Angular zone\n // Do not try to replace ngZone.run with ApplicationRef#run because ApplicationRef would then be\n // created outside of the Angular zone.\n return ngZone.run(() => {\n const ngZoneInjector = Injector.create(\n {providers: providers, parent: this.injector, name: moduleFactory.moduleType.name});\n const moduleRef = <InternalNgModuleRef<M>>moduleFactory.create(ngZoneInjector);\n const exceptionHandler: ErrorHandler|null = moduleRef.injector.get(ErrorHandler, null);\n if (!exceptionHandler) {\n throw new Error('No ErrorHandler. Is platform module (BrowserModule) included?');\n }\n ngZone!.runOutsideAngular(() => {\n const subscription = ngZone!.onError.subscribe({\n next: (error: any) => {\n exceptionHandler.handleError(error);\n }\n });\n moduleRef.onDestroy(() => {\n remove(this._modules, moduleRef);\n subscription.unsubscribe();\n });\n });\n return _callAndReportToErrorHandler(exceptionHandler, ngZone!, () => {\n const initStatus: ApplicationInitStatus = moduleRef.injector.get(ApplicationInitStatus);\n initStatus.runInitializers();\n return initStatus.donePromise.then(() => {\n if (ivyEnabled) {\n // If the `LOCALE_ID` provider is defined at bootstrap then we set the value for ivy\n const localeId = moduleRef.injector.get(LOCALE_ID, DEFAULT_LOCALE_ID);\n setLocaleId(localeId || DEFAULT_LOCALE_ID);\n }\n this._moduleDoBootstrap(moduleRef);\n return moduleRef;\n });\n });\n });\n }\n\n /**\n * Creates an instance of an `@NgModule` for a given platform using the given runtime compiler.\n *\n * @usageNotes\n * ### Simple Example\n *\n * ```typescript\n * @NgModule({\n * imports: [BrowserModule]\n * })\n * class MyModule {}\n *\n * let moduleRef = platformBrowser().bootstrapModule(MyModule);\n * ```\n *\n */\n bootstrapModule<M>(\n moduleType: Type<M>,\n compilerOptions: (CompilerOptions&BootstrapOptions)|\n Array<CompilerOptions&BootstrapOptions> = []): Promise<NgModuleRef<M>> {\n const options = optionsReducer({}, compilerOptions);\n return compileNgModuleFactory(this.injector, options, moduleType)\n .then(moduleFactory => this.bootstrapModuleFactory(moduleFactory, options));\n }\n\n private _moduleDoBootstrap(moduleRef: InternalNgModuleRef<any>): void {\n const appRef = moduleRef.injector.get(ApplicationRef) as ApplicationRef;\n if (moduleRef._bootstrapComponents.length > 0) {\n moduleRef._bootstrapComponents.forEach(f => appRef.bootstrap(f));\n } else if (moduleRef.instance.ngDoBootstrap) {\n moduleRef.instance.ngDoBootstrap(appRef);\n } else {\n throw new Error(\n `The module ${\n stringify(\n moduleRef.instance\n .constructor)} was bootstrapped, but it does not declare \"@NgModule.bootstrap\" components nor a \"ngDoBootstrap\" method. ` +\n `Please define one of these.`);\n }\n this._modules.push(moduleRef);\n }\n\n /**\n * Registers a listener to be called when the platform is destroyed.\n */\n onDestroy(callback: () => void): void {\n this._destroyListeners.push(callback);\n }\n\n /**\n * Retrieves the platform {@link Injector}, which is the parent injector for\n * every Angular application on the page and provides singleton providers.\n */\n get injector(): Injector {\n return this._injector;\n }\n\n /**\n * Destroys the current Angular platform and all Angular applications on the page.\n * Destroys all modules and listeners registered with the platform.\n */\n destroy() {\n if (this._destroyed) {\n throw new Error('The platform has already been destroyed!');\n }\n this._modules.slice().forEach(module => module.destroy());\n this._destroyListeners.forEach(listener => listener());\n this._destroyed = true;\n }\n\n get destroyed() {\n return this._destroyed;\n }\n}\n\nfunction getNgZone(\n ngZoneOption: NgZone|'zone.js'|'noop'|undefined,\n extra?: {ngZoneEventCoalescing: boolean, ngZoneRunCoalescing: boolean}): NgZone {\n let ngZone: NgZone;\n\n if (ngZoneOption === 'noop') {\n ngZone = new NoopNgZone();\n } else {\n ngZone = (ngZoneOption === 'zone.js' ? undefined : ngZoneOption) || new NgZone({\n enableLongStackTrace: isDevMode(),\n shouldCoalesceEventChangeDetection: !!extra?.ngZoneEventCoalescing,\n shouldCoalesceRunChangeDetection: !!extra?.ngZoneRunCoalescing\n });\n }\n return ngZone;\n}\n\nfunction _callAndReportToErrorHandler(\n errorHandler: ErrorHandler, ngZone: NgZone, callback: () => any): any {\n try {\n const result = callback();\n if (isPromise(result)) {\n return result.catch((e: any) => {\n ngZone.runOutsideAngular(() => errorHandler.handleError(e));\n // rethrow as the exception handler might not do it\n throw e;\n });\n }\n\n return result;\n } catch (e) {\n ngZone.runOutsideAngular(() => errorHandler.handleError(e));\n // rethrow as the exception handler might not do it\n throw e;\n }\n}\n\nfunction optionsReducer<T extends Object>(dst: any, objs: T|T[]): T {\n if (Array.isArray(objs)) {\n dst = objs.reduce(optionsReducer, dst);\n } else {\n dst = {...dst, ...(objs as any)};\n }\n return dst;\n}\n\n/**\n * A reference to an Angular application running on a page.\n *\n * @usageNotes\n *\n * {@a is-stable-examples}\n * ### isStable examples and caveats\n *\n * Note two important points about `isStable`, demonstrated in the examples below:\n * - the application will never be stable if you start any kind\n * of recurrent asynchronous task when the application starts\n * (for example for a polling process, started with a `setInterval`, a `setTimeout`\n * or using RxJS operators like `interval`);\n * - the `isStable` Observable runs outside of the Angular zone.\n *\n * Let's imagine that you start a recurrent task\n * (here incrementing a counter, using RxJS `interval`),\n * and at the same time subscribe to `isStable`.\n *\n * ```\n * constructor(appRef: ApplicationRef) {\n * appRef.isStable.pipe(\n * filter(stable => stable)\n * ).subscribe(() => console.log('App is stable now');\n * interval(1000).subscribe(counter => console.log(counter));\n * }\n * ```\n * In this example, `isStable` will never emit `true`,\n * and the trace \"App is stable now\" will never get logged.\n *\n * If you want to execute something when the app is stable,\n * you have to wait for the application to be stable\n * before starting your polling process.\n *\n * ```\n * constructor(appRef: ApplicationRef) {\n * appRef.isStable.pipe(\n * first(stable => stable),\n * tap(stable => console.log('App is stable now')),\n * switchMap(() => interval(1000))\n * ).subscribe(counter => console.log(counter));\n * }\n * ```\n * In this example, the trace \"App is stable now\" will be logged\n * and then the counter starts incrementing every second.\n *\n * Note also that this Observable runs outside of the Angular zone,\n * which means that the code in the subscription\n * to this Observable will not trigger the change detection.\n *\n * Let's imagine that instead of logging the counter value,\n * you update a field of your component\n * and display it in its template.\n *\n * ```\n * constructor(appRef: ApplicationRef) {\n * appRef.isStable.pipe(\n * first(stable => stable),\n * switchMap(() => interval(1000))\n * ).subscribe(counter => this.value = counter);\n * }\n * ```\n * As the `isStable` Observable runs outside the zone,\n * the `value` field will be updated properly,\n * but the template will not be refreshed!\n *\n * You'll have to manually trigger the change detection to update the template.\n *\n * ```\n * constructor(appRef: ApplicationRef, cd: ChangeDetectorRef) {\n * appRef.isStable.pipe(\n * first(stable => stable),\n * switchMap(() => interval(1000))\n * ).subscribe(counter => {\n * this.value = counter;\n * cd.detectChanges();\n * });\n * }\n * ```\n *\n * Or make the subscription callback run inside the zone.\n *\n * ```\n * constructor(appRef: ApplicationRef, zone: NgZone) {\n * appRef.isStable.pipe(\n * first(stable => stable),\n * switchMap(() => interval(1000))\n * ).subscribe(counter => zone.run(() => this.value = counter));\n * }\n * ```\n *\n * @publicApi\n */\n@Injectable()\nexport class ApplicationRef {\n /** @internal */\n private _bootstrapListeners: ((compRef: ComponentRef<any>) => void)[] = [];\n private _views: InternalViewRef[] = [];\n private _runningTick: boolean = false;\n private _stable = true;\n private _onMicrotaskEmptySubscription: Subscription;\n\n /**\n * Get a list of component types registered to this application.\n * This list is populated even before the component is created.\n */\n public readonly componentTypes: Type<any>[] = [];\n\n /**\n * Get a list of components registered to this application.\n */\n public readonly components: ComponentRef<any>[] = [];\n\n /**\n * Returns an Observable that indicates when the application is stable or unstable.\n *\n * @see [Usage notes](#is-stable-examples) for examples and caveats when using this API.\n */\n // TODO(issue/24571): remove '!'.\n public readonly isStable!: Observable<boolean>;\n\n /** @internal */\n constructor(\n private _zone: NgZone, private _injector: Injector, private _exceptionHandler: ErrorHandler,\n private _componentFactoryResolver: ComponentFactoryResolver,\n private _initStatus: ApplicationInitStatus) {\n this._onMicrotaskEmptySubscription = this._zone.onMicrotaskEmpty.subscribe({\n next: () => {\n this._zone.run(() => {\n this.tick();\n });\n }\n });\n\n const isCurrentlyStable = new Observable<boolean>((observer: Observer<boolean>) => {\n this._stable = this._zone.isStable && !this._zone.hasPendingMacrotasks &&\n !this._zone.hasPendingMicrotasks;\n this._zone.runOutsideAngular(() => {\n observer.next(this._stable);\n observer.complete();\n });\n });\n\n const isStable = new Observable<boolean>((observer: Observer<boolean>) => {\n // Create the subscription to onStable outside the Angular Zone so that\n // the callback is run outside the Angular Zone.\n let stableSub: Subscription;\n this._zone.runOutsideAngular(() => {\n stableSub = this._zone.onStable.subscribe(() => {\n NgZone.assertNotInAngularZone();\n\n // Check whether there are no pending macro/micro tasks in the next tick\n // to allow for NgZone to update the state.\n scheduleMicroTask(() => {\n if (!this._stable && !this._zone.hasPendingMacrotasks &&\n !this._zone.hasPendingMicrotasks) {\n this._stable = true;\n observer.next(true);\n }\n });\n });\n });\n\n const unstableSub: Subscription = this._zone.onUnstable.subscribe(() => {\n NgZone.assertInAngularZone();\n if (this._stable) {\n this._stable = false;\n this._zone.runOutsideAngular(() => {\n observer.next(false);\n });\n }\n });\n\n return () => {\n stableSub.unsubscribe();\n unstableSub.unsubscribe();\n };\n });\n\n (this as {isStable: Observable<boolean>}).isStable =\n merge(isCurrentlyStable, isStable.pipe(share()));\n }\n\n /**\n * Bootstrap a component onto the element identified by its selector or, optionally, to a\n * specified element.\n *\n * @usageNotes\n * ### Bootstrap process\n *\n * When bootstrapping a component, Angular mounts it onto a target DOM element\n * and kicks off automatic change detection. The target DOM element can be\n * provided using the `rootSelectorOrNode` argument.\n *\n * If the target DOM element is not provided, Angular tries to find one on a page\n * using the `selector` of the component that is being bootstrapped\n * (first matched element is used).\n *\n * ### Example\n *\n * Generally, we define the component to bootstrap in the `bootstrap` array of `NgModule`,\n * but it requires us to know the component while writing the application code.\n *\n * Imagine a situation where we have to wait for an API call to decide about the component to\n * bootstrap. We can use the `ngDoBootstrap` hook of the `NgModule` and call this method to\n * dynamically bootstrap a component.\n *\n * {@example core/ts/platform/platform.ts region='componentSelector'}\n *\n * Optionally, a component can be mounted onto a DOM element that does not match the\n * selector of the bootstrapped component.\n *\n * In the following example, we are providing a CSS selector to match the target element.\n *\n * {@example core/ts/platform/platform.ts region='cssSelector'}\n *\n * While in this example, we are providing reference to a DOM node.\n *\n * {@example core/ts/platform/platform.ts region='domNode'}\n */\n bootstrap<C>(componentOrFactory: ComponentFactory<C>|Type<C>, rootSelectorOrNode?: string|any):\n ComponentRef<C> {\n if (!this._initStatus.done) {\n throw new Error(\n 'Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.');\n }\n let componentFactory: ComponentFactory<C>;\n if (componentOrFactory instanceof ComponentFactory) {\n componentFactory = componentOrFactory;\n } else {\n componentFactory =\n this._componentFactoryResolver.resolveComponentFactory(componentOrFactory)!;\n }\n this.componentTypes.push(componentFactory.componentType);\n\n // Create a factory associated with the current module if it's not bound to some other\n const ngModule =\n isBoundToModule(componentFactory) ? undefined : this._injector.get(NgModuleRef);\n const selectorOrNode = rootSelectorOrNode || componentFactory.selector;\n const compRef = componentFactory.create(Injector.NULL, [], selectorOrNode, ngModule);\n const nativeElement = compRef.location.nativeElement;\n const testability = compRef.injector.get(Testability, null);\n const testabilityRegistry = testability && compRef.injector.get(TestabilityRegistry);\n if (testability && testabilityRegistry) {\n testabilityRegistry.registerApplication(nativeElement, testability);\n }\n\n compRef.onDestroy(() => {\n this.detachView(compRef.hostView);\n remove(this.components, compRef);\n if (testabilityRegistry) {\n testabilityRegistry.unregisterApplication(nativeElement);\n }\n });\n\n this._loadComponent(compRef);\n // Note that we have still left the `isDevMode()` condition in order to avoid\n // creating a breaking change for projects that still use the View Engine.\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && isDevMode()) {\n const _console = this._injector.get(Console);\n _console.log(\n `Angular is running in development mode. Call enableProdMode() to enable production mode.`);\n }\n return compRef;\n }\n\n /**\n * Invoke this method to explicitly process change detection and its side-effects.\n *\n * In development mode, `tick()` also performs a second change detection cycle to ensure that no\n * further changes are detected. If additional changes are picked up during this second cycle,\n * bindings in the app have side-effects that cannot be resolved in a single change detection\n * pass.\n * In this case, Angular throws an error, since an Angular application can only have one change\n * detection pass during which all change detection must complete.\n */\n tick(): void {\n if (this._runningTick) {\n throw new Error('ApplicationRef.tick is called recursively');\n }\n\n try {\n this._runningTick = true;\n for (let view of this._views) {\n view.detectChanges();\n }\n // Note that we have still left the `isDevMode()` condition in order to avoid\n // creating a breaking change for projects that still use the View Engine.\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && isDevMode()) {\n for (let view of this._views) {\n view.checkNoChanges();\n }\n }\n } catch (e) {\n // Attention: Don't rethrow as it could cancel subscriptions to Observables!\n this._zone.runOutsideAngular(() => this._exceptionHandler.handleError(e));\n } finally {\n this._runningTick = false;\n }\n }\n\n /**\n * Attaches a view so that it will be dirty checked.\n * The view will be automatically detached when it is destroyed.\n * This will throw if the view is already attached to a ViewContainer.\n */\n attachView(viewRef: ViewRef): void {\n const view = (viewRef as InternalViewRef);\n this._views.push(view);\n view.attachToAppRef(this);\n }\n\n /**\n * Detaches a view from dirty checking again.\n */\n detachView(viewRef: ViewRef): void {\n const view = (viewRef as InternalViewRef);\n remove(this._views, view);\n view.detachFromAppRef();\n }\n\n private _loadComponent(componentRef: ComponentRef<any>): void {\n this.attachView(componentRef.hostView);\n this.tick();\n this.components.push(componentRef);\n // Get the listeners lazily to prevent DI cycles.\n const listeners =\n this._injector.get(APP_BOOTSTRAP_LISTENER, []).concat(this._bootstrapListeners);\n listeners.forEach((listener) => listener(componentRef));\n }\n\n /** @internal */\n ngOnDestroy() {\n this._views.slice().forEach((view) => view.destroy());\n this._onMicrotaskEmptySubscription.unsubscribe();\n }\n\n /**\n * Returns the number of attached views.\n */\n get viewCount() {\n return this._views.length;\n }\n}\n\nfunction remove<T>(list: T[], el: T): void {\n const index = list.indexOf(el);\n if (index > -1) {\n list.splice(index, 1);\n }\n}\n\nfunction _lastDefined<T>(args: T[]): T|undefined {\n for (let i = args.length - 1; i >= 0; i--) {\n if (args[i] !== undefined) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _mergeArrays(parts: any[][]): any[] {\n const result: any[] = [];\n parts.forEach((part) => part && result.push(...part));\n return result;\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// Public API for Zone\nexport {NgZone, NoopNgZone as ɵNoopNgZone} from './zone/ng_zone';\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// Public API for render\nexport {Renderer2, RendererFactory2} from './render/api';\nexport {RendererStyleFlags2, RendererType2} from './render/api_flags';\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 {NgModuleType} from '../metadata/ng_module_def';\nimport {NgModuleFactory as R3NgModuleFactory} from '../render3/ng_module_ref';\n\nimport {NgModuleFactory} from './ng_module_factory';\nimport {getRegisteredNgModuleType} from './ng_module_factory_registration';\n\n\n/**\n * Used to load ng module factories.\n *\n * @publicApi\n * @deprecated the `string` form of `loadChildren` is deprecated, and `NgModuleFactoryLoader` is\n * part of its implementation. See `LoadChildren` for more details.\n */\nexport abstract class NgModuleFactoryLoader {\n abstract load(path: string): Promise<NgModuleFactory<any>>;\n}\n\nexport function getModuleFactory__PRE_R3__(id: string): NgModuleFactory<any> {\n const factory = getRegisteredNgModuleType(id) as NgModuleFactory<any>| null;\n if (!factory) throw noModuleError(id);\n return factory;\n}\n\nexport function getModuleFactory__POST_R3__(id: string): NgModuleFactory<any> {\n const type = getRegisteredNgModuleType(id) as NgModuleType | null;\n if (!type) throw noModuleError(id);\n return new R3NgModuleFactory(type);\n}\n\n/**\n * Returns the NgModuleFactory with the given id, if it exists and has been loaded.\n * Factories for modules that do not specify an `id` cannot be retrieved. Throws if the module\n * cannot be found.\n * @publicApi\n */\nexport const getModuleFactory: (id: string) => NgModuleFactory<any> = getModuleFactory__PRE_R3__;\n\nfunction noModuleError(\n id: string,\n ): Error {\n return new Error(`No module with ID ${id} loaded`);\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\nimport {Injectable, Optional} from '../di';\nimport {ivyEnabled} from '../ivy_switch';\n\nimport {Compiler} from './compiler';\nimport {NgModuleFactory} from './ng_module_factory';\nimport {NgModuleFactoryLoader} from './ng_module_factory_loader';\n\nconst _SEPARATOR = '#';\n\nconst FACTORY_CLASS_SUFFIX = 'NgFactory';\ndeclare var System: any;\n\n/**\n * Configuration for SystemJsNgModuleLoader.\n * token.\n *\n * @publicApi\n * @deprecated the `string` form of `loadChildren` is deprecated, and `SystemJsNgModuleLoaderConfig`\n * is part of its implementation. See `LoadChildren` for more details.\n */\nexport abstract class SystemJsNgModuleLoaderConfig {\n /**\n * Prefix to add when computing the name of the factory module for a given module name.\n */\n // TODO(issue/24571): remove '!'.\n factoryPathPrefix!: string;\n\n /**\n * Suffix to add when computing the name of the factory module for a given module name.\n */\n // TODO(issue/24571): remove '!'.\n factoryPathSuffix!: string;\n}\n\nconst DEFAULT_CONFIG: SystemJsNgModuleLoaderConfig = {\n factoryPathPrefix: '',\n factoryPathSuffix: '.ngfactory',\n};\n\n/**\n * NgModuleFactoryLoader that uses SystemJS to load NgModuleFactory\n * @publicApi\n * @deprecated the `string` form of `loadChildren` is deprecated, and `SystemJsNgModuleLoader` is\n * part of its implementation. See `LoadChildren` for more details.\n */\n@Injectable()\nexport class SystemJsNgModuleLoader implements NgModuleFactoryLoader {\n private _config: SystemJsNgModuleLoaderConfig;\n\n constructor(private _compiler: Compiler, @Optional() config?: SystemJsNgModuleLoaderConfig) {\n this._config = config || DEFAULT_CONFIG;\n }\n\n load(path: string): Promise<NgModuleFactory<any>> {\n const legacyOfflineMode = !ivyEnabled && this._compiler instanceof Compiler;\n return legacyOfflineMode ? this.loadFactory(path) : this.loadAndCompile(path);\n }\n\n private loadAndCompile(path: string): Promise<NgModuleFactory<any>> {\n let [module, exportName] = path.split(_SEPARATOR);\n if (exportName === undefined) {\n exportName = 'default';\n }\n\n return System.import(module)\n .then((module: any) => module[exportName])\n .then((type: any) => checkNotEmpty(type, module, exportName))\n .then((type: any) => this._compiler.compileModuleAsync(type));\n }\n\n private loadFactory(path: string): Promise<NgModuleFactory<any>> {\n let [module, exportName] = path.split(_SEPARATOR);\n let factoryClassSuffix = FACTORY_CLASS_SUFFIX;\n if (exportName === undefined) {\n exportName = 'default';\n factoryClassSuffix = '';\n }\n\n return System.import(this._config.factoryPathPrefix + module + this._config.factoryPathSuffix)\n .then((module: any) => module[exportName + factoryClassSuffix])\n .then((factory: any) => checkNotEmpty(factory, module, exportName));\n }\n}\n\nfunction checkNotEmpty(value: any, modulePath: string, exportName: string): any {\n if (!value) {\n throw new Error(`Cannot find '${exportName}' in '${modulePath}'`);\n }\n return value;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ChangeDetectorRef} from '../change_detection/change_detector_ref';\n\n/**\n * Represents an Angular [view](guide/glossary#view \"Definition\").\n *\n * @see {@link ChangeDetectorRef#usage-notes Change detection usage}\n *\n * @publicApi\n */\nexport abstract class ViewRef extends ChangeDetectorRef {\n /**\n * Destroys this view and all of the data structures associated with it.\n */\n abstract destroy(): void;\n\n /**\n * Reports whether this view has been destroyed.\n * @returns True after the `destroy()` method has been called, false otherwise.\n */\n abstract get destroyed(): boolean;\n\n /**\n * A lifecycle hook that provides additional developer-defined cleanup\n * functionality for views.\n * @param callback A handler function that cleans up developer-defined data\n * associated with a view. Called when the `destroy()` method is invoked.\n */\n abstract onDestroy(callback: Function): any /** TODO #9100 */;\n}\n\n/**\n * Represents an Angular [view](guide/glossary#view) in a view container.\n * An [embedded view](guide/glossary#view-tree) can be referenced from a component\n * other than the hosting component whose template defines it, or it can be defined\n * independently by a `TemplateRef`.\n *\n * Properties of elements in a view can change, but the structure (number and order) of elements in\n * a view cannot. Change the structure of elements by inserting, moving, or\n * removing nested views in a view container.\n *\n * @see `ViewContainerRef`\n *\n * @usageNotes\n *\n * The following template breaks down into two separate `TemplateRef` instances,\n * an outer one and an inner one.\n *\n * ```\n * Count: {{items.length}}\n * <ul>\n * <li *ngFor=\"let item of items\">{{item}}</li>\n * </ul>\n * ```\n *\n * This is the outer `TemplateRef`:\n *\n * ```\n * Count: {{items.length}}\n * <ul>\n * <ng-template ngFor let-item [ngForOf]=\"items\"></ng-template>\n * </ul>\n * ```\n *\n * This is the inner `TemplateRef`:\n *\n * ```\n * <li>{{item}}</li>\n * ```\n *\n * The outer and inner `TemplateRef` instances are assembled into views as follows:\n *\n * ```\n * <!-- ViewRef: outer-0 -->\n * Count: 2\n * <ul>\n * <ng-template view-container-ref></ng-template>\n * <!-- ViewRef: inner-1 --><li>first</li><!-- /ViewRef: inner-1 -->\n * <!-- ViewRef: inner-2 --><li>second</li><!-- /ViewRef: inner-2 -->\n * </ul>\n * <!-- /ViewRef: outer-0 -->\n * ```\n * @publicApi\n */\nexport abstract class EmbeddedViewRef<C> extends ViewRef {\n /**\n * The context for this view, inherited from the anchor element.\n */\n abstract context: C;\n\n /**\n * The root nodes for this embedded view.\n */\n abstract get rootNodes(): any[];\n}\n\nexport interface InternalViewRef extends ViewRef {\n detachFromAppRef(): void;\n attachToAppRef(appRef: ViewRefTracker): void;\n}\n\n/**\n * Interface for tracking root `ViewRef`s in `ApplicationRef`.\n *\n * NOTE: Importing `ApplicationRef` here directly creates circular dependency, which is why we have\n * a subset of the `ApplicationRef` interface `ViewRefTracker` here.\n */\nexport interface ViewRefTracker {\n detachView(viewRef: ViewRef): void;\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// Public API for compiler\nexport {Compiler, COMPILER_OPTIONS, CompilerFactory, CompilerOptions, ModuleWithComponentFactories} from './linker/compiler';\nexport {ComponentFactory, ComponentRef} from './linker/component_factory';\nexport {ComponentFactoryResolver} from './linker/component_factory_resolver';\nexport {ElementRef} from './linker/element_ref';\nexport {NgModuleFactory, NgModuleRef} from './linker/ng_module_factory';\nexport {getModuleFactory, NgModuleFactoryLoader} from './linker/ng_module_factory_loader';\nexport {QueryList} from './linker/query_list';\nexport {SystemJsNgModuleLoader, SystemJsNgModuleLoaderConfig} from './linker/system_js_ng_module_factory_loader';\nexport {TemplateRef} from './linker/template_ref';\nexport {ViewContainerRef} from './linker/view_container_ref';\nexport {EmbeddedViewRef, ViewRef} from './linker/view_ref';\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 '../di/injector';\nimport {assertTNodeForLView} from '../render3/assert';\nimport {getLContext} from '../render3/context_discovery';\nimport {CONTAINER_HEADER_OFFSET, LContainer, NATIVE} from '../render3/interfaces/container';\nimport {TElementNode, TNode, TNodeFlags, TNodeType} from '../render3/interfaces/node';\nimport {isComponentHost, isLContainer} from '../render3/interfaces/type_checks';\nimport {DECLARATION_COMPONENT_VIEW, LView, PARENT, T_HOST, TData, TVIEW} from '../render3/interfaces/view';\nimport {getComponent, getContext, getInjectionTokens, getInjector, getListeners, getLocalRefs, getOwningComponent} from '../render3/util/discovery_utils';\nimport {INTERPOLATION_DELIMITER} from '../render3/util/misc_utils';\nimport {renderStringify} from '../render3/util/stringify_utils';\nimport {getComponentLViewByIndex, getNativeByTNodeOrNull} from '../render3/util/view_utils';\nimport {assertDomNode} from '../util/assert';\nimport {DebugContext} from '../view/types';\n\n\n/**\n * @publicApi\n */\nexport class DebugEventListener {\n constructor(public name: string, public callback: Function) {}\n}\n\n/**\n * @publicApi\n */\nexport interface DebugNode {\n /**\n * The callbacks attached to the component's @Output properties and/or the element's event\n * properties.\n */\n readonly listeners: DebugEventListener[];\n\n /**\n * The `DebugElement` parent. Will be `null` if this is the root element.\n */\n readonly parent: DebugElement|null;\n\n /**\n * The underlying DOM node.\n */\n readonly nativeNode: any;\n\n /**\n * The host dependency injector. For example, the root element's component instance injector.\n */\n readonly injector: Injector;\n\n /**\n * The element's own component instance, if it has one.\n */\n readonly componentInstance: any;\n\n /**\n * An object that provides parent context for this element. Often an ancestor component instance\n * that governs this element.\n *\n * When an element is repeated within *ngFor, the context is an `NgForOf` whose `$implicit`\n * property is the value of the row instance value. For example, the `hero` in `*ngFor=\"let hero\n * of heroes\"`.\n */\n readonly context: any;\n\n /**\n * Dictionary of objects associated with template local variables (e.g. #foo), keyed by the local\n * variable name.\n */\n readonly references: {[key: string]: any};\n\n /**\n * This component's injector lookup tokens. Includes the component itself plus the tokens that the\n * component lists in its providers metadata.\n */\n readonly providerTokens: any[];\n}\nexport class DebugNode__PRE_R3__ {\n readonly listeners: DebugEventListener[] = [];\n readonly parent: DebugElement|null = null;\n readonly nativeNode: any;\n private readonly _debugContext: DebugContext;\n\n constructor(nativeNode: any, parent: DebugNode|null, _debugContext: DebugContext) {\n this._debugContext = _debugContext;\n this.nativeNode = nativeNode;\n if (parent && parent instanceof DebugElement__PRE_R3__) {\n parent.addChild(this);\n }\n }\n\n get injector(): Injector {\n return this._debugContext.injector;\n }\n\n get componentInstance(): any {\n return this._debugContext.component;\n }\n\n get context(): any {\n return this._debugContext.context;\n }\n\n get references(): {[key: string]: any} {\n return this._debugContext.references;\n }\n\n get providerTokens(): any[] {\n return this._debugContext.providerTokens;\n }\n}\n\n/**\n * @publicApi\n *\n * @see [Component testing scenarios](guide/testing-components-scenarios)\n * @see [Basics of testing components](guide/testing-components-basics)\n * @see [Testing utility APIs](guide/testing-utility-apis)\n */\nexport interface DebugElement extends DebugNode {\n /**\n * The element tag name, if it is an element.\n */\n readonly name: string;\n\n /**\n * A map of property names to property values for an element.\n *\n * This map includes:\n * - Regular property bindings (e.g. `[id]=\"id\"`)\n * - Host property bindings (e.g. `host: { '[id]': \"id\" }`)\n * - Interpolated property bindings (e.g. `id=\"{{ value }}\")\n *\n * It does not include:\n * - input property bindings (e.g. `[myCustomInput]=\"value\"`)\n * - attribute bindings (e.g. `[attr.role]=\"menu\"`)\n */\n readonly properties: {[key: string]: any};\n\n /**\n * A map of attribute names to attribute values for an element.\n */\n readonly attributes: {[key: string]: string|null};\n\n /**\n * A map containing the class names on the element as keys.\n *\n * This map is derived from the `className` property of the DOM element.\n *\n * Note: The values of this object will always be `true`. The class key will not appear in the KV\n * object if it does not exist on the element.\n *\n * @see [Element.className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className)\n */\n readonly classes: {[key: string]: boolean};\n\n /**\n * The inline styles of the DOM element.\n *\n * Will be `null` if there is no `style` property on the underlying DOM element.\n *\n * @see [ElementCSSInlineStyle](https://developer.mozilla.org/en-US/docs/Web/API/ElementCSSInlineStyle/style)\n */\n readonly styles: {[key: string]: string|null};\n\n /**\n * The `childNodes` of the DOM element as a `DebugNode` array.\n *\n * @see [Node.childNodes](https://developer.mozilla.org/en-US/docs/Web/API/Node/childNodes)\n */\n readonly childNodes: DebugNode[];\n\n /**\n * The underlying DOM element at the root of the component.\n */\n readonly nativeElement: any;\n\n /**\n * The immediate `DebugElement` children. Walk the tree by descending through `children`.\n */\n readonly children: DebugElement[];\n\n /**\n * @returns the first `DebugElement` that matches the predicate at any depth in the subtree.\n */\n query(predicate: Predicate<DebugElement>): DebugElement;\n\n /**\n * @returns All `DebugElement` matches for the predicate at any depth in the subtree.\n */\n queryAll(predicate: Predicate<DebugElement>): DebugElement[];\n\n /**\n * @returns All `DebugNode` matches for the predicate at any depth in the subtree.\n */\n queryAllNodes(predicate: Predicate<DebugNode>): DebugNode[];\n\n /**\n * Triggers the event by its name if there is a corresponding listener in the element's\n * `listeners` collection.\n *\n * If the event lacks a listener or there's some other problem, consider\n * calling `nativeElement.dispatchEvent(eventObject)`.\n *\n * @param eventName The name of the event to trigger\n * @param eventObj The _event object_ expected by the handler\n *\n * @see [Testing components scenarios](guide/testing-components-scenarios#trigger-event-handler)\n */\n triggerEventHandler(eventName: string, eventObj: any): void;\n}\nexport class DebugElement__PRE_R3__ extends DebugNode__PRE_R3__ implements DebugElement {\n readonly name!: string;\n readonly properties: {[key: string]: any} = {};\n readonly attributes: {[key: string]: string|null} = {};\n readonly classes: {[key: string]: boolean} = {};\n readonly styles: {[key: string]: string|null} = {};\n readonly childNodes: DebugNode[] = [];\n readonly nativeElement: any;\n\n constructor(nativeNode: any, parent: any, _debugContext: DebugContext) {\n super(nativeNode, parent, _debugContext);\n this.nativeElement = nativeNode;\n }\n\n addChild(child: DebugNode) {\n if (child) {\n this.childNodes.push(child);\n (child as {parent: DebugNode}).parent = this;\n }\n }\n\n removeChild(child: DebugNode) {\n const childIndex = this.childNodes.indexOf(child);\n if (childIndex !== -1) {\n (child as {parent: DebugNode | null}).parent = null;\n this.childNodes.splice(childIndex, 1);\n }\n }\n\n insertChildrenAfter(child: DebugNode, newChildren: DebugNode[]) {\n const siblingIndex = this.childNodes.indexOf(child);\n if (siblingIndex !== -1) {\n this.childNodes.splice(siblingIndex + 1, 0, ...newChildren);\n newChildren.forEach(c => {\n if (c.parent) {\n (c.parent as DebugElement__PRE_R3__).removeChild(c);\n }\n (child as {parent: DebugNode}).parent = this;\n });\n }\n }\n\n insertBefore(refChild: DebugNode, newChild: DebugNode): void {\n const refIndex = this.childNodes.indexOf(refChild);\n if (refIndex === -1) {\n this.addChild(newChild);\n } else {\n if (newChild.parent) {\n (newChild.parent as DebugElement__PRE_R3__).removeChild(newChild);\n }\n (newChild as {parent: DebugNode}).parent = this;\n this.childNodes.splice(refIndex, 0, newChild);\n }\n }\n\n query(predicate: Predicate<DebugElement>): DebugElement {\n const results = this.queryAll(predicate);\n return results[0] || null;\n }\n\n queryAll(predicate: Predicate<DebugElement>): DebugElement[] {\n const matches: DebugElement[] = [];\n _queryElementChildren(this, predicate, matches);\n return matches;\n }\n\n queryAllNodes(predicate: Predicate<DebugNode>): DebugNode[] {\n const matches: DebugNode[] = [];\n _queryNodeChildren(this, predicate, matches);\n return matches;\n }\n\n get children(): DebugElement[] {\n return this.childNodes //\n .filter((node) => node instanceof DebugElement__PRE_R3__) as DebugElement[];\n }\n\n triggerEventHandler(eventName: string, eventObj: any) {\n this.listeners.forEach((listener) => {\n if (listener.name == eventName) {\n listener.callback(eventObj);\n }\n });\n }\n}\n\n/**\n * @publicApi\n */\nexport function asNativeElements(debugEls: DebugElement[]): any {\n return debugEls.map((el) => el.nativeElement);\n}\n\nfunction _queryElementChildren(\n element: DebugElement, predicate: Predicate<DebugElement>, matches: DebugElement[]) {\n element.childNodes.forEach(node => {\n if (node instanceof DebugElement__PRE_R3__) {\n if (predicate(node)) {\n matches.push(node);\n }\n _queryElementChildren(node, predicate, matches);\n }\n });\n}\n\nfunction _queryNodeChildren(\n parentNode: DebugNode, predicate: Predicate<DebugNode>, matches: DebugNode[]) {\n if (parentNode instanceof DebugElement__PRE_R3__) {\n parentNode.childNodes.forEach(node => {\n if (predicate(node)) {\n matches.push(node);\n }\n if (node instanceof DebugElement__PRE_R3__) {\n _queryNodeChildren(node, predicate, matches);\n }\n });\n }\n}\n\nclass DebugNode__POST_R3__ implements DebugNode {\n readonly nativeNode: Node;\n\n constructor(nativeNode: Node) {\n this.nativeNode = nativeNode;\n }\n\n get parent(): DebugElement|null {\n const parent = this.nativeNode.parentNode as Element;\n return parent ? new DebugElement__POST_R3__(parent) : null;\n }\n\n get injector(): Injector {\n return getInjector(this.nativeNode);\n }\n\n get componentInstance(): any {\n const nativeElement = this.nativeNode;\n return nativeElement &&\n (getComponent(nativeElement as Element) || getOwningComponent(nativeElement));\n }\n get context(): any {\n return getComponent(this.nativeNode as Element) || getContext(this.nativeNode as Element);\n }\n\n get listeners(): DebugEventListener[] {\n return getListeners(this.nativeNode as Element).filter(listener => listener.type === 'dom');\n }\n\n get references(): {[key: string]: any;} {\n return getLocalRefs(this.nativeNode);\n }\n\n get providerTokens(): any[] {\n return getInjectionTokens(this.nativeNode as Element);\n }\n}\n\nclass DebugElement__POST_R3__ extends DebugNode__POST_R3__ implements DebugElement {\n constructor(nativeNode: Element) {\n ngDevMode && assertDomNode(nativeNode);\n super(nativeNode);\n }\n\n get nativeElement(): Element|null {\n return this.nativeNode.nodeType == Node.ELEMENT_NODE ? this.nativeNode as Element : null;\n }\n\n get name(): string {\n const context = getLContext(this.nativeNode);\n if (context !== null) {\n const lView = context.lView;\n const tData = lView[TVIEW].data;\n const tNode = tData[context.nodeIndex] as TNode;\n return tNode.value!;\n } else {\n return this.nativeNode.nodeName;\n }\n }\n\n /**\n * Gets a map of property names to property values for an element.\n *\n * This map includes:\n * - Regular property bindings (e.g. `[id]=\"id\"`)\n * - Host property bindings (e.g. `host: { '[id]': \"id\" }`)\n * - Interpolated property bindings (e.g. `id=\"{{ value }}\")\n *\n * It does not include:\n * - input property bindings (e.g. `[myCustomInput]=\"value\"`)\n * - attribute bindings (e.g. `[attr.role]=\"menu\"`)\n */\n get properties(): {[key: string]: any;} {\n const context = getLContext(this.nativeNode);\n if (context === null) {\n return {};\n }\n\n const lView = context.lView;\n const tData = lView[TVIEW].data;\n const tNode = tData[context.nodeIndex] as TNode;\n\n const properties: {[key: string]: string} = {};\n // Collect properties from the DOM.\n copyDomProperties(this.nativeElement, properties);\n // Collect properties from the bindings. This is needed for animation renderer which has\n // synthetic properties which don't get reflected into the DOM.\n collectPropertyBindings(properties, tNode, lView, tData);\n return properties;\n }\n\n get attributes(): {[key: string]: string|null;} {\n const attributes: {[key: string]: string|null;} = {};\n const element = this.nativeElement;\n\n if (!element) {\n return attributes;\n }\n\n const context = getLContext(element);\n if (context === null) {\n return {};\n }\n\n const lView = context.lView;\n const tNodeAttrs = (lView[TVIEW].data[context.nodeIndex] as TNode).attrs;\n const lowercaseTNodeAttrs: string[] = [];\n\n // For debug nodes we take the element's attribute directly from the DOM since it allows us\n // to account for ones that weren't set via bindings (e.g. ViewEngine keeps track of the ones\n // that are set through `Renderer2`). The problem is that the browser will lowercase all names,\n // however since we have the attributes already on the TNode, we can preserve the case by going\n // through them once, adding them to the `attributes` map and putting their lower-cased name\n // into an array. Afterwards when we're going through the native DOM attributes, we can check\n // whether we haven't run into an attribute already through the TNode.\n if (tNodeAttrs) {\n let i = 0;\n while (i < tNodeAttrs.length) {\n const attrName = tNodeAttrs[i];\n\n // Stop as soon as we hit a marker. We only care about the regular attributes. Everything\n // else will be handled below when we read the final attributes off the DOM.\n if (typeof attrName !== 'string') break;\n\n const attrValue = tNodeAttrs[i + 1];\n attributes[attrName] = attrValue as string;\n lowercaseTNodeAttrs.push(attrName.toLowerCase());\n\n i += 2;\n }\n }\n\n const eAttrs = element.attributes;\n for (let i = 0; i < eAttrs.length; i++) {\n const attr = eAttrs[i];\n const lowercaseName = attr.name.toLowerCase();\n\n // Make sure that we don't assign the same attribute both in its\n // case-sensitive form and the lower-cased one from the browser.\n if (lowercaseTNodeAttrs.indexOf(lowercaseName) === -1) {\n // Save the lowercase name to align the behavior between browsers.\n // IE preserves the case, while all other browser convert it to lower case.\n attributes[lowercaseName] = attr.value;\n }\n }\n\n return attributes;\n }\n\n get styles(): {[key: string]: string|null} {\n if (this.nativeElement && (this.nativeElement as HTMLElement).style) {\n return (this.nativeElement as HTMLElement).style as {[key: string]: any};\n }\n return {};\n }\n\n get classes(): {[key: string]: boolean;} {\n const result: {[key: string]: boolean;} = {};\n const element = this.nativeElement as HTMLElement | SVGElement;\n\n // SVG elements return an `SVGAnimatedString` instead of a plain string for the `className`.\n const className = element.className as string | SVGAnimatedString;\n const classes = className && typeof className !== 'string' ? className.baseVal.split(' ') :\n className.split(' ');\n\n classes.forEach((value: string) => result[value] = true);\n\n return result;\n }\n\n get childNodes(): DebugNode[] {\n const childNodes = this.nativeNode.childNodes;\n const children: DebugNode[] = [];\n for (let i = 0; i < childNodes.length; i++) {\n const element = childNodes[i];\n children.push(getDebugNode__POST_R3__(element));\n }\n return children;\n }\n\n get children(): DebugElement[] {\n const nativeElement = this.nativeElement;\n if (!nativeElement) return [];\n const childNodes = nativeElement.children;\n const children: DebugElement[] = [];\n for (let i = 0; i < childNodes.length; i++) {\n const element = childNodes[i];\n children.push(getDebugNode__POST_R3__(element));\n }\n return children;\n }\n\n query(predicate: Predicate<DebugElement>): DebugElement {\n const results = this.queryAll(predicate);\n return results[0] || null;\n }\n\n queryAll(predicate: Predicate<DebugElement>): DebugElement[] {\n const matches: DebugElement[] = [];\n _queryAllR3(this, predicate, matches, true);\n return matches;\n }\n\n queryAllNodes(predicate: Predicate<DebugNode>): DebugNode[] {\n const matches: DebugNode[] = [];\n _queryAllR3(this, predicate, matches, false);\n return matches;\n }\n\n triggerEventHandler(eventName: string, eventObj: any): void {\n const node = this.nativeNode as any;\n const invokedListeners: Function[] = [];\n\n this.listeners.forEach(listener => {\n if (listener.name === eventName) {\n const callback = listener.callback;\n callback.call(node, eventObj);\n invokedListeners.push(callback);\n }\n });\n\n // We need to check whether `eventListeners` exists, because it's something\n // that Zone.js only adds to `EventTarget` in browser environments.\n if (typeof node.eventListeners === 'function') {\n // Note that in Ivy we wrap event listeners with a call to `event.preventDefault` in some\n // cases. We use '__ngUnwrap__' as a special token that gives us access to the actual event\n // listener.\n node.eventListeners(eventName).forEach((listener: Function) => {\n // In order to ensure that we can detect the special __ngUnwrap__ token described above, we\n // use `toString` on the listener and see if it contains the token. We use this approach to\n // ensure that it still worked with compiled code since it cannot remove or rename string\n // literals. We also considered using a special function name (i.e. if(listener.name ===\n // special)) but that was more cumbersome and we were also concerned the compiled code could\n // strip the name, turning the condition in to (\"\" === \"\") and always returning true.\n if (listener.toString().indexOf('__ngUnwrap__') !== -1) {\n const unwrappedListener = listener('__ngUnwrap__');\n return invokedListeners.indexOf(unwrappedListener) === -1 &&\n unwrappedListener.call(node, eventObj);\n }\n });\n }\n }\n}\n\nfunction copyDomProperties(element: Element|null, properties: {[name: string]: string}): void {\n if (element) {\n // Skip own properties (as those are patched)\n let obj = Object.getPrototypeOf(element);\n const NodePrototype: any = Node.prototype;\n while (obj !== null && obj !== NodePrototype) {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n for (let key in descriptors) {\n if (!key.startsWith('__') && !key.startsWith('on')) {\n // don't include properties starting with `__` and `on`.\n // `__` are patched values which should not be included.\n // `on` are listeners which also should not be included.\n const value = (element as any)[key];\n if (isPrimitiveValue(value)) {\n properties[key] = value;\n }\n }\n }\n obj = Object.getPrototypeOf(obj);\n }\n }\n}\n\nfunction isPrimitiveValue(value: any): boolean {\n return typeof value === 'string' || typeof value === 'boolean' || typeof value === 'number' ||\n value === null;\n}\n\n/**\n * Walk the TNode tree to find matches for the predicate.\n *\n * @param parentElement the element from which the walk is started\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n */\nfunction _queryAllR3(\n parentElement: DebugElement, predicate: Predicate<DebugElement>, matches: DebugElement[],\n elementsOnly: true): void;\nfunction _queryAllR3(\n parentElement: DebugElement, predicate: Predicate<DebugNode>, matches: DebugNode[],\n elementsOnly: false): void;\nfunction _queryAllR3(\n parentElement: DebugElement, predicate: Predicate<DebugElement>|Predicate<DebugNode>,\n matches: DebugElement[]|DebugNode[], elementsOnly: boolean) {\n const context = getLContext(parentElement.nativeNode);\n if (context !== null) {\n const parentTNode = context.lView[TVIEW].data[context.nodeIndex] as TNode;\n _queryNodeChildrenR3(\n parentTNode, context.lView, predicate, matches, elementsOnly, parentElement.nativeNode);\n } else {\n // If the context is null, then `parentElement` was either created with Renderer2 or native DOM\n // APIs.\n _queryNativeNodeDescendants(parentElement.nativeNode, predicate, matches, elementsOnly);\n }\n}\n\n/**\n * Recursively match the current TNode against the predicate, and goes on with the next ones.\n *\n * @param tNode the current TNode\n * @param lView the LView of this TNode\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n * @param rootNativeNode the root native node on which predicate should not be matched\n */\nfunction _queryNodeChildrenR3(\n tNode: TNode, lView: LView, predicate: Predicate<DebugElement>|Predicate<DebugNode>,\n matches: DebugElement[]|DebugNode[], elementsOnly: boolean, rootNativeNode: any) {\n ngDevMode && assertTNodeForLView(tNode, lView);\n const nativeNode = getNativeByTNodeOrNull(tNode, lView);\n // For each type of TNode, specific logic is executed.\n if (tNode.type & (TNodeType.AnyRNode | TNodeType.ElementContainer)) {\n // Case 1: the TNode is an element\n // The native node has to be checked.\n _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode);\n if (isComponentHost(tNode)) {\n // If the element is the host of a component, then all nodes in its view have to be processed.\n // Note: the component's content (tNode.child) will be processed from the insertion points.\n const componentView = getComponentLViewByIndex(tNode.index, lView);\n if (componentView && componentView[TVIEW].firstChild) {\n _queryNodeChildrenR3(\n componentView[TVIEW].firstChild!, componentView, predicate, matches, elementsOnly,\n rootNativeNode);\n }\n } else {\n if (tNode.child) {\n // Otherwise, its children have to be processed.\n _queryNodeChildrenR3(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);\n }\n\n // We also have to query the DOM directly in order to catch elements inserted through\n // Renderer2. Note that this is __not__ optimal, because we're walking similar trees multiple\n // times. ViewEngine could do it more efficiently, because all the insertions go through\n // Renderer2, however that's not the case in Ivy. This approach is being used because:\n // 1. Matching the ViewEngine behavior would mean potentially introducing a depedency\n // from `Renderer2` to Ivy which could bring Ivy code into ViewEngine.\n // 2. We would have to make `Renderer3` \"know\" about debug nodes.\n // 3. It allows us to capture nodes that were inserted directly via the DOM.\n nativeNode && _queryNativeNodeDescendants(nativeNode, predicate, matches, elementsOnly);\n }\n // In all cases, if a dynamic container exists for this node, each view inside it has to be\n // processed.\n const nodeOrContainer = lView[tNode.index];\n if (isLContainer(nodeOrContainer)) {\n _queryNodeChildrenInContainerR3(\n nodeOrContainer, predicate, matches, elementsOnly, rootNativeNode);\n }\n } else if (tNode.type & TNodeType.Container) {\n // Case 2: the TNode is a container\n // The native node has to be checked.\n const lContainer = lView[tNode.index];\n _addQueryMatchR3(lContainer[NATIVE], predicate, matches, elementsOnly, rootNativeNode);\n // Each view inside the container has to be processed.\n _queryNodeChildrenInContainerR3(lContainer, predicate, matches, elementsOnly, rootNativeNode);\n } else if (tNode.type & TNodeType.Projection) {\n // Case 3: the TNode is a projection insertion point (i.e. a <ng-content>).\n // The nodes projected at this location all need to be processed.\n const componentView = lView![DECLARATION_COMPONENT_VIEW];\n const componentHost = componentView[T_HOST] as TElementNode;\n const head: TNode|null =\n (componentHost.projection as (TNode | null)[])[tNode.projection as number];\n\n if (Array.isArray(head)) {\n for (let nativeNode of head) {\n _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode);\n }\n } else if (head) {\n const nextLView = componentView[PARENT]! as LView;\n const nextTNode = nextLView[TVIEW].data[head.index] as TNode;\n _queryNodeChildrenR3(nextTNode, nextLView, predicate, matches, elementsOnly, rootNativeNode);\n }\n } else if (tNode.child) {\n // Case 4: the TNode is a view.\n _queryNodeChildrenR3(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);\n }\n\n // We don't want to go to the next sibling of the root node.\n if (rootNativeNode !== nativeNode) {\n // To determine the next node to be processed, we need to use the next or the projectionNext\n // link, depending on whether the current node has been projected.\n const nextTNode = (tNode.flags & TNodeFlags.isProjected) ? tNode.projectionNext : tNode.next;\n if (nextTNode) {\n _queryNodeChildrenR3(nextTNode, lView, predicate, matches, elementsOnly, rootNativeNode);\n }\n }\n}\n\n/**\n * Process all TNodes in a given container.\n *\n * @param lContainer the container to be processed\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n * @param rootNativeNode the root native node on which predicate should not be matched\n */\nfunction _queryNodeChildrenInContainerR3(\n lContainer: LContainer, predicate: Predicate<DebugElement>|Predicate<DebugNode>,\n matches: DebugElement[]|DebugNode[], elementsOnly: boolean, rootNativeNode: any) {\n for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n const childView = lContainer[i] as LView;\n const firstChild = childView[TVIEW].firstChild;\n if (firstChild) {\n _queryNodeChildrenR3(firstChild, childView, predicate, matches, elementsOnly, rootNativeNode);\n }\n }\n}\n\n/**\n * Match the current native node against the predicate.\n *\n * @param nativeNode the current native node\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n * @param rootNativeNode the root native node on which predicate should not be matched\n */\nfunction _addQueryMatchR3(\n nativeNode: any, predicate: Predicate<DebugElement>|Predicate<DebugNode>,\n matches: DebugElement[]|DebugNode[], elementsOnly: boolean, rootNativeNode: any) {\n if (rootNativeNode !== nativeNode) {\n const debugNode = getDebugNode(nativeNode);\n if (!debugNode) {\n return;\n }\n // Type of the \"predicate and \"matches\" array are set based on the value of\n // the \"elementsOnly\" parameter. TypeScript is not able to properly infer these\n // types with generics, so we manually cast the parameters accordingly.\n if (elementsOnly && debugNode instanceof DebugElement__POST_R3__ && predicate(debugNode) &&\n matches.indexOf(debugNode) === -1) {\n matches.push(debugNode);\n } else if (\n !elementsOnly && (predicate as Predicate<DebugNode>)(debugNode) &&\n (matches as DebugNode[]).indexOf(debugNode) === -1) {\n (matches as DebugNode[]).push(debugNode);\n }\n }\n}\n\n/**\n * Match all the descendants of a DOM node against a predicate.\n *\n * @param nativeNode the current native node\n * @param predicate the predicate to match\n * @param matches the list where matches are stored\n * @param elementsOnly whether only elements should be searched\n */\nfunction _queryNativeNodeDescendants(\n parentNode: any, predicate: Predicate<DebugElement>|Predicate<DebugNode>,\n matches: DebugElement[]|DebugNode[], elementsOnly: boolean) {\n const nodes = parentNode.childNodes;\n const length = nodes.length;\n\n for (let i = 0; i < length; i++) {\n const node = nodes[i];\n const debugNode = getDebugNode(node);\n\n if (debugNode) {\n if (elementsOnly && debugNode instanceof DebugElement__POST_R3__ && predicate(debugNode) &&\n matches.indexOf(debugNode) === -1) {\n matches.push(debugNode);\n } else if (\n !elementsOnly && (predicate as Predicate<DebugNode>)(debugNode) &&\n (matches as DebugNode[]).indexOf(debugNode) === -1) {\n (matches as DebugNode[]).push(debugNode);\n }\n\n _queryNativeNodeDescendants(node, predicate, matches, elementsOnly);\n }\n }\n}\n\n/**\n * Iterates through the property bindings for a given node and generates\n * a map of property names to values. This map only contains property bindings\n * defined in templates, not in host bindings.\n */\nfunction collectPropertyBindings(\n properties: {[key: string]: string}, tNode: TNode, lView: LView, tData: TData): void {\n let bindingIndexes = tNode.propertyBindings;\n\n if (bindingIndexes !== null) {\n for (let i = 0; i < bindingIndexes.length; i++) {\n const bindingIndex = bindingIndexes[i];\n const propMetadata = tData[bindingIndex] as string;\n const metadataParts = propMetadata.split(INTERPOLATION_DELIMITER);\n const propertyName = metadataParts[0];\n if (metadataParts.length > 1) {\n let value = metadataParts[1];\n for (let j = 1; j < metadataParts.length - 1; j++) {\n value += renderStringify(lView[bindingIndex + j - 1]) + metadataParts[j + 1];\n }\n properties[propertyName] = value;\n } else {\n properties[propertyName] = lView[bindingIndex];\n }\n }\n }\n}\n\n\n// Need to keep the nodes in a global Map so that multiple angular apps are supported.\nconst _nativeNodeToDebugNode = new Map<any, DebugNode>();\n\nfunction getDebugNode__PRE_R3__(nativeNode: any): DebugNode|null {\n return _nativeNodeToDebugNode.get(nativeNode) || null;\n}\n\nconst NG_DEBUG_PROPERTY = '__ng_debug__';\n\nexport function getDebugNode__POST_R3__(nativeNode: Element): DebugElement__POST_R3__;\nexport function getDebugNode__POST_R3__(nativeNode: Node): DebugNode__POST_R3__;\nexport function getDebugNode__POST_R3__(nativeNode: null): null;\nexport function getDebugNode__POST_R3__(nativeNode: any): DebugNode|null {\n if (nativeNode instanceof Node) {\n if (!(nativeNode.hasOwnProperty(NG_DEBUG_PROPERTY))) {\n (nativeNode as any)[NG_DEBUG_PROPERTY] = nativeNode.nodeType == Node.ELEMENT_NODE ?\n new DebugElement__POST_R3__(nativeNode as Element) :\n new DebugNode__POST_R3__(nativeNode);\n }\n return (nativeNode as any)[NG_DEBUG_PROPERTY];\n }\n return null;\n}\n\n/**\n * @publicApi\n */\nexport const getDebugNode: (nativeNode: any) => DebugNode | null = getDebugNode__PRE_R3__;\n\n\nexport function getDebugNodeR2__PRE_R3__(nativeNode: any): DebugNode|null {\n return getDebugNode__PRE_R3__(nativeNode);\n}\n\nexport function getDebugNodeR2__POST_R3__(_nativeNode: any): DebugNode|null {\n return null;\n}\n\nexport const getDebugNodeR2: (nativeNode: any) => DebugNode | null = getDebugNodeR2__PRE_R3__;\n\n\nexport function getAllDebugNodes(): DebugNode[] {\n return Array.from(_nativeNodeToDebugNode.values());\n}\n\nexport function indexDebugNode(node: DebugNode) {\n _nativeNodeToDebugNode.set(node.nativeNode, node);\n}\n\nexport function removeDebugNodeFromIndex(node: DebugNode) {\n _nativeNodeToDebugNode.delete(node.nativeNode);\n}\n\n/**\n * A boolean-valued function over a value, possibly including context information\n * regarding that value's position in an array.\n *\n * @publicApi\n */\nexport interface Predicate<T> {\n (value: T): boolean;\n}\n\n/**\n * @publicApi\n */\nexport const DebugNode: {new (...args: any[]): DebugNode} = DebugNode__PRE_R3__;\n\n/**\n * @publicApi\n */\nexport const DebugElement: {new (...args: any[]): DebugElement} = DebugElement__PRE_R3__;\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 * Change detection enables data binding in Angular.\n */\n\nexport {ChangeDetectionStrategy, ChangeDetectorRef, DefaultIterableDiffer, IterableChangeRecord, IterableChanges, IterableDiffer, IterableDifferFactory, IterableDiffers, KeyValueChangeRecord, KeyValueChanges, KeyValueDiffer, KeyValueDifferFactory, KeyValueDiffers, NgIterable, PipeTransform, SimpleChange, SimpleChanges, TrackByFunction, WrappedValue} from './change_detection/change_detection';\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 {createPlatformFactory, PlatformRef} from './application_ref';\nimport {PLATFORM_ID} from './application_tokens';\nimport {Console} from './console';\nimport {Injector, StaticProvider} from './di';\nimport {TestabilityRegistry} from './testability/testability';\n\nconst _CORE_PLATFORM_PROVIDERS: StaticProvider[] = [\n // Set a default platform name for platforms that don't set it explicitly.\n {provide: PLATFORM_ID, useValue: 'unknown'},\n {provide: PlatformRef, deps: [Injector]},\n {provide: TestabilityRegistry, deps: []},\n {provide: Console, deps: []},\n];\n\n/**\n * This platform has to be included in any other platform\n *\n * @publicApi\n */\nexport const platformCore = createPlatformFactory(null, 'core', _CORE_PLATFORM_PROVIDERS);\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {APP_INITIALIZER, ApplicationInitStatus} from './application_init';\nimport {ApplicationRef} from './application_ref';\nimport {APP_ID_RANDOM_PROVIDER} from './application_tokens';\nimport {defaultIterableDiffers, defaultKeyValueDiffers, IterableDiffers, KeyValueDiffers} from './change_detection/change_detection';\nimport {Injector, StaticProvider} from './di';\nimport {Inject, Optional, SkipSelf} from './di/metadata';\nimport {ErrorHandler} from './error_handler';\nimport {DEFAULT_LOCALE_ID, USD_CURRENCY_CODE} from './i18n/localization';\nimport {DEFAULT_CURRENCY_CODE, LOCALE_ID} from './i18n/tokens';\nimport {ivyEnabled} from './ivy_switch';\nimport {ComponentFactoryResolver} from './linker';\nimport {Compiler} from './linker/compiler';\nimport {NgModule} from './metadata';\nimport {SCHEDULER} from './render3/component_ref';\nimport {setLocaleId} from './render3/i18n/i18n_locale_id';\nimport {NgZone} from './zone';\n\ndeclare const $localize: {locale?: string};\n\nexport function _iterableDiffersFactory() {\n return defaultIterableDiffers;\n}\n\nexport function _keyValueDiffersFactory() {\n return defaultKeyValueDiffers;\n}\n\nexport function _localeFactory(locale?: string): string {\n locale = locale || getGlobalLocale();\n if (ivyEnabled) {\n setLocaleId(locale);\n }\n return locale;\n}\n\n/**\n * Work out the locale from the potential global properties.\n *\n * * Closure Compiler: use `goog.getLocale()`.\n * * Ivy enabled: use `$localize.locale`\n */\nexport function getGlobalLocale(): string {\n if (typeof ngI18nClosureMode !== 'undefined' && ngI18nClosureMode &&\n typeof goog !== 'undefined' && goog.getLocale() !== 'en') {\n // * The default `goog.getLocale()` value is `en`, while Angular used `en-US`.\n // * In order to preserve backwards compatibility, we use Angular default value over\n // Closure Compiler's one.\n return goog.getLocale();\n } else {\n // KEEP `typeof $localize !== 'undefined' && $localize.locale` IN SYNC WITH THE LOCALIZE\n // COMPILE-TIME INLINER.\n //\n // * During compile time inlining of translations the expression will be replaced\n // with a string literal that is the current locale. Other forms of this expression are not\n // guaranteed to be replaced.\n //\n // * During runtime translation evaluation, the developer is required to set `$localize.locale`\n // if required, or just to provide their own `LOCALE_ID` provider.\n return (ivyEnabled && typeof $localize !== 'undefined' && $localize.locale) ||\n DEFAULT_LOCALE_ID;\n }\n}\n\n/**\n * A built-in [dependency injection token](guide/glossary#di-token)\n * that is used to configure the root injector for bootstrapping.\n */\nexport const APPLICATION_MODULE_PROVIDERS: StaticProvider[] = [\n {\n provide: ApplicationRef,\n useClass: ApplicationRef,\n deps: [NgZone, Injector, ErrorHandler, ComponentFactoryResolver, ApplicationInitStatus]\n },\n {provide: SCHEDULER, deps: [NgZone], useFactory: zoneSchedulerFactory},\n {\n provide: ApplicationInitStatus,\n useClass: ApplicationInitStatus,\n deps: [[new Optional(), APP_INITIALIZER]]\n },\n {provide: Compiler, useClass: Compiler, deps: []},\n APP_ID_RANDOM_PROVIDER,\n {provide: IterableDiffers, useFactory: _iterableDiffersFactory, deps: []},\n {provide: KeyValueDiffers, useFactory: _keyValueDiffersFactory, deps: []},\n {\n provide: LOCALE_ID,\n useFactory: _localeFactory,\n deps: [[new Inject(LOCALE_ID), new Optional(), new SkipSelf()]]\n },\n {provide: DEFAULT_CURRENCY_CODE, useValue: USD_CURRENCY_CODE},\n];\n\n/**\n * Schedule work at next available slot.\n *\n * In Ivy this is just `requestAnimationFrame`. For compatibility reasons when bootstrapped\n * using `platformRef.bootstrap` we need to use `NgZone.onStable` as the scheduling mechanism.\n * This overrides the scheduling mechanism in Ivy to `NgZone.onStable`.\n *\n * @param ngZone NgZone to use for scheduling.\n */\nexport function zoneSchedulerFactory(ngZone: NgZone): (fn: () => void) => void {\n let queue: (() => void)[] = [];\n ngZone.onStable.subscribe(() => {\n while (queue.length) {\n queue.pop()!();\n }\n });\n return function(fn: () => void) {\n queue.push(fn);\n };\n}\n\n/**\n * Configures the root injector for an app with\n * providers of `@angular/core` dependencies that `ApplicationRef` needs\n * to bootstrap components.\n *\n * Re-exported by `BrowserModule`, which is included automatically in the root\n * `AppModule` when you create a new app with the CLI `new` command.\n *\n * @publicApi\n */\n@NgModule({providers: APPLICATION_MODULE_PROVIDERS})\nexport class ApplicationModule {\n // Inject ApplicationRef to make it eager...\n constructor(appRef: ApplicationRef) {}\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 {ViewEncapsulation} from '../metadata/view';\nimport {RendererType2} from '../render/api_flags';\nimport {SecurityContext} from '../sanitization/security';\n\nimport {asElementData, BindingDef, BindingFlags, ElementData, ElementHandleEventFn, NodeDef, NodeFlags, OutputDef, OutputType, QueryValueType, ViewData, ViewDefinitionFactory} from './types';\nimport {calcBindingFlags, checkAndUpdateBinding, dispatchEvent, elementEventFullName, getParentRenderElement, NOOP, resolveDefinition, resolveRendererType2, splitMatchedQueriesDsl, splitNamespace} from './util';\n\nexport function anchorDef(\n flags: NodeFlags, matchedQueriesDsl: null|[string | number, QueryValueType][],\n ngContentIndex: null|number, childCount: number, handleEvent?: null|ElementHandleEventFn,\n templateFactory?: ViewDefinitionFactory): NodeDef {\n flags |= NodeFlags.TypeElement;\n const {matchedQueries, references, matchedQueryIds} = splitMatchedQueriesDsl(matchedQueriesDsl);\n const template = templateFactory ? resolveDefinition(templateFactory) : null;\n\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n flags,\n checkIndex: -1,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n matchedQueries,\n matchedQueryIds,\n references,\n ngContentIndex,\n childCount,\n bindings: [],\n bindingFlags: 0,\n outputs: [],\n element: {\n ns: null,\n name: null,\n attrs: null,\n template,\n componentProvider: null,\n componentView: null,\n componentRendererType: null,\n publicProviders: null,\n allProviders: null,\n handleEvent: handleEvent || NOOP\n },\n provider: null,\n text: null,\n query: null,\n ngContent: null\n };\n}\n\nexport function elementDef(\n checkIndex: number, flags: NodeFlags,\n matchedQueriesDsl: null|[string | number, QueryValueType][], ngContentIndex: null|number,\n childCount: number, namespaceAndName: string|null, fixedAttrs: null|[string, string][] = [],\n bindings?: null|[BindingFlags, string, string | SecurityContext | null][],\n outputs?: null|([string, string])[], handleEvent?: null|ElementHandleEventFn,\n componentView?: null|ViewDefinitionFactory,\n componentRendererType?: RendererType2|null): NodeDef {\n if (!handleEvent) {\n handleEvent = NOOP;\n }\n const {matchedQueries, references, matchedQueryIds} = splitMatchedQueriesDsl(matchedQueriesDsl);\n let ns: string = null!;\n let name: string = null!;\n if (namespaceAndName) {\n [ns, name] = splitNamespace(namespaceAndName);\n }\n bindings = bindings || [];\n const bindingDefs: BindingDef[] = [];\n for (let i = 0; i < bindings.length; i++) {\n const [bindingFlags, namespaceAndName, suffixOrSecurityContext] = bindings[i];\n\n const [ns, name] = splitNamespace(namespaceAndName);\n let securityContext: SecurityContext = undefined!;\n let suffix: string = undefined!;\n switch (bindingFlags & BindingFlags.Types) {\n case BindingFlags.TypeElementStyle:\n suffix = <string>suffixOrSecurityContext;\n break;\n case BindingFlags.TypeElementAttribute:\n case BindingFlags.TypeProperty:\n securityContext = <SecurityContext>suffixOrSecurityContext;\n break;\n }\n bindingDefs[i] =\n {flags: bindingFlags, ns, name, nonMinifiedName: name, securityContext, suffix};\n }\n outputs = outputs || [];\n const outputDefs: OutputDef[] = [];\n for (let i = 0; i < outputs.length; i++) {\n const [target, eventName] = outputs[i];\n outputDefs[i] =\n {type: OutputType.ElementOutput, target: <any>target, eventName, propName: null};\n }\n fixedAttrs = fixedAttrs || [];\n const attrs = <[string, string, string][]>fixedAttrs.map(([namespaceAndName, value]) => {\n const [ns, name] = splitNamespace(namespaceAndName);\n return [ns, name, value];\n });\n componentRendererType = resolveRendererType2(componentRendererType);\n if (componentView) {\n flags |= NodeFlags.ComponentView;\n }\n flags |= NodeFlags.TypeElement;\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n checkIndex,\n flags,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n matchedQueries,\n matchedQueryIds,\n references,\n ngContentIndex,\n childCount,\n bindings: bindingDefs,\n bindingFlags: calcBindingFlags(bindingDefs),\n outputs: outputDefs,\n element: {\n ns,\n name,\n attrs,\n template: null,\n // will bet set by the view definition\n componentProvider: null,\n componentView: componentView || null,\n componentRendererType: componentRendererType,\n publicProviders: null,\n allProviders: null,\n handleEvent: handleEvent || NOOP,\n },\n provider: null,\n text: null,\n query: null,\n ngContent: null\n };\n}\n\nexport function createElement(view: ViewData, renderHost: any, def: NodeDef): ElementData {\n const elDef = def.element!;\n const rootSelectorOrNode = view.root.selectorOrNode;\n const renderer = view.renderer;\n let el: any;\n if (view.parent || !rootSelectorOrNode) {\n if (elDef.name) {\n el = renderer.createElement(elDef.name, elDef.ns);\n } else {\n el = renderer.createComment('');\n }\n const parentEl = getParentRenderElement(view, renderHost, def);\n if (parentEl) {\n renderer.appendChild(parentEl, el);\n }\n } else {\n // when using native Shadow DOM, do not clear the root element contents to allow slot projection\n const preserveContent =\n (!!elDef.componentRendererType &&\n elDef.componentRendererType.encapsulation === ViewEncapsulation.ShadowDom);\n el = renderer.selectRootElement(rootSelectorOrNode, preserveContent);\n }\n if (elDef.attrs) {\n for (let i = 0; i < elDef.attrs.length; i++) {\n const [ns, name, value] = elDef.attrs[i];\n renderer.setAttribute(el, name, value, ns);\n }\n }\n return el;\n}\n\nexport function listenToElementOutputs(view: ViewData, compView: ViewData, def: NodeDef, el: any) {\n for (let i = 0; i < def.outputs.length; i++) {\n const output = def.outputs[i];\n const handleEventClosure = renderEventHandlerClosure(\n view, def.nodeIndex, elementEventFullName(output.target, output.eventName));\n let listenTarget: 'window'|'document'|'body'|'component'|null = output.target;\n let listenerView = view;\n if (output.target === 'component') {\n listenTarget = null;\n listenerView = compView;\n }\n const disposable =\n <any>listenerView.renderer.listen(listenTarget || el, output.eventName, handleEventClosure);\n view.disposables![def.outputIndex + i] = disposable;\n }\n}\n\nfunction renderEventHandlerClosure(view: ViewData, index: number, eventName: string) {\n return (event: any) => dispatchEvent(view, index, eventName, event);\n}\n\n\nexport function checkAndUpdateElementInline(\n view: ViewData, def: NodeDef, v0: any, v1: any, v2: any, v3: any, v4: any, v5: any, v6: any,\n v7: any, v8: any, v9: any): boolean {\n const bindLen = def.bindings.length;\n let changed = false;\n if (bindLen > 0 && checkAndUpdateElementValue(view, def, 0, v0)) changed = true;\n if (bindLen > 1 && checkAndUpdateElementValue(view, def, 1, v1)) changed = true;\n if (bindLen > 2 && checkAndUpdateElementValue(view, def, 2, v2)) changed = true;\n if (bindLen > 3 && checkAndUpdateElementValue(view, def, 3, v3)) changed = true;\n if (bindLen > 4 && checkAndUpdateElementValue(view, def, 4, v4)) changed = true;\n if (bindLen > 5 && checkAndUpdateElementValue(view, def, 5, v5)) changed = true;\n if (bindLen > 6 && checkAndUpdateElementValue(view, def, 6, v6)) changed = true;\n if (bindLen > 7 && checkAndUpdateElementValue(view, def, 7, v7)) changed = true;\n if (bindLen > 8 && checkAndUpdateElementValue(view, def, 8, v8)) changed = true;\n if (bindLen > 9 && checkAndUpdateElementValue(view, def, 9, v9)) changed = true;\n return changed;\n}\n\nexport function checkAndUpdateElementDynamic(view: ViewData, def: NodeDef, values: any[]): boolean {\n let changed = false;\n for (let i = 0; i < values.length; i++) {\n if (checkAndUpdateElementValue(view, def, i, values[i])) changed = true;\n }\n return changed;\n}\n\nfunction checkAndUpdateElementValue(view: ViewData, def: NodeDef, bindingIdx: number, value: any) {\n if (!checkAndUpdateBinding(view, def, bindingIdx, value)) {\n return false;\n }\n const binding = def.bindings[bindingIdx];\n const elData = asElementData(view, def.nodeIndex);\n const renderNode = elData.renderElement;\n const name = binding.name!;\n switch (binding.flags & BindingFlags.Types) {\n case BindingFlags.TypeElementAttribute:\n setElementAttribute(view, binding, renderNode, binding.ns, name, value);\n break;\n case BindingFlags.TypeElementClass:\n setElementClass(view, renderNode, name, value);\n break;\n case BindingFlags.TypeElementStyle:\n setElementStyle(view, binding, renderNode, name, value);\n break;\n case BindingFlags.TypeProperty:\n const bindView = (def.flags & NodeFlags.ComponentView &&\n binding.flags & BindingFlags.SyntheticHostProperty) ?\n elData.componentView :\n view;\n setElementProperty(bindView, binding, renderNode, name, value);\n break;\n }\n return true;\n}\n\nfunction setElementAttribute(\n view: ViewData, binding: BindingDef, renderNode: any, ns: string|null, name: string,\n value: any) {\n const securityContext = binding.securityContext;\n let renderValue = securityContext ? view.root.sanitizer.sanitize(securityContext, value) : value;\n renderValue = renderValue != null ? renderValue.toString() : null;\n const renderer = view.renderer;\n if (value != null) {\n renderer.setAttribute(renderNode, name, renderValue, ns);\n } else {\n renderer.removeAttribute(renderNode, name, ns);\n }\n}\n\nfunction setElementClass(view: ViewData, renderNode: any, name: string, value: boolean) {\n const renderer = view.renderer;\n if (value) {\n renderer.addClass(renderNode, name);\n } else {\n renderer.removeClass(renderNode, name);\n }\n}\n\nfunction setElementStyle(\n view: ViewData, binding: BindingDef, renderNode: any, name: string, value: any) {\n let renderValue: string|null =\n view.root.sanitizer.sanitize(SecurityContext.STYLE, value as {} | string);\n if (renderValue != null) {\n renderValue = renderValue.toString();\n const unit = binding.suffix;\n if (unit != null) {\n renderValue = renderValue + unit;\n }\n } else {\n renderValue = null;\n }\n const renderer = view.renderer;\n if (renderValue != null) {\n renderer.setStyle(renderNode, name, renderValue);\n } else {\n renderer.removeStyle(renderNode, name);\n }\n}\n\nfunction setElementProperty(\n view: ViewData, binding: BindingDef, renderNode: any, name: string, value: any) {\n const securityContext = binding.securityContext;\n let renderValue = securityContext ? view.root.sanitizer.sanitize(securityContext, value) : value;\n view.renderer.setProperty(renderNode, name, renderValue);\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, unwrapElementRef} from '../linker/element_ref';\nimport {QueryList} from '../linker/query_list';\n\nimport {asElementData, asProviderData, asQueryList, NodeDef, NodeFlags, QueryBindingDef, QueryBindingType, QueryDef, QueryValueType, ViewData} from './types';\nimport {declaredViewContainer, filterQueryId, isEmbeddedView} from './util';\n\nexport function queryDef(\n flags: NodeFlags, id: number, bindings: {[propName: string]: QueryBindingType}): NodeDef {\n let bindingDefs: QueryBindingDef[] = [];\n for (let propName in bindings) {\n const bindingType = bindings[propName];\n bindingDefs.push({propName, bindingType});\n }\n\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n // TODO(vicb): check\n checkIndex: -1,\n flags,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n ngContentIndex: -1,\n matchedQueries: {},\n matchedQueryIds: 0,\n references: {},\n childCount: 0,\n bindings: [],\n bindingFlags: 0,\n outputs: [],\n element: null,\n provider: null,\n text: null,\n query: {id, filterId: filterQueryId(id), bindings: bindingDefs},\n ngContent: null\n };\n}\n\nexport function createQuery(emitDistinctChangesOnly: boolean): QueryList<any> {\n return new QueryList(emitDistinctChangesOnly);\n}\n\nexport function dirtyParentQueries(view: ViewData) {\n const queryIds = view.def.nodeMatchedQueries;\n while (view.parent && isEmbeddedView(view)) {\n let tplDef = view.parentNodeDef!;\n view = view.parent;\n // content queries\n const end = tplDef.nodeIndex + tplDef.childCount;\n for (let i = 0; i <= end; i++) {\n const nodeDef = view.def.nodes[i];\n if ((nodeDef.flags & NodeFlags.TypeContentQuery) &&\n (nodeDef.flags & NodeFlags.DynamicQuery) &&\n (nodeDef.query!.filterId & queryIds) === nodeDef.query!.filterId) {\n asQueryList(view, i).setDirty();\n }\n if ((nodeDef.flags & NodeFlags.TypeElement && i + nodeDef.childCount < tplDef.nodeIndex) ||\n !(nodeDef.childFlags & NodeFlags.TypeContentQuery) ||\n !(nodeDef.childFlags & NodeFlags.DynamicQuery)) {\n // skip elements that don't contain the template element or no query.\n i += nodeDef.childCount;\n }\n }\n }\n\n // view queries\n if (view.def.nodeFlags & NodeFlags.TypeViewQuery) {\n for (let i = 0; i < view.def.nodes.length; i++) {\n const nodeDef = view.def.nodes[i];\n if ((nodeDef.flags & NodeFlags.TypeViewQuery) && (nodeDef.flags & NodeFlags.DynamicQuery)) {\n asQueryList(view, i).setDirty();\n }\n // only visit the root nodes\n i += nodeDef.childCount;\n }\n }\n}\n\nexport function checkAndUpdateQuery(view: ViewData, nodeDef: NodeDef) {\n const queryList = asQueryList(view, nodeDef.nodeIndex);\n if (!queryList.dirty) {\n return;\n }\n let directiveInstance: any;\n let newValues: any[] = undefined!;\n if (nodeDef.flags & NodeFlags.TypeContentQuery) {\n const elementDef = nodeDef.parent!.parent!;\n newValues = calcQueryValues(\n view, elementDef.nodeIndex, elementDef.nodeIndex + elementDef.childCount, nodeDef.query!,\n []);\n directiveInstance = asProviderData(view, nodeDef.parent!.nodeIndex).instance;\n } else if (nodeDef.flags & NodeFlags.TypeViewQuery) {\n newValues = calcQueryValues(view, 0, view.def.nodes.length - 1, nodeDef.query!, []);\n directiveInstance = view.component;\n }\n queryList.reset(newValues, unwrapElementRef);\n const bindings = nodeDef.query!.bindings;\n let notify = false;\n for (let i = 0; i < bindings.length; i++) {\n const binding = bindings[i];\n let boundValue: any;\n switch (binding.bindingType) {\n case QueryBindingType.First:\n boundValue = queryList.first;\n break;\n case QueryBindingType.All:\n boundValue = queryList;\n notify = true;\n break;\n }\n directiveInstance[binding.propName] = boundValue;\n }\n if (notify) {\n queryList.notifyOnChanges();\n }\n}\n\nfunction calcQueryValues(\n view: ViewData, startIndex: number, endIndex: number, queryDef: QueryDef,\n values: any[]): any[] {\n for (let i = startIndex; i <= endIndex; i++) {\n const nodeDef = view.def.nodes[i];\n const valueType = nodeDef.matchedQueries[queryDef.id];\n if (valueType != null) {\n values.push(getQueryValue(view, nodeDef, valueType));\n }\n if (nodeDef.flags & NodeFlags.TypeElement && nodeDef.element!.template &&\n (nodeDef.element!.template !.nodeMatchedQueries & queryDef.filterId) ===\n queryDef.filterId) {\n const elementData = asElementData(view, i);\n // check embedded views that were attached at the place of their template,\n // but process child nodes first if some match the query (see issue #16568)\n if ((nodeDef.childMatchedQueries & queryDef.filterId) === queryDef.filterId) {\n calcQueryValues(view, i + 1, i + nodeDef.childCount, queryDef, values);\n i += nodeDef.childCount;\n }\n if (nodeDef.flags & NodeFlags.EmbeddedViews) {\n const embeddedViews = elementData.viewContainer!._embeddedViews;\n for (let k = 0; k < embeddedViews.length; k++) {\n const embeddedView = embeddedViews[k];\n const dvc = declaredViewContainer(embeddedView);\n if (dvc && dvc === elementData) {\n calcQueryValues(embeddedView, 0, embeddedView.def.nodes.length - 1, queryDef, values);\n }\n }\n }\n const projectedViews = elementData.template._projectedViews;\n if (projectedViews) {\n for (let k = 0; k < projectedViews.length; k++) {\n const projectedView = projectedViews[k];\n calcQueryValues(projectedView, 0, projectedView.def.nodes.length - 1, queryDef, values);\n }\n }\n }\n if ((nodeDef.childMatchedQueries & queryDef.filterId) !== queryDef.filterId) {\n // if no child matches the query, skip the children.\n i += nodeDef.childCount;\n }\n }\n return values;\n}\n\nexport function getQueryValue(\n view: ViewData, nodeDef: NodeDef, queryValueType: QueryValueType): any {\n if (queryValueType != null) {\n // a match\n switch (queryValueType) {\n case QueryValueType.RenderElement:\n return asElementData(view, nodeDef.nodeIndex).renderElement;\n case QueryValueType.ElementRef:\n return new ElementRef(asElementData(view, nodeDef.nodeIndex).renderElement);\n case QueryValueType.TemplateRef:\n return asElementData(view, nodeDef.nodeIndex).template;\n case QueryValueType.ViewContainerRef:\n return asElementData(view, nodeDef.nodeIndex).viewContainer;\n case QueryValueType.Provider:\n return asProviderData(view, nodeDef.nodeIndex).instance;\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 {NodeDef, NodeFlags, ViewData} from './types';\nimport {getParentRenderElement, RenderNodeAction, visitProjectedRenderNodes} from './util';\n\nexport function ngContentDef(ngContentIndex: null|number, index: number): NodeDef {\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n checkIndex: -1,\n flags: NodeFlags.TypeNgContent,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n matchedQueries: {},\n matchedQueryIds: 0,\n references: {},\n ngContentIndex,\n childCount: 0,\n bindings: [],\n bindingFlags: 0,\n outputs: [],\n element: null,\n provider: null,\n text: null,\n query: null,\n ngContent: {index}\n };\n}\n\nexport function appendNgContent(view: ViewData, renderHost: any, def: NodeDef) {\n const parentEl = getParentRenderElement(view, renderHost, def);\n if (!parentEl) {\n // Nothing to do if there is no parent element.\n return;\n }\n const ngContentIndex = def.ngContent!.index;\n visitProjectedRenderNodes(\n view, ngContentIndex, RenderNodeAction.AppendChild, parentEl, null, undefined);\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 {newArray} from '../util/array_utils';\n\nimport {asPureExpressionData, BindingDef, BindingFlags, NodeDef, NodeFlags, PureExpressionData, ViewData} from './types';\nimport {calcBindingFlags, checkAndUpdateBinding} from './util';\n\nexport function purePipeDef(checkIndex: number, argCount: number): NodeDef {\n // argCount + 1 to include the pipe as first arg\n return _pureExpressionDef(NodeFlags.TypePurePipe, checkIndex, newArray(argCount + 1));\n}\n\nexport function pureArrayDef(checkIndex: number, argCount: number): NodeDef {\n return _pureExpressionDef(NodeFlags.TypePureArray, checkIndex, newArray(argCount));\n}\n\nexport function pureObjectDef(checkIndex: number, propToIndex: {[p: string]: number}): NodeDef {\n const keys = Object.keys(propToIndex);\n const nbKeys = keys.length;\n const propertyNames = [];\n for (let i = 0; i < nbKeys; i++) {\n const key = keys[i];\n const index = propToIndex[key];\n propertyNames.push(key);\n }\n\n return _pureExpressionDef(NodeFlags.TypePureObject, checkIndex, propertyNames);\n}\n\nfunction _pureExpressionDef(\n flags: NodeFlags, checkIndex: number, propertyNames: string[]): NodeDef {\n const bindings: BindingDef[] = [];\n for (let i = 0; i < propertyNames.length; i++) {\n const prop = propertyNames[i];\n bindings.push({\n flags: BindingFlags.TypeProperty,\n name: prop,\n ns: null,\n nonMinifiedName: prop,\n securityContext: null,\n suffix: null\n });\n }\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n checkIndex,\n flags,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n matchedQueries: {},\n matchedQueryIds: 0,\n references: {},\n ngContentIndex: -1,\n childCount: 0,\n bindings,\n bindingFlags: calcBindingFlags(bindings),\n outputs: [],\n element: null,\n provider: null,\n text: null,\n query: null,\n ngContent: null\n };\n}\n\nexport function createPureExpression(view: ViewData, def: NodeDef): PureExpressionData {\n return {value: undefined};\n}\n\nexport function checkAndUpdatePureExpressionInline(\n view: ViewData, def: NodeDef, v0: any, v1: any, v2: any, v3: any, v4: any, v5: any, v6: any,\n v7: any, v8: any, v9: any): boolean {\n const bindings = def.bindings;\n let changed = false;\n const bindLen = bindings.length;\n if (bindLen > 0 && checkAndUpdateBinding(view, def, 0, v0)) changed = true;\n if (bindLen > 1 && checkAndUpdateBinding(view, def, 1, v1)) changed = true;\n if (bindLen > 2 && checkAndUpdateBinding(view, def, 2, v2)) changed = true;\n if (bindLen > 3 && checkAndUpdateBinding(view, def, 3, v3)) changed = true;\n if (bindLen > 4 && checkAndUpdateBinding(view, def, 4, v4)) changed = true;\n if (bindLen > 5 && checkAndUpdateBinding(view, def, 5, v5)) changed = true;\n if (bindLen > 6 && checkAndUpdateBinding(view, def, 6, v6)) changed = true;\n if (bindLen > 7 && checkAndUpdateBinding(view, def, 7, v7)) changed = true;\n if (bindLen > 8 && checkAndUpdateBinding(view, def, 8, v8)) changed = true;\n if (bindLen > 9 && checkAndUpdateBinding(view, def, 9, v9)) changed = true;\n\n if (changed) {\n const data = asPureExpressionData(view, def.nodeIndex);\n let value: any;\n switch (def.flags & NodeFlags.Types) {\n case NodeFlags.TypePureArray:\n value = [];\n if (bindLen > 0) value.push(v0);\n if (bindLen > 1) value.push(v1);\n if (bindLen > 2) value.push(v2);\n if (bindLen > 3) value.push(v3);\n if (bindLen > 4) value.push(v4);\n if (bindLen > 5) value.push(v5);\n if (bindLen > 6) value.push(v6);\n if (bindLen > 7) value.push(v7);\n if (bindLen > 8) value.push(v8);\n if (bindLen > 9) value.push(v9);\n break;\n case NodeFlags.TypePureObject:\n value = {};\n if (bindLen > 0) value[bindings[0].name!] = v0;\n if (bindLen > 1) value[bindings[1].name!] = v1;\n if (bindLen > 2) value[bindings[2].name!] = v2;\n if (bindLen > 3) value[bindings[3].name!] = v3;\n if (bindLen > 4) value[bindings[4].name!] = v4;\n if (bindLen > 5) value[bindings[5].name!] = v5;\n if (bindLen > 6) value[bindings[6].name!] = v6;\n if (bindLen > 7) value[bindings[7].name!] = v7;\n if (bindLen > 8) value[bindings[8].name!] = v8;\n if (bindLen > 9) value[bindings[9].name!] = v9;\n break;\n case NodeFlags.TypePurePipe:\n const pipe = v0;\n switch (bindLen) {\n case 1:\n value = pipe.transform(v0);\n break;\n case 2:\n value = pipe.transform(v1);\n break;\n case 3:\n value = pipe.transform(v1, v2);\n break;\n case 4:\n value = pipe.transform(v1, v2, v3);\n break;\n case 5:\n value = pipe.transform(v1, v2, v3, v4);\n break;\n case 6:\n value = pipe.transform(v1, v2, v3, v4, v5);\n break;\n case 7:\n value = pipe.transform(v1, v2, v3, v4, v5, v6);\n break;\n case 8:\n value = pipe.transform(v1, v2, v3, v4, v5, v6, v7);\n break;\n case 9:\n value = pipe.transform(v1, v2, v3, v4, v5, v6, v7, v8);\n break;\n case 10:\n value = pipe.transform(v1, v2, v3, v4, v5, v6, v7, v8, v9);\n break;\n }\n break;\n }\n data.value = value;\n }\n return changed;\n}\n\nexport function checkAndUpdatePureExpressionDynamic(\n view: ViewData, def: NodeDef, values: any[]): boolean {\n const bindings = def.bindings;\n let changed = false;\n for (let i = 0; i < values.length; i++) {\n // Note: We need to loop over all values, so that\n // the old values are updates as well!\n if (checkAndUpdateBinding(view, def, i, values[i])) {\n changed = true;\n }\n }\n if (changed) {\n const data = asPureExpressionData(view, def.nodeIndex);\n let value: any;\n switch (def.flags & NodeFlags.Types) {\n case NodeFlags.TypePureArray:\n value = values;\n break;\n case NodeFlags.TypePureObject:\n value = {};\n for (let i = 0; i < values.length; i++) {\n value[bindings[i].name!] = values[i];\n }\n break;\n case NodeFlags.TypePurePipe:\n const pipe = values[0];\n const params = values.slice(1);\n value = (<any>pipe.transform)(...params);\n break;\n }\n data.value = value;\n }\n return changed;\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 {asTextData, BindingDef, BindingFlags, NodeDef, NodeFlags, TextData, ViewData} from './types';\nimport {checkAndUpdateBinding, getParentRenderElement} from './util';\n\nexport function textDef(\n checkIndex: number, ngContentIndex: number|null, staticText: string[]): NodeDef {\n const bindings: BindingDef[] = [];\n for (let i = 1; i < staticText.length; i++) {\n bindings[i - 1] = {\n flags: BindingFlags.TypeProperty,\n name: null,\n ns: null,\n nonMinifiedName: null,\n securityContext: null,\n suffix: staticText[i],\n };\n }\n\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n checkIndex,\n flags: NodeFlags.TypeText,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n matchedQueries: {},\n matchedQueryIds: 0,\n references: {},\n ngContentIndex,\n childCount: 0,\n bindings,\n bindingFlags: BindingFlags.TypeProperty,\n outputs: [],\n element: null,\n provider: null,\n text: {prefix: staticText[0]},\n query: null,\n ngContent: null,\n };\n}\n\nexport function createText(view: ViewData, renderHost: any, def: NodeDef): TextData {\n let renderNode: any;\n const renderer = view.renderer;\n renderNode = renderer.createText(def.text!.prefix);\n const parentEl = getParentRenderElement(view, renderHost, def);\n if (parentEl) {\n renderer.appendChild(parentEl, renderNode);\n }\n return {renderText: renderNode};\n}\n\nexport function checkAndUpdateTextInline(\n view: ViewData, def: NodeDef, v0: any, v1: any, v2: any, v3: any, v4: any, v5: any, v6: any,\n v7: any, v8: any, v9: any): boolean {\n let changed = false;\n const bindings = def.bindings;\n const bindLen = bindings.length;\n if (bindLen > 0 && checkAndUpdateBinding(view, def, 0, v0)) changed = true;\n if (bindLen > 1 && checkAndUpdateBinding(view, def, 1, v1)) changed = true;\n if (bindLen > 2 && checkAndUpdateBinding(view, def, 2, v2)) changed = true;\n if (bindLen > 3 && checkAndUpdateBinding(view, def, 3, v3)) changed = true;\n if (bindLen > 4 && checkAndUpdateBinding(view, def, 4, v4)) changed = true;\n if (bindLen > 5 && checkAndUpdateBinding(view, def, 5, v5)) changed = true;\n if (bindLen > 6 && checkAndUpdateBinding(view, def, 6, v6)) changed = true;\n if (bindLen > 7 && checkAndUpdateBinding(view, def, 7, v7)) changed = true;\n if (bindLen > 8 && checkAndUpdateBinding(view, def, 8, v8)) changed = true;\n if (bindLen > 9 && checkAndUpdateBinding(view, def, 9, v9)) changed = true;\n\n if (changed) {\n let value = def.text!.prefix;\n if (bindLen > 0) value += _addInterpolationPart(v0, bindings[0]);\n if (bindLen > 1) value += _addInterpolationPart(v1, bindings[1]);\n if (bindLen > 2) value += _addInterpolationPart(v2, bindings[2]);\n if (bindLen > 3) value += _addInterpolationPart(v3, bindings[3]);\n if (bindLen > 4) value += _addInterpolationPart(v4, bindings[4]);\n if (bindLen > 5) value += _addInterpolationPart(v5, bindings[5]);\n if (bindLen > 6) value += _addInterpolationPart(v6, bindings[6]);\n if (bindLen > 7) value += _addInterpolationPart(v7, bindings[7]);\n if (bindLen > 8) value += _addInterpolationPart(v8, bindings[8]);\n if (bindLen > 9) value += _addInterpolationPart(v9, bindings[9]);\n const renderNode = asTextData(view, def.nodeIndex).renderText;\n view.renderer.setValue(renderNode, value);\n }\n return changed;\n}\n\nexport function checkAndUpdateTextDynamic(view: ViewData, def: NodeDef, values: any[]): boolean {\n const bindings = def.bindings;\n let changed = false;\n for (let i = 0; i < values.length; i++) {\n // Note: We need to loop over all values, so that\n // the old values are updates as well!\n if (checkAndUpdateBinding(view, def, i, values[i])) {\n changed = true;\n }\n }\n if (changed) {\n let value = '';\n for (let i = 0; i < values.length; i++) {\n value = value + _addInterpolationPart(values[i], bindings[i]);\n }\n value = def.text!.prefix + value;\n const renderNode = asTextData(view, def.nodeIndex).renderText;\n view.renderer.setValue(renderNode, value);\n }\n return changed;\n}\n\nfunction _addInterpolationPart(value: any, binding: BindingDef): string {\n const valueStr = value != null ? value.toString() : '';\n return valueStr + binding.suffix;\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 {Renderer2} from '../render/api';\n\nimport {checkAndUpdateElementDynamic, checkAndUpdateElementInline, createElement, listenToElementOutputs} from './element';\nimport {expressionChangedAfterItHasBeenCheckedError} from './errors';\nimport {appendNgContent} from './ng_content';\nimport {callLifecycleHooksChildrenFirst, checkAndUpdateDirectiveDynamic, checkAndUpdateDirectiveInline, createDirectiveInstance, createPipeInstance, createProviderInstance} from './provider';\nimport {checkAndUpdatePureExpressionDynamic, checkAndUpdatePureExpressionInline, createPureExpression} from './pure_expression';\nimport {checkAndUpdateQuery, createQuery} from './query';\nimport {createTemplateData, createViewContainerData} from './refs';\nimport {checkAndUpdateTextDynamic, checkAndUpdateTextInline, createText} from './text';\nimport {ArgumentType, asElementData, asQueryList, asTextData, CheckType, ElementData, NodeData, NodeDef, NodeFlags, ProviderData, RootData, Services, shiftInitState, ViewData, ViewDefinition, ViewFlags, ViewHandleEventFn, ViewState, ViewUpdateFn} from './types';\nimport {checkBindingNoChanges, isComponentView, markParentViewsForCheckProjectedViews, NOOP, resolveDefinition, tokenKey} from './util';\nimport {detachProjectedView} from './view_attach';\n\nexport function viewDef(\n flags: ViewFlags, nodes: NodeDef[], updateDirectives?: null|ViewUpdateFn,\n updateRenderer?: null|ViewUpdateFn): ViewDefinition {\n // clone nodes and set auto calculated values\n let viewBindingCount = 0;\n let viewDisposableCount = 0;\n let viewNodeFlags = 0;\n let viewRootNodeFlags = 0;\n let viewMatchedQueries = 0;\n let currentParent: NodeDef|null = null;\n let currentRenderParent: NodeDef|null = null;\n let currentElementHasPublicProviders = false;\n let currentElementHasPrivateProviders = false;\n let lastRenderRootNode: NodeDef|null = null;\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n node.nodeIndex = i;\n node.parent = currentParent;\n node.bindingIndex = viewBindingCount;\n node.outputIndex = viewDisposableCount;\n node.renderParent = currentRenderParent;\n\n viewNodeFlags |= node.flags;\n viewMatchedQueries |= node.matchedQueryIds;\n\n if (node.element) {\n const elDef = node.element;\n elDef.publicProviders =\n currentParent ? currentParent.element!.publicProviders : Object.create(null);\n elDef.allProviders = elDef.publicProviders;\n // Note: We assume that all providers of an element are before any child element!\n currentElementHasPublicProviders = false;\n currentElementHasPrivateProviders = false;\n\n if (node.element.template) {\n viewMatchedQueries |= node.element.template.nodeMatchedQueries;\n }\n }\n validateNode(currentParent, node, nodes.length);\n\n\n viewBindingCount += node.bindings.length;\n viewDisposableCount += node.outputs.length;\n\n if (!currentRenderParent && (node.flags & NodeFlags.CatRenderNode)) {\n lastRenderRootNode = node;\n }\n\n if (node.flags & NodeFlags.CatProvider) {\n if (!currentElementHasPublicProviders) {\n currentElementHasPublicProviders = true;\n // Use prototypical inheritance to not get O(n^2) complexity...\n currentParent!.element!.publicProviders =\n Object.create(currentParent!.element!.publicProviders);\n currentParent!.element!.allProviders = currentParent!.element!.publicProviders;\n }\n const isPrivateService = (node.flags & NodeFlags.PrivateProvider) !== 0;\n const isComponent = (node.flags & NodeFlags.Component) !== 0;\n if (!isPrivateService || isComponent) {\n currentParent!.element!.publicProviders![tokenKey(node.provider!.token)] = node;\n } else {\n if (!currentElementHasPrivateProviders) {\n currentElementHasPrivateProviders = true;\n // Use prototypical inheritance to not get O(n^2) complexity...\n currentParent!.element!.allProviders =\n Object.create(currentParent!.element!.publicProviders);\n }\n currentParent!.element!.allProviders![tokenKey(node.provider!.token)] = node;\n }\n if (isComponent) {\n currentParent!.element!.componentProvider = node;\n }\n }\n\n if (currentParent) {\n currentParent.childFlags |= node.flags;\n currentParent.directChildFlags |= node.flags;\n currentParent.childMatchedQueries |= node.matchedQueryIds;\n if (node.element && node.element.template) {\n currentParent.childMatchedQueries |= node.element.template.nodeMatchedQueries;\n }\n } else {\n viewRootNodeFlags |= node.flags;\n }\n\n if (node.childCount > 0) {\n currentParent = node;\n\n if (!isNgContainer(node)) {\n currentRenderParent = node;\n }\n } else {\n // When the current node has no children, check if it is the last children of its parent.\n // When it is, propagate the flags up.\n // The loop is required because an element could be the last transitive children of several\n // elements. We loop to either the root or the highest opened element (= with remaining\n // children)\n while (currentParent && i === currentParent.nodeIndex + currentParent.childCount) {\n const newParent: NodeDef|null = currentParent.parent;\n if (newParent) {\n newParent.childFlags |= currentParent.childFlags;\n newParent.childMatchedQueries |= currentParent.childMatchedQueries;\n }\n currentParent = newParent;\n // We also need to update the render parent & account for ng-container\n if (currentParent && isNgContainer(currentParent)) {\n currentRenderParent = currentParent.renderParent;\n } else {\n currentRenderParent = currentParent;\n }\n }\n }\n }\n\n const handleEvent: ViewHandleEventFn = (view, nodeIndex, eventName, event) =>\n nodes[nodeIndex].element!.handleEvent!(view, eventName, event);\n\n return {\n // Will be filled later...\n factory: null,\n nodeFlags: viewNodeFlags,\n rootNodeFlags: viewRootNodeFlags,\n nodeMatchedQueries: viewMatchedQueries,\n flags,\n nodes: nodes,\n updateDirectives: updateDirectives || NOOP,\n updateRenderer: updateRenderer || NOOP,\n handleEvent,\n bindingCount: viewBindingCount,\n outputCount: viewDisposableCount,\n lastRenderRootNode\n };\n}\n\nfunction isNgContainer(node: NodeDef): boolean {\n return (node.flags & NodeFlags.TypeElement) !== 0 && node.element!.name === null;\n}\n\nfunction validateNode(parent: NodeDef|null, node: NodeDef, nodeCount: number) {\n const template = node.element && node.element.template;\n if (template) {\n if (!template.lastRenderRootNode) {\n throw new Error(`Illegal State: Embedded templates without nodes are not allowed!`);\n }\n if (template.lastRenderRootNode &&\n template.lastRenderRootNode.flags & NodeFlags.EmbeddedViews) {\n throw new Error(\n `Illegal State: Last root node of a template can't have embedded views, at index ${\n node.nodeIndex}!`);\n }\n }\n if (node.flags & NodeFlags.CatProvider) {\n const parentFlags = parent ? parent.flags : 0;\n if ((parentFlags & NodeFlags.TypeElement) === 0) {\n throw new Error(\n `Illegal State: StaticProvider/Directive nodes need to be children of elements or anchors, at index ${\n node.nodeIndex}!`);\n }\n }\n if (node.query) {\n if (node.flags & NodeFlags.TypeContentQuery &&\n (!parent || (parent.flags & NodeFlags.TypeDirective) === 0)) {\n throw new Error(\n `Illegal State: Content Query nodes need to be children of directives, at index ${\n node.nodeIndex}!`);\n }\n if (node.flags & NodeFlags.TypeViewQuery && parent) {\n throw new Error(`Illegal State: View Query nodes have to be top level nodes, at index ${\n node.nodeIndex}!`);\n }\n }\n if (node.childCount) {\n const parentEnd = parent ? parent.nodeIndex + parent.childCount : nodeCount - 1;\n if (node.nodeIndex <= parentEnd && node.nodeIndex + node.childCount > parentEnd) {\n throw new Error(\n `Illegal State: childCount of node leads outside of parent, at index ${node.nodeIndex}!`);\n }\n }\n}\n\nexport function createEmbeddedView(\n parent: ViewData, anchorDef: NodeDef, viewDef: ViewDefinition, context?: any): ViewData {\n // embedded views are seen as siblings to the anchor, so we need\n // to get the parent of the anchor and use it as parentIndex.\n const view = createView(parent.root, parent.renderer, parent, anchorDef, viewDef);\n initView(view, parent.component, context);\n createViewNodes(view);\n return view;\n}\n\nexport function createRootView(root: RootData, def: ViewDefinition, context?: any): ViewData {\n const view = createView(root, root.renderer, null, null, def);\n initView(view, context, context);\n createViewNodes(view);\n return view;\n}\n\nexport function createComponentView(\n parentView: ViewData, nodeDef: NodeDef, viewDef: ViewDefinition, hostElement: any): ViewData {\n const rendererType = nodeDef.element!.componentRendererType;\n let compRenderer: Renderer2;\n if (!rendererType) {\n compRenderer = parentView.root.renderer;\n } else {\n compRenderer = parentView.root.rendererFactory.createRenderer(hostElement, rendererType);\n }\n return createView(\n parentView.root, compRenderer, parentView, nodeDef.element!.componentProvider, viewDef);\n}\n\nfunction createView(\n root: RootData, renderer: Renderer2, parent: ViewData|null, parentNodeDef: NodeDef|null,\n def: ViewDefinition): ViewData {\n const nodes: NodeData[] = new Array(def.nodes.length);\n const disposables = def.outputCount ? new Array(def.outputCount) : null;\n const view: ViewData = {\n def,\n parent,\n viewContainerParent: null,\n parentNodeDef,\n context: null,\n component: null,\n nodes,\n state: ViewState.CatInit,\n root,\n renderer,\n oldValues: new Array(def.bindingCount),\n disposables,\n initIndex: -1\n };\n return view;\n}\n\nfunction initView(view: ViewData, component: any, context: any) {\n view.component = component;\n view.context = context;\n}\n\nfunction createViewNodes(view: ViewData) {\n let renderHost: any;\n if (isComponentView(view)) {\n const hostDef = view.parentNodeDef;\n renderHost = asElementData(view.parent!, hostDef!.parent!.nodeIndex).renderElement;\n }\n const def = view.def;\n const nodes = view.nodes;\n for (let i = 0; i < def.nodes.length; i++) {\n const nodeDef = def.nodes[i];\n Services.setCurrentNode(view, i);\n let nodeData: any;\n switch (nodeDef.flags & NodeFlags.Types) {\n case NodeFlags.TypeElement:\n const el = createElement(view, renderHost, nodeDef) as any;\n let componentView: ViewData = undefined!;\n if (nodeDef.flags & NodeFlags.ComponentView) {\n const compViewDef = resolveDefinition(nodeDef.element!.componentView!);\n componentView = Services.createComponentView(view, nodeDef, compViewDef, el);\n }\n listenToElementOutputs(view, componentView, nodeDef, el);\n nodeData = <ElementData>{\n renderElement: el,\n componentView,\n viewContainer: null,\n template: nodeDef.element!.template ? createTemplateData(view, nodeDef) : undefined\n };\n if (nodeDef.flags & NodeFlags.EmbeddedViews) {\n nodeData.viewContainer = createViewContainerData(view, nodeDef, nodeData);\n }\n break;\n case NodeFlags.TypeText:\n nodeData = createText(view, renderHost, nodeDef) as any;\n break;\n case NodeFlags.TypeClassProvider:\n case NodeFlags.TypeFactoryProvider:\n case NodeFlags.TypeUseExistingProvider:\n case NodeFlags.TypeValueProvider: {\n nodeData = nodes[i];\n if (!nodeData && !(nodeDef.flags & NodeFlags.LazyProvider)) {\n const instance = createProviderInstance(view, nodeDef);\n nodeData = <ProviderData>{instance};\n }\n break;\n }\n case NodeFlags.TypePipe: {\n const instance = createPipeInstance(view, nodeDef);\n nodeData = <ProviderData>{instance};\n break;\n }\n case NodeFlags.TypeDirective: {\n nodeData = nodes[i];\n if (!nodeData) {\n const instance = createDirectiveInstance(view, nodeDef);\n nodeData = <ProviderData>{instance};\n }\n if (nodeDef.flags & NodeFlags.Component) {\n const compView = asElementData(view, nodeDef.parent!.nodeIndex).componentView;\n initView(compView, nodeData.instance, nodeData.instance);\n }\n break;\n }\n case NodeFlags.TypePureArray:\n case NodeFlags.TypePureObject:\n case NodeFlags.TypePurePipe:\n nodeData = createPureExpression(view, nodeDef) as any;\n break;\n case NodeFlags.TypeContentQuery:\n case NodeFlags.TypeViewQuery:\n nodeData = createQuery(\n (nodeDef.flags & NodeFlags.EmitDistinctChangesOnly) ===\n NodeFlags.EmitDistinctChangesOnly) as any;\n break;\n case NodeFlags.TypeNgContent:\n appendNgContent(view, renderHost, nodeDef);\n // no runtime data needed for NgContent...\n nodeData = undefined;\n break;\n }\n nodes[i] = nodeData;\n }\n // Create the ViewData.nodes of component views after we created everything else,\n // so that e.g. ng-content works\n execComponentViewsAction(view, ViewAction.CreateViewNodes);\n\n // fill static content and view queries\n execQueriesAction(\n view, NodeFlags.TypeContentQuery | NodeFlags.TypeViewQuery, NodeFlags.StaticQuery,\n CheckType.CheckAndUpdate);\n}\n\nexport function checkNoChangesView(view: ViewData) {\n markProjectedViewsForCheck(view);\n Services.updateDirectives(view, CheckType.CheckNoChanges);\n execEmbeddedViewsAction(view, ViewAction.CheckNoChanges);\n Services.updateRenderer(view, CheckType.CheckNoChanges);\n execComponentViewsAction(view, ViewAction.CheckNoChanges);\n // Note: We don't check queries for changes as we didn't do this in v2.x.\n // TODO(tbosch): investigate if we can enable the check again in v5.x with a nicer error message.\n view.state &= ~(ViewState.CheckProjectedViews | ViewState.CheckProjectedView);\n}\n\nexport function checkAndUpdateView(view: ViewData) {\n if (view.state & ViewState.BeforeFirstCheck) {\n view.state &= ~ViewState.BeforeFirstCheck;\n view.state |= ViewState.FirstCheck;\n } else {\n view.state &= ~ViewState.FirstCheck;\n }\n shiftInitState(view, ViewState.InitState_BeforeInit, ViewState.InitState_CallingOnInit);\n markProjectedViewsForCheck(view);\n Services.updateDirectives(view, CheckType.CheckAndUpdate);\n execEmbeddedViewsAction(view, ViewAction.CheckAndUpdate);\n execQueriesAction(\n view, NodeFlags.TypeContentQuery, NodeFlags.DynamicQuery, CheckType.CheckAndUpdate);\n let callInit = shiftInitState(\n view, ViewState.InitState_CallingOnInit, ViewState.InitState_CallingAfterContentInit);\n callLifecycleHooksChildrenFirst(\n view, NodeFlags.AfterContentChecked | (callInit ? NodeFlags.AfterContentInit : 0));\n\n Services.updateRenderer(view, CheckType.CheckAndUpdate);\n\n execComponentViewsAction(view, ViewAction.CheckAndUpdate);\n execQueriesAction(\n view, NodeFlags.TypeViewQuery, NodeFlags.DynamicQuery, CheckType.CheckAndUpdate);\n callInit = shiftInitState(\n view, ViewState.InitState_CallingAfterContentInit, ViewState.InitState_CallingAfterViewInit);\n callLifecycleHooksChildrenFirst(\n view, NodeFlags.AfterViewChecked | (callInit ? NodeFlags.AfterViewInit : 0));\n\n if (view.def.flags & ViewFlags.OnPush) {\n view.state &= ~ViewState.ChecksEnabled;\n }\n view.state &= ~(ViewState.CheckProjectedViews | ViewState.CheckProjectedView);\n shiftInitState(view, ViewState.InitState_CallingAfterViewInit, ViewState.InitState_AfterInit);\n}\n\nexport function checkAndUpdateNode(\n view: ViewData, nodeDef: NodeDef, argStyle: ArgumentType, v0?: any, v1?: any, v2?: any,\n v3?: any, v4?: any, v5?: any, v6?: any, v7?: any, v8?: any, v9?: any): boolean {\n if (argStyle === ArgumentType.Inline) {\n return checkAndUpdateNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n } else {\n return checkAndUpdateNodeDynamic(view, nodeDef, v0);\n }\n}\n\nfunction markProjectedViewsForCheck(view: ViewData) {\n const def = view.def;\n if (!(def.nodeFlags & NodeFlags.ProjectedTemplate)) {\n return;\n }\n for (let i = 0; i < def.nodes.length; i++) {\n const nodeDef = def.nodes[i];\n if (nodeDef.flags & NodeFlags.ProjectedTemplate) {\n const projectedViews = asElementData(view, i).template._projectedViews;\n if (projectedViews) {\n for (let i = 0; i < projectedViews.length; i++) {\n const projectedView = projectedViews[i];\n projectedView.state |= ViewState.CheckProjectedView;\n markParentViewsForCheckProjectedViews(projectedView, view);\n }\n }\n } else if ((nodeDef.childFlags & NodeFlags.ProjectedTemplate) === 0) {\n // a parent with leafs\n // no child is a component,\n // then skip the children\n i += nodeDef.childCount;\n }\n }\n}\n\nfunction checkAndUpdateNodeInline(\n view: ViewData, nodeDef: NodeDef, v0?: any, v1?: any, v2?: any, v3?: any, v4?: any, v5?: any,\n v6?: any, v7?: any, v8?: any, v9?: any): boolean {\n switch (nodeDef.flags & NodeFlags.Types) {\n case NodeFlags.TypeElement:\n return checkAndUpdateElementInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n case NodeFlags.TypeText:\n return checkAndUpdateTextInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n case NodeFlags.TypeDirective:\n return checkAndUpdateDirectiveInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n case NodeFlags.TypePureArray:\n case NodeFlags.TypePureObject:\n case NodeFlags.TypePurePipe:\n return checkAndUpdatePureExpressionInline(\n view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n default:\n throw 'unreachable';\n }\n}\n\nfunction checkAndUpdateNodeDynamic(view: ViewData, nodeDef: NodeDef, values: any[]): boolean {\n switch (nodeDef.flags & NodeFlags.Types) {\n case NodeFlags.TypeElement:\n return checkAndUpdateElementDynamic(view, nodeDef, values);\n case NodeFlags.TypeText:\n return checkAndUpdateTextDynamic(view, nodeDef, values);\n case NodeFlags.TypeDirective:\n return checkAndUpdateDirectiveDynamic(view, nodeDef, values);\n case NodeFlags.TypePureArray:\n case NodeFlags.TypePureObject:\n case NodeFlags.TypePurePipe:\n return checkAndUpdatePureExpressionDynamic(view, nodeDef, values);\n default:\n throw 'unreachable';\n }\n}\n\nexport function checkNoChangesNode(\n view: ViewData, nodeDef: NodeDef, argStyle: ArgumentType, v0?: any, v1?: any, v2?: any,\n v3?: any, v4?: any, v5?: any, v6?: any, v7?: any, v8?: any, v9?: any): any {\n if (argStyle === ArgumentType.Inline) {\n checkNoChangesNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n } else {\n checkNoChangesNodeDynamic(view, nodeDef, v0);\n }\n // Returning false is ok here as we would have thrown in case of a change.\n return false;\n}\n\nfunction checkNoChangesNodeInline(\n view: ViewData, nodeDef: NodeDef, v0: any, v1: any, v2: any, v3: any, v4: any, v5: any, v6: any,\n v7: any, v8: any, v9: any): void {\n const bindLen = nodeDef.bindings.length;\n if (bindLen > 0) checkBindingNoChanges(view, nodeDef, 0, v0);\n if (bindLen > 1) checkBindingNoChanges(view, nodeDef, 1, v1);\n if (bindLen > 2) checkBindingNoChanges(view, nodeDef, 2, v2);\n if (bindLen > 3) checkBindingNoChanges(view, nodeDef, 3, v3);\n if (bindLen > 4) checkBindingNoChanges(view, nodeDef, 4, v4);\n if (bindLen > 5) checkBindingNoChanges(view, nodeDef, 5, v5);\n if (bindLen > 6) checkBindingNoChanges(view, nodeDef, 6, v6);\n if (bindLen > 7) checkBindingNoChanges(view, nodeDef, 7, v7);\n if (bindLen > 8) checkBindingNoChanges(view, nodeDef, 8, v8);\n if (bindLen > 9) checkBindingNoChanges(view, nodeDef, 9, v9);\n}\n\nfunction checkNoChangesNodeDynamic(view: ViewData, nodeDef: NodeDef, values: any[]): void {\n for (let i = 0; i < values.length; i++) {\n checkBindingNoChanges(view, nodeDef, i, values[i]);\n }\n}\n\n/**\n * Workaround https://github.com/angular/tsickle/issues/497\n * @suppress {misplacedTypeAnnotation}\n */\nfunction checkNoChangesQuery(view: ViewData, nodeDef: NodeDef) {\n const queryList = asQueryList(view, nodeDef.nodeIndex);\n if (queryList.dirty) {\n throw expressionChangedAfterItHasBeenCheckedError(\n Services.createDebugContext(view, nodeDef.nodeIndex),\n `Query ${nodeDef.query!.id} not dirty`, `Query ${nodeDef.query!.id} dirty`,\n (view.state & ViewState.BeforeFirstCheck) !== 0);\n }\n}\n\nexport function destroyView(view: ViewData) {\n if (view.state & ViewState.Destroyed) {\n return;\n }\n execEmbeddedViewsAction(view, ViewAction.Destroy);\n execComponentViewsAction(view, ViewAction.Destroy);\n callLifecycleHooksChildrenFirst(view, NodeFlags.OnDestroy);\n if (view.disposables) {\n for (let i = 0; i < view.disposables.length; i++) {\n view.disposables[i]();\n }\n }\n detachProjectedView(view);\n if (view.renderer.destroyNode) {\n destroyViewNodes(view);\n }\n if (isComponentView(view)) {\n view.renderer.destroy();\n }\n view.state |= ViewState.Destroyed;\n}\n\nfunction destroyViewNodes(view: ViewData) {\n const len = view.def.nodes.length;\n for (let i = 0; i < len; i++) {\n const def = view.def.nodes[i];\n if (def.flags & NodeFlags.TypeElement) {\n view.renderer.destroyNode!(asElementData(view, i).renderElement);\n } else if (def.flags & NodeFlags.TypeText) {\n view.renderer.destroyNode!(asTextData(view, i).renderText);\n } else if (def.flags & NodeFlags.TypeContentQuery || def.flags & NodeFlags.TypeViewQuery) {\n asQueryList(view, i).destroy();\n }\n }\n}\n\nenum ViewAction {\n CreateViewNodes,\n CheckNoChanges,\n CheckNoChangesProjectedViews,\n CheckAndUpdate,\n CheckAndUpdateProjectedViews,\n Destroy\n}\n\nfunction execComponentViewsAction(view: ViewData, action: ViewAction) {\n const def = view.def;\n if (!(def.nodeFlags & NodeFlags.ComponentView)) {\n return;\n }\n for (let i = 0; i < def.nodes.length; i++) {\n const nodeDef = def.nodes[i];\n if (nodeDef.flags & NodeFlags.ComponentView) {\n // a leaf\n callViewAction(asElementData(view, i).componentView, action);\n } else if ((nodeDef.childFlags & NodeFlags.ComponentView) === 0) {\n // a parent with leafs\n // no child is a component,\n // then skip the children\n i += nodeDef.childCount;\n }\n }\n}\n\nfunction execEmbeddedViewsAction(view: ViewData, action: ViewAction) {\n const def = view.def;\n if (!(def.nodeFlags & NodeFlags.EmbeddedViews)) {\n return;\n }\n for (let i = 0; i < def.nodes.length; i++) {\n const nodeDef = def.nodes[i];\n if (nodeDef.flags & NodeFlags.EmbeddedViews) {\n // a leaf\n const embeddedViews = asElementData(view, i).viewContainer!._embeddedViews;\n for (let k = 0; k < embeddedViews.length; k++) {\n callViewAction(embeddedViews[k], action);\n }\n } else if ((nodeDef.childFlags & NodeFlags.EmbeddedViews) === 0) {\n // a parent with leafs\n // no child is a component,\n // then skip the children\n i += nodeDef.childCount;\n }\n }\n}\n\nfunction callViewAction(view: ViewData, action: ViewAction) {\n const viewState = view.state;\n switch (action) {\n case ViewAction.CheckNoChanges:\n if ((viewState & ViewState.Destroyed) === 0) {\n if ((viewState & ViewState.CatDetectChanges) === ViewState.CatDetectChanges) {\n checkNoChangesView(view);\n } else if (viewState & ViewState.CheckProjectedViews) {\n execProjectedViewsAction(view, ViewAction.CheckNoChangesProjectedViews);\n }\n }\n break;\n case ViewAction.CheckNoChangesProjectedViews:\n if ((viewState & ViewState.Destroyed) === 0) {\n if (viewState & ViewState.CheckProjectedView) {\n checkNoChangesView(view);\n } else if (viewState & ViewState.CheckProjectedViews) {\n execProjectedViewsAction(view, action);\n }\n }\n break;\n case ViewAction.CheckAndUpdate:\n if ((viewState & ViewState.Destroyed) === 0) {\n if ((viewState & ViewState.CatDetectChanges) === ViewState.CatDetectChanges) {\n checkAndUpdateView(view);\n } else if (viewState & ViewState.CheckProjectedViews) {\n execProjectedViewsAction(view, ViewAction.CheckAndUpdateProjectedViews);\n }\n }\n break;\n case ViewAction.CheckAndUpdateProjectedViews:\n if ((viewState & ViewState.Destroyed) === 0) {\n if (viewState & ViewState.CheckProjectedView) {\n checkAndUpdateView(view);\n } else if (viewState & ViewState.CheckProjectedViews) {\n execProjectedViewsAction(view, action);\n }\n }\n break;\n case ViewAction.Destroy:\n // Note: destroyView recurses over all views,\n // so we don't need to special case projected views here.\n destroyView(view);\n break;\n case ViewAction.CreateViewNodes:\n createViewNodes(view);\n break;\n }\n}\n\nfunction execProjectedViewsAction(view: ViewData, action: ViewAction) {\n execEmbeddedViewsAction(view, action);\n execComponentViewsAction(view, action);\n}\n\nfunction execQueriesAction(\n view: ViewData, queryFlags: NodeFlags, staticDynamicQueryFlag: NodeFlags,\n checkType: CheckType) {\n if (!(view.def.nodeFlags & queryFlags) || !(view.def.nodeFlags & staticDynamicQueryFlag)) {\n return;\n }\n const nodeCount = view.def.nodes.length;\n for (let i = 0; i < nodeCount; i++) {\n const nodeDef = view.def.nodes[i];\n if ((nodeDef.flags & queryFlags) && (nodeDef.flags & staticDynamicQueryFlag)) {\n Services.setCurrentNode(view, nodeDef.nodeIndex);\n switch (checkType) {\n case CheckType.CheckAndUpdate:\n checkAndUpdateQuery(view, nodeDef);\n break;\n case CheckType.CheckNoChanges:\n checkNoChangesQuery(view, nodeDef);\n break;\n }\n }\n if (!(nodeDef.childFlags & queryFlags) || !(nodeDef.childFlags & staticDynamicQueryFlag)) {\n // no child has a matching query\n // then skip the children\n i += nodeDef.childCount;\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 {DebugElement__PRE_R3__, DebugEventListener, DebugNode__PRE_R3__, getDebugNode, indexDebugNode, removeDebugNodeFromIndex} from '../debug/debug_node';\nimport {Injector, resolveForwardRef} from '../di';\nimport {getInjectableDef, InjectableType, ɵɵInjectableDeclaration} from '../di/interface/defs';\nimport {ErrorHandler} from '../error_handler';\nimport {Type} from '../interface/type';\nimport {ComponentFactory} from '../linker/component_factory';\nimport {NgModuleRef} from '../linker/ng_module_factory';\nimport {Renderer2, RendererFactory2} from '../render/api';\nimport {RendererStyleFlags2, RendererType2} from '../render/api_flags';\nimport {Sanitizer} from '../sanitization/sanitizer';\nimport {escapeCommentText} from '../util/dom';\nimport {isDevMode} from '../util/is_dev_mode';\nimport {normalizeDebugBindingName, normalizeDebugBindingValue} from '../util/ng_reflect';\n\nimport {isViewDebugError, viewDestroyedError, viewWrappedDebugError} from './errors';\nimport {resolveDep} from './provider';\nimport {dirtyParentQueries, getQueryValue} from './query';\nimport {createInjector, createNgModuleRef, getComponentViewDefinitionFactory} from './refs';\nimport {ArgumentType, asElementData, asPureExpressionData, BindingFlags, CheckType, DebugContext, ElementData, NgModuleDefinition, NodeDef, NodeFlags, NodeLogger, ProviderOverride, RootData, Services, ViewData, ViewDefinition, ViewState} from './types';\nimport {isComponentView, NOOP, renderNode, resolveDefinition, splitDepsDsl, tokenKey, viewParentEl} from './util';\nimport {checkAndUpdateNode, checkAndUpdateView, checkNoChangesNode, checkNoChangesView, createComponentView, createEmbeddedView, createRootView, destroyView} from './view';\n\n\nlet initialized = false;\n\nexport function initServicesIfNeeded() {\n if (initialized) {\n return;\n }\n initialized = true;\n const services = isDevMode() ? createDebugServices() : createProdServices();\n Services.setCurrentNode = services.setCurrentNode;\n Services.createRootView = services.createRootView;\n Services.createEmbeddedView = services.createEmbeddedView;\n Services.createComponentView = services.createComponentView;\n Services.createNgModuleRef = services.createNgModuleRef;\n Services.overrideProvider = services.overrideProvider;\n Services.overrideComponentView = services.overrideComponentView;\n Services.clearOverrides = services.clearOverrides;\n Services.checkAndUpdateView = services.checkAndUpdateView;\n Services.checkNoChangesView = services.checkNoChangesView;\n Services.destroyView = services.destroyView;\n Services.resolveDep = resolveDep;\n Services.createDebugContext = services.createDebugContext;\n Services.handleEvent = services.handleEvent;\n Services.updateDirectives = services.updateDirectives;\n Services.updateRenderer = services.updateRenderer;\n Services.dirtyParentQueries = dirtyParentQueries;\n}\n\nfunction createProdServices() {\n return {\n setCurrentNode: () => {},\n createRootView: createProdRootView,\n createEmbeddedView: createEmbeddedView,\n createComponentView: createComponentView,\n createNgModuleRef: createNgModuleRef,\n overrideProvider: NOOP,\n overrideComponentView: NOOP,\n clearOverrides: NOOP,\n checkAndUpdateView: checkAndUpdateView,\n checkNoChangesView: checkNoChangesView,\n destroyView: destroyView,\n createDebugContext: (view: ViewData, nodeIndex: number) => new DebugContext_(view, nodeIndex),\n handleEvent: (view: ViewData, nodeIndex: number, eventName: string, event: any) =>\n view.def.handleEvent(view, nodeIndex, eventName, event),\n updateDirectives: (view: ViewData, checkType: CheckType) => view.def.updateDirectives(\n checkType === CheckType.CheckAndUpdate ? prodCheckAndUpdateNode : prodCheckNoChangesNode,\n view),\n updateRenderer: (view: ViewData, checkType: CheckType) => view.def.updateRenderer(\n checkType === CheckType.CheckAndUpdate ? prodCheckAndUpdateNode : prodCheckNoChangesNode,\n view),\n };\n}\n\nfunction createDebugServices() {\n return {\n setCurrentNode: debugSetCurrentNode,\n createRootView: debugCreateRootView,\n createEmbeddedView: debugCreateEmbeddedView,\n createComponentView: debugCreateComponentView,\n createNgModuleRef: debugCreateNgModuleRef,\n overrideProvider: debugOverrideProvider,\n overrideComponentView: debugOverrideComponentView,\n clearOverrides: debugClearOverrides,\n checkAndUpdateView: debugCheckAndUpdateView,\n checkNoChangesView: debugCheckNoChangesView,\n destroyView: debugDestroyView,\n createDebugContext: (view: ViewData, nodeIndex: number) => new DebugContext_(view, nodeIndex),\n handleEvent: debugHandleEvent,\n updateDirectives: debugUpdateDirectives,\n updateRenderer: debugUpdateRenderer,\n };\n}\n\nfunction createProdRootView(\n elInjector: Injector, projectableNodes: any[][], rootSelectorOrNode: string|any,\n def: ViewDefinition, ngModule: NgModuleRef<any>, context?: any): ViewData {\n const rendererFactory: RendererFactory2 = ngModule.injector.get(RendererFactory2);\n return createRootView(\n createRootData(elInjector, ngModule, rendererFactory, projectableNodes, rootSelectorOrNode),\n def, context);\n}\n\nfunction debugCreateRootView(\n elInjector: Injector, projectableNodes: any[][], rootSelectorOrNode: string|any,\n def: ViewDefinition, ngModule: NgModuleRef<any>, context?: any): ViewData {\n const rendererFactory: RendererFactory2 = ngModule.injector.get(RendererFactory2);\n const root = createRootData(\n elInjector, ngModule, new DebugRendererFactory2(rendererFactory), projectableNodes,\n rootSelectorOrNode);\n const defWithOverride = applyProviderOverridesToView(def);\n return callWithDebugContext(\n DebugAction.create, createRootView, null, [root, defWithOverride, context]);\n}\n\nfunction createRootData(\n elInjector: Injector, ngModule: NgModuleRef<any>, rendererFactory: RendererFactory2,\n projectableNodes: any[][], rootSelectorOrNode: any): RootData {\n const sanitizer = ngModule.injector.get(Sanitizer);\n const errorHandler = ngModule.injector.get(ErrorHandler);\n const renderer = rendererFactory.createRenderer(null, null);\n return {\n ngModule,\n injector: elInjector,\n projectableNodes,\n selectorOrNode: rootSelectorOrNode,\n sanitizer,\n rendererFactory,\n renderer,\n errorHandler\n };\n}\n\nfunction debugCreateEmbeddedView(\n parentView: ViewData, anchorDef: NodeDef, viewDef: ViewDefinition, context?: any): ViewData {\n const defWithOverride = applyProviderOverridesToView(viewDef);\n return callWithDebugContext(\n DebugAction.create, createEmbeddedView, null,\n [parentView, anchorDef, defWithOverride, context]);\n}\n\nfunction debugCreateComponentView(\n parentView: ViewData, nodeDef: NodeDef, viewDef: ViewDefinition, hostElement: any): ViewData {\n const overrideComponentView =\n viewDefOverrides.get(nodeDef.element!.componentProvider!.provider!.token);\n if (overrideComponentView) {\n viewDef = overrideComponentView;\n } else {\n viewDef = applyProviderOverridesToView(viewDef);\n }\n return callWithDebugContext(\n DebugAction.create, createComponentView, null, [parentView, nodeDef, viewDef, hostElement]);\n}\n\nfunction debugCreateNgModuleRef(\n moduleType: Type<any>, parentInjector: Injector, bootstrapComponents: Type<any>[],\n def: NgModuleDefinition): NgModuleRef<any> {\n const defWithOverride = applyProviderOverridesToNgModule(def);\n return createNgModuleRef(moduleType, parentInjector, bootstrapComponents, defWithOverride);\n}\n\nconst providerOverrides = new Map<any, ProviderOverride>();\nconst providerOverridesWithScope = new Map<InjectableType<any>, ProviderOverride>();\nconst viewDefOverrides = new Map<any, ViewDefinition>();\n\nfunction debugOverrideProvider(override: ProviderOverride) {\n providerOverrides.set(override.token, override);\n let injectableDef: ɵɵInjectableDeclaration<any>|null;\n if (typeof override.token === 'function' && (injectableDef = getInjectableDef(override.token)) &&\n typeof injectableDef.providedIn === 'function') {\n providerOverridesWithScope.set(override.token as InjectableType<any>, override);\n }\n}\n\nfunction debugOverrideComponentView(comp: any, compFactory: ComponentFactory<any>) {\n const hostViewDef = resolveDefinition(getComponentViewDefinitionFactory(compFactory));\n const compViewDef = resolveDefinition(hostViewDef.nodes[0].element!.componentView!);\n viewDefOverrides.set(comp, compViewDef);\n}\n\nfunction debugClearOverrides() {\n providerOverrides.clear();\n providerOverridesWithScope.clear();\n viewDefOverrides.clear();\n}\n\n// Notes about the algorithm:\n// 1) Locate the providers of an element and check if one of them was overwritten\n// 2) Change the providers of that element\n//\n// We only create new data structures if we need to, to keep perf impact\n// reasonable.\nfunction applyProviderOverridesToView(def: ViewDefinition): ViewDefinition {\n if (providerOverrides.size === 0) {\n return def;\n }\n const elementIndicesWithOverwrittenProviders = findElementIndicesWithOverwrittenProviders(def);\n if (elementIndicesWithOverwrittenProviders.length === 0) {\n return def;\n }\n // clone the whole view definition,\n // as it maintains references between the nodes that are hard to update.\n def = def.factory!(() => NOOP);\n for (let i = 0; i < elementIndicesWithOverwrittenProviders.length; i++) {\n applyProviderOverridesToElement(def, elementIndicesWithOverwrittenProviders[i]);\n }\n return def;\n\n function findElementIndicesWithOverwrittenProviders(def: ViewDefinition): number[] {\n const elIndicesWithOverwrittenProviders: number[] = [];\n let lastElementDef: NodeDef|null = null;\n for (let i = 0; i < def.nodes.length; i++) {\n const nodeDef = def.nodes[i];\n if (nodeDef.flags & NodeFlags.TypeElement) {\n lastElementDef = nodeDef;\n }\n if (lastElementDef && nodeDef.flags & NodeFlags.CatProviderNoDirective &&\n providerOverrides.has(nodeDef.provider!.token)) {\n elIndicesWithOverwrittenProviders.push(lastElementDef!.nodeIndex);\n lastElementDef = null;\n }\n }\n return elIndicesWithOverwrittenProviders;\n }\n\n function applyProviderOverridesToElement(viewDef: ViewDefinition, elIndex: number) {\n for (let i = elIndex + 1; i < viewDef.nodes.length; i++) {\n const nodeDef = viewDef.nodes[i];\n if (nodeDef.flags & NodeFlags.TypeElement) {\n // stop at the next element\n return;\n }\n if (nodeDef.flags & NodeFlags.CatProviderNoDirective) {\n const provider = nodeDef.provider!;\n const override = providerOverrides.get(provider.token);\n if (override) {\n nodeDef.flags = (nodeDef.flags & ~NodeFlags.CatProviderNoDirective) | override.flags;\n provider.deps = splitDepsDsl(override.deps);\n provider.value = override.value;\n }\n }\n }\n }\n}\n\n// Notes about the algorithm:\n// We only create new data structures if we need to, to keep perf impact\n// reasonable.\nfunction applyProviderOverridesToNgModule(def: NgModuleDefinition): NgModuleDefinition {\n const {hasOverrides, hasDeprecatedOverrides} = calcHasOverrides(def);\n if (!hasOverrides) {\n return def;\n }\n // clone the whole view definition,\n // as it maintains references between the nodes that are hard to update.\n def = def.factory!(() => NOOP);\n applyProviderOverrides(def);\n return def;\n\n function calcHasOverrides(def: NgModuleDefinition):\n {hasOverrides: boolean, hasDeprecatedOverrides: boolean} {\n let hasOverrides = false;\n let hasDeprecatedOverrides = false;\n if (providerOverrides.size === 0) {\n return {hasOverrides, hasDeprecatedOverrides};\n }\n def.providers.forEach(node => {\n const override = providerOverrides.get(node.token);\n if ((node.flags & NodeFlags.CatProviderNoDirective) && override) {\n hasOverrides = true;\n hasDeprecatedOverrides = hasDeprecatedOverrides || override.deprecatedBehavior;\n }\n });\n def.modules.forEach(module => {\n providerOverridesWithScope.forEach((override, token) => {\n if (resolveForwardRef(getInjectableDef(token)!.providedIn) === module) {\n hasOverrides = true;\n hasDeprecatedOverrides = hasDeprecatedOverrides || override.deprecatedBehavior;\n }\n });\n });\n return {hasOverrides, hasDeprecatedOverrides};\n }\n\n function applyProviderOverrides(def: NgModuleDefinition) {\n for (let i = 0; i < def.providers.length; i++) {\n const provider = def.providers[i];\n if (hasDeprecatedOverrides) {\n // We had a bug where me made\n // all providers lazy. Keep this logic behind a flag\n // for migrating existing users.\n provider.flags |= NodeFlags.LazyProvider;\n }\n const override = providerOverrides.get(provider.token);\n if (override) {\n provider.flags = (provider.flags & ~NodeFlags.CatProviderNoDirective) | override.flags;\n provider.deps = splitDepsDsl(override.deps);\n provider.value = override.value;\n }\n }\n if (providerOverridesWithScope.size > 0) {\n let moduleSet = new Set<any>(def.modules);\n providerOverridesWithScope.forEach((override, token) => {\n if (moduleSet.has(resolveForwardRef(getInjectableDef(token)!.providedIn))) {\n let provider = {\n token: token,\n flags:\n override.flags | (hasDeprecatedOverrides ? NodeFlags.LazyProvider : NodeFlags.None),\n deps: splitDepsDsl(override.deps),\n value: override.value,\n index: def.providers.length,\n };\n def.providers.push(provider);\n def.providersByKey[tokenKey(token)] = provider;\n }\n });\n }\n }\n}\n\nfunction prodCheckAndUpdateNode(\n view: ViewData, checkIndex: number, argStyle: ArgumentType, v0?: any, v1?: any, v2?: any,\n v3?: any, v4?: any, v5?: any, v6?: any, v7?: any, v8?: any, v9?: any): any {\n const nodeDef = view.def.nodes[checkIndex];\n checkAndUpdateNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n return (nodeDef.flags & NodeFlags.CatPureExpression) ?\n asPureExpressionData(view, checkIndex).value :\n undefined;\n}\n\nfunction prodCheckNoChangesNode(\n view: ViewData, checkIndex: number, argStyle: ArgumentType, v0?: any, v1?: any, v2?: any,\n v3?: any, v4?: any, v5?: any, v6?: any, v7?: any, v8?: any, v9?: any): any {\n const nodeDef = view.def.nodes[checkIndex];\n checkNoChangesNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n return (nodeDef.flags & NodeFlags.CatPureExpression) ?\n asPureExpressionData(view, checkIndex).value :\n undefined;\n}\n\nfunction debugCheckAndUpdateView(view: ViewData) {\n return callWithDebugContext(DebugAction.detectChanges, checkAndUpdateView, null, [view]);\n}\n\nfunction debugCheckNoChangesView(view: ViewData) {\n return callWithDebugContext(DebugAction.checkNoChanges, checkNoChangesView, null, [view]);\n}\n\nfunction debugDestroyView(view: ViewData) {\n return callWithDebugContext(DebugAction.destroy, destroyView, null, [view]);\n}\n\nenum DebugAction {\n create,\n detectChanges,\n checkNoChanges,\n destroy,\n handleEvent\n}\n\nlet _currentAction: DebugAction;\nlet _currentView: ViewData;\nlet _currentNodeIndex: number|null;\n\nfunction debugSetCurrentNode(view: ViewData, nodeIndex: number|null) {\n _currentView = view;\n _currentNodeIndex = nodeIndex;\n}\n\nfunction debugHandleEvent(view: ViewData, nodeIndex: number, eventName: string, event: any) {\n debugSetCurrentNode(view, nodeIndex);\n return callWithDebugContext(\n DebugAction.handleEvent, view.def.handleEvent, null, [view, nodeIndex, eventName, event]);\n}\n\nfunction debugUpdateDirectives(view: ViewData, checkType: CheckType) {\n if (view.state & ViewState.Destroyed) {\n throw viewDestroyedError(DebugAction[_currentAction]);\n }\n debugSetCurrentNode(view, nextDirectiveWithBinding(view, 0));\n return view.def.updateDirectives(debugCheckDirectivesFn, view);\n\n function debugCheckDirectivesFn(\n view: ViewData, nodeIndex: number, argStyle: ArgumentType, ...values: any[]) {\n const nodeDef = view.def.nodes[nodeIndex];\n if (checkType === CheckType.CheckAndUpdate) {\n debugCheckAndUpdateNode(view, nodeDef, argStyle, values);\n } else {\n debugCheckNoChangesNode(view, nodeDef, argStyle, values);\n }\n if (nodeDef.flags & NodeFlags.TypeDirective) {\n debugSetCurrentNode(view, nextDirectiveWithBinding(view, nodeIndex));\n }\n return (nodeDef.flags & NodeFlags.CatPureExpression) ?\n asPureExpressionData(view, nodeDef.nodeIndex).value :\n undefined;\n }\n}\n\nfunction debugUpdateRenderer(view: ViewData, checkType: CheckType) {\n if (view.state & ViewState.Destroyed) {\n throw viewDestroyedError(DebugAction[_currentAction]);\n }\n debugSetCurrentNode(view, nextRenderNodeWithBinding(view, 0));\n return view.def.updateRenderer(debugCheckRenderNodeFn, view);\n\n function debugCheckRenderNodeFn(\n view: ViewData, nodeIndex: number, argStyle: ArgumentType, ...values: any[]) {\n const nodeDef = view.def.nodes[nodeIndex];\n if (checkType === CheckType.CheckAndUpdate) {\n debugCheckAndUpdateNode(view, nodeDef, argStyle, values);\n } else {\n debugCheckNoChangesNode(view, nodeDef, argStyle, values);\n }\n if (nodeDef.flags & NodeFlags.CatRenderNode) {\n debugSetCurrentNode(view, nextRenderNodeWithBinding(view, nodeIndex));\n }\n return (nodeDef.flags & NodeFlags.CatPureExpression) ?\n asPureExpressionData(view, nodeDef.nodeIndex).value :\n undefined;\n }\n}\n\nfunction debugCheckAndUpdateNode(\n view: ViewData, nodeDef: NodeDef, argStyle: ArgumentType, givenValues: any[]): void {\n const changed = (<any>checkAndUpdateNode)(view, nodeDef, argStyle, ...givenValues);\n if (changed) {\n const values = argStyle === ArgumentType.Dynamic ? givenValues[0] : givenValues;\n if (nodeDef.flags & NodeFlags.TypeDirective) {\n const bindingValues: {[key: string]: string} = {};\n for (let i = 0; i < nodeDef.bindings.length; i++) {\n const binding = nodeDef.bindings[i];\n const value = values[i];\n if (binding.flags & BindingFlags.TypeProperty) {\n bindingValues[normalizeDebugBindingName(binding.nonMinifiedName!)] =\n normalizeDebugBindingValue(value);\n }\n }\n const elDef = nodeDef.parent!;\n const el = asElementData(view, elDef.nodeIndex).renderElement;\n if (!elDef.element!.name) {\n // a comment.\n view.renderer.setValue(\n el, escapeCommentText(`bindings=${JSON.stringify(bindingValues, null, 2)}`));\n } else {\n // a regular element.\n for (let attr in bindingValues) {\n const value = bindingValues[attr];\n if (value != null) {\n view.renderer.setAttribute(el, attr, value);\n } else {\n view.renderer.removeAttribute(el, attr);\n }\n }\n }\n }\n }\n}\n\nfunction debugCheckNoChangesNode(\n view: ViewData, nodeDef: NodeDef, argStyle: ArgumentType, values: any[]): void {\n (<any>checkNoChangesNode)(view, nodeDef, argStyle, ...values);\n}\n\nfunction nextDirectiveWithBinding(view: ViewData, nodeIndex: number): number|null {\n for (let i = nodeIndex; i < view.def.nodes.length; i++) {\n const nodeDef = view.def.nodes[i];\n if (nodeDef.flags & NodeFlags.TypeDirective && nodeDef.bindings && nodeDef.bindings.length) {\n return i;\n }\n }\n return null;\n}\n\nfunction nextRenderNodeWithBinding(view: ViewData, nodeIndex: number): number|null {\n for (let i = nodeIndex; i < view.def.nodes.length; i++) {\n const nodeDef = view.def.nodes[i];\n if ((nodeDef.flags & NodeFlags.CatRenderNode) && nodeDef.bindings && nodeDef.bindings.length) {\n return i;\n }\n }\n return null;\n}\n\nclass DebugContext_ implements DebugContext {\n private nodeDef: NodeDef;\n private elView: ViewData;\n private elDef: NodeDef;\n\n constructor(public view: ViewData, public nodeIndex: number|null) {\n if (nodeIndex == null) {\n this.nodeIndex = nodeIndex = 0;\n }\n this.nodeDef = view.def.nodes[nodeIndex];\n let elDef = this.nodeDef;\n let elView = view;\n while (elDef && (elDef.flags & NodeFlags.TypeElement) === 0) {\n elDef = elDef.parent!;\n }\n if (!elDef) {\n while (!elDef && elView) {\n elDef = viewParentEl(elView)!;\n elView = elView.parent!;\n }\n }\n this.elDef = elDef;\n this.elView = elView;\n }\n\n private get elOrCompView() {\n // Has to be done lazily as we use the DebugContext also during creation of elements...\n return asElementData(this.elView, this.elDef.nodeIndex).componentView || this.view;\n }\n\n get injector(): Injector {\n return createInjector(this.elView, this.elDef);\n }\n\n get component(): any {\n return this.elOrCompView.component;\n }\n\n get context(): any {\n return this.elOrCompView.context;\n }\n\n get providerTokens(): any[] {\n const tokens: any[] = [];\n if (this.elDef) {\n for (let i = this.elDef.nodeIndex + 1; i <= this.elDef.nodeIndex + this.elDef.childCount;\n i++) {\n const childDef = this.elView.def.nodes[i];\n if (childDef.flags & NodeFlags.CatProvider) {\n tokens.push(childDef.provider!.token);\n }\n i += childDef.childCount;\n }\n }\n return tokens;\n }\n\n get references(): {[key: string]: any} {\n const references: {[key: string]: any} = {};\n if (this.elDef) {\n collectReferences(this.elView, this.elDef, references);\n\n for (let i = this.elDef.nodeIndex + 1; i <= this.elDef.nodeIndex + this.elDef.childCount;\n i++) {\n const childDef = this.elView.def.nodes[i];\n if (childDef.flags & NodeFlags.CatProvider) {\n collectReferences(this.elView, childDef, references);\n }\n i += childDef.childCount;\n }\n }\n return references;\n }\n\n get componentRenderElement() {\n const elData = findHostElement(this.elOrCompView);\n return elData ? elData.renderElement : undefined;\n }\n\n get renderNode(): any {\n return this.nodeDef.flags & NodeFlags.TypeText ? renderNode(this.view, this.nodeDef) :\n renderNode(this.elView, this.elDef);\n }\n\n logError(console: Console, ...values: any[]) {\n let logViewDef: ViewDefinition;\n let logNodeIndex: number;\n if (this.nodeDef.flags & NodeFlags.TypeText) {\n logViewDef = this.view.def;\n logNodeIndex = this.nodeDef.nodeIndex;\n } else {\n logViewDef = this.elView.def;\n logNodeIndex = this.elDef.nodeIndex;\n }\n // Note: we only generate a log function for text and element nodes\n // to make the generated code as small as possible.\n const renderNodeIndex = getRenderNodeIndex(logViewDef, logNodeIndex);\n let currRenderNodeIndex = -1;\n let nodeLogger: NodeLogger = () => {\n currRenderNodeIndex++;\n if (currRenderNodeIndex === renderNodeIndex) {\n return console.error.bind(console, ...values);\n } else {\n return NOOP;\n }\n };\n logViewDef.factory!(nodeLogger);\n if (currRenderNodeIndex < renderNodeIndex) {\n console.error('Illegal state: the ViewDefinitionFactory did not call the logger!');\n (<any>console.error)(...values);\n }\n }\n}\n\nfunction getRenderNodeIndex(viewDef: ViewDefinition, nodeIndex: number): number {\n let renderNodeIndex = -1;\n for (let i = 0; i <= nodeIndex; i++) {\n const nodeDef = viewDef.nodes[i];\n if (nodeDef.flags & NodeFlags.CatRenderNode) {\n renderNodeIndex++;\n }\n }\n return renderNodeIndex;\n}\n\nfunction findHostElement(view: ViewData): ElementData|null {\n while (view && !isComponentView(view)) {\n view = view.parent!;\n }\n if (view.parent) {\n return asElementData(view.parent, viewParentEl(view)!.nodeIndex);\n }\n return null;\n}\n\nfunction collectReferences(view: ViewData, nodeDef: NodeDef, references: {[key: string]: any}) {\n for (let refName in nodeDef.references) {\n references[refName] = getQueryValue(view, nodeDef, nodeDef.references[refName]);\n }\n}\n\nfunction callWithDebugContext(action: DebugAction, fn: any, self: any, args: any[]) {\n const oldAction = _currentAction;\n const oldView = _currentView;\n const oldNodeIndex = _currentNodeIndex;\n try {\n _currentAction = action;\n const result = fn.apply(self, args);\n _currentView = oldView;\n _currentNodeIndex = oldNodeIndex;\n _currentAction = oldAction;\n return result;\n } catch (e) {\n if (isViewDebugError(e) || !_currentView) {\n throw e;\n }\n throw viewWrappedDebugError(e, getCurrentDebugContext()!);\n }\n}\n\nexport function getCurrentDebugContext(): DebugContext|null {\n return _currentView ? new DebugContext_(_currentView, _currentNodeIndex) : null;\n}\n\nexport class DebugRendererFactory2 implements RendererFactory2 {\n constructor(private delegate: RendererFactory2) {}\n\n createRenderer(element: any, renderData: RendererType2|null): Renderer2 {\n return new DebugRenderer2(this.delegate.createRenderer(element, renderData));\n }\n\n begin() {\n if (this.delegate.begin) {\n this.delegate.begin();\n }\n }\n end() {\n if (this.delegate.end) {\n this.delegate.end();\n }\n }\n\n whenRenderingDone(): Promise<any> {\n if (this.delegate.whenRenderingDone) {\n return this.delegate.whenRenderingDone();\n }\n return Promise.resolve(null);\n }\n}\n\nexport class DebugRenderer2 implements Renderer2 {\n readonly data: {[key: string]: any};\n\n private createDebugContext(nativeElement: any) {\n return this.debugContextFactory(nativeElement);\n }\n\n /**\n * Factory function used to create a `DebugContext` when a node is created.\n *\n * The `DebugContext` allows to retrieve information about the nodes that are useful in tests.\n *\n * The factory is configurable so that the `DebugRenderer2` could instantiate either a View Engine\n * or a Render context.\n */\n debugContextFactory: (nativeElement?: any) => DebugContext | null = getCurrentDebugContext;\n\n constructor(private delegate: Renderer2) {\n this.data = this.delegate.data;\n }\n\n destroyNode(node: any) {\n const debugNode = getDebugNode(node);\n\n if (debugNode) {\n removeDebugNodeFromIndex(debugNode);\n if (debugNode instanceof DebugNode__PRE_R3__) {\n debugNode.listeners.length = 0;\n }\n }\n\n if (this.delegate.destroyNode) {\n this.delegate.destroyNode(node);\n }\n }\n\n destroy() {\n this.delegate.destroy();\n }\n\n createElement(name: string, namespace?: string): any {\n const el = this.delegate.createElement(name, namespace);\n const debugCtx = this.createDebugContext(el);\n if (debugCtx) {\n const debugEl = new DebugElement__PRE_R3__(el, null, debugCtx);\n (debugEl as {name: string}).name = name;\n indexDebugNode(debugEl);\n }\n return el;\n }\n\n createComment(value: string): any {\n const comment = this.delegate.createComment(escapeCommentText(value));\n const debugCtx = this.createDebugContext(comment);\n if (debugCtx) {\n indexDebugNode(new DebugNode__PRE_R3__(comment, null, debugCtx));\n }\n return comment;\n }\n\n createText(value: string): any {\n const text = this.delegate.createText(value);\n const debugCtx = this.createDebugContext(text);\n if (debugCtx) {\n indexDebugNode(new DebugNode__PRE_R3__(text, null, debugCtx));\n }\n return text;\n }\n\n appendChild(parent: any, newChild: any): void {\n const debugEl = getDebugNode(parent);\n const debugChildEl = getDebugNode(newChild);\n if (debugEl && debugChildEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.addChild(debugChildEl);\n }\n this.delegate.appendChild(parent, newChild);\n }\n\n insertBefore(parent: any, newChild: any, refChild: any, isMove?: boolean): void {\n const debugEl = getDebugNode(parent);\n const debugChildEl = getDebugNode(newChild);\n const debugRefEl = getDebugNode(refChild)!;\n if (debugEl && debugChildEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.insertBefore(debugRefEl, debugChildEl);\n }\n\n this.delegate.insertBefore(parent, newChild, refChild, isMove);\n }\n\n removeChild(parent: any, oldChild: any): void {\n const debugEl = getDebugNode(parent);\n const debugChildEl = getDebugNode(oldChild);\n if (debugEl && debugChildEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.removeChild(debugChildEl);\n }\n this.delegate.removeChild(parent, oldChild);\n }\n\n selectRootElement(selectorOrNode: string|any, preserveContent?: boolean): any {\n const el = this.delegate.selectRootElement(selectorOrNode, preserveContent);\n const debugCtx = getCurrentDebugContext();\n if (debugCtx) {\n indexDebugNode(new DebugElement__PRE_R3__(el, null, debugCtx));\n }\n return el;\n }\n\n setAttribute(el: any, name: string, value: string, namespace?: string): void {\n const debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n const fullName = namespace ? namespace + ':' + name : name;\n debugEl.attributes[fullName] = value;\n }\n this.delegate.setAttribute(el, name, value, namespace);\n }\n\n removeAttribute(el: any, name: string, namespace?: string): void {\n const debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n const fullName = namespace ? namespace + ':' + name : name;\n debugEl.attributes[fullName] = null;\n }\n this.delegate.removeAttribute(el, name, namespace);\n }\n\n addClass(el: any, name: string): void {\n const debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.classes[name] = true;\n }\n this.delegate.addClass(el, name);\n }\n\n removeClass(el: any, name: string): void {\n const debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.classes[name] = false;\n }\n this.delegate.removeClass(el, name);\n }\n\n setStyle(el: any, style: string, value: any, flags: RendererStyleFlags2): void {\n const debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.styles[style] = value;\n }\n this.delegate.setStyle(el, style, value, flags);\n }\n\n removeStyle(el: any, style: string, flags: RendererStyleFlags2): void {\n const debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.styles[style] = null;\n }\n this.delegate.removeStyle(el, style, flags);\n }\n\n setProperty(el: any, name: string, value: any): void {\n const debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.properties[name] = value;\n }\n this.delegate.setProperty(el, name, value);\n }\n\n listen(\n target: 'document'|'windows'|'body'|any, eventName: string,\n callback: (event: any) => boolean): () => void {\n if (typeof target !== 'string') {\n const debugEl = getDebugNode(target);\n if (debugEl) {\n debugEl.listeners.push(new DebugEventListener(eventName, callback));\n }\n }\n\n return this.delegate.listen(target, eventName, callback);\n }\n\n parentNode(node: any): any {\n return this.delegate.parentNode(node);\n }\n nextSibling(node: any): any {\n return this.delegate.nextSibling(node);\n }\n setValue(node: any, value: string): void {\n return this.delegate.setValue(node, 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 {Injector} from '../di/injector';\nimport {Type} from '../interface/type';\nimport {ComponentFactory} from '../linker/component_factory';\nimport {NgModuleFactory, NgModuleRef} from '../linker/ng_module_factory';\n\nimport {initServicesIfNeeded} from './services';\nimport {NgModuleDefinition, NgModuleDefinitionFactory, NgModuleProviderDef, ProviderOverride, Services, ViewDefinition} from './types';\nimport {resolveDefinition} from './util';\n\nexport function overrideProvider(override: ProviderOverride) {\n initServicesIfNeeded();\n return Services.overrideProvider(override);\n}\n\nexport function overrideComponentView(comp: Type<any>, componentFactory: ComponentFactory<any>) {\n initServicesIfNeeded();\n return Services.overrideComponentView(comp, componentFactory);\n}\n\nexport function clearOverrides() {\n initServicesIfNeeded();\n return Services.clearOverrides();\n}\n\n// Attention: this function is called as top level function.\n// Putting any logic in here will destroy closure tree shaking!\nexport function createNgModuleFactory(\n ngModuleType: Type<any>, bootstrapComponents: Type<any>[],\n defFactory: NgModuleDefinitionFactory): NgModuleFactory<any> {\n return new NgModuleFactory_(ngModuleType, bootstrapComponents, defFactory);\n}\n\nfunction cloneNgModuleDefinition(def: NgModuleDefinition): NgModuleDefinition {\n const providers = Array.from(def.providers);\n const modules = Array.from(def.modules);\n const providersByKey: {[tokenKey: string]: NgModuleProviderDef} = {};\n for (const key in def.providersByKey) {\n providersByKey[key] = def.providersByKey[key];\n }\n\n return {\n factory: def.factory,\n scope: def.scope,\n providers,\n modules,\n providersByKey,\n };\n}\n\nclass NgModuleFactory_ extends NgModuleFactory<any> {\n constructor(\n public readonly moduleType: Type<any>, private _bootstrapComponents: Type<any>[],\n private _ngModuleDefFactory: NgModuleDefinitionFactory) {\n // Attention: this ctor is called as top level function.\n // Putting any logic in here will destroy closure tree shaking!\n super();\n }\n\n override create(parentInjector: Injector|null): NgModuleRef<any> {\n initServicesIfNeeded();\n // Clone the NgModuleDefinition so that any tree shakeable provider definition\n // added to this instance of the NgModuleRef doesn't affect the cached copy.\n // See https://github.com/angular/angular/issues/25018.\n const def = cloneNgModuleDefinition(resolveDefinition(this._ngModuleDefFactory));\n return Services.createNgModuleRef(\n this.moduleType, parentInjector || Injector.NULL, this._bootstrapComponents, def);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport {EMPTY_ARRAY} from '../util/empty';\nexport {anchorDef, elementDef} from './element';\nexport {clearOverrides, createNgModuleFactory, overrideComponentView, overrideProvider} from './entrypoint';\nexport {ngContentDef} from './ng_content';\nexport {moduleDef, moduleProvideDef} from './ng_module';\nexport {directiveDef, pipeDef, providerDef} from './provider';\nexport {pureArrayDef, pureObjectDef, purePipeDef} from './pure_expression';\nexport {queryDef} from './query';\nexport {createComponentFactory, getComponentViewDefinitionFactory, nodeValue, ViewRef_} from './refs';\nexport {initServicesIfNeeded} from './services';\nexport {textDef} from './text';\nexport {createRendererType2, elementEventFullName, EMPTY_MAP, inlineInterpolate, interpolate, rootRenderNodes, tokenKey, unwrapValue} from './util';\nexport {viewDef} from './view';\nexport {attachEmbeddedView, detachEmbeddedView, moveEmbeddedView} from './view_attach';\n\nexport * from './types';\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 {ALLOW_MULTIPLE_PLATFORMS as ɵALLOW_MULTIPLE_PLATFORMS} from './application_ref';\nexport {APP_ID_RANDOM_PROVIDER as ɵAPP_ID_RANDOM_PROVIDER} from './application_tokens';\nexport {defaultIterableDiffers as ɵdefaultIterableDiffers, defaultKeyValueDiffers as ɵdefaultKeyValueDiffers} from './change_detection/change_detection';\nexport {devModeEqual as ɵdevModeEqual, isListLikeIterable as ɵisListLikeIterable} from './change_detection/change_detection_util';\nexport {ChangeDetectorStatus as ɵChangeDetectorStatus, isDefaultChangeDetectionStrategy as ɵisDefaultChangeDetectionStrategy} from './change_detection/constants';\nexport {Console as ɵConsole} from './console';\nexport {getDebugNodeR2 as ɵgetDebugNodeR2} from './debug/debug_node';\nexport {inject, setCurrentInjector as ɵsetCurrentInjector, ɵɵinject} from './di/injector_compatibility';\nexport {getInjectableDef as ɵgetInjectableDef, ɵɵInjectableDeclaration, ɵɵInjectorDef} from './di/interface/defs';\nexport {INJECTOR_SCOPE as ɵINJECTOR_SCOPE} from './di/scope';\nexport {CurrencyIndex as ɵCurrencyIndex, ExtraLocaleDataIndex as ɵExtraLocaleDataIndex, findLocaleData as ɵfindLocaleData, getLocaleCurrencyCode as ɵgetLocaleCurrencyCode, getLocalePluralCase as ɵgetLocalePluralCase, LocaleDataIndex as ɵLocaleDataIndex, registerLocaleData as ɵregisterLocaleData, unregisterAllLocaleData as ɵunregisterLocaleData} from './i18n/locale_data_api';\nexport {DEFAULT_LOCALE_ID as ɵDEFAULT_LOCALE_ID} from './i18n/localization';\nexport {ivyEnabled as ɵivyEnabled} from './ivy_switch';\nexport {ComponentFactory as ɵComponentFactory} from './linker/component_factory';\nexport {CodegenComponentFactoryResolver as ɵCodegenComponentFactoryResolver} from './linker/component_factory_resolver';\nexport {clearResolutionOfComponentResourcesQueue as ɵclearResolutionOfComponentResourcesQueue, resolveComponentResources as ɵresolveComponentResources} from './metadata/resource_loading';\nexport {ReflectionCapabilities as ɵReflectionCapabilities} from './reflection/reflection_capabilities';\nexport {GetterFn as ɵGetterFn, MethodFn as ɵMethodFn, SetterFn as ɵSetterFn} from './reflection/types';\nexport {RuntimeError as ɵRuntimeError, RuntimeErrorCode as ɵRuntimeErrorCode} from './render3/error_code';\nexport {allowSanitizationBypassAndThrow as ɵallowSanitizationBypassAndThrow, BypassType as ɵBypassType, getSanitizationBypassType as ɵgetSanitizationBypassType, SafeHtml as ɵSafeHtml, SafeResourceUrl as ɵSafeResourceUrl, SafeScript as ɵSafeScript, SafeStyle as ɵSafeStyle, SafeUrl as ɵSafeUrl, SafeValue as ɵSafeValue, unwrapSafeValue as ɵunwrapSafeValue} from './sanitization/bypass';\nexport {_sanitizeHtml as ɵ_sanitizeHtml} from './sanitization/html_sanitizer';\nexport {_sanitizeUrl as ɵ_sanitizeUrl} from './sanitization/url_sanitizer';\nexport {makeDecorator as ɵmakeDecorator} from './util/decorators';\nexport {global as ɵglobal} from './util/global';\nexport {isObservable as ɵisObservable, isPromise as ɵisPromise, isSubscribable as ɵisSubscribable} from './util/lang';\nexport {stringify as ɵstringify} from './util/stringify';\nexport {clearOverrides as ɵclearOverrides, initServicesIfNeeded as ɵinitServicesIfNeeded, overrideComponentView as ɵoverrideComponentView, overrideProvider as ɵoverrideProvider} from './view/index';\nexport {NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR} from './view/provider';\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 {FactoryTarget, getCompilerFacade, JitCompilerUsage, R3DeclareComponentFacade, R3DeclareDirectiveFacade, R3DeclareFactoryFacade, R3DeclareInjectableFacade, R3DeclareInjectorFacade, R3DeclareNgModuleFacade, R3DeclarePipeFacade} from '../../compiler/compiler_facade';\nimport {Type} from '../../interface/type';\nimport {setClassMetadata} from '../metadata';\nimport {angularCoreEnv} from './environment';\n\n/**\n * Compiles a partial directive declaration object into a full directive definition object.\n *\n * @codeGenApi\n */\nexport function ɵɵngDeclareDirective(decl: R3DeclareDirectiveFacade): unknown {\n const compiler = getCompilerFacade(\n {usage: JitCompilerUsage.PartialDeclaration, kind: 'directive', type: decl.type});\n return compiler.compileDirectiveDeclaration(\n angularCoreEnv, `ng:///${decl.type.name}/ɵfac.js`, decl);\n}\n\n/**\n * Evaluates the class metadata declaration.\n *\n * @codeGenApi\n */\nexport function ɵɵngDeclareClassMetadata(decl: {\n type: Type<any>; decorators: any[];\n ctorParameters?: () => any[];\n propDecorators?: {[field: string]: any};\n}): void {\n setClassMetadata(\n decl.type, decl.decorators, decl.ctorParameters ?? null, decl.propDecorators ?? null);\n}\n\n/**\n * Compiles a partial component declaration object into a full component definition object.\n *\n * @codeGenApi\n */\nexport function ɵɵngDeclareComponent(decl: R3DeclareComponentFacade): unknown {\n const compiler = getCompilerFacade(\n {usage: JitCompilerUsage.PartialDeclaration, kind: 'component', type: decl.type});\n return compiler.compileComponentDeclaration(\n angularCoreEnv, `ng:///${decl.type.name}/ɵcmp.js`, decl);\n}\n\n/**\n * Compiles a partial pipe declaration object into a full pipe definition object.\n *\n * @codeGenApi\n */\nexport function ɵɵngDeclareFactory(decl: R3DeclareFactoryFacade): unknown {\n const compiler = getCompilerFacade({\n usage: JitCompilerUsage.PartialDeclaration,\n kind: getFactoryKind(decl.target),\n type: decl.type\n });\n return compiler.compileFactoryDeclaration(\n angularCoreEnv, `ng:///${decl.type.name}/ɵfac.js`, decl);\n}\n\nfunction getFactoryKind(target: FactoryTarget) {\n switch (target) {\n case FactoryTarget.Directive:\n return 'directive';\n case FactoryTarget.Component:\n return 'component';\n case FactoryTarget.Injectable:\n return 'injectable';\n case FactoryTarget.Pipe:\n return 'pipe';\n case FactoryTarget.NgModule:\n return 'NgModule';\n }\n}\n\n/**\n * Compiles a partial injectable declaration object into a full injectable definition object.\n *\n * @codeGenApi\n */\nexport function ɵɵngDeclareInjectable(decl: R3DeclareInjectableFacade): unknown {\n const compiler = getCompilerFacade(\n {usage: JitCompilerUsage.PartialDeclaration, kind: 'injectable', type: decl.type});\n return compiler.compileInjectableDeclaration(\n angularCoreEnv, `ng:///${decl.type.name}/ɵprov.js`, decl);\n}\n\n/**\n * These enums are used in the partial factory declaration calls.\n */\nexport {FactoryTarget} from '../../compiler/compiler_facade';\n\n/**\n * Compiles a partial injector declaration object into a full injector definition object.\n *\n * @codeGenApi\n */\nexport function ɵɵngDeclareInjector(decl: R3DeclareInjectorFacade): unknown {\n const compiler = getCompilerFacade(\n {usage: JitCompilerUsage.PartialDeclaration, kind: 'NgModule', type: decl.type});\n return compiler.compileInjectorDeclaration(\n angularCoreEnv, `ng:///${decl.type.name}/ɵinj.js`, decl);\n}\n\n/**\n * Compiles a partial NgModule declaration object into a full NgModule definition object.\n *\n * @codeGenApi\n */\nexport function ɵɵngDeclareNgModule(decl: R3DeclareNgModuleFacade): unknown {\n const compiler = getCompilerFacade(\n {usage: JitCompilerUsage.PartialDeclaration, kind: 'NgModule', type: decl.type});\n return compiler.compileNgModuleDeclaration(\n angularCoreEnv, `ng:///${decl.type.name}/ɵmod.js`, decl);\n}\n\n/**\n * Compiles a partial pipe declaration object into a full pipe definition object.\n *\n * @codeGenApi\n */\nexport function ɵɵngDeclarePipe(decl: R3DeclarePipeFacade): unknown {\n const compiler = getCompilerFacade(\n {usage: JitCompilerUsage.PartialDeclaration, kind: 'pipe', type: decl.type});\n return compiler.compilePipeDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵpipe.js`, decl);\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// clang-format off\n// we reexport these symbols just so that they are retained during the dead code elimination\n// performed by rollup while it's creating fesm files.\n//\n// no code actually imports these symbols from the @angular/core entry point\nexport {\n compileNgModuleFactory__POST_R3__ as ɵcompileNgModuleFactory__POST_R3__,\n isBoundToModule__POST_R3__ as ɵisBoundToModule__POST_R3__\n} from './application_ref';\nexport {\n SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__ as ɵSWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__,\n} from './change_detection/change_detector_ref';\nexport {\n getDebugNode__POST_R3__ as ɵgetDebugNode__POST_R3__,\n} from './debug/debug_node';\nexport {\n SWITCH_COMPILE_INJECTABLE__POST_R3__ as ɵSWITCH_COMPILE_INJECTABLE__POST_R3__,\n} from './di/injectable';\nexport {INJECTOR_IMPL__POST_R3__ as ɵINJECTOR_IMPL__POST_R3__} from './di/injector';\nexport {\n NG_INJ_DEF as ɵNG_INJ_DEF,\n NG_PROV_DEF as ɵNG_PROV_DEF,\n} from './di/interface/defs';\nexport {CREATE_ATTRIBUTE_DECORATOR__POST_R3__ as ɵCREATE_ATTRIBUTE_DECORATOR__POST_R3__} from './di/metadata_attr';\nexport {createInjector as ɵcreateInjector} from './di/r3_injector';\nexport {\n SWITCH_IVY_ENABLED__POST_R3__ as ɵSWITCH_IVY_ENABLED__POST_R3__,\n} from './ivy_switch';\nexport {\n Compiler_compileModuleAndAllComponentsAsync__POST_R3__ as ɵCompiler_compileModuleAndAllComponentsAsync__POST_R3__,\n Compiler_compileModuleAndAllComponentsSync__POST_R3__ as ɵCompiler_compileModuleAndAllComponentsSync__POST_R3__,\n Compiler_compileModuleAsync__POST_R3__ as ɵCompiler_compileModuleAsync__POST_R3__,\n Compiler_compileModuleSync__POST_R3__ as ɵCompiler_compileModuleSync__POST_R3__,\n} from './linker/compiler';\nexport {\n SWITCH_ELEMENT_REF_FACTORY__POST_R3__ as ɵSWITCH_ELEMENT_REF_FACTORY__POST_R3__,\n} from './linker/element_ref';\nexport { getModuleFactory__POST_R3__ as ɵgetModuleFactory__POST_R3__ } from './linker/ng_module_factory_loader';\nexport { registerNgModuleType as ɵregisterNgModuleType } from './linker/ng_module_factory_registration';\nexport {\n SWITCH_TEMPLATE_REF_FACTORY__POST_R3__ as ɵSWITCH_TEMPLATE_REF_FACTORY__POST_R3__,\n} from './linker/template_ref';\nexport {\n SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__ as ɵSWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__,\n} from './linker/view_container_ref';\nexport {\n SWITCH_COMPILE_COMPONENT__POST_R3__ as ɵSWITCH_COMPILE_COMPONENT__POST_R3__,\n SWITCH_COMPILE_DIRECTIVE__POST_R3__ as ɵSWITCH_COMPILE_DIRECTIVE__POST_R3__,\n SWITCH_COMPILE_PIPE__POST_R3__ as ɵSWITCH_COMPILE_PIPE__POST_R3__,\n} from './metadata/directives';\nexport {\n SWITCH_COMPILE_NGMODULE__POST_R3__ as ɵSWITCH_COMPILE_NGMODULE__POST_R3__,\n} from './metadata/ng_module';\nexport {\n NgModuleDef as ɵNgModuleDef,\n NgModuleTransitiveScopes as ɵNgModuleTransitiveScopes,\n} from './metadata/ng_module_def';\nexport {\n SWITCH_RENDERER2_FACTORY__POST_R3__ as ɵSWITCH_RENDERER2_FACTORY__POST_R3__,\n} from './render/api';\nexport {\n getLContext as ɵgetLContext\n} from './render3/context_discovery';\nexport {\n NG_COMP_DEF as ɵNG_COMP_DEF,\n NG_DIR_DEF as ɵNG_DIR_DEF,\n NG_ELEMENT_ID as ɵNG_ELEMENT_ID,\n NG_MOD_DEF as ɵNG_MOD_DEF,\n NG_PIPE_DEF as ɵNG_PIPE_DEF,\n} from './render3/fields';\nexport {\n AttributeMarker as ɵAttributeMarker,\n ComponentDef as ɵComponentDef,\n ComponentFactory as ɵRender3ComponentFactory,\n ComponentRef as ɵRender3ComponentRef,\n ComponentType as ɵComponentType,\n CssSelectorList as ɵCssSelectorList,\n detectChanges as ɵdetectChanges,\n DirectiveDef as ɵDirectiveDef,\n DirectiveType as ɵDirectiveType,\n getDirectives as ɵgetDirectives,\n getHostElement as ɵgetHostElement,\n LifecycleHooksFeature as ɵLifecycleHooksFeature,\n markDirty as ɵmarkDirty,\n NgModuleFactory as ɵNgModuleFactory,\n NgModuleRef as ɵRender3NgModuleRef,\n NgModuleType as ɵNgModuleType,\n NO_CHANGE as ɵNO_CHANGE,\n PipeDef as ɵPipeDef,\n renderComponent as ɵrenderComponent,\n RenderFlags as ɵRenderFlags,\n setClassMetadata as ɵsetClassMetadata,\n setLocaleId as ɵsetLocaleId,\n store as ɵstore,\n whenRendered as ɵwhenRendered,\n ɵɵadvance,\n ɵɵattribute,\n ɵɵattributeInterpolate1,\n ɵɵattributeInterpolate2,\n ɵɵattributeInterpolate3,\n ɵɵattributeInterpolate4,\n ɵɵattributeInterpolate5,\n ɵɵattributeInterpolate6,\n ɵɵattributeInterpolate7,\n ɵɵattributeInterpolate8,\n ɵɵattributeInterpolateV,\n ɵɵclassMap,\n ɵɵclassMapInterpolate1,\n ɵɵclassMapInterpolate2,\n ɵɵclassMapInterpolate3,\n ɵɵclassMapInterpolate4,\n ɵɵclassMapInterpolate5,\n ɵɵclassMapInterpolate6,\n ɵɵclassMapInterpolate7,\n ɵɵclassMapInterpolate8,\n ɵɵclassMapInterpolateV,\n ɵɵclassProp,\n ɵɵComponentDeclaration,\n ɵɵcontentQuery,\n ɵɵCopyDefinitionFeature,\n ɵɵdefineComponent,\n ɵɵdefineDirective,\n ɵɵdefineNgModule,\n ɵɵdefinePipe,\n ɵɵDirectiveDeclaration,\n ɵɵdirectiveInject,\n ɵɵdisableBindings,\n ɵɵelement,\n ɵɵelementContainer,\n ɵɵelementContainerEnd,\n ɵɵelementContainerStart,\n ɵɵelementEnd,\n ɵɵelementStart,\n ɵɵenableBindings,\n ɵɵFactoryDeclaration,\n ɵɵgetCurrentView,\n ɵɵgetInheritedFactory,\n ɵɵhostProperty,\n ɵɵi18n,\n ɵɵi18nApply,\n ɵɵi18nAttributes,\n ɵɵi18nEnd,\n ɵɵi18nExp,\n ɵɵi18nPostprocess,\n ɵɵi18nStart,\n ɵɵInheritDefinitionFeature,\n ɵɵinjectAttribute,\n ɵɵInjectorDeclaration,\n ɵɵinvalidFactory,\n ɵɵlistener,\n ɵɵloadQuery,\n ɵɵnamespaceHTML,\n ɵɵnamespaceMathML,\n ɵɵnamespaceSVG,\n ɵɵnextContext,\n ɵɵNgModuleDeclaration,\n ɵɵNgOnChangesFeature,\n ɵɵpipe,\n ɵɵpipeBind1,\n ɵɵpipeBind2,\n ɵɵpipeBind3,\n ɵɵpipeBind4,\n ɵɵpipeBindV,\n ɵɵPipeDeclaration,\n ɵɵprojection,\n ɵɵprojectionDef,\n ɵɵproperty,\n ɵɵpropertyInterpolate,\n ɵɵpropertyInterpolate1,\n ɵɵpropertyInterpolate2,\n ɵɵpropertyInterpolate3,\n ɵɵpropertyInterpolate4,\n ɵɵpropertyInterpolate5,\n ɵɵpropertyInterpolate6,\n ɵɵpropertyInterpolate7,\n ɵɵpropertyInterpolate8,\n ɵɵpropertyInterpolateV,\n ɵɵProvidersFeature,\n ɵɵpureFunction0,\n ɵɵpureFunction1,\n ɵɵpureFunction2,\n ɵɵpureFunction3,\n ɵɵpureFunction4,\n ɵɵpureFunction5,\n ɵɵpureFunction6,\n ɵɵpureFunction7,\n ɵɵpureFunction8,\n ɵɵpureFunctionV,\n ɵɵqueryRefresh,\n ɵɵreference,\n ɵɵresolveBody,\n ɵɵresolveDocument,\n ɵɵresolveWindow,\n ɵɵrestoreView,\n\n ɵɵsetComponentScope,\n ɵɵsetNgModuleScope,\n ɵɵstyleMap,\n ɵɵstyleMapInterpolate1,\n ɵɵstyleMapInterpolate2,\n ɵɵstyleMapInterpolate3,\n ɵɵstyleMapInterpolate4,\n ɵɵstyleMapInterpolate5,\n ɵɵstyleMapInterpolate6,\n ɵɵstyleMapInterpolate7,\n ɵɵstyleMapInterpolate8,\n ɵɵstyleMapInterpolateV,\n ɵɵstyleProp,\n ɵɵstylePropInterpolate1,\n ɵɵstylePropInterpolate2,\n ɵɵstylePropInterpolate3,\n ɵɵstylePropInterpolate4,\n ɵɵstylePropInterpolate5,\n ɵɵstylePropInterpolate6,\n ɵɵstylePropInterpolate7,\n ɵɵstylePropInterpolate8,\n ɵɵstylePropInterpolateV,\n ɵɵsyntheticHostListener,\n ɵɵsyntheticHostProperty,\n ɵɵtemplate,\n ɵɵtemplateRefExtractor,\n ɵɵtext,\n ɵɵtextInterpolate,\n ɵɵtextInterpolate1,\n ɵɵtextInterpolate2,\n ɵɵtextInterpolate3,\n ɵɵtextInterpolate4,\n ɵɵtextInterpolate5,\n ɵɵtextInterpolate6,\n ɵɵtextInterpolate7,\n ɵɵtextInterpolate8,\n ɵɵtextInterpolateV,\n ɵɵviewQuery,\n} from './render3/index';\nexport {\n LContext as ɵLContext,\n} from './render3/interfaces/context';\nexport {\n setDocument as ɵsetDocument\n} from './render3/interfaces/document';\nexport {\n Player as ɵPlayer,\n PlayerFactory as ɵPlayerFactory,\n PlayerHandler as ɵPlayerHandler,\n PlayState as ɵPlayState,\n} from './render3/interfaces/player';\nexport {\n compileComponent as ɵcompileComponent,\n compileDirective as ɵcompileDirective,\n} from './render3/jit/directive';\nexport {\n resetJitOptions as ɵresetJitOptions,\n} from './render3/jit/jit_options';\nexport {\n compileNgModule as ɵcompileNgModule,\n compileNgModuleDefs as ɵcompileNgModuleDefs,\n flushModuleScopingQueueAsMuchAsPossible as ɵflushModuleScopingQueueAsMuchAsPossible,\n patchComponentDefWithScope as ɵpatchComponentDefWithScope,\n resetCompiledComponents as ɵresetCompiledComponents,\n transitiveScopesFor as ɵtransitiveScopesFor,\n} from './render3/jit/module';\nexport {\n FactoryTarget as ɵɵFactoryTarget,\n ɵɵngDeclareClassMetadata,\n ɵɵngDeclareComponent,\n ɵɵngDeclareDirective,\n ɵɵngDeclareFactory,\n ɵɵngDeclareInjectable,\n ɵɵngDeclareInjector,\n ɵɵngDeclareNgModule,\n ɵɵngDeclarePipe,\n} from './render3/jit/partial';\nexport {\n compilePipe as ɵcompilePipe,\n} from './render3/jit/pipe';\nexport { Profiler as ɵProfiler, ProfilerEvent as ɵProfilerEvent } from './render3/profiler';\nexport {\n publishDefaultGlobalUtils as ɵpublishDefaultGlobalUtils\n,\n publishGlobalUtil as ɵpublishGlobalUtil} from './render3/util/global_utils';\nexport {\n bypassSanitizationTrustHtml as ɵbypassSanitizationTrustHtml,\n bypassSanitizationTrustResourceUrl as ɵbypassSanitizationTrustResourceUrl,\n bypassSanitizationTrustScript as ɵbypassSanitizationTrustScript,\n bypassSanitizationTrustStyle as ɵbypassSanitizationTrustStyle,\n bypassSanitizationTrustUrl as ɵbypassSanitizationTrustUrl,\n} from './sanitization/bypass';\nexport {\n ɵɵsanitizeHtml,\n ɵɵsanitizeResourceUrl,\n ɵɵsanitizeScript,\n ɵɵsanitizeStyle,\n ɵɵsanitizeUrl,\n ɵɵsanitizeUrlOrResourceUrl,\n ɵɵtrustConstantHtml,\n ɵɵtrustConstantResourceUrl,\n} from './sanitization/sanitization';\nexport {\n noSideEffects as ɵnoSideEffects,\n} from './util/closure';\n\n// clang-format on\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 {CodegenComponentFactoryResolver as ɵCodegenComponentFactoryResolver} from './linker/component_factory_resolver';\nexport {registerModuleFactory as ɵregisterModuleFactory} from './linker/ng_module_factory_registration';\nexport {anchorDef as ɵand, ArgumentType as ɵArgumentType, BindingFlags as ɵBindingFlags, createComponentFactory as ɵccf, createNgModuleFactory as ɵcmf, createRendererType2 as ɵcrt, DepFlags as ɵDepFlags, directiveDef as ɵdid, elementDef as ɵeld, EMPTY_ARRAY as ɵEMPTY_ARRAY, EMPTY_MAP as ɵEMPTY_MAP, getComponentViewDefinitionFactory as ɵgetComponentViewDefinitionFactory, inlineInterpolate as ɵinlineInterpolate, interpolate as ɵinterpolate, moduleDef as ɵmod, moduleProvideDef as ɵmpd, ngContentDef as ɵncd, NodeFlags as ɵNodeFlags, nodeValue as ɵnov, pipeDef as ɵpid, providerDef as ɵprd, pureArrayDef as ɵpad, pureObjectDef as ɵpod, purePipeDef as ɵppd, QueryBindingType as ɵQueryBindingType, queryDef as ɵqud, QueryValueType as ɵQueryValueType, textDef as ɵted, unwrapValue as ɵunv, viewDef as ɵvid, ViewDefinition as ɵViewDefinition, ViewFlags as ɵViewFlags} from './view/index';\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 from which you should import all public core APIs.\n */\nexport * from './metadata';\nexport * from './version';\nexport {TypeDecorator} from './util/decorators';\nexport * from './di';\nexport {createPlatform, assertPlatform, destroyPlatform, getPlatform, PlatformRef, ApplicationRef, createPlatformFactory, NgProbeToken} from './application_ref';\nexport {enableProdMode, isDevMode} from './util/is_dev_mode';\nexport {APP_ID, PACKAGE_ROOT_URL, PLATFORM_INITIALIZER, PLATFORM_ID, APP_BOOTSTRAP_LISTENER} from './application_tokens';\nexport {APP_INITIALIZER, ApplicationInitStatus} from './application_init';\nexport * from './zone';\nexport * from './render';\nexport * from './linker';\nexport {DebugElement, DebugEventListener, DebugNode, asNativeElements, getDebugNode, Predicate} from './debug/debug_node';\nexport {GetTestability, Testability, TestabilityRegistry, setTestabilityGetter} from './testability/testability';\nexport * from './change_detection';\nexport * from './platform_core_providers';\nexport {TRANSLATIONS, TRANSLATIONS_FORMAT, LOCALE_ID, DEFAULT_CURRENCY_CODE, MissingTranslationStrategy} from './i18n/tokens';\nexport {ApplicationModule} from './application_module';\nexport {AbstractType, Type} from './interface/type';\nexport {EventEmitter} from './event_emitter';\nexport {ErrorHandler} from './error_handler';\nexport * from './core_private_export';\nexport * from './core_render3_private_export';\nexport {SecurityContext} from './sanitization/security';\nexport {Sanitizer} from './sanitization/sanitizer';\nexport * from './codegen_private_exports';\n\nimport {global} from './util/global';\nif (typeof ngDevMode !== 'undefined' && ngDevMode) {\n // This helper is to give a reasonable error message to people upgrading to v9 that have not yet\n // installed `@angular/localize` in their app.\n // tslint:disable-next-line: no-toplevel-property-access\n global.$localize = global.$localize || function() {\n throw new Error(\n 'It looks like your application or one of its dependencies is using i18n.\\n' +\n 'Angular 9 introduced a global `$localize()` function that needs to be loaded.\\n' +\n 'Please run `ng add @angular/localize` from the Angular CLI.\\n' +\n '(For non-CLI projects, add `import \\'@angular/localize/init\\';` to your `polyfills.ts` file.\\n' +\n 'For server-side rendering applications add the import to your `main.server.ts` file.)');\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.\n */\nexport * from './src/core';\n\n// This file only reexports content of the `src` folder. Keep it that way.\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file is not used to build this module. It is only used during editing\n// by the TypeScript language service and during build for verification. `ngc`\n// replaces this file with production index.ts when it rewrites private symbol\n// names.\n\nexport * from './public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {APPLICATION_MODULE_PROVIDERS as ɵangular_packages_core_core_z,_iterableDiffersFactory as ɵangular_packages_core_core_w,_keyValueDiffersFactory as ɵangular_packages_core_core_x,_localeFactory as ɵangular_packages_core_core_y,zoneSchedulerFactory as ɵangular_packages_core_core_ba} from './src/application_module';\nexport {_appIdRandomProviderFactory as ɵangular_packages_core_core_g} from './src/application_tokens';\nexport {injectChangeDetectorRef as ɵangular_packages_core_core_r} from './src/change_detection/change_detector_ref';\nexport {DefaultIterableDifferFactory as ɵangular_packages_core_core_s} from './src/change_detection/differs/default_iterable_differ';\nexport {DefaultKeyValueDifferFactory as ɵangular_packages_core_core_t} from './src/change_detection/differs/default_keyvalue_differ';\nexport {defaultIterableDiffersFactory as ɵangular_packages_core_core_u} from './src/change_detection/differs/iterable_differs';\nexport {defaultKeyValueDiffersFactory as ɵangular_packages_core_core_v} from './src/change_detection/differs/keyvalue_differs';\nexport {DebugElement__PRE_R3__ as ɵangular_packages_core_core_p,DebugNode__PRE_R3__ as ɵangular_packages_core_core_o,getDebugNodeR2__PRE_R3__ as ɵangular_packages_core_core_q} from './src/debug/debug_node';\nexport {isForwardRef as ɵangular_packages_core_core_a} from './src/di/forward_ref';\nexport {getInjectImplementation as ɵangular_packages_core_core_bx} from './src/di/inject_switch';\nexport {attachInjectFlag as ɵangular_packages_core_core_c,injectInjectorOnly as ɵangular_packages_core_core_b} from './src/di/injector_compatibility';\nexport {InjectorMarkers as ɵangular_packages_core_core_by} from './src/di/injector_marker';\nexport {DecoratorFlags as ɵangular_packages_core_core_bt,InternalInjectFlags as ɵangular_packages_core_core_bu} from './src/di/interface/injector';\nexport {NullInjector as ɵangular_packages_core_core_bw} from './src/di/null_injector';\nexport {ReflectiveInjector_ as ɵangular_packages_core_core_d} from './src/di/reflective_injector';\nexport {ReflectiveDependency as ɵangular_packages_core_core_e,resolveReflectiveProviders as ɵangular_packages_core_core_f} from './src/di/reflective_provider';\nexport {USD_CURRENCY_CODE as ɵangular_packages_core_core_bb} from './src/i18n/localization';\nexport {createElementRef as ɵangular_packages_core_core_j,injectElementRef as ɵangular_packages_core_core_i} from './src/linker/element_ref';\nexport {getModuleFactory__PRE_R3__ as ɵangular_packages_core_core_k} from './src/linker/ng_module_factory_loader';\nexport {createTemplateRef as ɵangular_packages_core_core_m,injectTemplateRef as ɵangular_packages_core_core_l} from './src/linker/template_ref';\nexport {injectViewContainerRef as ɵangular_packages_core_core_n} from './src/linker/view_container_ref';\nexport {injectRenderer2 as ɵangular_packages_core_core_h} from './src/render/api';\nexport {SCHEDULER as ɵangular_packages_core_core_bf} from './src/render3/component_ref';\nexport {injectAttributeImpl as ɵangular_packages_core_core_bg} from './src/render3/di';\nexport {NgOnChangesFeatureImpl as ɵangular_packages_core_core_be} from './src/render3/features/ng_onchanges_feature';\nexport {i18nPostprocess as ɵangular_packages_core_core_cc} from './src/render3/i18n/i18n_postprocess';\nexport {TElementNode as ɵangular_packages_core_core_bk} from './src/render3/interfaces/node';\nexport {LView as ɵangular_packages_core_core_ca} from './src/render3/interfaces/view';\nexport {pureFunction1Internal as ɵangular_packages_core_core_bl,pureFunction2Internal as ɵangular_packages_core_core_bm,pureFunction3Internal as ɵangular_packages_core_core_bn,pureFunction4Internal as ɵangular_packages_core_core_bo,pureFunctionVInternal as ɵangular_packages_core_core_bp} from './src/render3/pure_function';\nexport {getBindingRoot as ɵangular_packages_core_core_bi,getLView as ɵangular_packages_core_core_bh,nextContextImpl as ɵangular_packages_core_core_bj} from './src/render3/state';\nexport {getRootContext as ɵangular_packages_core_core_cb} from './src/render3/util/view_traversal_utils';\nexport {getNativeByTNode as ɵangular_packages_core_core_bz} from './src/render3/util/view_utils';\nexport {getUrlSanitizer as ɵangular_packages_core_core_bq} from './src/sanitization/sanitization';\nexport {makeParamDecorator as ɵangular_packages_core_core_bs,makePropDecorator as ɵangular_packages_core_core_br} from './src/util/decorators';\nexport {getClosureSafeProperty as ɵangular_packages_core_core_bv} from './src/util/property';\nexport {_def as ɵangular_packages_core_core_bc} from './src/view/provider';\nexport {DebugContext as ɵangular_packages_core_core_bd} from './src/view/types';"],"names":["InjectFlags","ChangeDetectionStrategy","ChangeDetectorStatus","ViewEncapsulation","global","unusedValueExportToPlacateAjd","FactoryTarget","policy","getPolicy","SecurityContext","RendererStyleFlags2","unused1","unused2","unused3","unused4","unused5","unusedValueToPlacateAjd","INJECTOR","CIRCULAR","NO_NEW_LINE","NULL_INJECTOR","renderComponent","USE_VALUE","render3CompileInjectable","LocaleDataIndex","resolveProvider","getComponent","R3_ViewRef","R3ViewRef","_renderCompCount","renderDetachView","createInjector","InjectorRefTokenKey","INJECTORRefTokenKey","_createProviderInstance","ComponentFactory","viewEngine_ComponentFactoryResolver","getNamespace","ComponentRef","viewEngine_ComponentFactory","ComponentFactoryResolver","viewEngine_ComponentRef","viewEngine_NgModuleRef","NgModuleRef","viewEngine_NgModuleFactory","getPipeDef","unwrapValue","Subscription","Subject","ViewEngine_TemplateRef","ViewEngine_ElementRef","r3.ɵɵattribute","r3.ɵɵattributeInterpolate1","r3.ɵɵattributeInterpolate2","r3.ɵɵattributeInterpolate3","r3.ɵɵattributeInterpolate4","r3.ɵɵattributeInterpolate5","r3.ɵɵattributeInterpolate6","r3.ɵɵattributeInterpolate7","r3.ɵɵattributeInterpolate8","r3.ɵɵattributeInterpolateV","r3.ɵɵdefineComponent","r3.ɵɵdefineDirective","r3.ɵɵdefineNgModule","r3.ɵɵdefinePipe","r3.ɵɵdirectiveInject","r3.ɵɵgetInheritedFactory","r3.ɵɵinjectAttribute","r3.ɵɵinvalidFactory","r3.ɵɵtemplateRefExtractor","r3.ɵɵNgOnChangesFeature","r3.ɵɵProvidersFeature","r3.ɵɵCopyDefinitionFeature","r3.ɵɵInheritDefinitionFeature","r3.ɵɵnextContext","r3.ɵɵnamespaceHTML","r3.ɵɵnamespaceMathML","r3.ɵɵnamespaceSVG","r3.ɵɵenableBindings","r3.ɵɵdisableBindings","r3.ɵɵelementStart","r3.ɵɵelementEnd","r3.ɵɵelement","r3.ɵɵelementContainerStart","r3.ɵɵelementContainerEnd","r3.ɵɵelementContainer","r3.ɵɵpureFunction0","r3.ɵɵpureFunction1","r3.ɵɵpureFunction2","r3.ɵɵpureFunction3","r3.ɵɵpureFunction4","r3.ɵɵpureFunction5","r3.ɵɵpureFunction6","r3.ɵɵpureFunction7","r3.ɵɵpureFunction8","r3.ɵɵpureFunctionV","r3.ɵɵgetCurrentView","r3.ɵɵrestoreView","r3.ɵɵlistener","r3.ɵɵprojection","r3.ɵɵsyntheticHostProperty","r3.ɵɵsyntheticHostListener","r3.ɵɵpipeBind1","r3.ɵɵpipeBind2","r3.ɵɵpipeBind3","r3.ɵɵpipeBind4","r3.ɵɵpipeBindV","r3.ɵɵprojectionDef","r3.ɵɵhostProperty","r3.ɵɵproperty","r3.ɵɵpropertyInterpolate","r3.ɵɵpropertyInterpolate1","r3.ɵɵpropertyInterpolate2","r3.ɵɵpropertyInterpolate3","r3.ɵɵpropertyInterpolate4","r3.ɵɵpropertyInterpolate5","r3.ɵɵpropertyInterpolate6","r3.ɵɵpropertyInterpolate7","r3.ɵɵpropertyInterpolate8","r3.ɵɵpropertyInterpolateV","r3.ɵɵpipe","r3.ɵɵqueryRefresh","r3.ɵɵviewQuery","r3.ɵɵloadQuery","r3.ɵɵcontentQuery","r3.ɵɵreference","r3.ɵɵclassMap","r3.ɵɵclassMapInterpolate1","r3.ɵɵclassMapInterpolate2","r3.ɵɵclassMapInterpolate3","r3.ɵɵclassMapInterpolate4","r3.ɵɵclassMapInterpolate5","r3.ɵɵclassMapInterpolate6","r3.ɵɵclassMapInterpolate7","r3.ɵɵclassMapInterpolate8","r3.ɵɵclassMapInterpolateV","r3.ɵɵstyleMap","r3.ɵɵstyleMapInterpolate1","r3.ɵɵstyleMapInterpolate2","r3.ɵɵstyleMapInterpolate3","r3.ɵɵstyleMapInterpolate4","r3.ɵɵstyleMapInterpolate5","r3.ɵɵstyleMapInterpolate6","r3.ɵɵstyleMapInterpolate7","r3.ɵɵstyleMapInterpolate8","r3.ɵɵstyleMapInterpolateV","r3.ɵɵstyleProp","r3.ɵɵstylePropInterpolate1","r3.ɵɵstylePropInterpolate2","r3.ɵɵstylePropInterpolate3","r3.ɵɵstylePropInterpolate4","r3.ɵɵstylePropInterpolate5","r3.ɵɵstylePropInterpolate6","r3.ɵɵstylePropInterpolate7","r3.ɵɵstylePropInterpolate8","r3.ɵɵstylePropInterpolateV","r3.ɵɵclassProp","r3.ɵɵadvance","r3.ɵɵtemplate","r3.ɵɵtext","r3.ɵɵtextInterpolate","r3.ɵɵtextInterpolate1","r3.ɵɵtextInterpolate2","r3.ɵɵtextInterpolate3","r3.ɵɵtextInterpolate4","r3.ɵɵtextInterpolate5","r3.ɵɵtextInterpolate6","r3.ɵɵtextInterpolate7","r3.ɵɵtextInterpolate8","r3.ɵɵtextInterpolateV","r3.ɵɵi18n","r3.ɵɵi18nAttributes","r3.ɵɵi18nExp","r3.ɵɵi18nStart","r3.ɵɵi18nEnd","r3.ɵɵi18nApply","r3.ɵɵi18nPostprocess","r3.ɵɵresolveWindow","r3.ɵɵresolveDocument","r3.ɵɵresolveBody","r3.ɵɵsetComponentScope","r3.ɵɵsetNgModuleScope","sanitization.ɵɵsanitizeHtml","sanitization.ɵɵsanitizeStyle","sanitization.ɵɵsanitizeResourceUrl","sanitization.ɵɵsanitizeScript","sanitization.ɵɵsanitizeUrl","sanitization.ɵɵsanitizeUrlOrResourceUrl","sanitization.ɵɵtrustConstantHtml","sanitization.ɵɵtrustConstantResourceUrl","getDirectiveMetadata","render3CompileComponent","render3CompileDirective","render3CompilePipe","render3CompileNgModule","LOCALE_ID","MissingTranslationStrategy","NgModuleFactoryR3","ComponentFactoryR3","R3NgModuleFactory","_publishDefaultGlobalUtils","publishDefaultGlobalUtils","Observable","merge","share","ViewRef","getDebugNode","setElementAttribute"],"mappings":";;;;;;;;;;;;IAAA;;;;;;;aAQgB,sBAAsB,CAAI,wBAA2B;QACnE,KAAK,IAAI,GAAG,IAAI,wBAAwB,EAAE;YACxC,IAAI,wBAAwB,CAAC,GAAG,CAAC,KAAK,sBAA6B,EAAE;gBACnE,OAAO,GAAG,CAAC;aACZ;SACF;QACD,MAAM,KAAK,CAAC,mDAAmD,CAAC,CAAC;IACnE,CAAC;IAED;;;;;;aAMgB,cAAc,CAAC,MAA+B,EAAE,MAA+B;QAC7F,KAAK,IAAM,GAAG,IAAI,MAAM,EAAE;YACxB,IAAI,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;gBAC7D,MAAM,CAAC,GAA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ICAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}1 {"version":3,"file":"core.umd.js","sources":["../../../../../packages/core/src/util/property.ts","../../../../../packages/core/src/util/stringify.ts","../../../../../packages/core/src/di/forward_ref.ts","../../../../../external/npm/node_modules/tslib/tslib.es6.js","../../../../../packages/core/src/render3/error_details_base_url.ts","../../../../../packages/core/src/render3/error_code.ts","../../../../../packages/core/src/render3/util/stringify_utils.ts","../../../../../packages/core/src/render3/errors_di.ts","../../../../../packages/core/src/util/assert.ts","../../../../../packages/core/src/di/interface/defs.ts","../../../../../packages/core/src/di/interface/injector.ts","../../../../../packages/core/src/di/inject_switch.ts","../../../../../packages/core/src/util/closure.ts","../../../../../packages/core/src/change_detection/constants.ts","../../../../../packages/core/src/metadata/view.ts","../../../../../packages/core/src/util/global.ts","../../../../../packages/core/src/util/ng_dev_mode.ts","../../../../../packages/core/src/util/empty.ts","../../../../../packages/core/src/render3/fields.ts","../../../../../packages/core/src/render3/definition.ts","../../../../../packages/core/src/render3/interfaces/container.ts","../../../../../packages/core/src/render3/interfaces/view.ts","../../../../../packages/core/src/render3/interfaces/type_checks.ts","../../../../../packages/core/src/render3/assert.ts","../../../../../packages/core/src/render3/definition_factory.ts","../../../../../packages/core/src/interface/simple_change.ts","../../../../../packages/core/src/render3/features/ng_onchanges_feature.ts","../../../../../packages/core/src/render3/profiler.ts","../../../../../packages/core/src/render3/namespaces.ts","../../../../../packages/core/src/render3/interfaces/document.ts","../../../../../packages/core/src/render3/interfaces/renderer.ts","../../../../../packages/core/src/render3/util/view_utils.ts","../../../../../packages/core/src/render3/state.ts","../../../../../packages/core/src/render3/hooks.ts","../../../../../packages/core/src/render3/interfaces/injector.ts","../../../../../packages/core/src/render3/interfaces/node.ts","../../../../../packages/core/src/render3/node_assert.ts","../../../../../packages/core/src/render3/util/attrs_utils.ts","../../../../../packages/core/src/render3/util/injector_utils.ts","../../../../../packages/core/src/render3/di.ts","../../../../../packages/core/src/render3/instructions/di_attr.ts","../../../../../packages/core/src/util/decorators.ts","../../../../../packages/core/src/di/metadata_attr.ts","../../../../../packages/core/src/di/injection_token.ts","../../../../../packages/core/src/metadata/di.ts","../../../../../packages/core/src/compiler/compiler_facade_interface.ts","../../../../../packages/core/src/compiler/compiler_facade.ts","../../../../../packages/core/src/interface/type.ts","../../../../../packages/core/src/util/array_utils.ts","../../../../../packages/core/src/reflection/reflection_capabilities.ts","../../../../../packages/core/src/di/injector_compatibility.ts","../../../../../packages/core/src/di/metadata.ts","../../../../../packages/core/src/di/jit/util.ts","../../../../../packages/core/src/metadata/resource_loading.ts","../../../../../packages/core/src/util/security/trusted_types.ts","../../../../../packages/core/src/util/security/trusted_types_bypass.ts","../../../../../packages/core/src/sanitization/bypass.ts","../../../../../packages/core/src/sanitization/inert_body.ts","../../../../../packages/core/src/sanitization/url_sanitizer.ts","../../../../../packages/core/src/sanitization/html_sanitizer.ts","../../../../../packages/core/src/sanitization/security.ts","../../../../../packages/core/src/sanitization/sanitization.ts","../../../../../packages/core/src/render3/context_discovery.ts","../../../../../packages/core/src/util/errors.ts","../../../../../packages/core/src/errors.ts","../../../../../packages/core/src/error_handler.ts","../../../../../packages/core/src/metadata/schema.ts","../../../../../packages/core/src/util/dom.ts","../../../../../packages/core/src/util/named_array_type.ts","../../../../../packages/core/src/util/ng_reflect.ts","../../../../../packages/core/src/render3/util/misc_utils.ts","../../../../../packages/core/src/render3/errors.ts","../../../../../packages/core/src/render/api_flags.ts","../../../../../packages/core/src/render3/i18n/i18n_tree_shaking.ts","../../../../../packages/core/src/render3/interfaces/projection.ts","../../../../../packages/core/src/render3/util/view_traversal_utils.ts","../../../../../packages/core/src/render3/node_manipulation.ts","../../../../../packages/core/src/render3/styling/class_differ.ts","../../../../../packages/core/src/render3/node_selector_matcher.ts","../../../../../packages/core/src/render3/tokens.ts","../../../../../packages/core/src/render3/instructions/advance.ts","../../../../../packages/core/src/render3/interfaces/styling.ts","../../../../../packages/core/src/render3/util/debug_utils.ts","../../../../../packages/core/src/render3/instructions/lview_debug.ts","../../../../../packages/core/src/render3/instructions/shared.ts","../../../../../packages/core/src/render3/styling/static_styling.ts","../../../../../packages/core/src/render3/instructions/change_detection.ts","../../../../../packages/core/src/di/injector_token.ts","../../../../../packages/core/src/di/null_injector.ts","../../../../../packages/core/src/di/scope.ts","../../../../../packages/core/src/di/r3_injector.ts","../../../../../packages/core/src/di/injector.ts","../../../../../packages/core/src/render3/util/discovery_utils.ts","../../../../../packages/core/src/render3/util/change_detection_utils.ts","../../../../../packages/core/src/render3/util/global_utils.ts","../../../../../packages/core/src/render3/component.ts","../../../../../packages/core/src/render3/features/inherit_definition_feature.ts","../../../../../packages/core/src/render3/features/copy_definition_feature.ts","../../../../../packages/core/src/util/symbol.ts","../../../../../packages/core/src/change_detection/change_detection_util.ts","../../../../../packages/core/src/render3/bindings.ts","../../../../../packages/core/src/render3/instructions/attribute.ts","../../../../../packages/core/src/render3/instructions/interpolation.ts","../../../../../packages/core/src/render3/instructions/attribute_interpolation.ts","../../../../../packages/core/src/render3/instructions/template.ts","../../../../../packages/core/src/render3/instructions/storage.ts","../../../../../packages/core/src/di/jit/environment.ts","../../../../../packages/core/src/di/jit/injectable.ts","../../../../../packages/core/src/di/util.ts","../../../../../packages/core/src/di/injectable.ts","../../../../../packages/core/src/di/reflective_errors.ts","../../../../../packages/core/src/di/reflective_key.ts","../../../../../packages/core/src/reflection/reflector.ts","../../../../../packages/core/src/reflection/reflection.ts","../../../../../packages/core/src/di/reflective_provider.ts","../../../../../packages/core/src/di/reflective_injector.ts","../../../../../packages/core/src/di/index.ts","../../../../../packages/core/src/di.ts","../../../../../packages/core/src/render3/instructions/di.ts","../../../../../packages/core/src/render3/instructions/property.ts","../../../../../packages/core/src/render3/instructions/element.ts","../../../../../packages/core/src/render3/instructions/element_container.ts","../../../../../packages/core/src/render3/instructions/get_current_view.ts","../../../../../packages/core/src/util/lang.ts","../../../../../packages/core/src/render3/instructions/listener.ts","../../../../../packages/core/src/render3/instructions/namespace.ts","../../../../../packages/core/src/render3/instructions/next_context.ts","../../../../../packages/core/src/render3/instructions/projection.ts","../../../../../packages/core/src/render3/instructions/property_interpolation.ts","../../../../../packages/core/src/render3/styling/style_binding_list.ts","../../../../../packages/core/src/render3/styling/styling_parser.ts","../../../../../packages/core/src/render3/instructions/styling.ts","../../../../../packages/core/src/render3/instructions/text.ts","../../../../../packages/core/src/render3/instructions/text_interpolation.ts","../../../../../packages/core/src/render3/instructions/class_map_interpolation.ts","../../../../../packages/core/src/render3/instructions/style_map_interpolation.ts","../../../../../packages/core/src/render3/instructions/style_prop_interpolation.ts","../../../../../packages/core/src/render3/instructions/host_property.ts","../../../../../packages/core/src/util/ng_i18n_closure_mode.ts","../../../../../packages/core/src/i18n/locale_en.ts","../../../../../packages/core/src/i18n/locale_data_api.ts","../../../../../packages/core/src/i18n/localization.ts","../../../../../packages/core/src/render3/interfaces/i18n.ts","../../../../../packages/core/src/render3/i18n/i18n_locale_id.ts","../../../../../packages/core/src/render3/node_manipulation_i18n.ts","../../../../../packages/core/src/render3/i18n/i18n_insert_before_index.ts","../../../../../packages/core/src/render3/i18n/i18n_util.ts","../../../../../packages/core/src/render3/i18n/i18n_apply.ts","../../../../../packages/core/src/render3/instructions/i18n_icu_container_visitor.ts","../../../../../packages/core/src/render3/i18n/i18n_debug.ts","../../../../../packages/core/src/render3/i18n/i18n_parse.ts","../../../../../packages/core/src/render3/i18n/i18n_postprocess.ts","../../../../../packages/core/src/render3/instructions/i18n.ts","../../../../../packages/core/src/render3/instructions/all.ts","../../../../../packages/core/src/render3/di_setup.ts","../../../../../packages/core/src/render3/features/providers_feature.ts","../../../../../packages/core/src/linker/component_factory.ts","../../../../../packages/core/src/linker/component_factory_resolver.ts","../../../../../packages/core/src/util/noop.ts","../../../../../packages/core/src/linker/element_ref.ts","../../../../../packages/core/src/render/api.ts","../../../../../packages/core/src/sanitization/sanitizer.ts","../../../../../packages/core/src/version.ts","../../../../../packages/core/src/change_detection/differs/default_iterable_differ.ts","../../../../../packages/core/src/change_detection/differs/default_keyvalue_differ.ts","../../../../../packages/core/src/change_detection/differs/iterable_differs.ts","../../../../../packages/core/src/change_detection/differs/keyvalue_differs.ts","../../../../../packages/core/src/render3/collect_native_nodes.ts","../../../../../packages/core/src/render3/view_ref.ts","../../../../../packages/core/src/change_detection/change_detector_ref.ts","../../../../../packages/core/src/change_detection/change_detection.ts","../../../../../packages/core/src/linker/template_ref.ts","../../../../../packages/core/src/linker/ng_module_factory.ts","../../../../../packages/core/src/linker/view_container_ref.ts","../../../../../packages/core/src/view/errors.ts","../../../../../packages/core/src/view/types.ts","../../../../../packages/core/src/view/util.ts","../../../../../packages/core/src/view/ng_module.ts","../../../../../packages/core/src/view/view_attach.ts","../../../../../packages/core/src/view/refs.ts","../../../../../packages/core/src/view/provider.ts","../../../../../packages/core/src/render3/component_ref.ts","../../../../../packages/core/src/render3/metadata.ts","../../../../../packages/core/src/linker/ng_module_factory_registration.ts","../../../../../packages/core/src/render3/ng_module_ref.ts","../../../../../packages/core/src/render3/pure_function.ts","../../../../../packages/core/src/render3/pipe.ts","../../../../../packages/core/src/event_emitter.ts","../../../../../packages/core/src/linker/query_list.ts","../../../../../packages/core/src/render3/interfaces/definition.ts","../../../../../packages/core/src/render3/interfaces/query.ts","../../../../../packages/core/src/render3/query.ts","../../../../../packages/core/src/render3/view_engine_compatibility_prebound.ts","../../../../../packages/core/src/render3/index.ts","../../../../../packages/core/src/render3/jit/environment.ts","../../../../../packages/core/src/render3/jit/jit_options.ts","../../../../../packages/core/src/render3/jit/module.ts","../../../../../packages/core/src/render3/jit/directive.ts","../../../../../packages/core/src/render3/jit/pipe.ts","../../../../../packages/core/src/metadata/directives.ts","../../../../../packages/core/src/metadata/ng_module.ts","../../../../../packages/core/src/metadata.ts","../../../../../packages/core/src/application_init.ts","../../../../../packages/core/src/application_tokens.ts","../../../../../packages/core/src/console.ts","../../../../../packages/core/src/i18n/tokens.ts","../../../../../packages/core/src/ivy_switch.ts","../../../../../packages/core/src/linker/compiler.ts","../../../../../packages/core/src/util/microtask.ts","../../../../../packages/core/src/util/raf.ts","../../../../../packages/core/src/zone/ng_zone.ts","../../../../../packages/core/src/testability/testability.ts","../../../../../packages/core/src/util/is_dev_mode.ts","../../../../../packages/core/src/application_ref.ts","../../../../../packages/core/src/zone.ts","../../../../../packages/core/src/render.ts","../../../../../packages/core/src/linker/ng_module_factory_loader.ts","../../../../../packages/core/src/linker/system_js_ng_module_factory_loader.ts","../../../../../packages/core/src/linker/view_ref.ts","../../../../../packages/core/src/linker.ts","../../../../../packages/core/src/debug/debug_node.ts","../../../../../packages/core/src/change_detection.ts","../../../../../packages/core/src/platform_core_providers.ts","../../../../../packages/core/src/application_module.ts","../../../../../packages/core/src/view/element.ts","../../../../../packages/core/src/view/query.ts","../../../../../packages/core/src/view/ng_content.ts","../../../../../packages/core/src/view/pure_expression.ts","../../../../../packages/core/src/view/text.ts","../../../../../packages/core/src/view/view.ts","../../../../../packages/core/src/view/services.ts","../../../../../packages/core/src/view/entrypoint.ts","../../../../../packages/core/src/view/index.ts","../../../../../packages/core/src/core_private_export.ts","../../../../../packages/core/src/render3/jit/partial.ts","../../../../../packages/core/src/core_render3_private_export.ts","../../../../../packages/core/src/codegen_private_exports.ts","../../../../../packages/core/src/core.ts","../../../../../packages/core/public_api.ts","../../../../../packages/core/index.ts","../../../../../packages/core/core.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\nexport function getClosureSafeProperty<T>(objWithPropertyToExtract: T): string {\n for (let key in objWithPropertyToExtract) {\n if (objWithPropertyToExtract[key] === getClosureSafeProperty as any) {\n return key;\n }\n }\n throw Error('Could not find renamed property on target object.');\n}\n\n/**\n * Sets properties on a target object from a source object, but only if\n * the property doesn't already exist on the target object.\n * @param target The target to set properties on\n * @param source The source of the property keys and values to set\n */\nexport function fillProperties(target: {[key: string]: string}, source: {[key: string]: string}) {\n for (const key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport function stringify(token: any): string {\n if (typeof token === 'string') {\n return token;\n }\n\n if (Array.isArray(token)) {\n return '[' + token.map(stringify).join(', ') + ']';\n }\n\n if (token == null) {\n return '' + token;\n }\n\n if (token.overriddenName) {\n return `${token.overriddenName}`;\n }\n\n if (token.name) {\n return `${token.name}`;\n }\n\n const res = token.toString();\n\n if (res == null) {\n return '' + res;\n }\n\n const newLineIndex = res.indexOf('\\n');\n return newLineIndex === -1 ? res : res.substring(0, newLineIndex);\n}\n\n/**\n * Concatenates two strings with separator, allocating new strings only when necessary.\n *\n * @param before before string.\n * @param separator separator string.\n * @param after after string.\n * @returns concatenated string.\n */\nexport function concatStringsWithSpace(before: string|null, after: string|null): string {\n return (before == null || before === '') ?\n (after === null ? '' : after) :\n ((after == null || after === '') ? before : before + ' ' + after);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {getClosureSafeProperty} from '../util/property';\nimport {stringify} from '../util/stringify';\n\n\n\n/**\n * An interface that a function passed into {@link forwardRef} has to implement.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref_fn'}\n * @publicApi\n */\nexport interface ForwardRefFn {\n (): any;\n}\n\nconst __forward_ref__ = getClosureSafeProperty({__forward_ref__: getClosureSafeProperty});\n\n/**\n * Allows to refer to references which are not yet defined.\n *\n * For instance, `forwardRef` is used when the `token` which we need to refer to for the purposes of\n * DI is declared, but not yet defined. It is also used when the `token` which we use when creating\n * a query is not yet defined.\n *\n * @usageNotes\n * ### Example\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}\n * @publicApi\n */\nexport function forwardRef(forwardRefFn: ForwardRefFn): Type<any> {\n (<any>forwardRefFn).__forward_ref__ = forwardRef;\n (<any>forwardRefFn).toString = function() {\n return stringify(this());\n };\n return (<Type<any>><any>forwardRefFn);\n}\n\n/**\n * Lazily retrieves the reference value from a forwardRef.\n *\n * Acts as the identity function when given a non-forward-ref value.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'}\n *\n * @see `forwardRef`\n * @publicApi\n */\nexport function resolveForwardRef<T>(type: T): T {\n return isForwardRef(type) ? type() : type;\n}\n\n/** Checks whether a function is wrapped by a `forwardRef`. */\nexport function isForwardRef(fn: any): fn is() => any {\n return typeof fn === 'function' && fn.hasOwnProperty(__forward_ref__) &&\n fn.__forward_ref__ === forwardRef;\n}\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 (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Base URL for the error details page.\n *\n * Keep the files below in sync:\n * - packages/compiler-cli/src/ngtsc/diagnostics/src/error_details_base_url.ts\n * - packages/core/src/render3/error_details_base_url.ts\n */\nexport const ERROR_DETAILS_PAGE_BASE_URL = 'https://angular.io/errors';\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 {ERROR_DETAILS_PAGE_BASE_URL} from './error_details_base_url';\n\nexport const enum RuntimeErrorCode {\n // Internal Errors\n\n // Change Detection Errors\n EXPRESSION_CHANGED_AFTER_CHECKED = '100',\n\n // Dependency Injection Errors\n CYCLIC_DI_DEPENDENCY = '200',\n PROVIDER_NOT_FOUND = '201',\n\n // Template Errors\n MULTIPLE_COMPONENTS_MATCH = '300',\n EXPORT_NOT_FOUND = '301',\n PIPE_NOT_FOUND = '302',\n UNKNOWN_BINDING = '303',\n UNKNOWN_ELEMENT = '304',\n TEMPLATE_STRUCTURE_ERROR = '305'\n\n // Styling Errors\n\n // Declarations Errors\n\n // i18n Errors\n\n // Compilation Errors\n}\n\nexport class RuntimeError extends Error {\n constructor(public code: RuntimeErrorCode, message: string) {\n super(formatRuntimeError(code, message));\n }\n}\n\n// Contains a set of error messages that have details guides at angular.io.\n// Full list of available error guides can be found at https://angular.io/errors\n/* tslint:disable:no-toplevel-property-access */\nexport const RUNTIME_ERRORS_WITH_GUIDES = new Set([\n RuntimeErrorCode.EXPRESSION_CHANGED_AFTER_CHECKED,\n RuntimeErrorCode.CYCLIC_DI_DEPENDENCY,\n RuntimeErrorCode.PROVIDER_NOT_FOUND,\n RuntimeErrorCode.MULTIPLE_COMPONENTS_MATCH,\n RuntimeErrorCode.EXPORT_NOT_FOUND,\n RuntimeErrorCode.PIPE_NOT_FOUND,\n]);\n/* tslint:enable:no-toplevel-property-access */\n\n/** Called to format a runtime error */\nexport function formatRuntimeError(code: RuntimeErrorCode, message: string): string {\n const fullCode = code ? `NG0${code}: ` : '';\n\n let errorMessage = `${fullCode}${message}`;\n\n // Some runtime errors are still thrown without `ngDevMode` (for example\n // `throwProviderNotFoundError`), so we add `ngDevMode` check here to avoid pulling\n // `RUNTIME_ERRORS_WITH_GUIDES` symbol into prod bundles.\n // TODO: revisit all instances where `RuntimeError` is thrown and see if `ngDevMode` can be added\n // there instead to tree-shake more devmode-only code (and eventually remove `ngDevMode` check\n // from this code).\n if (ngDevMode && RUNTIME_ERRORS_WITH_GUIDES.has(code)) {\n errorMessage = `${errorMessage}. Find more at ${ERROR_DETAILS_PAGE_BASE_URL}/NG0${code}`;\n }\n return errorMessage;\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 * Used for stringify render output in Ivy.\n * Important! This function is very performance-sensitive and we should\n * be extra careful not to introduce megamorphic reads in it.\n * Check `core/test/render3/perf/render_stringify` for benchmarks and alternate implementations.\n */\nexport function renderStringify(value: any): string {\n if (typeof value === 'string') return value;\n if (value == null) return '';\n // Use `String` so that it invokes the `toString` method of the value. Note that this\n // appears to be faster than calling `value.toString` (see `render_stringify` benchmark).\n return String(value);\n}\n\n\n/**\n * Used to stringify a value so that it can be displayed in an error message.\n * Important! This function contains a megamorphic read and should only be\n * used for error messages.\n */\nexport function stringifyForError(value: any): string {\n if (typeof value === 'function') return value.name || value.toString();\n if (typeof value === 'object' && value != null && typeof value.type === 'function') {\n return value.type.name || value.type.toString();\n }\n\n return renderStringify(value);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {InjectorType} from '../di/interface/defs';\nimport {stringify} from '../util/stringify';\nimport {RuntimeError, RuntimeErrorCode} from './error_code';\nimport {stringifyForError} from './util/stringify_utils';\n\n\n/** Called when directives inject each other (creating a circular dependency) */\nexport function throwCyclicDependencyError(token: string, path?: string[]): never {\n const depPath = path ? `. Dependency path: ${path.join(' > ')} > ${token}` : '';\n throw new RuntimeError(\n RuntimeErrorCode.CYCLIC_DI_DEPENDENCY,\n `Circular dependency in DI detected for ${token}${depPath}`);\n}\n\nexport function throwMixedMultiProviderError() {\n throw new Error(`Cannot mix multi providers and regular providers`);\n}\n\nexport function throwInvalidProviderError(\n ngModuleType?: InjectorType<any>, providers?: any[], provider?: any) {\n let ngModuleDetail = '';\n if (ngModuleType && providers) {\n const providerDetail = providers.map(v => v == provider ? '?' + provider + '?' : '...');\n ngModuleDetail =\n ` - only instances of Provider and Type are allowed, got: [${providerDetail.join(', ')}]`;\n }\n\n throw new Error(\n `Invalid provider for the NgModule '${stringify(ngModuleType)}'` + ngModuleDetail);\n}\n\n\n/** Throws an error when a token is not found in DI. */\nexport function throwProviderNotFoundError(token: any, injectorName?: string): never {\n const injectorDetails = injectorName ? ` in ${injectorName}` : '';\n throw new RuntimeError(\n RuntimeErrorCode.PROVIDER_NOT_FOUND,\n `No provider for ${stringifyForError(token)} found${injectorDetails}`);\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// The functions in this file verify that the assumptions we are making\n// about state in an instruction are correct before implementing any logic.\n// They are meant only to be called in dev mode as sanity checks.\n\nimport {stringify} from './stringify';\n\nexport function assertNumber(actual: any, msg: string): asserts actual is number {\n if (!(typeof actual === 'number')) {\n throwError(msg, typeof actual, 'number', '===');\n }\n}\n\nexport function assertNumberInRange(\n actual: any, minInclusive: number, maxInclusive: number): asserts actual is number {\n assertNumber(actual, 'Expected a number');\n assertLessThanOrEqual(actual, maxInclusive, 'Expected number to be less than or equal to');\n assertGreaterThanOrEqual(actual, minInclusive, 'Expected number to be greater than or equal to');\n}\n\nexport function assertString(actual: any, msg: string): asserts actual is string {\n if (!(typeof actual === 'string')) {\n throwError(msg, actual === null ? 'null' : typeof actual, 'string', '===');\n }\n}\n\nexport function assertFunction(actual: any, msg: string): asserts actual is Function {\n if (!(typeof actual === 'function')) {\n throwError(msg, actual === null ? 'null' : typeof actual, 'function', '===');\n }\n}\n\nexport function assertEqual<T>(actual: T, expected: T, msg: string) {\n if (!(actual == expected)) {\n throwError(msg, actual, expected, '==');\n }\n}\n\nexport function assertNotEqual<T>(actual: T, expected: T, msg: string): asserts actual is T {\n if (!(actual != expected)) {\n throwError(msg, actual, expected, '!=');\n }\n}\n\nexport function assertSame<T>(actual: T, expected: T, msg: string): asserts actual is T {\n if (!(actual === expected)) {\n throwError(msg, actual, expected, '===');\n }\n}\n\nexport function assertNotSame<T>(actual: T, expected: T, msg: string) {\n if (!(actual !== expected)) {\n throwError(msg, actual, expected, '!==');\n }\n}\n\nexport function assertLessThan<T>(actual: T, expected: T, msg: string): asserts actual is T {\n if (!(actual < expected)) {\n throwError(msg, actual, expected, '<');\n }\n}\n\nexport function assertLessThanOrEqual<T>(actual: T, expected: T, msg: string): asserts actual is T {\n if (!(actual <= expected)) {\n throwError(msg, actual, expected, '<=');\n }\n}\n\nexport function assertGreaterThan<T>(actual: T, expected: T, msg: string): asserts actual is T {\n if (!(actual > expected)) {\n throwError(msg, actual, expected, '>');\n }\n}\n\nexport function assertGreaterThanOrEqual<T>(\n actual: T, expected: T, msg: string): asserts actual is T {\n if (!(actual >= expected)) {\n throwError(msg, actual, expected, '>=');\n }\n}\n\nexport function assertNotDefined<T>(actual: T, msg: string) {\n if (actual != null) {\n throwError(msg, actual, null, '==');\n }\n}\n\nexport function assertDefined<T>(actual: T|null|undefined, msg: string): asserts actual is T {\n if (actual == null) {\n throwError(msg, actual, null, '!=');\n }\n}\n\nexport function throwError(msg: string): never;\nexport function throwError(msg: string, actual: any, expected: any, comparison: string): never;\nexport function throwError(msg: string, actual?: any, expected?: any, comparison?: string): never {\n throw new Error(\n `ASSERTION ERROR: ${msg}` +\n (comparison == null ? '' : ` [Expected=> ${expected} ${comparison} ${actual} <=Actual]`));\n}\n\nexport function assertDomNode(node: any): asserts node is Node {\n // If we're in a worker, `Node` will not be defined.\n if (!(typeof Node !== 'undefined' && node instanceof Node) &&\n !(typeof node === 'object' && node != null &&\n node.constructor.name === 'WebWorkerRenderNode')) {\n throwError(`The provided value must be an instance of a DOM Node but got ${stringify(node)}`);\n }\n}\n\n\nexport function assertIndexInRange(arr: any[], index: number) {\n assertDefined(arr, 'Array must be defined.');\n const maxLen = arr.length;\n if (index < 0 || index >= maxLen) {\n throwError(`Index expected to be less than ${maxLen} but got ${index}`);\n }\n}\n\n\nexport function assertOneOf(value: any, ...validValues: any[]) {\n if (validValues.indexOf(value) !== -1) return true;\n throwError(`Expected value to be one of ${JSON.stringify(validValues)} but was ${\n JSON.stringify(value)}.`);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../../interface/type';\nimport {getClosureSafeProperty} from '../../util/property';\nimport {ClassProvider, ConstructorProvider, ExistingProvider, FactoryProvider, StaticClassProvider, ValueProvider} from './provider';\n\n\n\n/**\n * Information about how a type or `InjectionToken` interfaces with the DI system.\n *\n * At a minimum, this includes a `factory` which defines how to create the given type `T`, possibly\n * requesting injection of other types if necessary.\n *\n * Optionally, a `providedIn` parameter specifies that the given type belongs to a particular\n * `Injector`, `NgModule`, or a special scope (e.g. `'root'`). A value of `null` indicates\n * that the injectable does not belong to any scope.\n *\n * @codeGenApi\n * @publicApi The ViewEngine compiler emits code with this type for injectables. This code is\n * deployed to npm, and should be treated as public api.\n\n */\nexport interface ɵɵInjectableDeclaration<T> {\n /**\n * Specifies that the given type belongs to a particular injector:\n * - `InjectorType` such as `NgModule`,\n * - `'root'` the root injector\n * - `'any'` all injectors.\n * - `null`, does not belong to any injector. Must be explicitly listed in the injector\n * `providers`.\n */\n providedIn: InjectorType<any>|'root'|'platform'|'any'|null;\n\n /**\n * The token to which this definition belongs.\n *\n * Note that this may not be the same as the type that the `factory` will create.\n */\n token: unknown;\n\n /**\n * Factory method to execute to create an instance of the injectable.\n */\n factory: (t?: Type<any>) => T;\n\n /**\n * In a case of no explicit injector, a location where the instance of the injectable is stored.\n */\n value: T|undefined;\n}\n\n/**\n * Information about the providers to be included in an `Injector` as well as how the given type\n * which carries the information should be created by the DI system.\n *\n * An `InjectorDef` can import other types which have `InjectorDefs`, forming a deep nested\n * structure of providers with a defined priority (identically to how `NgModule`s also have\n * an import/dependency structure).\n *\n * NOTE: This is a private type and should not be exported\n *\n * @codeGenApi\n */\nexport interface ɵɵInjectorDef<T> {\n // TODO(alxhub): Narrow down the type here once decorators properly change the return type of the\n // class they are decorating (to add the ɵprov property for example).\n providers: (Type<any>|ValueProvider|ExistingProvider|FactoryProvider|ConstructorProvider|\n StaticClassProvider|ClassProvider|any[])[];\n\n imports: (InjectorType<any>|InjectorTypeWithProviders<any>)[];\n}\n\n/**\n * A `Type` which has a `ɵprov: ɵɵInjectableDeclaration` static field.\n *\n * `InjectableType`s contain their own Dependency Injection metadata and are usable in an\n * `InjectorDef`-based `StaticInjector.\n *\n * @publicApi\n */\nexport interface InjectableType<T> extends Type<T> {\n /**\n * Opaque type whose structure is highly version dependent. Do not rely on any properties.\n */\n ɵprov: unknown;\n}\n\n/**\n * A type which has an `InjectorDef` static field.\n *\n * `InjectorTypes` can be used to configure a `StaticInjector`.\n *\n * This is an opaque type whose structure is highly version dependent. Do not rely on any\n * properties.\n *\n * @publicApi\n */\nexport interface InjectorType<T> extends Type<T> {\n ɵfac?: unknown;\n ɵinj: unknown;\n}\n\n/**\n * Describes the `InjectorDef` equivalent of a `ModuleWithProviders`, an `InjectorType` with an\n * associated array of providers.\n *\n * Objects of this type can be listed in the imports section of an `InjectorDef`.\n *\n * NOTE: This is a private type and should not be exported\n */\nexport interface InjectorTypeWithProviders<T> {\n ngModule: InjectorType<T>;\n providers?: (Type<any>|ValueProvider|ExistingProvider|FactoryProvider|ConstructorProvider|\n StaticClassProvider|ClassProvider|any[])[];\n}\n\n\n/**\n * Construct an injectable definition which defines how a token will be constructed by the DI\n * system, and in which injectors (if any) it will be available.\n *\n * This should be assigned to a static `ɵprov` field on a type, which will then be an\n * `InjectableType`.\n *\n * Options:\n * * `providedIn` determines which injectors will include the injectable, by either associating it\n * with an `@NgModule` or other `InjectorType`, or by specifying that this injectable should be\n * provided in the `'root'` injector, which will be the application-level injector in most apps.\n * * `factory` gives the zero argument function which will create an instance of the injectable.\n * The factory can call `inject` to access the `Injector` and request injection of dependencies.\n *\n * @codeGenApi\n * @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm.\n */\nexport function ɵɵdefineInjectable<T>(opts: {\n token: unknown,\n providedIn?: Type<any>|'root'|'platform'|'any'|null, factory: () => T,\n}): unknown {\n return {\n token: opts.token,\n providedIn: opts.providedIn as any || null,\n factory: opts.factory,\n value: undefined,\n } as ɵɵInjectableDeclaration<T>;\n}\n\n/**\n * @deprecated in v8, delete after v10. This API should be used only by generated code, and that\n * code should now use ɵɵdefineInjectable instead.\n * @publicApi\n */\nexport const defineInjectable = ɵɵdefineInjectable;\n\n/**\n * Construct an `InjectorDef` which configures an injector.\n *\n * This should be assigned to a static injector def (`ɵinj`) field on a type, which will then be an\n * `InjectorType`.\n *\n * Options:\n *\n * * `providers`: an optional array of providers to add to the injector. Each provider must\n * either have a factory or point to a type which has a `ɵprov` static property (the\n * type must be an `InjectableType`).\n * * `imports`: an optional array of imports of other `InjectorType`s or `InjectorTypeWithModule`s\n * whose providers will also be added to the injector. Locally provided types will override\n * providers from imports.\n *\n * @codeGenApi\n */\nexport function ɵɵdefineInjector(options: {providers?: any[], imports?: any[]}): unknown {\n return {providers: options.providers || [], imports: options.imports || []};\n}\n\n/**\n * Read the injectable def (`ɵprov`) for `type` in a way which is immune to accidentally reading\n * inherited value.\n *\n * @param type A type which may have its own (non-inherited) `ɵprov`.\n */\nexport function getInjectableDef<T>(type: any): ɵɵInjectableDeclaration<T>|null {\n return getOwnDefinition(type, NG_PROV_DEF) || getOwnDefinition(type, NG_INJECTABLE_DEF);\n}\n\n/**\n * Return definition only if it is defined directly on `type` and is not inherited from a base\n * class of `type`.\n */\nfunction getOwnDefinition<T>(type: any, field: string): ɵɵInjectableDeclaration<T>|null {\n return type.hasOwnProperty(field) ? type[field] : null;\n}\n\n/**\n * Read the injectable def (`ɵprov`) for `type` or read the `ɵprov` from one of its ancestors.\n *\n * @param type A type which may have `ɵprov`, via inheritance.\n *\n * @deprecated Will be removed in a future version of Angular, where an error will occur in the\n * scenario if we find the `ɵprov` on an ancestor only.\n */\nexport function getInheritedInjectableDef<T>(type: any): ɵɵInjectableDeclaration<T>|null {\n const def = type && (type[NG_PROV_DEF] || type[NG_INJECTABLE_DEF]);\n\n if (def) {\n const typeName = getTypeName(type);\n // TODO(FW-1307): Re-add ngDevMode when closure can handle it\n // ngDevMode &&\n console.warn(\n `DEPRECATED: DI is instantiating a token \"${\n typeName}\" that inherits its @Injectable decorator but does not provide one itself.\\n` +\n `This will become an error in a future version of Angular. Please add @Injectable() to the \"${\n typeName}\" class.`);\n return def;\n } else {\n return null;\n }\n}\n\n/** Gets the name of a type, accounting for some cross-browser differences. */\nfunction getTypeName(type: any): string {\n // `Function.prototype.name` behaves differently between IE and other browsers. In most browsers\n // it'll always return the name of the function itself, no matter how many other functions it\n // inherits from. On IE the function doesn't have its own `name` property, but it takes it from\n // the lowest level in the prototype chain. E.g. if we have `class Foo extends Parent` most\n // browsers will evaluate `Foo.name` to `Foo` while IE will return `Parent`. We work around\n // the issue by converting the function to a string and parsing its name out that way via a regex.\n if (type.hasOwnProperty('name')) {\n return type.name;\n }\n\n const match = ('' + type).match(/^function\\s*([^\\s(]+)/);\n return match === null ? '' : match[1];\n}\n\n/**\n * Read the injector def type in a way which is immune to accidentally reading inherited value.\n *\n * @param type type which may have an injector def (`ɵinj`)\n */\nexport function getInjectorDef<T>(type: any): ɵɵInjectorDef<T>|null {\n return type && (type.hasOwnProperty(NG_INJ_DEF) || type.hasOwnProperty(NG_INJECTOR_DEF)) ?\n (type as any)[NG_INJ_DEF] :\n null;\n}\n\nexport const NG_PROV_DEF = getClosureSafeProperty({ɵprov: getClosureSafeProperty});\nexport const NG_INJ_DEF = getClosureSafeProperty({ɵinj: getClosureSafeProperty});\n\n// We need to keep these around so we can read off old defs if new defs are unavailable\nexport const NG_INJECTABLE_DEF = getClosureSafeProperty({ngInjectableDef: getClosureSafeProperty});\nexport const NG_INJECTOR_DEF = getClosureSafeProperty({ngInjectorDef: getClosureSafeProperty});\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/**\n * Special flag indicating that a decorator is of type `Inject`. It's used to make `Inject`\n * decorator tree-shakable (so we don't have to rely on the `instanceof` checks).\n * Note: this flag is not included into the `InjectFlags` since it's an internal-only API.\n */\nexport const enum DecoratorFlags {\n Inject = -1\n}\n\n/**\n * Injection flags for DI.\n *\n * @publicApi\n */\nexport enum InjectFlags {\n // TODO(alxhub): make this 'const' (and remove `InternalInjectFlags` enum) when ngc no longer\n // writes exports of it into ngfactory files.\n\n /** Check self and check parent injector if needed */\n Default = 0b0000,\n\n /**\n * Specifies that an injector should retrieve a dependency from any injector until reaching the\n * host element of the current component. (Only used with Element Injector)\n */\n Host = 0b0001,\n\n /** Don't ascend to ancestors of the node requesting injection. */\n Self = 0b0010,\n\n /** Skip the node that is requesting injection. */\n SkipSelf = 0b0100,\n\n /** Inject `defaultValue` instead if token not found. */\n Optional = 0b1000,\n}\n\n/**\n * This enum is an exact copy of the `InjectFlags` enum above, but the difference is that this is a\n * const enum, so actual enum values would be inlined in generated code. The `InjectFlags` enum can\n * be turned into a const enum when ViewEngine is removed (see TODO at the `InjectFlags` enum\n * above). The benefit of inlining is that we can use these flags at the top level without affecting\n * tree-shaking (see \"no-toplevel-property-access\" tslint rule for more info).\n * Keep this enum in sync with `InjectFlags` enum above.\n */\nexport const enum InternalInjectFlags {\n /** Check self and check parent injector if needed */\n Default = 0b0000,\n\n /**\n * Specifies that an injector should retrieve a dependency from any injector until reaching the\n * host element of the current component. (Only used with Element Injector)\n */\n Host = 0b0001,\n\n /** Don't ascend to ancestors of the node requesting injection. */\n Self = 0b0010,\n\n /** Skip the node that is requesting injection. */\n SkipSelf = 0b0100,\n\n /** Inject `defaultValue` instead if token not found. */\n Optional = 0b1000,\n\n /**\n * This token is being injected into a pipe.\n *\n * This flag is intentionally not in the public facing `InjectFlags` because it is only added by\n * the compiler and is not a developer applicable flag.\n */\n ForPipe = 0b10000,\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 {throwProviderNotFoundError} from '../render3/errors_di';\nimport {assertNotEqual} from '../util/assert';\nimport {stringify} from '../util/stringify';\n\nimport {getInjectableDef, ɵɵInjectableDeclaration} from './interface/defs';\nimport {InjectFlags} from './interface/injector';\nimport {ProviderToken} from './provider_token';\n\n\n/**\n * Current implementation of inject.\n *\n * By default, it is `injectInjectorOnly`, which makes it `Injector`-only aware. It can be changed\n * to `directiveInject`, which brings in the `NodeInjector` system of ivy. It is designed this\n * way for two reasons:\n * 1. `Injector` should not depend on ivy logic.\n * 2. To maintain tree shake-ability we don't want to bring in unnecessary code.\n */\nlet _injectImplementation: (<T>(token: ProviderToken<T>, flags?: InjectFlags) => T | null)|\n undefined;\nexport function getInjectImplementation() {\n return _injectImplementation;\n}\n\n\n/**\n * Sets the current inject implementation.\n */\nexport function setInjectImplementation(\n impl: (<T>(token: ProviderToken<T>, flags?: InjectFlags) => T | null)|\n undefined): (<T>(token: ProviderToken<T>, flags?: InjectFlags) => T | null)|undefined {\n const previous = _injectImplementation;\n _injectImplementation = impl;\n return previous;\n}\n\n\n/**\n * Injects `root` tokens in limp mode.\n *\n * If no injector exists, we can still inject tree-shakable providers which have `providedIn` set to\n * `\"root\"`. This is known as the limp mode injection. In such case the value is stored in the\n * injectable definition.\n */\nexport function injectRootLimpMode<T>(\n token: ProviderToken<T>, notFoundValue: T|undefined, flags: InjectFlags): T|null {\n const injectableDef: ɵɵInjectableDeclaration<T>|null = getInjectableDef(token);\n if (injectableDef && injectableDef.providedIn == 'root') {\n return injectableDef.value === undefined ? injectableDef.value = injectableDef.factory() :\n injectableDef.value;\n }\n if (flags & InjectFlags.Optional) return null;\n if (notFoundValue !== undefined) return notFoundValue;\n throwProviderNotFoundError(stringify(token), 'Injector');\n}\n\n\n/**\n * Assert that `_injectImplementation` is not `fn`.\n *\n * This is useful, to prevent infinite recursion.\n *\n * @param fn Function which it should not equal to\n */\nexport function assertInjectImplementationNotEqual(\n fn: (<T>(token: ProviderToken<T>, flags?: InjectFlags) => T | null)) {\n ngDevMode &&\n assertNotEqual(_injectImplementation, fn, 'Calling ɵɵinject would cause infinite recursion');\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 * Convince closure compiler that the wrapped function has no side-effects.\n *\n * Closure compiler always assumes that `toString` has no side-effects. We use this quirk to\n * allow us to execute a function but have closure compiler mark the call as no-side-effects.\n * It is important that the return value for the `noSideEffects` function be assigned\n * to something which is retained otherwise the call to `noSideEffects` will be removed by closure\n * compiler.\n */\nexport function noSideEffects<T>(fn: () => T): T {\n return {toString: fn}.toString() as unknown as T;\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/**\n * The strategy that the default change detector uses to detect changes.\n * When set, takes effect the next time change detection is triggered.\n *\n * @see {@link ChangeDetectorRef#usage-notes Change detection usage}\n *\n * @publicApi\n */\nexport enum ChangeDetectionStrategy {\n /**\n * Use the `CheckOnce` strategy, meaning that automatic change detection is deactivated\n * until reactivated by setting the strategy to `Default` (`CheckAlways`).\n * Change detection can still be explicitly invoked.\n * This strategy applies to all child directives and cannot be overridden.\n */\n OnPush = 0,\n\n /**\n * Use the default `CheckAlways` strategy, in which change detection is automatic until\n * explicitly deactivated.\n */\n Default = 1,\n}\n\n/**\n * Defines the possible states of the default change detector.\n * @see `ChangeDetectorRef`\n */\nexport enum ChangeDetectorStatus {\n /**\n * A state in which, after calling `detectChanges()`, the change detector\n * state becomes `Checked`, and must be explicitly invoked or reactivated.\n */\n CheckOnce,\n\n /**\n * A state in which change detection is skipped until the change detector mode\n * becomes `CheckOnce`.\n */\n Checked,\n\n /**\n * A state in which change detection continues automatically until explicitly\n * deactivated.\n */\n CheckAlways,\n\n /**\n * A state in which a change detector sub tree is not a part of the main tree and\n * should be skipped.\n */\n Detached,\n\n /**\n * Indicates that the change detector encountered an error checking a binding\n * or calling a directive lifecycle method and is now in an inconsistent state. Change\n * detectors in this state do not detect changes.\n */\n Errored,\n\n /**\n * Indicates that the change detector has been destroyed.\n */\n Destroyed,\n}\n\n/**\n * Reports whether a given strategy is currently the default for change detection.\n * @param changeDetectionStrategy The strategy to check.\n * @returns True if the given strategy is the current default, false otherwise.\n * @see `ChangeDetectorStatus`\n * @see `ChangeDetectorRef`\n */\nexport function isDefaultChangeDetectionStrategy(changeDetectionStrategy: ChangeDetectionStrategy):\n boolean {\n return changeDetectionStrategy == null ||\n changeDetectionStrategy === ChangeDetectionStrategy.Default;\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 * Defines template and style encapsulation options available for Component's {@link Component}.\n *\n * See {@link Component#encapsulation encapsulation}.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/ts/metadata/encapsulation.ts region='longform'}\n *\n * @publicApi\n */\nexport enum ViewEncapsulation {\n /**\n * Emulate `Native` scoping of styles by adding an attribute containing surrogate id to the Host\n * Element and pre-processing the style rules provided via {@link Component#styles styles} or\n * {@link Component#styleUrls styleUrls}, and adding the new Host Element attribute to all\n * selectors.\n *\n * This is the default option.\n */\n Emulated = 0,\n\n // Historically the 1 value was for `Native` encapsulation which has been removed as of v11.\n\n /**\n * Don't provide any template or style encapsulation.\n */\n None = 2,\n\n /**\n * Use Shadow DOM to encapsulate styles.\n *\n * For the DOM this means using modern [Shadow\n * DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM) and\n * creating a ShadowRoot for Component's Host Element.\n */\n ShadowDom = 3\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// TODO(jteplitz602): Load WorkerGlobalScope from lib.webworker.d.ts file #3492\ndeclare var WorkerGlobalScope: any /** TODO #9100 */;\n// CommonJS / Node have global context exposed as \"global\" variable.\n// We don't want to include the whole node.d.ts this this compilation unit so we'll just fake\n// the global \"global\" var for now.\ndeclare var global: any /** TODO #9100 */;\n\nconst __globalThis = typeof globalThis !== 'undefined' && globalThis;\nconst __window = typeof window !== 'undefined' && window;\nconst __self = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&\n self instanceof WorkerGlobalScope && self;\nconst __global = typeof global !== 'undefined' && global;\n\n// Always use __globalThis if available, which is the spec-defined global variable across all\n// environments, then fallback to __global first, because in Node tests both __global and\n// __window may be defined and _global should be __global in that case.\nconst _global = __globalThis || __global || __window || __self;\n\n/**\n * Attention: whenever providing a new value, be sure to add an\n * entry into the corresponding `....externs.js` file,\n * so that closure won't use that global for its purposes.\n */\nexport {_global as global};\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 {global} from './global';\n\ndeclare global {\n /**\n * Values of ngDevMode\n * Depending on the current state of the application, ngDevMode may have one of several values.\n *\n * For convenience, the “truthy” value which enables dev mode is also an object which contains\n * Angular’s performance counters. This is not necessary, but cuts down on boilerplate for the\n * perf counters.\n *\n * ngDevMode may also be set to false. This can happen in one of a few ways:\n * - The user explicitly sets `window.ngDevMode = false` somewhere in their app.\n * - The user calls `enableProdMode()`.\n * - The URL contains a `ngDevMode=false` text.\n * Finally, ngDevMode may not have been defined at all.\n */\n const ngDevMode: null|NgDevModePerfCounters;\n interface NgDevModePerfCounters {\n namedConstructors: boolean;\n firstCreatePass: number;\n tNode: number;\n tView: number;\n rendererCreateTextNode: number;\n rendererSetText: number;\n rendererCreateElement: number;\n rendererAddEventListener: number;\n rendererSetAttribute: number;\n rendererRemoveAttribute: number;\n rendererSetProperty: number;\n rendererSetClassName: number;\n rendererAddClass: number;\n rendererRemoveClass: number;\n rendererSetStyle: number;\n rendererRemoveStyle: number;\n rendererDestroy: number;\n rendererDestroyNode: number;\n rendererMoveNode: number;\n rendererRemoveNode: number;\n rendererAppendChild: number;\n rendererInsertBefore: number;\n rendererCreateComment: number;\n }\n}\n\nexport function ngDevModeResetPerfCounters(): NgDevModePerfCounters {\n const locationString = typeof location !== 'undefined' ? location.toString() : '';\n const newCounters: NgDevModePerfCounters = {\n namedConstructors: locationString.indexOf('ngDevMode=namedConstructors') != -1,\n firstCreatePass: 0,\n tNode: 0,\n tView: 0,\n rendererCreateTextNode: 0,\n rendererSetText: 0,\n rendererCreateElement: 0,\n rendererAddEventListener: 0,\n rendererSetAttribute: 0,\n rendererRemoveAttribute: 0,\n rendererSetProperty: 0,\n rendererSetClassName: 0,\n rendererAddClass: 0,\n rendererRemoveClass: 0,\n rendererSetStyle: 0,\n rendererRemoveStyle: 0,\n rendererDestroy: 0,\n rendererDestroyNode: 0,\n rendererMoveNode: 0,\n rendererRemoveNode: 0,\n rendererAppendChild: 0,\n rendererInsertBefore: 0,\n rendererCreateComment: 0,\n };\n\n // Make sure to refer to ngDevMode as ['ngDevMode'] for closure.\n const allowNgDevModeTrue = locationString.indexOf('ngDevMode=false') === -1;\n global['ngDevMode'] = allowNgDevModeTrue && newCounters;\n return newCounters;\n}\n\n/**\n * This function checks to see if the `ngDevMode` has been set. If yes,\n * then we honor it, otherwise we default to dev mode with additional checks.\n *\n * The idea is that unless we are doing production build where we explicitly\n * set `ngDevMode == false` we should be helping the developer by providing\n * as much early warning and errors as possible.\n *\n * `ɵɵdefineComponent` is guaranteed to have been called before any component template functions\n * (and thus Ivy instructions), so a single initialization there is sufficient to ensure ngDevMode\n * is defined for the entire instruction set.\n *\n * When checking `ngDevMode` on toplevel, always init it before referencing it\n * (e.g. `((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode())`), otherwise you can\n * get a `ReferenceError` like in https://github.com/angular/angular/issues/31595.\n *\n * Details on possible values for `ngDevMode` can be found on its docstring.\n *\n * NOTE:\n * - changes to the `ngDevMode` name must be synced with `compiler-cli/src/tooling.ts`.\n */\nexport function initNgDevMode(): boolean {\n // The below checks are to ensure that calling `initNgDevMode` multiple times does not\n // reset the counters.\n // If the `ngDevMode` is not an object, then it means we have not created the perf counters\n // yet.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (typeof ngDevMode !== 'object') {\n ngDevModeResetPerfCounters();\n }\n return typeof ngDevMode !== 'undefined' && !!ngDevMode;\n }\n return 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 */\nimport {initNgDevMode} from './ng_dev_mode';\n\n/**\n * This file contains reuseable \"empty\" symbols that can be used as default return values\n * in different parts of the rendering code. Because the same symbols are returned, this\n * allows for identity checks against these values to be consistently used by the framework\n * code.\n */\n\nexport const EMPTY_OBJ: {} = {};\nexport const EMPTY_ARRAY: any[] = [];\n\n// freezing the values prevents any code from accidentally inserting new values in\nif ((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode()) {\n // These property accesses can be ignored because ngDevMode will be set to false\n // when optimizing code and the whole if statement will be dropped.\n // tslint:disable-next-line:no-toplevel-property-access\n Object.freeze(EMPTY_OBJ);\n // tslint:disable-next-line:no-toplevel-property-access\n Object.freeze(EMPTY_ARRAY);\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 {getClosureSafeProperty} from '../util/property';\n\nexport const NG_COMP_DEF = getClosureSafeProperty({ɵcmp: getClosureSafeProperty});\nexport const NG_DIR_DEF = getClosureSafeProperty({ɵdir: getClosureSafeProperty});\nexport const NG_PIPE_DEF = getClosureSafeProperty({ɵpipe: getClosureSafeProperty});\nexport const NG_MOD_DEF = getClosureSafeProperty({ɵmod: getClosureSafeProperty});\nexport const NG_LOC_ID_DEF = getClosureSafeProperty({ɵloc: getClosureSafeProperty});\nexport const NG_FACTORY_DEF = getClosureSafeProperty({ɵfac: getClosureSafeProperty});\n\n/**\n * If a directive is diPublic, bloomAdd sets a property on the type with this constant as\n * the key and the directive's unique ID as the value. This allows us to map directives to their\n * bloom filter bit for DI.\n */\n// TODO(misko): This is wrong. The NG_ELEMENT_ID should never be minified.\nexport const NG_ELEMENT_ID = getClosureSafeProperty({__NG_ELEMENT_ID__: getClosureSafeProperty});\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 {ChangeDetectionStrategy} from '../change_detection/constants';\nimport {Mutable, Type} from '../interface/type';\nimport {NgModuleDef, NgModuleType} from '../metadata/ng_module_def';\nimport {SchemaMetadata} from '../metadata/schema';\nimport {ViewEncapsulation} from '../metadata/view';\nimport {noSideEffects} from '../util/closure';\nimport {EMPTY_ARRAY, EMPTY_OBJ} from '../util/empty';\nimport {initNgDevMode} from '../util/ng_dev_mode';\nimport {stringify} from '../util/stringify';\nimport {NG_COMP_DEF, NG_DIR_DEF, NG_LOC_ID_DEF, NG_MOD_DEF, NG_PIPE_DEF} from './fields';\nimport {ComponentDef, ComponentDefFeature, ComponentTemplate, ComponentType, ContentQueriesFunction, DirectiveDef, DirectiveDefFeature, DirectiveTypesOrFactory, HostBindingsFunction, PipeDef, PipeTypesOrFactory, ViewQueriesFunction} from './interfaces/definition';\nimport {TAttributes, TConstantsOrFactory} from './interfaces/node';\nimport {CssSelectorList} from './interfaces/projection';\n\n\nlet _renderCompCount = 0;\n\n\n/**\n * Create a component definition object.\n *\n *\n * # Example\n * ```\n * class MyDirective {\n * // Generated by Angular Template Compiler\n * // [Symbol] syntax will not be supported by TypeScript until v2.7\n * static ɵcmp = defineComponent({\n * ...\n * });\n * }\n * ```\n * @codeGenApi\n */\nexport function ɵɵdefineComponent<T>(componentDefinition: {\n /**\n * Directive type, needed to configure the injector.\n */\n type: Type<T>;\n\n /** The selectors that will be used to match nodes to this component. */\n selectors?: CssSelectorList;\n\n /**\n * The number of nodes, local refs, and pipes in this component template.\n *\n * Used to calculate the length of this component's LView array, so we\n * can pre-fill the array and set the binding start index.\n */\n // TODO(kara): remove queries from this count\n decls: number;\n\n /**\n * The number of bindings in this component template (including pure fn bindings).\n *\n * Used to calculate the length of this component's LView array, so we\n * can pre-fill the array and set the host binding start index.\n */\n vars: number;\n\n /**\n * A map of input names.\n *\n * The format is in: `{[actualPropertyName: string]:(string|[string, string])}`.\n *\n * Given:\n * ```\n * class MyComponent {\n * @Input()\n * publicInput1: string;\n *\n * @Input('publicInput2')\n * declaredInput2: string;\n * }\n * ```\n *\n * is described as:\n * ```\n * {\n * publicInput1: 'publicInput1',\n * declaredInput2: ['publicInput2', 'declaredInput2'],\n * }\n * ```\n *\n * Which the minifier may translate to:\n * ```\n * {\n * minifiedPublicInput1: 'publicInput1',\n * minifiedDeclaredInput2: ['publicInput2', 'declaredInput2'],\n * }\n * ```\n *\n * This allows the render to re-construct the minified, public, and declared names\n * of properties.\n *\n * NOTE:\n * - Because declared and public name are usually same we only generate the array\n * `['public', 'declared']` format when they differ.\n * - The reason why this API and `outputs` API is not the same is that `NgOnChanges` has\n * inconsistent behavior in that it uses declared names rather than minified or public. For\n * this reason `NgOnChanges` will be deprecated and removed in future version and this\n * API will be simplified to be consistent with `output`.\n */\n inputs?: {[P in keyof T]?: string | [string, string]};\n\n /**\n * A map of output names.\n *\n * The format is in: `{[actualPropertyName: string]:string}`.\n *\n * Which the minifier may translate to: `{[minifiedPropertyName: string]:string}`.\n *\n * This allows the render to re-construct the minified and non-minified names\n * of properties.\n */\n outputs?: {[P in keyof T]?: string};\n\n /**\n * Function executed by the parent template to allow child directive to apply host bindings.\n */\n hostBindings?: HostBindingsFunction<T>;\n\n /**\n * The number of bindings in this directive `hostBindings` (including pure fn bindings).\n *\n * Used to calculate the length of the component's LView array, so we\n * can pre-fill the array and set the host binding start index.\n */\n hostVars?: number;\n\n /**\n * Assign static attribute values to a host element.\n *\n * This property will assign static attribute values as well as class and style\n * values to a host element. Since attribute values can consist of different types of values, the\n * `hostAttrs` array must include the values in the following format:\n *\n * attrs = [\n * // static attributes (like `title`, `name`, `id`...)\n * attr1, value1, attr2, value,\n *\n * // a single namespace value (like `x:id`)\n * NAMESPACE_MARKER, namespaceUri1, name1, value1,\n *\n * // another single namespace value (like `x:name`)\n * NAMESPACE_MARKER, namespaceUri2, name2, value2,\n *\n * // a series of CSS classes that will be applied to the element (no spaces)\n * CLASSES_MARKER, class1, class2, class3,\n *\n * // a series of CSS styles (property + value) that will be applied to the element\n * STYLES_MARKER, prop1, value1, prop2, value2\n * ]\n *\n * All non-class and non-style attributes must be defined at the start of the list\n * first before all class and style values are set. When there is a change in value\n * type (like when classes and styles are introduced) a marker must be used to separate\n * the entries. The marker values themselves are set via entries found in the\n * [AttributeMarker] enum.\n */\n hostAttrs?: TAttributes;\n\n /**\n * Function to create instances of content queries associated with a given directive.\n */\n contentQueries?: ContentQueriesFunction<T>;\n\n /**\n * Defines the name that can be used in the template to assign this directive to a variable.\n *\n * See: {@link Directive.exportAs}\n */\n exportAs?: string[];\n\n /**\n * Template function use for rendering DOM.\n *\n * This function has following structure.\n *\n * ```\n * function Template<T>(ctx:T, creationMode: boolean) {\n * if (creationMode) {\n * // Contains creation mode instructions.\n * }\n * // Contains binding update instructions\n * }\n * ```\n *\n * Common instructions are:\n * Creation mode instructions:\n * - `elementStart`, `elementEnd`\n * - `text`\n * - `container`\n * - `listener`\n *\n * Binding update instructions:\n * - `bind`\n * - `elementAttribute`\n * - `elementProperty`\n * - `elementClass`\n * - `elementStyle`\n *\n */\n template: ComponentTemplate<T>;\n\n /**\n * Constants for the nodes in the component's view.\n * Includes attribute arrays, local definition arrays etc.\n */\n consts?: TConstantsOrFactory;\n\n /**\n * An array of `ngContent[selector]` values that were found in the template.\n */\n ngContentSelectors?: string[];\n\n /**\n * Additional set of instructions specific to view query processing. This could be seen as a\n * set of instruction to be inserted into the template function.\n *\n * Query-related instructions need to be pulled out to a specific function as a timing of\n * execution is different as compared to all other instructions (after change detection hooks but\n * before view hooks).\n */\n viewQuery?: ViewQueriesFunction<T>| null;\n\n /**\n * A list of optional features to apply.\n *\n * See: {@link NgOnChangesFeature}, {@link ProvidersFeature}\n */\n features?: ComponentDefFeature[];\n\n /**\n * Defines template and style encapsulation options available for Component's {@link Component}.\n */\n encapsulation?: ViewEncapsulation;\n\n /**\n * Defines arbitrary developer-defined data to be stored on a renderer instance.\n * This is useful for renderers that delegate to other renderers.\n *\n * see: animation\n */\n data?: {[kind: string]: any};\n\n /**\n * A set of styles that the component needs to be present for component to render correctly.\n */\n styles?: string[];\n\n /**\n * The strategy that the default change detector uses to detect changes.\n * When set, takes effect the next time change detection is triggered.\n */\n changeDetection?: ChangeDetectionStrategy;\n\n /**\n * Registry of directives and components that may be found in this component's view.\n *\n * The property is either an array of `DirectiveDef`s or a function which returns the array of\n * `DirectiveDef`s. The function is necessary to be able to support forward declarations.\n */\n directives?: DirectiveTypesOrFactory | null;\n\n /**\n * Registry of pipes that may be found in this component's view.\n *\n * The property is either an array of `PipeDefs`s or a function which returns the array of\n * `PipeDefs`s. The function is necessary to be able to support forward declarations.\n */\n pipes?: PipeTypesOrFactory | null;\n\n /**\n * The set of schemas that declare elements to be allowed in the component's template.\n */\n schemas?: SchemaMetadata[] | null;\n}): unknown {\n return noSideEffects(() => {\n // Initialize ngDevMode. This must be the first statement in ɵɵdefineComponent.\n // See the `initNgDevMode` docstring for more information.\n (typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode();\n\n const type = componentDefinition.type;\n const declaredInputs: {[key: string]: string} = {} as any;\n const def: Mutable<ComponentDef<any>, keyof ComponentDef<any>> = {\n type: type,\n providersResolver: null,\n decls: componentDefinition.decls,\n vars: componentDefinition.vars,\n factory: null,\n template: componentDefinition.template || null!,\n consts: componentDefinition.consts || null,\n ngContentSelectors: componentDefinition.ngContentSelectors,\n hostBindings: componentDefinition.hostBindings || null,\n hostVars: componentDefinition.hostVars || 0,\n hostAttrs: componentDefinition.hostAttrs || null,\n contentQueries: componentDefinition.contentQueries || null,\n declaredInputs: declaredInputs,\n inputs: null!, // assigned in noSideEffects\n outputs: null!, // assigned in noSideEffects\n exportAs: componentDefinition.exportAs || null,\n onPush: componentDefinition.changeDetection === ChangeDetectionStrategy.OnPush,\n directiveDefs: null!, // assigned in noSideEffects\n pipeDefs: null!, // assigned in noSideEffects\n selectors: componentDefinition.selectors || EMPTY_ARRAY,\n viewQuery: componentDefinition.viewQuery || null,\n features: componentDefinition.features as DirectiveDefFeature[] || null,\n data: componentDefinition.data || {},\n // TODO(misko): convert ViewEncapsulation into const enum so that it can be used\n // directly in the next line. Also `None` should be 0 not 2.\n encapsulation: componentDefinition.encapsulation || ViewEncapsulation.Emulated,\n id: 'c',\n styles: componentDefinition.styles || EMPTY_ARRAY,\n _: null,\n setInput: null,\n schemas: componentDefinition.schemas || null,\n tView: null,\n };\n const directiveTypes = componentDefinition.directives!;\n const feature = componentDefinition.features;\n const pipeTypes = componentDefinition.pipes!;\n def.id += _renderCompCount++;\n def.inputs = invertObject(componentDefinition.inputs, declaredInputs),\n def.outputs = invertObject(componentDefinition.outputs),\n feature && feature.forEach((fn) => fn(def));\n def.directiveDefs = directiveTypes ?\n () => (typeof directiveTypes === 'function' ? directiveTypes() : directiveTypes)\n .map(extractDirectiveDef) :\n null;\n def.pipeDefs = pipeTypes ?\n () => (typeof pipeTypes === 'function' ? pipeTypes() : pipeTypes).map(extractPipeDef) :\n null;\n\n return def;\n });\n}\n\n/**\n * Generated next to NgModules to monkey-patch directive and pipe references onto a component's\n * definition, when generating a direct reference in the component file would otherwise create an\n * import cycle.\n *\n * See [this explanation](https://hackmd.io/Odw80D0pR6yfsOjg_7XCJg?view) for more details.\n *\n * @codeGenApi\n */\nexport function ɵɵsetComponentScope(\n type: ComponentType<any>, directives: Type<any>[], pipes: Type<any>[]): void {\n const def = (type.ɵcmp as ComponentDef<any>);\n def.directiveDefs = () => directives.map(extractDirectiveDef);\n def.pipeDefs = () => pipes.map(extractPipeDef);\n}\n\nexport function extractDirectiveDef(type: Type<any>): DirectiveDef<any>|ComponentDef<any> {\n const def = getComponentDef(type) || getDirectiveDef(type);\n if (ngDevMode && !def) {\n throw new Error(`'${type.name}' is neither 'ComponentType' or 'DirectiveType'.`);\n }\n return def!;\n}\n\nexport function extractPipeDef(type: Type<any>): PipeDef<any> {\n const def = getPipeDef(type);\n if (ngDevMode && !def) {\n throw new Error(`'${type.name}' is not a 'PipeType'.`);\n }\n return def!;\n}\n\nexport const autoRegisterModuleById: {[id: string]: NgModuleType} = {};\n\n/**\n * @codeGenApi\n */\nexport function ɵɵdefineNgModule<T>(def: {\n /** Token representing the module. Used by DI. */\n type: T;\n\n /** List of components to bootstrap. */\n bootstrap?: Type<any>[] | (() => Type<any>[]);\n\n /** List of components, directives, and pipes declared by this module. */\n declarations?: Type<any>[] | (() => Type<any>[]);\n\n /** List of modules or `ModuleWithProviders` imported by this module. */\n imports?: Type<any>[] | (() => Type<any>[]);\n\n /**\n * List of modules, `ModuleWithProviders`, components, directives, or pipes exported by this\n * module.\n */\n exports?: Type<any>[] | (() => Type<any>[]);\n\n /** The set of schemas that declare elements to be allowed in the NgModule. */\n schemas?: SchemaMetadata[] | null;\n\n /** Unique ID for the module that is used with `getModuleFactory`. */\n id?: string | null;\n}): unknown {\n return noSideEffects(() => {\n const res: NgModuleDef<T> = {\n type: def.type,\n bootstrap: def.bootstrap || EMPTY_ARRAY,\n declarations: def.declarations || EMPTY_ARRAY,\n imports: def.imports || EMPTY_ARRAY,\n exports: def.exports || EMPTY_ARRAY,\n transitiveCompileScopes: null,\n schemas: def.schemas || null,\n id: def.id || null,\n };\n if (def.id != null) {\n autoRegisterModuleById[def.id!] = def.type as unknown as NgModuleType;\n }\n return res;\n });\n}\n\n/**\n * Adds the module metadata that is necessary to compute the module's transitive scope to an\n * existing module definition.\n *\n * Scope metadata of modules is not used in production builds, so calls to this function can be\n * marked pure to tree-shake it from the bundle, allowing for all referenced declarations\n * to become eligible for tree-shaking as well.\n *\n * @codeGenApi\n */\nexport function ɵɵsetNgModuleScope(type: any, scope: {\n /** List of components, directives, and pipes declared by this module. */\n declarations?: Type<any>[]|(() => Type<any>[]);\n\n /** List of modules or `ModuleWithProviders` imported by this module. */\n imports?: Type<any>[] | (() => Type<any>[]);\n\n /**\n * List of modules, `ModuleWithProviders`, components, directives, or pipes exported by this\n * module.\n */\n exports?: Type<any>[] | (() => Type<any>[]);\n}): unknown {\n return noSideEffects(() => {\n const ngModuleDef = getNgModuleDef(type, true);\n ngModuleDef.declarations = scope.declarations || EMPTY_ARRAY;\n ngModuleDef.imports = scope.imports || EMPTY_ARRAY;\n ngModuleDef.exports = scope.exports || EMPTY_ARRAY;\n });\n}\n\n/**\n * Inverts an inputs or outputs lookup such that the keys, which were the\n * minified keys, are part of the values, and the values are parsed so that\n * the publicName of the property is the new key\n *\n * e.g. for\n *\n * ```\n * class Comp {\n * @Input()\n * propName1: string;\n *\n * @Input('publicName2')\n * declaredPropName2: number;\n * }\n * ```\n *\n * will be serialized as\n *\n * ```\n * {\n * propName1: 'propName1',\n * declaredPropName2: ['publicName2', 'declaredPropName2'],\n * }\n * ```\n *\n * which is than translated by the minifier as:\n *\n * ```\n * {\n * minifiedPropName1: 'propName1',\n * minifiedPropName2: ['publicName2', 'declaredPropName2'],\n * }\n * ```\n *\n * becomes: (public name => minifiedName)\n *\n * ```\n * {\n * 'propName1': 'minifiedPropName1',\n * 'publicName2': 'minifiedPropName2',\n * }\n * ```\n *\n * Optionally the function can take `secondary` which will result in: (public name => declared name)\n *\n * ```\n * {\n * 'propName1': 'propName1',\n * 'publicName2': 'declaredPropName2',\n * }\n * ```\n *\n\n */\nfunction invertObject<T>(\n obj?: {[P in keyof T]?: string|[string, string]},\n secondary?: {[key: string]: string}): {[P in keyof T]: string} {\n if (obj == null) return EMPTY_OBJ as any;\n const newLookup: any = {};\n for (const minifiedKey in obj) {\n if (obj.hasOwnProperty(minifiedKey)) {\n let publicName: string|[string, string] = obj[minifiedKey]!;\n let declaredName = publicName;\n if (Array.isArray(publicName)) {\n declaredName = publicName[1];\n publicName = publicName[0];\n }\n newLookup[publicName] = minifiedKey;\n if (secondary) {\n (secondary[publicName] = declaredName as string);\n }\n }\n }\n return newLookup;\n}\n\n/**\n * Create a directive definition object.\n *\n * # Example\n * ```ts\n * class MyDirective {\n * // Generated by Angular Template Compiler\n * // [Symbol] syntax will not be supported by TypeScript until v2.7\n * static ɵdir = ɵɵdefineDirective({\n * ...\n * });\n * }\n * ```\n *\n * @codeGenApi\n */\nexport const ɵɵdefineDirective =\n ɵɵdefineComponent as any as<T>(directiveDefinition: {\n /**\n * Directive type, needed to configure the injector.\n */\n type: Type<T>;\n\n /** The selectors that will be used to match nodes to this directive. */\n selectors?: CssSelectorList;\n\n /**\n * A map of input names.\n *\n * The format is in: `{[actualPropertyName: string]:(string|[string, string])}`.\n *\n * Given:\n * ```\n * class MyComponent {\n * @Input()\n * publicInput1: string;\n *\n * @Input('publicInput2')\n * declaredInput2: string;\n * }\n * ```\n *\n * is described as:\n * ```\n * {\n * publicInput1: 'publicInput1',\n * declaredInput2: ['declaredInput2', 'publicInput2'],\n * }\n * ```\n *\n * Which the minifier may translate to:\n * ```\n * {\n * minifiedPublicInput1: 'publicInput1',\n * minifiedDeclaredInput2: [ 'publicInput2', 'declaredInput2'],\n * }\n * ```\n *\n * This allows the render to re-construct the minified, public, and declared names\n * of properties.\n *\n * NOTE:\n * - Because declared and public name are usually same we only generate the array\n * `['declared', 'public']` format when they differ.\n * - The reason why this API and `outputs` API is not the same is that `NgOnChanges` has\n * inconsistent behavior in that it uses declared names rather than minified or public. For\n * this reason `NgOnChanges` will be deprecated and removed in future version and this\n * API will be simplified to be consistent with `output`.\n */\n inputs?: {[P in keyof T]?: string | [string, string]};\n\n /**\n * A map of output names.\n *\n * The format is in: `{[actualPropertyName: string]:string}`.\n *\n * Which the minifier may translate to: `{[minifiedPropertyName: string]:string}`.\n *\n * This allows the render to re-construct the minified and non-minified names\n * of properties.\n */\n outputs?: {[P in keyof T]?: string};\n\n /**\n * A list of optional features to apply.\n *\n * See: {@link NgOnChangesFeature}, {@link ProvidersFeature}, {@link InheritDefinitionFeature}\n */\n features?: DirectiveDefFeature[];\n\n /**\n * Function executed by the parent template to allow child directive to apply host bindings.\n */\n hostBindings?: HostBindingsFunction<T>;\n\n /**\n * The number of bindings in this directive `hostBindings` (including pure fn bindings).\n *\n * Used to calculate the length of the component's LView array, so we\n * can pre-fill the array and set the host binding start index.\n */\n hostVars?: number;\n\n /**\n * Assign static attribute values to a host element.\n *\n * This property will assign static attribute values as well as class and style\n * values to a host element. Since attribute values can consist of different types of values,\n * the `hostAttrs` array must include the values in the following format:\n *\n * attrs = [\n * // static attributes (like `title`, `name`, `id`...)\n * attr1, value1, attr2, value,\n *\n * // a single namespace value (like `x:id`)\n * NAMESPACE_MARKER, namespaceUri1, name1, value1,\n *\n * // another single namespace value (like `x:name`)\n * NAMESPACE_MARKER, namespaceUri2, name2, value2,\n *\n * // a series of CSS classes that will be applied to the element (no spaces)\n * CLASSES_MARKER, class1, class2, class3,\n *\n * // a series of CSS styles (property + value) that will be applied to the element\n * STYLES_MARKER, prop1, value1, prop2, value2\n * ]\n *\n * All non-class and non-style attributes must be defined at the start of the list\n * first before all class and style values are set. When there is a change in value\n * type (like when classes and styles are introduced) a marker must be used to separate\n * the entries. The marker values themselves are set via entries found in the\n * [AttributeMarker] enum.\n */\n hostAttrs?: TAttributes;\n\n /**\n * Function to create instances of content queries associated with a given directive.\n */\n contentQueries?: ContentQueriesFunction<T>;\n\n /**\n * Additional set of instructions specific to view query processing. This could be seen as a\n * set of instructions to be inserted into the template function.\n */\n viewQuery?: ViewQueriesFunction<T>| null;\n\n /**\n * Defines the name that can be used in the template to assign this directive to a variable.\n *\n * See: {@link Directive.exportAs}\n */\n exportAs?: string[];\n }) => never;\n\n/**\n * Create a pipe definition object.\n *\n * # Example\n * ```\n * class MyPipe implements PipeTransform {\n * // Generated by Angular Template Compiler\n * static ɵpipe = definePipe({\n * ...\n * });\n * }\n * ```\n * @param pipeDef Pipe definition generated by the compiler\n *\n * @codeGenApi\n */\nexport function ɵɵdefinePipe<T>(pipeDef: {\n /** Name of the pipe. Used for matching pipes in template to pipe defs. */\n name: string,\n\n /** Pipe class reference. Needed to extract pipe lifecycle hooks. */\n type: Type<T>,\n\n /** Whether the pipe is pure. */\n pure?: boolean\n}): unknown {\n return (<PipeDef<T>>{\n type: pipeDef.type,\n name: pipeDef.name,\n factory: null,\n pure: pipeDef.pure !== false,\n onDestroy: pipeDef.type.prototype.ngOnDestroy || null\n });\n}\n\n/**\n * The following getter methods retrieve the definition from the type. Currently the retrieval\n * honors inheritance, but in the future we may change the rule to require that definitions are\n * explicit. This would require some sort of migration strategy.\n */\n\nexport function getComponentDef<T>(type: any): ComponentDef<T>|null {\n return type[NG_COMP_DEF] || null;\n}\n\nexport function getDirectiveDef<T>(type: any): DirectiveDef<T>|null {\n return type[NG_DIR_DEF] || null;\n}\n\nexport function getPipeDef<T>(type: any): PipeDef<T>|null {\n return type[NG_PIPE_DEF] || null;\n}\n\nexport function getNgModuleDef<T>(type: any, throwNotFound: true): NgModuleDef<T>;\nexport function getNgModuleDef<T>(type: any): NgModuleDef<T>|null;\nexport function getNgModuleDef<T>(type: any, throwNotFound?: boolean): NgModuleDef<T>|null {\n const ngModuleDef = type[NG_MOD_DEF] || null;\n if (!ngModuleDef && throwNotFound === true) {\n throw new Error(`Type ${stringify(type)} does not have 'ɵmod' property.`);\n }\n return ngModuleDef;\n}\n\nexport function getNgLocaleIdDef(type: any): string|null {\n return (type as any)[NG_LOC_ID_DEF] || null;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {TNode} from './node';\nimport {RComment, RElement} from './renderer_dom';\nimport {HOST, LView, NEXT, PARENT, T_HOST, TRANSPLANTED_VIEWS_TO_REFRESH} from './view';\n\n\n\n/**\n * Special location which allows easy identification of type. If we have an array which was\n * retrieved from the `LView` and that array has `true` at `TYPE` location, we know it is\n * `LContainer`.\n */\nexport const TYPE = 1;\n\n/**\n * Below are constants for LContainer indices to help us look up LContainer members\n * without having to remember the specific indices.\n * Uglify will inline these when minifying so there shouldn't be a cost.\n */\n\n/**\n * Flag to signify that this `LContainer` may have transplanted views which need to be change\n * detected. (see: `LView[DECLARATION_COMPONENT_VIEW])`.\n *\n * This flag, once set, is never unset for the `LContainer`. This means that when unset we can skip\n * a lot of work in `refreshEmbeddedViews`. But when set we still need to verify\n * that the `MOVED_VIEWS` are transplanted and on-push.\n */\nexport const HAS_TRANSPLANTED_VIEWS = 2;\n\n// PARENT, NEXT, TRANSPLANTED_VIEWS_TO_REFRESH are indices 3, 4, and 5\n// As we already have these constants in LView, we don't need to re-create them.\n\n// T_HOST is index 6\n// We already have this constants in LView, we don't need to re-create it.\n\nexport const NATIVE = 7;\nexport const VIEW_REFS = 8;\nexport const MOVED_VIEWS = 9;\n\n\n/**\n * Size of LContainer's header. Represents the index after which all views in the\n * container will be inserted. We need to keep a record of current views so we know\n * which views are already in the DOM (and don't need to be re-added) and so we can\n * remove views from the DOM when they are no longer required.\n */\nexport const CONTAINER_HEADER_OFFSET = 10;\n\n/**\n * The state associated with a container.\n *\n * This is an array so that its structure is closer to LView. This helps\n * when traversing the view tree (which is a mix of containers and component\n * views), so we can jump to viewOrContainer[NEXT] in the same way regardless\n * of type.\n */\nexport interface LContainer extends Array<any> {\n /**\n * The host element of this LContainer.\n *\n * The host could be an LView if this container is on a component node.\n * In that case, the component LView is its HOST.\n */\n readonly[HOST]: RElement|RComment|LView;\n\n /**\n * This is a type field which allows us to differentiate `LContainer` from `StylingContext` in an\n * efficient way. The value is always set to `true`\n */\n [TYPE]: true;\n\n /**\n * Flag to signify that this `LContainer` may have transplanted views which need to be change\n * detected. (see: `LView[DECLARATION_COMPONENT_VIEW])`.\n *\n * This flag, once set, is never unset for the `LContainer`.\n */\n [HAS_TRANSPLANTED_VIEWS]: boolean;\n\n /**\n * Access to the parent view is necessary so we can propagate back\n * up from inside a container to parent[NEXT].\n */\n [PARENT]: LView;\n\n /**\n * This allows us to jump from a container to a sibling container or component\n * view with the same parent, so we can remove listeners efficiently.\n */\n [NEXT]: LView|LContainer|null;\n\n /**\n * The number of direct transplanted views which need a refresh or have descendants themselves\n * that need a refresh but have not marked their ancestors as Dirty. This tells us that during\n * change detection we should still descend to find those children to refresh, even if the parents\n * are not `Dirty`/`CheckAlways`.\n */\n [TRANSPLANTED_VIEWS_TO_REFRESH]: number;\n\n /**\n * A collection of views created based on the underlying `<ng-template>` element but inserted into\n * a different `LContainer`. We need to track views created from a given declaration point since\n * queries collect matches from the embedded view declaration point and _not_ the insertion point.\n */\n [MOVED_VIEWS]: LView[]|null;\n\n /**\n * Pointer to the `TNode` which represents the host of the container.\n */\n [T_HOST]: TNode;\n\n /** The comment element that serves as an anchor for this LContainer. */\n readonly[NATIVE]:\n RComment; // TODO(misko): remove as this value can be gotten by unwrapping `[HOST]`\n\n /**\n * Array of `ViewRef`s used by any `ViewContainerRef`s that point to this container.\n *\n * This is lazily initialized by `ViewContainerRef` when the first view is inserted.\n *\n * NOTE: This is stored as `any[]` because render3 should really not be aware of `ViewRef` and\n * doing so creates circular dependency.\n */\n [VIEW_REFS]: unknown[]|null;\n}\n\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nexport const unusedValueExportToPlacateAjd = 1;\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 '../../di/injector';\nimport {ProviderToken} from '../../di/provider_token';\nimport {Type} from '../../interface/type';\nimport {SchemaMetadata} from '../../metadata/schema';\nimport {Sanitizer} from '../../sanitization/sanitizer';\nimport {LContainer} from './container';\nimport {ComponentDef, ComponentTemplate, DirectiveDef, DirectiveDefList, HostBindingsFunction, PipeDef, PipeDefList, ViewQueriesFunction} from './definition';\nimport {I18nUpdateOpCodes, TI18n, TIcu} from './i18n';\nimport {TConstants, TNode} from './node';\nimport {PlayerHandler} from './player';\nimport {LQueries, TQueries} from './query';\nimport {Renderer3, RendererFactory3} from './renderer';\nimport {RComment, RElement} from './renderer_dom';\nimport {TStylingKey, TStylingRange} from './styling';\n\n\n\n// Below are constants for LView indices to help us look up LView members\n// without having to remember the specific indices.\n// Uglify will inline these when minifying so there shouldn't be a cost.\nexport const HOST = 0;\nexport const TVIEW = 1;\nexport const FLAGS = 2;\nexport const PARENT = 3;\nexport const NEXT = 4;\nexport const TRANSPLANTED_VIEWS_TO_REFRESH = 5;\nexport const T_HOST = 6;\nexport const CLEANUP = 7;\nexport const CONTEXT = 8;\nexport const INJECTOR = 9;\nexport const RENDERER_FACTORY = 10;\nexport const RENDERER = 11;\nexport const SANITIZER = 12;\nexport const CHILD_HEAD = 13;\nexport const CHILD_TAIL = 14;\n// FIXME(misko): Investigate if the three declarations aren't all same thing.\nexport const DECLARATION_VIEW = 15;\nexport const DECLARATION_COMPONENT_VIEW = 16;\nexport const DECLARATION_LCONTAINER = 17;\nexport const PREORDER_HOOK_FLAGS = 18;\nexport const QUERIES = 19;\n/**\n * Size of LView's header. Necessary to adjust for it when setting slots.\n *\n * IMPORTANT: `HEADER_OFFSET` should only be referred to the in the `ɵɵ*` instructions to translate\n * instruction index into `LView` index. All other indexes should be in the `LView` index space and\n * there should be no need to refer to `HEADER_OFFSET` anywhere else.\n */\nexport const HEADER_OFFSET = 20;\n\n\n// This interface replaces the real LView interface if it is an arg or a\n// return value of a public instruction. This ensures we don't need to expose\n// the actual interface, which should be kept private.\nexport interface OpaqueViewState {\n '__brand__': 'Brand for OpaqueViewState that nothing will match';\n}\n\n\n/**\n * `LView` stores all of the information needed to process the instructions as\n * they are invoked from the template. Each embedded view and component view has its\n * own `LView`. When processing a particular view, we set the `viewData` to that\n * `LView`. When that view is done processing, the `viewData` is set back to\n * whatever the original `viewData` was before (the parent `LView`).\n *\n * Keeping separate state for each view facilities view insertion / deletion, so we\n * don't have to edit the data array based on which views are present.\n */\nexport interface LView extends Array<any> {\n /**\n * Human readable representation of the `LView`.\n *\n * NOTE: This property only exists if `ngDevMode` is set to `true` and it is not present in\n * production. Its presence is purely to help debug issue in development, and should not be relied\n * on in production application.\n */\n debug?: LViewDebug;\n\n /**\n * The node into which this `LView` is inserted.\n */\n [HOST]: RElement|null;\n\n /**\n * The static data for this view. We need a reference to this so we can easily walk up the\n * node tree in DI and get the TView.data array associated with a node (where the\n * directive defs are stored).\n */\n readonly[TVIEW]: TView;\n\n /** Flags for this view. See LViewFlags for more info. */\n [FLAGS]: LViewFlags;\n\n /**\n * This may store an {@link LView} or {@link LContainer}.\n *\n * `LView` - The parent view. This is needed when we exit the view and must restore the previous\n * LView. Without this, the render method would have to keep a stack of\n * views as it is recursively rendering templates.\n *\n * `LContainer` - The current view is part of a container, and is an embedded view.\n */\n [PARENT]: LView|LContainer|null;\n\n /**\n *\n * The next sibling LView or LContainer.\n *\n * Allows us to propagate between sibling view states that aren't in the same\n * container. Embedded views already have a node.next, but it is only set for\n * views in the same container. We need a way to link component views and views\n * across containers as well.\n */\n [NEXT]: LView|LContainer|null;\n\n /** Queries active for this view - nodes from a view are reported to those queries. */\n [QUERIES]: LQueries|null;\n\n /**\n * Store the `TNode` of the location where the current `LView` is inserted into.\n *\n * Given:\n * ```\n * <div>\n * <ng-template><span></span></ng-template>\n * </div>\n * ```\n *\n * We end up with two `TView`s.\n * - `parent` `TView` which contains `<div><!-- anchor --></div>`\n * - `child` `TView` which contains `<span></span>`\n *\n * Typically the `child` is inserted into the declaration location of the `parent`, but it can be\n * inserted anywhere. Because it can be inserted anywhere it is not possible to store the\n * insertion information in the `TView` and instead we must store it in the `LView[T_HOST]`.\n *\n * So to determine where is our insertion parent we would execute:\n * ```\n * const parentLView = lView[PARENT];\n * const parentTNode = lView[T_HOST];\n * const insertionParent = parentLView[parentTNode.index];\n * ```\n *\n *\n * If `null`, this is the root view of an application (root component is in this view) and it has\n * no parents.\n */\n [T_HOST]: TNode|null;\n\n /**\n * When a view is destroyed, listeners need to be released and outputs need to be\n * unsubscribed. This context array stores both listener functions wrapped with\n * their context and output subscription instances for a particular view.\n *\n * These change per LView instance, so they cannot be stored on TView. Instead,\n * TView.cleanup saves an index to the necessary context in this array.\n *\n * After `LView` is created it is possible to attach additional instance specific functions at the\n * end of the `lView[CLENUP]` because we know that no more `T` level cleanup functions will be\n * addeded here.\n */\n [CLEANUP]: any[]|null;\n\n /**\n * - For dynamic views, this is the context with which to render the template (e.g.\n * `NgForContext`), or `{}` if not defined explicitly.\n * - For root view of the root component the context contains change detection data.\n * - For non-root components, the context is the component instance,\n * - For inline views, the context is null.\n */\n [CONTEXT]: {}|RootContext|null;\n\n /** An optional Module Injector to be used as fall back after Element Injectors are consulted. */\n readonly[INJECTOR]: Injector|null;\n\n /** Factory to be used for creating Renderer. */\n [RENDERER_FACTORY]: RendererFactory3;\n\n /** Renderer to be used for this view. */\n [RENDERER]: Renderer3;\n\n /** An optional custom sanitizer. */\n [SANITIZER]: Sanitizer|null;\n\n /**\n * Reference to the first LView or LContainer beneath this LView in\n * the hierarchy.\n *\n * Necessary to store this so views can traverse through their nested views\n * to remove listeners and call onDestroy callbacks.\n */\n [CHILD_HEAD]: LView|LContainer|null;\n\n /**\n * The last LView or LContainer beneath this LView in the hierarchy.\n *\n * The tail allows us to quickly add a new state to the end of the view list\n * without having to propagate starting from the first child.\n */\n [CHILD_TAIL]: LView|LContainer|null;\n\n /**\n * View where this view's template was declared.\n *\n * The template for a dynamically created view may be declared in a different view than\n * it is inserted. We already track the \"insertion view\" (view where the template was\n * inserted) in LView[PARENT], but we also need access to the \"declaration view\"\n * (view where the template was declared). Otherwise, we wouldn't be able to call the\n * view's template function with the proper contexts. Context should be inherited from\n * the declaration view tree, not the insertion view tree.\n *\n * Example (AppComponent template):\n *\n * <ng-template #foo></ng-template> <-- declared here -->\n * <some-comp [tpl]=\"foo\"></some-comp> <-- inserted inside this component -->\n *\n * The <ng-template> above is declared in the AppComponent template, but it will be passed into\n * SomeComp and inserted there. In this case, the declaration view would be the AppComponent,\n * but the insertion view would be SomeComp. When we are removing views, we would want to\n * traverse through the insertion view to clean up listeners. When we are calling the\n * template function during change detection, we need the declaration view to get inherited\n * context.\n */\n [DECLARATION_VIEW]: LView|null;\n\n\n /**\n * Points to the declaration component view, used to track transplanted `LView`s.\n *\n * See: `DECLARATION_VIEW` which points to the actual `LView` where it was declared, whereas\n * `DECLARATION_COMPONENT_VIEW` points to the component which may not be same as\n * `DECLARATION_VIEW`.\n *\n * Example:\n * ```\n * <#VIEW #myComp>\n * <div *ngIf=\"true\">\n * <ng-template #myTmpl>...</ng-template>\n * </div>\n * </#VIEW>\n * ```\n * In the above case `DECLARATION_VIEW` for `myTmpl` points to the `LView` of `ngIf` whereas\n * `DECLARATION_COMPONENT_VIEW` points to `LView` of the `myComp` which owns the template.\n *\n * The reason for this is that all embedded views are always check-always whereas the component\n * view can be check-always or on-push. When we have a transplanted view it is important to\n * determine if we have transplanted a view from check-always declaration to on-push insertion\n * point. In such a case the transplanted view needs to be added to the `LContainer` in the\n * declared `LView` and CD during the declared view CD (in addition to the CD at the insertion\n * point.) (Any transplanted views which are intra Component are of no interest because the CD\n * strategy of declaration and insertion will always be the same, because it is the same\n * component.)\n *\n * Queries already track moved views in `LView[DECLARATION_LCONTAINER]` and\n * `LContainer[MOVED_VIEWS]`. However the queries also track `LView`s which moved within the same\n * component `LView`. Transplanted views are a subset of moved views, and we use\n * `DECLARATION_COMPONENT_VIEW` to differentiate them. As in this example.\n *\n * Example showing intra component `LView` movement.\n * ```\n * <#VIEW #myComp>\n * <div *ngIf=\"condition; then thenBlock else elseBlock\"></div>\n * <ng-template #thenBlock>Content to render when condition is true.</ng-template>\n * <ng-template #elseBlock>Content to render when condition is false.</ng-template>\n * </#VIEW>\n * ```\n * The `thenBlock` and `elseBlock` is moved but not transplanted.\n *\n * Example showing inter component `LView` movement (transplanted view).\n * ```\n * <#VIEW #myComp>\n * <ng-template #myTmpl>...</ng-template>\n * <insertion-component [template]=\"myTmpl\"></insertion-component>\n * </#VIEW>\n * ```\n * In the above example `myTmpl` is passed into a different component. If `insertion-component`\n * instantiates `myTmpl` and `insertion-component` is on-push then the `LContainer` needs to be\n * marked as containing transplanted views and those views need to be CD as part of the\n * declaration CD.\n *\n *\n * When change detection runs, it iterates over `[MOVED_VIEWS]` and CDs any child `LView`s where\n * the `DECLARATION_COMPONENT_VIEW` of the current component and the child `LView` does not match\n * (it has been transplanted across components.)\n *\n * Note: `[DECLARATION_COMPONENT_VIEW]` points to itself if the LView is a component view (the\n * simplest / most common case).\n *\n * see also:\n * - https://hackmd.io/@mhevery/rJUJsvv9H write up of the problem\n * - `LContainer[HAS_TRANSPLANTED_VIEWS]` which marks which `LContainer` has transplanted views.\n * - `LContainer[TRANSPLANT_HEAD]` and `LContainer[TRANSPLANT_TAIL]` storage for transplanted\n * - `LView[DECLARATION_LCONTAINER]` similar problem for queries\n * - `LContainer[MOVED_VIEWS]` similar problem for queries\n */\n [DECLARATION_COMPONENT_VIEW]: LView;\n\n /**\n * A declaration point of embedded views (ones instantiated based on the content of a\n * <ng-template>), null for other types of views.\n *\n * We need to track all embedded views created from a given declaration point so we can prepare\n * query matches in a proper order (query matches are ordered based on their declaration point and\n * _not_ the insertion point).\n */\n [DECLARATION_LCONTAINER]: LContainer|null;\n\n /**\n * More flags for this view. See PreOrderHookFlags for more info.\n */\n [PREORDER_HOOK_FLAGS]: PreOrderHookFlags;\n\n /**\n * The number of direct transplanted views which need a refresh or have descendants themselves\n * that need a refresh but have not marked their ancestors as Dirty. This tells us that during\n * change detection we should still descend to find those children to refresh, even if the parents\n * are not `Dirty`/`CheckAlways`.\n */\n [TRANSPLANTED_VIEWS_TO_REFRESH]: number;\n}\n\n/** Flags associated with an LView (saved in LView[FLAGS]) */\nexport const enum LViewFlags {\n /** The state of the init phase on the first 2 bits */\n InitPhaseStateIncrementer = 0b00000000001,\n InitPhaseStateMask = 0b00000000011,\n\n /**\n * Whether or not the view is in creationMode.\n *\n * This must be stored in the view rather than using `data` as a marker so that\n * we can properly support embedded views. Otherwise, when exiting a child view\n * back into the parent view, `data` will be defined and `creationMode` will be\n * improperly reported as false.\n */\n CreationMode = 0b00000000100,\n\n /**\n * Whether or not this LView instance is on its first processing pass.\n *\n * An LView instance is considered to be on its \"first pass\" until it\n * has completed one creation mode run and one update mode run. At this\n * time, the flag is turned off.\n */\n FirstLViewPass = 0b00000001000,\n\n /** Whether this view has default change detection strategy (checks always) or onPush */\n CheckAlways = 0b00000010000,\n\n /**\n * Whether or not manual change detection is turned on for onPush components.\n *\n * This is a special mode that only marks components dirty in two cases:\n * 1) There has been a change to an @Input property\n * 2) `markDirty()` has been called manually by the user\n *\n * Note that in this mode, the firing of events does NOT mark components\n * dirty automatically.\n *\n * Manual mode is turned off by default for backwards compatibility, as events\n * automatically mark OnPush components dirty in View Engine.\n *\n * TODO: Add a public API to ChangeDetectionStrategy to turn this mode on\n */\n ManualOnPush = 0b00000100000,\n\n /** Whether or not this view is currently dirty (needing check) */\n Dirty = 0b000001000000,\n\n /** Whether or not this view is currently attached to change detection tree. */\n Attached = 0b000010000000,\n\n /** Whether or not this view is destroyed. */\n Destroyed = 0b000100000000,\n\n /** Whether or not this view is the root view */\n IsRoot = 0b001000000000,\n\n /**\n * Whether this moved LView was needs to be refreshed at the insertion location because the\n * declaration was dirty.\n */\n RefreshTransplantedView = 0b0010000000000,\n\n /**\n * Index of the current init phase on last 21 bits\n */\n IndexWithinInitPhaseIncrementer = 0b0100000000000,\n IndexWithinInitPhaseShift = 11,\n IndexWithinInitPhaseReset = 0b0011111111111,\n}\n\n/**\n * Possible states of the init phase:\n * - 00: OnInit hooks to be run.\n * - 01: AfterContentInit hooks to be run\n * - 10: AfterViewInit hooks to be run\n * - 11: All init hooks have been run\n */\nexport const enum InitPhaseState {\n OnInitHooksToBeRun = 0b00,\n AfterContentInitHooksToBeRun = 0b01,\n AfterViewInitHooksToBeRun = 0b10,\n InitPhaseCompleted = 0b11,\n}\n\n/** More flags associated with an LView (saved in LView[PREORDER_HOOK_FLAGS]) */\nexport const enum PreOrderHookFlags {\n /**\n The index of the next pre-order hook to be called in the hooks array, on the first 16\n bits\n */\n IndexOfTheNextPreOrderHookMaskMask = 0b01111111111111111,\n\n /**\n * The number of init hooks that have already been called, on the last 16 bits\n */\n NumberOfInitHooksCalledIncrementer = 0b010000000000000000,\n NumberOfInitHooksCalledShift = 16,\n NumberOfInitHooksCalledMask = 0b11111111111111110000000000000000,\n}\n\n/**\n * Stores a set of OpCodes to process `HostBindingsFunction` associated with a current view.\n *\n * In order to invoke `HostBindingsFunction` we need:\n * 1. 'elementIdx`: Index to the element associated with the `HostBindingsFunction`.\n * 2. 'directiveIdx`: Index to the directive associated with the `HostBindingsFunction`. (This will\n * become the context for the `HostBindingsFunction` invocation.)\n * 3. `bindingRootIdx`: Location where the bindings for the `HostBindingsFunction` start. Internally\n * `HostBindingsFunction` binding indexes start from `0` so we need to add `bindingRootIdx` to\n * it.\n * 4. `HostBindingsFunction`: A host binding function to execute.\n *\n * The above information needs to be encoded into the `HostBindingOpCodes` in an efficient manner.\n *\n * 1. `elementIdx` is encoded into the `HostBindingOpCodes` as `~elementIdx` (so a negative number);\n * 2. `directiveIdx`\n * 3. `bindingRootIdx`\n * 4. `HostBindingsFunction` is passed in as is.\n *\n * The `HostBindingOpCodes` array contains:\n * - negative number to select the element index.\n * - followed by 1 or more of:\n * - a number to select the directive index\n * - a number to select the bindingRoot index\n * - and a function to invoke.\n *\n * ## Example\n *\n * ```\n * const hostBindingOpCodes = [\n * ~30, // Select element 30\n * 40, 45, MyDir.ɵdir.hostBindings // Invoke host bindings on MyDir on element 30;\n * // directiveIdx = 40; bindingRootIdx = 45;\n * 50, 55, OtherDir.ɵdir.hostBindings // Invoke host bindings on OtherDire on element 30\n * // directiveIdx = 50; bindingRootIdx = 55;\n * ]\n * ```\n *\n * ## Pseudocode\n * ```\n * const hostBindingOpCodes = tView.hostBindingOpCodes;\n * if (hostBindingOpCodes === null) return;\n * for (let i = 0; i < hostBindingOpCodes.length; i++) {\n * const opCode = hostBindingOpCodes[i] as number;\n * if (opCode < 0) {\n * // Negative numbers are element indexes.\n * setSelectedIndex(~opCode);\n * } else {\n * // Positive numbers are NumberTuple which store bindingRootIndex and directiveIndex.\n * const directiveIdx = opCode;\n * const bindingRootIndx = hostBindingOpCodes[++i] as number;\n * const hostBindingFn = hostBindingOpCodes[++i] as HostBindingsFunction<any>;\n * setBindingRootForHostBindings(bindingRootIndx, directiveIdx);\n * const context = lView[directiveIdx];\n * hostBindingFn(RenderFlags.Update, context);\n * }\n * }\n * ```\n *\n */\nexport interface HostBindingOpCodes extends Array<number|HostBindingsFunction<any>> {\n __brand__: 'HostBindingOpCodes';\n debug?: string[];\n}\n\n/**\n * Explicitly marks `TView` as a specific type in `ngDevMode`\n *\n * It is useful to know conceptually what time of `TView` we are dealing with when\n * debugging an application (even if the runtime does not need it.) For this reason\n * we store this information in the `ngDevMode` `TView` and than use it for\n * better debugging experience.\n */\nexport const enum TViewType {\n /**\n * Root `TView` is the used to bootstrap components into. It is used in conjunction with\n * `LView` which takes an existing DOM node not owned by Angular and wraps it in `TView`/`LView`\n * so that other components can be loaded into it.\n */\n Root = 0,\n\n /**\n * `TView` associated with a Component. This would be the `TView` directly associated with the\n * component view (as opposed an `Embedded` `TView` which would be a child of `Component` `TView`)\n */\n Component = 1,\n\n /**\n * `TView` associated with a template. Such as `*ngIf`, `<ng-template>` etc... A `Component`\n * can have zero or more `Embedede` `TView`s.\n */\n Embedded = 2,\n}\n\n/**\n * Converts `TViewType` into human readable text.\n * Make sure this matches with `TViewType`\n */\nexport const TViewTypeAsString = [\n 'Root', // 0\n 'Component', // 1\n 'Embedded', // 2\n] as const;\n\n\n/**\n * The static data for an LView (shared between all templates of a\n * given type).\n *\n * Stored on the `ComponentDef.tView`.\n */\nexport interface TView {\n /**\n * Type of `TView` (`Root`|`Component`|`Embedded`).\n */\n type: TViewType;\n\n /**\n * This is a blueprint used to generate LView instances for this TView. Copying this\n * blueprint is faster than creating a new LView from scratch.\n */\n blueprint: LView;\n\n /**\n * The template function used to refresh the view of dynamically created views\n * and components. Will be null for inline views.\n */\n template: ComponentTemplate<{}>|null;\n\n /**\n * A function containing query-related instructions.\n */\n viewQuery: ViewQueriesFunction<{}>|null;\n\n /**\n * A `TNode` representing the declaration location of this `TView` (not part of this TView).\n */\n declTNode: TNode|null;\n\n // FIXME(misko): Why does `TView` not have `declarationTView` property?\n\n /** Whether or not this template has been processed in creation mode. */\n firstCreatePass: boolean;\n\n /**\n * Whether or not this template has been processed in update mode (e.g. change detected)\n *\n * `firstUpdatePass` is used by styling to set up `TData` to contain metadata about the styling\n * instructions. (Mainly to build up a linked list of styling priority order.)\n *\n * Typically this function gets cleared after first execution. If exception is thrown then this\n * flag can remain turned un until there is first successful (no exception) pass. This means that\n * individual styling instructions keep track of if they have already been added to the linked\n * list to prevent double adding.\n */\n firstUpdatePass: boolean;\n\n /** Static data equivalent of LView.data[]. Contains TNodes, PipeDefInternal or TI18n. */\n data: TData;\n\n /**\n * The binding start index is the index at which the data array\n * starts to store bindings only. Saving this value ensures that we\n * will begin reading bindings at the correct point in the array when\n * we are in update mode.\n *\n * -1 means that it has not been initialized.\n */\n bindingStartIndex: number;\n\n /**\n * The index where the \"expando\" section of `LView` begins. The expando\n * section contains injectors, directive instances, and host binding values.\n * Unlike the \"decls\" and \"vars\" sections of `LView`, the length of this\n * section cannot be calculated at compile-time because directives are matched\n * at runtime to preserve locality.\n *\n * We store this start index so we know where to start checking host bindings\n * in `setHostBindings`.\n */\n expandoStartIndex: number;\n\n /**\n * Whether or not there are any static view queries tracked on this view.\n *\n * We store this so we know whether or not we should do a view query\n * refresh after creation mode to collect static query results.\n */\n staticViewQueries: boolean;\n\n /**\n * Whether or not there are any static content queries tracked on this view.\n *\n * We store this so we know whether or not we should do a content query\n * refresh after creation mode to collect static query results.\n */\n staticContentQueries: boolean;\n\n /**\n * A reference to the first child node located in the view.\n */\n firstChild: TNode|null;\n\n /**\n * Stores the OpCodes to be replayed during change-detection to process the `HostBindings`\n *\n * See `HostBindingOpCodes` for encoding details.\n */\n hostBindingOpCodes: HostBindingOpCodes|null;\n\n /**\n * Full registry of directives and components that may be found in this view.\n *\n * It's necessary to keep a copy of the full def list on the TView so it's possible\n * to render template functions without a host component.\n */\n directiveRegistry: DirectiveDefList|null;\n\n /**\n * Full registry of pipes that may be found in this view.\n *\n * The property is either an array of `PipeDefs`s or a function which returns the array of\n * `PipeDefs`s. The function is necessary to be able to support forward declarations.\n *\n * It's necessary to keep a copy of the full def list on the TView so it's possible\n * to render template functions without a host component.\n */\n pipeRegistry: PipeDefList|null;\n\n /**\n * Array of ngOnInit, ngOnChanges and ngDoCheck hooks that should be executed for this view in\n * creation mode.\n *\n * This array has a flat structure and contains TNode indices, directive indices (where an\n * instance can be found in `LView`) and hook functions. TNode index is followed by the directive\n * index and a hook function. If there are multiple hooks for a given TNode, the TNode index is\n * not repeated and the next lifecycle hook information is stored right after the previous hook\n * function. This is done so that at runtime the system can efficiently iterate over all of the\n * functions to invoke without having to make any decisions/lookups.\n */\n preOrderHooks: HookData|null;\n\n /**\n * Array of ngOnChanges and ngDoCheck hooks that should be executed for this view in update mode.\n *\n * This array has the same structure as the `preOrderHooks` one.\n */\n preOrderCheckHooks: HookData|null;\n\n /**\n * Array of ngAfterContentInit and ngAfterContentChecked hooks that should be executed\n * for this view in creation mode.\n *\n * Even indices: Directive index\n * Odd indices: Hook function\n */\n contentHooks: HookData|null;\n\n /**\n * Array of ngAfterContentChecked hooks that should be executed for this view in update\n * mode.\n *\n * Even indices: Directive index\n * Odd indices: Hook function\n */\n contentCheckHooks: HookData|null;\n\n /**\n * Array of ngAfterViewInit and ngAfterViewChecked hooks that should be executed for\n * this view in creation mode.\n *\n * Even indices: Directive index\n * Odd indices: Hook function\n */\n viewHooks: HookData|null;\n\n /**\n * Array of ngAfterViewChecked hooks that should be executed for this view in\n * update mode.\n *\n * Even indices: Directive index\n * Odd indices: Hook function\n */\n viewCheckHooks: HookData|null;\n\n /**\n * Array of ngOnDestroy hooks that should be executed when this view is destroyed.\n *\n * Even indices: Directive index\n * Odd indices: Hook function\n */\n destroyHooks: DestroyHookData|null;\n\n /**\n * When a view is destroyed, listeners need to be released and outputs need to be\n * unsubscribed. This cleanup array stores both listener data (in chunks of 4)\n * and output data (in chunks of 2) for a particular view. Combining the arrays\n * saves on memory (70 bytes per array) and on a few bytes of code size (for two\n * separate for loops).\n *\n * If it's a native DOM listener or output subscription being stored:\n * 1st index is: event name `name = tView.cleanup[i+0]`\n * 2nd index is: index of native element or a function that retrieves global target (window,\n * document or body) reference based on the native element:\n * `typeof idxOrTargetGetter === 'function'`: global target getter function\n * `typeof idxOrTargetGetter === 'number'`: index of native element\n *\n * 3rd index is: index of listener function `listener = lView[CLEANUP][tView.cleanup[i+2]]`\n * 4th index is: `useCaptureOrIndx = tView.cleanup[i+3]`\n * `typeof useCaptureOrIndx == 'boolean' : useCapture boolean\n * `typeof useCaptureOrIndx == 'number':\n * `useCaptureOrIndx >= 0` `removeListener = LView[CLEANUP][useCaptureOrIndx]`\n * `useCaptureOrIndx < 0` `subscription = LView[CLEANUP][-useCaptureOrIndx]`\n *\n * If it's an output subscription or query list destroy hook:\n * 1st index is: output unsubscribe function / query list destroy function\n * 2nd index is: index of function context in LView.cleanupInstances[]\n * `tView.cleanup[i+0].call(lView[CLEANUP][tView.cleanup[i+1]])`\n */\n cleanup: any[]|null;\n\n /**\n * A list of element indices for child components that will need to be\n * refreshed when the current view has finished its check. These indices have\n * already been adjusted for the HEADER_OFFSET.\n *\n */\n components: number[]|null;\n\n /**\n * A collection of queries tracked in a given view.\n */\n queries: TQueries|null;\n\n /**\n * An array of indices pointing to directives with content queries alongside with the\n * corresponding query index. Each entry in this array is a tuple of:\n * - index of the first content query index declared by a given directive;\n * - index of a directive.\n *\n * We are storing those indexes so we can refresh content queries as part of a view refresh\n * process.\n */\n contentQueries: number[]|null;\n\n /**\n * Set of schemas that declare elements to be allowed inside the view.\n */\n schemas: SchemaMetadata[]|null;\n\n /**\n * Array of constants for the view. Includes attribute arrays, local definition arrays etc.\n * Used for directive matching, attribute bindings, local definitions and more.\n */\n consts: TConstants|null;\n\n /**\n * Indicates that there was an error before we managed to complete the first create pass of the\n * view. This means that the view is likely corrupted and we should try to recover it.\n */\n incompleteFirstPass: boolean;\n}\n\nexport const enum RootContextFlags {\n Empty = 0b00,\n DetectChanges = 0b01,\n FlushPlayers = 0b10\n}\n\n\n/**\n * RootContext contains information which is shared for all components which\n * were bootstrapped with {@link renderComponent}.\n */\nexport interface RootContext {\n /**\n * A function used for scheduling change detection in the future. Usually\n * this is `requestAnimationFrame`.\n */\n scheduler: (workFn: () => void) => void;\n\n /**\n * A promise which is resolved when all components are considered clean (not dirty).\n *\n * This promise is overwritten every time a first call to {@link markDirty} is invoked.\n */\n clean: Promise<null>;\n\n /**\n * RootComponents - The components that were instantiated by the call to\n * {@link renderComponent}.\n */\n components: {}[];\n\n /**\n * The player flushing handler to kick off all animations\n */\n playerHandler: PlayerHandler|null;\n\n /**\n * What render-related operations to run once a scheduler has been set\n */\n flags: RootContextFlags;\n}\n\n/** Single hook callback function. */\nexport type HookFn = () => void;\n\n/**\n * Information necessary to call a hook. E.g. the callback that\n * needs to invoked and the index at which to find its context.\n */\nexport type HookEntry = number|HookFn;\n\n/**\n * Array of hooks that should be executed for a view and their directive indices.\n *\n * For each node of the view, the following data is stored:\n * 1) Node index (optional)\n * 2) A series of number/function pairs where:\n * - even indices are directive indices\n * - odd indices are hook functions\n *\n * Special cases:\n * - a negative directive index flags an init hook (ngOnInit, ngAfterContentInit, ngAfterViewInit)\n */\nexport type HookData = HookEntry[];\n\n/**\n * Array of destroy hooks that should be executed for a view and their directive indices.\n *\n * The array is set up as a series of number/function or number/(number|function)[]:\n * - Even indices represent the context with which hooks should be called.\n * - Odd indices are the hook functions themselves. If a value at an odd index is an array,\n * it represents the destroy hooks of a `multi` provider where:\n * - Even indices represent the index of the provider for which we've registered a destroy hook,\n * inside of the `multi` provider array.\n * - Odd indices are the destroy hook functions.\n * For example:\n * LView: `[0, 1, 2, AService, 4, [BService, CService, DService]]`\n * destroyHooks: `[3, AService.ngOnDestroy, 5, [0, BService.ngOnDestroy, 2, DService.ngOnDestroy]]`\n *\n * In the example above `AService` is a type provider with an `ngOnDestroy`, whereas `BService`,\n * `CService` and `DService` are part of a `multi` provider where only `BService` and `DService`\n * have an `ngOnDestroy` hook.\n */\nexport type DestroyHookData = (HookEntry|HookData)[];\n\n/**\n * Static data that corresponds to the instance-specific data array on an LView.\n *\n * Each node's static data is stored in tData at the same index that it's stored\n * in the data array. Any nodes that do not have static data store a null value in\n * tData to avoid a sparse array.\n *\n * Each pipe's definition is stored here at the same index as its pipe instance in\n * the data array.\n *\n * Each host property's name is stored here at the same index as its value in the\n * data array.\n *\n * Each property binding name is stored here at the same index as its value in\n * the data array. If the binding is an interpolation, the static string values\n * are stored parallel to the dynamic values. Example:\n *\n * id=\"prefix {{ v0 }} a {{ v1 }} b {{ v2 }} suffix\"\n *\n * LView | TView.data\n *------------------------\n * v0 value | 'a'\n * v1 value | 'b'\n * v2 value | id � prefix � suffix\n *\n * Injector bloom filters are also stored here.\n */\nexport type TData = (TNode|PipeDef<any>|DirectiveDef<any>|ComponentDef<any>|number|TStylingRange|\n TStylingKey|ProviderToken<any>|TI18n|I18nUpdateOpCodes|TIcu|null|string)[];\n\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nexport const unusedValueExportToPlacateAjd = 1;\n\n/**\n * Human readable version of the `LView`.\n *\n * `LView` is a data structure used internally to keep track of views. The `LView` is designed for\n * efficiency and so at times it is difficult to read or write tests which assert on its values. For\n * this reason when `ngDevMode` is true we patch a `LView.debug` property which points to\n * `LViewDebug` for easier debugging and test writing. It is the intent of `LViewDebug` to be used\n * in tests.\n */\nexport interface LViewDebug {\n /**\n * Flags associated with the `LView` unpacked into a more readable state.\n *\n * See `LViewFlags` for the flag meanings.\n */\n readonly flags: {\n initPhaseState: number,\n creationMode: boolean,\n firstViewPass: boolean,\n checkAlways: boolean,\n dirty: boolean,\n attached: boolean,\n destroyed: boolean,\n isRoot: boolean,\n indexWithinInitPhase: number,\n };\n\n /**\n * Associated TView\n */\n readonly tView: TView;\n\n /**\n * Parent view (or container)\n */\n readonly parent: LViewDebug|LContainerDebug|null;\n\n /**\n * Next sibling to the `LView`.\n */\n readonly next: LViewDebug|LContainerDebug|null;\n\n /**\n * The context used for evaluation of the `LView`\n *\n * (Usually the component)\n */\n readonly context: {}|null;\n\n /**\n * Hierarchical tree of nodes.\n */\n readonly nodes: DebugNode[];\n\n /**\n * Template structure (no instance data).\n * (Shows how TNodes are connected)\n */\n readonly template: string;\n\n /**\n * HTML representation of the `LView`.\n *\n * This is only approximate to actual HTML as child `LView`s are removed.\n */\n readonly html: string;\n\n /**\n * The host element to which this `LView` is attached.\n */\n readonly hostHTML: string|null;\n\n /**\n * Child `LView`s\n */\n readonly childViews: Array<LViewDebug|LContainerDebug>;\n\n /**\n * Sub range of `LView` containing decls (DOM elements).\n */\n readonly decls: LViewDebugRange;\n\n /**\n * Sub range of `LView` containing vars (bindings).\n */\n readonly vars: LViewDebugRange;\n\n /**\n * Sub range of `LView` containing expando (used by DI).\n */\n readonly expando: LViewDebugRange;\n}\n\n/**\n * Human readable version of the `LContainer`\n *\n * `LContainer` is a data structure used internally to keep track of child views. The `LContainer`\n * is designed for efficiency and so at times it is difficult to read or write tests which assert on\n * its values. For this reason when `ngDevMode` is true we patch a `LContainer.debug` property which\n * points to `LContainerDebug` for easier debugging and test writing. It is the intent of\n * `LContainerDebug` to be used in tests.\n */\nexport interface LContainerDebug {\n readonly native: RComment;\n /**\n * Child `LView`s.\n */\n readonly views: LViewDebug[];\n readonly parent: LViewDebug|null;\n readonly movedViews: LView[]|null;\n readonly host: RElement|RComment|LView;\n readonly next: LViewDebug|LContainerDebug|null;\n readonly hasTransplantedViews: boolean;\n}\n\n\n\n/**\n * `LView` is subdivided to ranges where the actual data is stored. Some of these ranges such as\n * `decls` and `vars` are known at compile time. Other such as `i18n` and `expando` are runtime only\n * concepts.\n */\nexport interface LViewDebugRange {\n /**\n * The starting index in `LView` where the range begins. (Inclusive)\n */\n start: number;\n\n /**\n * The ending index in `LView` where the range ends. (Exclusive)\n */\n end: number;\n\n /**\n * The length of the range\n */\n length: number;\n\n /**\n * The merged content of the range. `t` contains data from `TView.data` and `l` contains `LView`\n * data at an index.\n */\n content: LViewDebugRangeContent[];\n}\n\n/**\n * For convenience the static and instance portions of `TView` and `LView` are merged into a single\n * object in `LViewRange`.\n */\nexport interface LViewDebugRangeContent {\n /**\n * Index into original `LView` or `TView.data`.\n */\n index: number;\n\n /**\n * Value from the `TView.data[index]` location.\n */\n t: any;\n\n /**\n * Value from the `LView[index]` location.\n */\n l: any;\n}\n\n\n/**\n * A logical node which comprise into `LView`s.\n *\n */\nexport interface DebugNode {\n /**\n * HTML representation of the node.\n */\n html: string|null;\n\n /**\n * Associated `TNode`\n */\n tNode: TNode;\n\n /**\n * Human readable node type.\n */\n type: string;\n\n /**\n * DOM native node.\n */\n native: Node;\n\n /**\n * Child nodes\n */\n children: DebugNode[];\n\n /**\n * A list of Component/Directive types which need to be instantiated an this location.\n */\n factories: Type<unknown>[];\n\n /**\n * A list of Component/Directive instances which were instantiated an this location.\n */\n instances: unknown[];\n\n /**\n * NodeInjector information.\n */\n injector: NodeInjectorDebug;\n\n /**\n * Injector resolution path.\n */\n injectorResolutionPath: any;\n}\n\nexport interface NodeInjectorDebug {\n /**\n * Instance bloom. Does the current injector have a provider with a given bloom mask.\n */\n bloom: string;\n\n\n /**\n * Cumulative bloom. Do any of the above injectors have a provider with a given bloom mask.\n */\n cumulativeBloom: string;\n\n /**\n * A list of providers associated with this injector.\n */\n providers: (Type<unknown>|DirectiveDef<unknown>|ComponentDef<unknown>)[];\n\n /**\n * A list of providers associated with this injector visible to the view of the component only.\n */\n viewProviders: Type<unknown>[];\n\n\n /**\n * Location of the parent `TNode`.\n */\n parentInjectorIndex: number;\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 {LContainer, TYPE} from './container';\nimport {ComponentDef, DirectiveDef} from './definition';\nimport {TNode, TNodeFlags} from './node';\nimport {RNode} from './renderer_dom';\nimport {FLAGS, LView, LViewFlags} from './view';\n\n\n/**\n * True if `value` is `LView`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nexport function isLView(value: RNode|LView|LContainer|{}|null): value is LView {\n return Array.isArray(value) && typeof value[TYPE] === 'object';\n}\n\n/**\n * True if `value` is `LContainer`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nexport function isLContainer(value: RNode|LView|LContainer|{}|null): value is LContainer {\n return Array.isArray(value) && value[TYPE] === true;\n}\n\nexport function isContentQueryHost(tNode: TNode): boolean {\n return (tNode.flags & TNodeFlags.hasContentQuery) !== 0;\n}\n\nexport function isComponentHost(tNode: TNode): boolean {\n return (tNode.flags & TNodeFlags.isComponentHost) === TNodeFlags.isComponentHost;\n}\n\nexport function isDirectiveHost(tNode: TNode): boolean {\n return (tNode.flags & TNodeFlags.isDirectiveHost) === TNodeFlags.isDirectiveHost;\n}\n\nexport function isComponentDef<T>(def: DirectiveDef<T>): def is ComponentDef<T> {\n return (def as ComponentDef<T>).template !== null;\n}\n\nexport function isRootView(target: LView): boolean {\n return (target[FLAGS] & LViewFlags.IsRoot) !== 0;\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 {assertDefined, assertEqual, assertNumber, throwError} from '../util/assert';\n\nimport {getComponentDef, getNgModuleDef} from './definition';\nimport {LContainer} from './interfaces/container';\nimport {DirectiveDef} from './interfaces/definition';\nimport {TIcu} from './interfaces/i18n';\nimport {NodeInjectorOffset} from './interfaces/injector';\nimport {TNode} from './interfaces/node';\nimport {isLContainer, isLView} from './interfaces/type_checks';\nimport {DECLARATION_COMPONENT_VIEW, HEADER_OFFSET, LView, T_HOST, TVIEW, TView} from './interfaces/view';\n\n// [Assert functions do not constraint type when they are guarded by a truthy\n// expression.](https://github.com/microsoft/TypeScript/issues/37295)\n\n\nexport function assertTNodeForLView(tNode: TNode, lView: LView) {\n assertTNodeForTView(tNode, lView[TVIEW]);\n}\n\nexport function assertTNodeForTView(tNode: TNode, tView: TView) {\n assertTNode(tNode);\n tNode.hasOwnProperty('tView_') &&\n assertEqual(\n (tNode as any as {tView_: TView}).tView_, tView,\n 'This TNode does not belong to this TView.');\n}\n\nexport function assertTNode(tNode: TNode) {\n assertDefined(tNode, 'TNode must be defined');\n if (!(tNode && typeof tNode === 'object' && tNode.hasOwnProperty('directiveStylingLast'))) {\n throwError('Not of type TNode, got: ' + tNode);\n }\n}\n\n\nexport function assertTIcu(tIcu: TIcu) {\n assertDefined(tIcu, 'Expected TIcu to be defined');\n if (!(typeof tIcu.currentCaseLViewIndex === 'number')) {\n throwError('Object is not of TIcu type.');\n }\n}\n\nexport function assertComponentType(\n actual: any,\n msg: string = 'Type passed in is not ComponentType, it does not have \\'ɵcmp\\' property.') {\n if (!getComponentDef(actual)) {\n throwError(msg);\n }\n}\n\nexport function assertNgModuleType(\n actual: any,\n msg: string = 'Type passed in is not NgModuleType, it does not have \\'ɵmod\\' property.') {\n if (!getNgModuleDef(actual)) {\n throwError(msg);\n }\n}\n\nexport function assertCurrentTNodeIsParent(isParent: boolean) {\n assertEqual(isParent, true, 'currentTNode should be a parent');\n}\n\nexport function assertHasParent(tNode: TNode|null) {\n assertDefined(tNode, 'currentTNode should exist!');\n assertDefined(tNode!.parent, 'currentTNode should have a parent');\n}\n\nexport function assertDataNext(lView: LView, index: number, arr?: any[]) {\n if (arr == null) arr = lView;\n assertEqual(\n arr.length, index, `index ${index} expected to be at the end of arr (length ${arr.length})`);\n}\n\nexport function assertLContainer(value: any): asserts value is LContainer {\n assertDefined(value, 'LContainer must be defined');\n assertEqual(isLContainer(value), true, 'Expecting LContainer');\n}\n\nexport function assertLViewOrUndefined(value: any): asserts value is LView|null|undefined {\n value && assertEqual(isLView(value), true, 'Expecting LView or undefined or null');\n}\n\nexport function assertLView(value: any): asserts value is LView {\n assertDefined(value, 'LView must be defined');\n assertEqual(isLView(value), true, 'Expecting LView');\n}\n\nexport function assertFirstCreatePass(tView: TView, errMessage?: string) {\n assertEqual(\n tView.firstCreatePass, true, errMessage || 'Should only be called in first create pass.');\n}\n\nexport function assertFirstUpdatePass(tView: TView, errMessage?: string) {\n assertEqual(\n tView.firstUpdatePass, true, errMessage || 'Should only be called in first update pass.');\n}\n\n/**\n * This is a basic sanity check that an object is probably a directive def. DirectiveDef is\n * an interface, so we can't do a direct instanceof check.\n */\nexport function assertDirectiveDef<T>(obj: any): asserts obj is DirectiveDef<T> {\n if (obj.type === undefined || obj.selectors == undefined || obj.inputs === undefined) {\n throwError(\n `Expected a DirectiveDef/ComponentDef and this object does not seem to have the expected shape.`);\n }\n}\n\nexport function assertIndexInDeclRange(lView: LView, index: number) {\n const tView = lView[1];\n assertBetween(HEADER_OFFSET, tView.bindingStartIndex, index);\n}\n\nexport function assertIndexInVarsRange(lView: LView, index: number) {\n const tView = lView[1];\n assertBetween(tView.bindingStartIndex, tView.expandoStartIndex, index);\n}\n\nexport function assertIndexInExpandoRange(lView: LView, index: number) {\n const tView = lView[1];\n assertBetween(tView.expandoStartIndex, lView.length, index);\n}\n\nexport function assertBetween(lower: number, upper: number, index: number) {\n if (!(lower <= index && index < upper)) {\n throwError(`Index out of range (expecting ${lower} <= ${index} < ${upper})`);\n }\n}\n\nexport function assertProjectionSlots(lView: LView, errMessage?: string) {\n assertDefined(lView[DECLARATION_COMPONENT_VIEW], 'Component views should exist.');\n assertDefined(\n lView[DECLARATION_COMPONENT_VIEW][T_HOST]!.projection,\n errMessage ||\n 'Components with projection nodes (<ng-content>) must have projection slots defined.');\n}\n\nexport function assertParentView(lView: LView|null, errMessage?: string) {\n assertDefined(\n lView,\n errMessage || 'Component views should always have a parent view (component\\'s host view)');\n}\n\n\n/**\n * This is a basic sanity check that the `injectorIndex` seems to point to what looks like a\n * NodeInjector data structure.\n *\n * @param lView `LView` which should be checked.\n * @param injectorIndex index into the `LView` where the `NodeInjector` is expected.\n */\nexport function assertNodeInjector(lView: LView, injectorIndex: number) {\n assertIndexInExpandoRange(lView, injectorIndex);\n assertIndexInExpandoRange(lView, injectorIndex + NodeInjectorOffset.PARENT);\n assertNumber(lView[injectorIndex + 0], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 1], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 2], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 3], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 4], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 5], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 6], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 7], 'injectorIndex should point to a bloom filter');\n assertNumber(\n lView[injectorIndex + NodeInjectorOffset.PARENT],\n 'injectorIndex should point to parent injector');\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {stringify} from '../util/stringify';\nimport {NG_FACTORY_DEF} from './fields';\n\n\n/**\n * Definition of what a factory function should look like.\n */\nexport type FactoryFn<T> = {\n /**\n * Subclasses without an explicit constructor call through to the factory of their base\n * definition, providing it with their own constructor to instantiate.\n */\n <U extends T>(t?: Type<U>): U;\n\n /**\n * If no constructor to instantiate is provided, an instance of type T itself is created.\n */\n (t?: undefined): T;\n};\n\n\nexport function getFactoryDef<T>(type: any, throwNotFound: true): FactoryFn<T>;\nexport function getFactoryDef<T>(type: any): FactoryFn<T>|null;\nexport function getFactoryDef<T>(type: any, throwNotFound?: boolean): FactoryFn<T>|null {\n const hasFactoryDef = type.hasOwnProperty(NG_FACTORY_DEF);\n if (!hasFactoryDef && throwNotFound === true && ngDevMode) {\n throw new Error(`Type ${stringify(type)} does not have 'ɵfac' property.`);\n }\n return hasFactoryDef ? type[NG_FACTORY_DEF] : null;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Represents a basic change from a previous to a new value for a single\n * property on a directive instance. Passed as a value in a\n * {@link SimpleChanges} object to the `ngOnChanges` hook.\n *\n * @see `OnChanges`\n *\n * @publicApi\n */\nexport class SimpleChange {\n constructor(public previousValue: any, public currentValue: any, public firstChange: boolean) {}\n /**\n * Check whether the new value is the first value assigned.\n */\n isFirstChange(): boolean {\n return this.firstChange;\n }\n}\n\n/**\n * A hashtable of changes represented by {@link SimpleChange} objects stored\n * at the declared property name they belong to on a Directive or Component. This is\n * the type passed to the `ngOnChanges` hook.\n *\n * @see `OnChanges`\n *\n * @publicApi\n */\nexport interface SimpleChanges {\n [propName: string]: SimpleChange;\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 {OnChanges} from '../../interface/lifecycle_hooks';\nimport {SimpleChange, SimpleChanges} from '../../interface/simple_change';\nimport {EMPTY_OBJ} from '../../util/empty';\nimport {DirectiveDef, DirectiveDefFeature} from '../interfaces/definition';\n\n/**\n * The NgOnChangesFeature decorates a component with support for the ngOnChanges\n * lifecycle hook, so it should be included in any component that implements\n * that hook.\n *\n * If the component or directive uses inheritance, the NgOnChangesFeature MUST\n * be included as a feature AFTER {@link InheritDefinitionFeature}, otherwise\n * inherited properties will not be propagated to the ngOnChanges lifecycle\n * hook.\n *\n * Example usage:\n *\n * ```\n * static ɵcmp = defineComponent({\n * ...\n * inputs: {name: 'publicName'},\n * features: [NgOnChangesFeature]\n * });\n * ```\n *\n * @codeGenApi\n */\nexport function ɵɵNgOnChangesFeature<T>(): DirectiveDefFeature {\n return NgOnChangesFeatureImpl;\n}\n\nexport function NgOnChangesFeatureImpl<T>(definition: DirectiveDef<T>) {\n if (definition.type.prototype.ngOnChanges) {\n definition.setInput = ngOnChangesSetInput;\n }\n return rememberChangeHistoryAndInvokeOnChangesHook;\n}\n\n// This option ensures that the ngOnChanges lifecycle hook will be inherited\n// from superclasses (in InheritDefinitionFeature).\n/** @nocollapse */\n// tslint:disable-next-line:no-toplevel-property-access\n(ɵɵNgOnChangesFeature as DirectiveDefFeature).ngInherit = true;\n\n/**\n * This is a synthetic lifecycle hook which gets inserted into `TView.preOrderHooks` to simulate\n * `ngOnChanges`.\n *\n * The hook reads the `NgSimpleChangesStore` data from the component instance and if changes are\n * found it invokes `ngOnChanges` on the component instance.\n *\n * @param this Component instance. Because this function gets inserted into `TView.preOrderHooks`,\n * it is guaranteed to be called with component instance.\n */\nfunction rememberChangeHistoryAndInvokeOnChangesHook(this: OnChanges) {\n const simpleChangesStore = getSimpleChangesStore(this);\n const current = simpleChangesStore?.current;\n\n if (current) {\n const previous = simpleChangesStore!.previous;\n if (previous === EMPTY_OBJ) {\n simpleChangesStore!.previous = current;\n } else {\n // New changes are copied to the previous store, so that we don't lose history for inputs\n // which were not changed this time\n for (let key in current) {\n previous[key] = current[key];\n }\n }\n simpleChangesStore!.current = null;\n this.ngOnChanges(current);\n }\n}\n\n\nfunction ngOnChangesSetInput<T>(\n this: DirectiveDef<T>, instance: T, value: any, publicName: string, privateName: string): void {\n const simpleChangesStore = getSimpleChangesStore(instance) ||\n setSimpleChangesStore(instance, {previous: EMPTY_OBJ, current: null});\n const current = simpleChangesStore.current || (simpleChangesStore.current = {});\n const previous = simpleChangesStore.previous;\n\n const declaredName = (this.declaredInputs as {[key: string]: string})[publicName];\n const previousChange = previous[declaredName];\n current[declaredName] = new SimpleChange(\n previousChange && previousChange.currentValue, value, previous === EMPTY_OBJ);\n\n (instance as any)[privateName] = value;\n}\n\nconst SIMPLE_CHANGES_STORE = '__ngSimpleChanges__';\n\nfunction getSimpleChangesStore(instance: any): null|NgSimpleChangesStore {\n return instance[SIMPLE_CHANGES_STORE] || null;\n}\n\nfunction setSimpleChangesStore(instance: any, store: NgSimpleChangesStore): NgSimpleChangesStore {\n return instance[SIMPLE_CHANGES_STORE] = store;\n}\n\n/**\n * Data structure which is monkey-patched on the component instance and used by `ngOnChanges`\n * life-cycle hook to track previous input values.\n */\ninterface NgSimpleChangesStore {\n previous: SimpleChanges;\n current: SimpleChanges|null;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Profiler events is an enum used by the profiler to distinguish between different calls of user\n * code invoked throughout the application lifecycle.\n */\nexport const enum ProfilerEvent {\n /**\n * Corresponds to the point in time before the runtime has called the template function of a\n * component with `RenderFlags.Create`.\n */\n TemplateCreateStart,\n\n /**\n * Corresponds to the point in time after the runtime has called the template function of a\n * component with `RenderFlags.Create`.\n */\n TemplateCreateEnd,\n\n /**\n * Corresponds to the point in time before the runtime has called the template function of a\n * component with `RenderFlags.Update`.\n */\n TemplateUpdateStart,\n\n /**\n * Corresponds to the point in time after the runtime has called the template function of a\n * component with `RenderFlags.Update`.\n */\n TemplateUpdateEnd,\n\n /**\n * Corresponds to the point in time before the runtime has called a lifecycle hook of a component\n * or directive.\n */\n LifecycleHookStart,\n\n /**\n * Corresponds to the point in time after the runtime has called a lifecycle hook of a component\n * or directive.\n */\n LifecycleHookEnd,\n\n /**\n * Corresponds to the point in time before the runtime has evaluated an expression associated with\n * an event or an output.\n */\n OutputStart,\n\n /**\n * Corresponds to the point in time after the runtime has evaluated an expression associated with\n * an event or an output.\n */\n OutputEnd,\n}\n\n/**\n * Profiler function which the runtime will invoke before and after user code.\n */\nexport interface Profiler {\n (event: ProfilerEvent, instance: {}|null, hookOrListener?: (e?: any) => any): void;\n}\n\n\nlet profilerCallback: Profiler|null = null;\n\n/**\n * Sets the callback function which will be invoked before and after performing certain actions at\n * runtime (for example, before and after running change detection).\n *\n * Warning: this function is *INTERNAL* and should not be relied upon in application's code.\n * The contract of the function might be changed in any release and/or the function can be removed\n * completely.\n *\n * @param profiler function provided by the caller or null value to disable profiling.\n */\nexport const setProfiler = (profiler: Profiler|null) => {\n profilerCallback = profiler;\n};\n\n/**\n * Profiler function which wraps user code executed by the runtime.\n *\n * @param event ProfilerEvent corresponding to the execution context\n * @param instance component instance\n * @param hookOrListener lifecycle hook function or output listener. The value depends on the\n * execution context\n * @returns\n */\nexport const profiler: Profiler = function(\n event: ProfilerEvent, instance: {}|null, hookOrListener?: (e?: any) => any) {\n if (profilerCallback != null /* both `null` and `undefined` */) {\n profilerCallback(event, instance, hookOrListener);\n }\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\nexport const MATH_ML_NAMESPACE = 'http://www.w3.org/1998/MathML/';\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 * Most of the use of `document` in Angular is from within the DI system so it is possible to simply\n * inject the `DOCUMENT` token and are done.\n *\n * Ivy is special because it does not rely upon the DI and must get hold of the document some other\n * way.\n *\n * The solution is to define `getDocument()` and `setDocument()` top-level functions for ivy.\n * Wherever ivy needs the global document, it calls `getDocument()` instead.\n *\n * When running ivy outside of a browser environment, it is necessary to call `setDocument()` to\n * tell ivy what the global `document` is.\n *\n * Angular does this for us in each of the standard platforms (`Browser`, `Server`, and `WebWorker`)\n * by calling `setDocument()` when providing the `DOCUMENT` token.\n */\nlet DOCUMENT: Document|undefined = undefined;\n\n/**\n * Tell ivy what the `document` is for this platform.\n *\n * It is only necessary to call this if the current platform is not a browser.\n *\n * @param document The object representing the global `document` in this environment.\n */\nexport function setDocument(document: Document|undefined): void {\n DOCUMENT = document;\n}\n\n/**\n * Access the object that represents the `document` for this platform.\n *\n * Ivy calls this whenever it needs to access the `document` object.\n * For example to create the renderer or to do sanitization.\n */\nexport function getDocument(): Document {\n if (DOCUMENT !== undefined) {\n return DOCUMENT;\n } else if (typeof document !== 'undefined') {\n return document;\n }\n // No \"document\" can be found. This should only happen if we are running ivy outside Angular and\n // the current platform is not a browser. Since this is not a supported scenario at the moment\n // this should not happen in Angular apps.\n // Once we support running ivy outside of Angular we will need to publish `setDocument()` as a\n // public API. Meanwhile we just return `undefined` and let the application fail.\n return undefined!;\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 * The goal here is to make sure that the browser DOM API is the Renderer.\n * We do this by defining a subset of DOM API to be the renderer and then\n * use that at runtime for rendering.\n *\n * At runtime we can then use the DOM api directly, in server or web-worker\n * it will be easy to implement such API.\n */\n\nimport {RendererStyleFlags2, RendererType2} from '../../render/api_flags';\nimport {TrustedHTML, TrustedScript, TrustedScriptURL} from '../../util/security/trusted_type_defs';\nimport {getDocument} from './document';\nimport {RComment, RElement, RNode, RText} from './renderer_dom';\n\n// TODO: cleanup once the code is merged in angular/angular\nexport enum RendererStyleFlags3 {\n Important = 1 << 0,\n DashCase = 1 << 1\n}\n\nexport type Renderer3 = ObjectOrientedRenderer3|ProceduralRenderer3;\n\nexport type GlobalTargetName = 'document'|'window'|'body';\n\nexport type GlobalTargetResolver = (element: any) => EventTarget;\n\n/**\n * Object Oriented style of API needed to create elements and text nodes.\n *\n * This is the native browser API style, e.g. operations are methods on individual objects\n * like HTMLElement. With this style, no additional code is needed as a facade\n * (reducing payload size).\n * */\nexport interface ObjectOrientedRenderer3 {\n createComment(data: string): RComment;\n createElement(tagName: string): RElement;\n createElementNS(namespace: string, tagName: string): RElement;\n createTextNode(data: string): RText;\n\n querySelector(selectors: string): RElement|null;\n}\n\n/** Returns whether the `renderer` is a `ProceduralRenderer3` */\nexport function isProceduralRenderer(renderer: ProceduralRenderer3|\n ObjectOrientedRenderer3): renderer is ProceduralRenderer3 {\n return !!((renderer as any).listen);\n}\n\n/**\n * Procedural style of API needed to create elements and text nodes.\n *\n * In non-native browser environments (e.g. platforms such as web-workers), this is the\n * facade that enables element manipulation. This also facilitates backwards compatibility\n * with Renderer2.\n */\nexport interface ProceduralRenderer3 {\n destroy(): void;\n createComment(value: string): RComment;\n createElement(name: string, namespace?: string|null): RElement;\n createText(value: string): RText;\n /**\n * This property is allowed to be null / undefined,\n * in which case the view engine won't call it.\n * This is used as a performance optimization for production mode.\n */\n destroyNode?: ((node: RNode) => void)|null;\n appendChild(parent: RElement, newChild: RNode): void;\n insertBefore(parent: RNode, newChild: RNode, refChild: RNode|null, isMove?: boolean): void;\n removeChild(parent: RElement, oldChild: RNode, isHostElement?: boolean): void;\n selectRootElement(selectorOrNode: string|any, preserveContent?: boolean): RElement;\n\n parentNode(node: RNode): RElement|null;\n nextSibling(node: RNode): RNode|null;\n\n setAttribute(\n el: RElement, name: string, value: string|TrustedHTML|TrustedScript|TrustedScriptURL,\n namespace?: string|null): void;\n removeAttribute(el: RElement, name: string, namespace?: string|null): void;\n addClass(el: RElement, name: string): void;\n removeClass(el: RElement, name: string): void;\n setStyle(\n el: RElement, style: string, value: any,\n flags?: RendererStyleFlags2|RendererStyleFlags3): void;\n removeStyle(el: RElement, style: string, flags?: RendererStyleFlags2|RendererStyleFlags3): void;\n setProperty(el: RElement, name: string, value: any): void;\n setValue(node: RText|RComment, value: string): void;\n\n // TODO(misko): Deprecate in favor of addEventListener/removeEventListener\n listen(\n target: GlobalTargetName|RNode, eventName: string,\n callback: (event: any) => boolean | void): () => void;\n}\n\nexport interface RendererFactory3 {\n createRenderer(hostElement: RElement|null, rendererType: RendererType2|null): Renderer3;\n begin?(): void;\n end?(): void;\n}\n\nexport const domRendererFactory3: RendererFactory3 = {\n createRenderer: (hostElement: RElement|null, rendererType: RendererType2|null): Renderer3 => {\n return getDocument();\n }\n};\n\n\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nexport const unusedValueExportToPlacateAjd = 1;\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 {assertDomNode, assertGreaterThan, assertGreaterThanOrEqual, assertIndexInRange, assertLessThan} from '../../util/assert';\nimport {assertTNode, assertTNodeForLView} from '../assert';\nimport {LContainer, TYPE} from '../interfaces/container';\nimport {TConstants, TNode} from '../interfaces/node';\nimport {isProceduralRenderer} from '../interfaces/renderer';\nimport {RNode} from '../interfaces/renderer_dom';\nimport {isLContainer, isLView} from '../interfaces/type_checks';\nimport {FLAGS, HEADER_OFFSET, HOST, LView, LViewFlags, PARENT, PREORDER_HOOK_FLAGS, RENDERER, TData, TRANSPLANTED_VIEWS_TO_REFRESH, TView} from '../interfaces/view';\n\n\n\n/**\n * For efficiency reasons we often put several different data types (`RNode`, `LView`, `LContainer`)\n * in same location in `LView`. This is because we don't want to pre-allocate space for it\n * because the storage is sparse. This file contains utilities for dealing with such data types.\n *\n * How do we know what is stored at a given location in `LView`.\n * - `Array.isArray(value) === false` => `RNode` (The normal storage value)\n * - `Array.isArray(value) === true` => then the `value[0]` represents the wrapped value.\n * - `typeof value[TYPE] === 'object'` => `LView`\n * - This happens when we have a component at a given location\n * - `typeof value[TYPE] === true` => `LContainer`\n * - This happens when we have `LContainer` binding at a given location.\n *\n *\n * NOTE: it is assumed that `Array.isArray` and `typeof` operations are very efficient.\n */\n\n/**\n * Returns `RNode`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nexport function unwrapRNode(value: RNode|LView|LContainer): RNode {\n while (Array.isArray(value)) {\n value = value[HOST] as any;\n }\n return value as RNode;\n}\n\n/**\n * Returns `LView` or `null` if not found.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nexport function unwrapLView(value: RNode|LView|LContainer): LView|null {\n while (Array.isArray(value)) {\n // This check is same as `isLView()` but we don't call at as we don't want to call\n // `Array.isArray()` twice and give JITer more work for inlining.\n if (typeof value[TYPE] === 'object') return value as LView;\n value = value[HOST] as any;\n }\n return null;\n}\n\n/**\n * Returns `LContainer` or `null` if not found.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nexport function unwrapLContainer(value: RNode|LView|LContainer): LContainer|null {\n while (Array.isArray(value)) {\n // This check is same as `isLContainer()` but we don't call at as we don't want to call\n // `Array.isArray()` twice and give JITer more work for inlining.\n if (value[TYPE] === true) return value as LContainer;\n value = value[HOST] as any;\n }\n return null;\n}\n\n/**\n * Retrieves an element value from the provided `viewData`, by unwrapping\n * from any containers, component views, or style contexts.\n */\nexport function getNativeByIndex(index: number, lView: LView): RNode {\n ngDevMode && assertIndexInRange(lView, index);\n ngDevMode && assertGreaterThanOrEqual(index, HEADER_OFFSET, 'Expected to be past HEADER_OFFSET');\n return unwrapRNode(lView[index]);\n}\n\n/**\n * Retrieve an `RNode` for a given `TNode` and `LView`.\n *\n * This function guarantees in dev mode to retrieve a non-null `RNode`.\n *\n * @param tNode\n * @param lView\n */\nexport function getNativeByTNode(tNode: TNode, lView: LView): RNode {\n ngDevMode && assertTNodeForLView(tNode, lView);\n ngDevMode && assertIndexInRange(lView, tNode.index);\n const node: RNode = unwrapRNode(lView[tNode.index]);\n ngDevMode && !isProceduralRenderer(lView[RENDERER]) && assertDomNode(node);\n return node;\n}\n\n/**\n * Retrieve an `RNode` or `null` for a given `TNode` and `LView`.\n *\n * Some `TNode`s don't have associated `RNode`s. For example `Projection`\n *\n * @param tNode\n * @param lView\n */\nexport function getNativeByTNodeOrNull(tNode: TNode|null, lView: LView): RNode|null {\n const index = tNode === null ? -1 : tNode.index;\n if (index !== -1) {\n ngDevMode && assertTNodeForLView(tNode!, lView);\n const node: RNode|null = unwrapRNode(lView[index]);\n ngDevMode && node !== null && !isProceduralRenderer(lView[RENDERER]) && assertDomNode(node);\n return node;\n }\n return null;\n}\n\n\n// fixme(misko): The return Type should be `TNode|null`\nexport function getTNode(tView: TView, index: number): TNode {\n ngDevMode && assertGreaterThan(index, -1, 'wrong index for TNode');\n ngDevMode && assertLessThan(index, tView.data.length, 'wrong index for TNode');\n const tNode = tView.data[index] as TNode;\n ngDevMode && tNode !== null && assertTNode(tNode);\n return tNode;\n}\n\n/** Retrieves a value from any `LView` or `TData`. */\nexport function load<T>(view: LView|TData, index: number): T {\n ngDevMode && assertIndexInRange(view, index);\n return view[index];\n}\n\nexport function getComponentLViewByIndex(nodeIndex: number, hostView: LView): LView {\n // Could be an LView or an LContainer. If LContainer, unwrap to find LView.\n ngDevMode && assertIndexInRange(hostView, nodeIndex);\n const slotValue = hostView[nodeIndex];\n const lView = isLView(slotValue) ? slotValue : slotValue[HOST];\n return lView;\n}\n\n/** Checks whether a given view is in creation mode */\nexport function isCreationMode(view: LView): boolean {\n return (view[FLAGS] & LViewFlags.CreationMode) === LViewFlags.CreationMode;\n}\n\n/**\n * Returns a boolean for whether the view is attached to the change detection tree.\n *\n * Note: This determines whether a view should be checked, not whether it's inserted\n * into a container. For that, you'll want `viewAttachedToContainer` below.\n */\nexport function viewAttachedToChangeDetector(view: LView): boolean {\n return (view[FLAGS] & LViewFlags.Attached) === LViewFlags.Attached;\n}\n\n/** Returns a boolean for whether the view is attached to a container. */\nexport function viewAttachedToContainer(view: LView): boolean {\n return isLContainer(view[PARENT]);\n}\n\n/** Returns a constant from `TConstants` instance. */\nexport function getConstant<T>(consts: TConstants|null, index: null|undefined): null;\nexport function getConstant<T>(consts: TConstants, index: number): T|null;\nexport function getConstant<T>(consts: TConstants|null, index: number|null|undefined): T|null;\nexport function getConstant<T>(consts: TConstants|null, index: number|null|undefined): T|null {\n if (index === null || index === undefined) return null;\n ngDevMode && assertIndexInRange(consts!, index);\n return consts![index] as unknown as T;\n}\n\n/**\n * Resets the pre-order hook flags of the view.\n * @param lView the LView on which the flags are reset\n */\nexport function resetPreOrderHookFlags(lView: LView) {\n lView[PREORDER_HOOK_FLAGS] = 0;\n}\n\n/**\n * Updates the `TRANSPLANTED_VIEWS_TO_REFRESH` counter on the `LContainer` as well as the parents\n * whose\n * 1. counter goes from 0 to 1, indicating that there is a new child that has a view to refresh\n * or\n * 2. counter goes from 1 to 0, indicating there are no more descendant views to refresh\n */\nexport function updateTransplantedViewCount(lContainer: LContainer, amount: 1|- 1) {\n lContainer[TRANSPLANTED_VIEWS_TO_REFRESH] += amount;\n let viewOrContainer: LView|LContainer = lContainer;\n let parent: LView|LContainer|null = lContainer[PARENT];\n while (parent !== null &&\n ((amount === 1 && viewOrContainer[TRANSPLANTED_VIEWS_TO_REFRESH] === 1) ||\n (amount === -1 && viewOrContainer[TRANSPLANTED_VIEWS_TO_REFRESH] === 0))) {\n parent[TRANSPLANTED_VIEWS_TO_REFRESH] += amount;\n viewOrContainer = parent;\n parent = parent[PARENT];\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 {InjectFlags} from '../di/interface/injector';\nimport {assertDefined, assertEqual, assertGreaterThanOrEqual, assertLessThan, assertNotEqual} from '../util/assert';\nimport {assertLViewOrUndefined, assertTNodeForLView, assertTNodeForTView} from './assert';\nimport {DirectiveDef} from './interfaces/definition';\nimport {TNode, TNodeType} from './interfaces/node';\nimport {CONTEXT, DECLARATION_VIEW, HEADER_OFFSET, LView, OpaqueViewState, T_HOST, TData, TVIEW, TView, TViewType} from './interfaces/view';\nimport {MATH_ML_NAMESPACE, SVG_NAMESPACE} from './namespaces';\nimport {getTNode} from './util/view_utils';\n\n\n/**\n *\n */\ninterface LFrame {\n /**\n * Parent LFrame.\n *\n * This is needed when `leaveView` is called to restore the previous state.\n */\n parent: LFrame;\n\n /**\n * Child LFrame.\n *\n * This is used to cache existing LFrames to relieve the memory pressure.\n */\n child: LFrame|null;\n\n /**\n * State of the current view being processed.\n *\n * An array of nodes (text, element, container, etc), pipes, their bindings, and\n * any local variables that need to be stored between invocations.\n */\n lView: LView;\n\n /**\n * Current `TView` associated with the `LFrame.lView`.\n *\n * One can get `TView` from `lFrame[TVIEW]` however because it is so common it makes sense to\n * store it in `LFrame` for perf reasons.\n */\n tView: TView;\n\n /**\n * Used to set the parent property when nodes are created and track query results.\n *\n * This is used in conjunction with `isParent`.\n */\n currentTNode: TNode|null;\n\n /**\n * If `isParent` is:\n * - `true`: then `currentTNode` points to a parent node.\n * - `false`: then `currentTNode` points to previous node (sibling).\n */\n isParent: boolean;\n\n /**\n * Index of currently selected element in LView.\n *\n * Used by binding instructions. Updated as part of advance instruction.\n */\n selectedIndex: number;\n\n /**\n * Current pointer to the binding index.\n */\n bindingIndex: number;\n\n /**\n * The last viewData retrieved by nextContext().\n * Allows building nextContext() and reference() calls.\n *\n * e.g. const inner = x().$implicit; const outer = x().$implicit;\n */\n contextLView: LView;\n\n /**\n * Store the element depth count. This is used to identify the root elements of the template\n * so that we can then attach patch data `LView` to only those elements. We know that those\n * are the only places where the patch data could change, this way we will save on number\n * of places where tha patching occurs.\n */\n elementDepthCount: number;\n\n /**\n * Current namespace to be used when creating elements\n */\n currentNamespace: string|null;\n\n\n /**\n * The root index from which pure function instructions should calculate their binding\n * indices. In component views, this is TView.bindingStartIndex. In a host binding\n * context, this is the TView.expandoStartIndex + any dirs/hostVars before the given dir.\n */\n bindingRootIndex: number;\n\n /**\n * Current index of a View or Content Query which needs to be processed next.\n * We iterate over the list of Queries and increment current query index at every step.\n */\n currentQueryIndex: number;\n\n /**\n * When host binding is executing this points to the directive index.\n * `TView.data[currentDirectiveIndex]` is `DirectiveDef`\n * `LView[currentDirectiveIndex]` is directive instance.\n */\n currentDirectiveIndex: number;\n\n /**\n * Are we currently in i18n block as denoted by `ɵɵelementStart` and `ɵɵelementEnd`.\n *\n * This information is needed because while we are in i18n block all elements must be pre-declared\n * in the translation. (i.e. `Hello �#2�World�/#2�!` pre-declares element at `�#2�` location.)\n * This allocates `TNodeType.Placeholder` element at location `2`. If translator removes `�#2�`\n * from translation than the runtime must also ensure tha element at `2` does not get inserted\n * into the DOM. The translation does not carry information about deleted elements. Therefor the\n * only way to know that an element is deleted is that it was not pre-declared in the translation.\n *\n * This flag works by ensuring that elements which are created without pre-declaration\n * (`TNodeType.Placeholder`) are not inserted into the DOM render tree. (It does mean that the\n * element still gets instantiated along with all of its behavior [directives])\n */\n inI18n: boolean;\n}\n\n/**\n * All implicit instruction state is stored here.\n *\n * It is useful to have a single object where all of the state is stored as a mental model\n * (rather it being spread across many different variables.)\n *\n * PERF NOTE: Turns out that writing to a true global variable is slower than\n * having an intermediate object with properties.\n */\ninterface InstructionState {\n /**\n * Current `LFrame`\n *\n * `null` if we have not called `enterView`\n */\n lFrame: LFrame;\n\n /**\n * Stores whether directives should be matched to elements.\n *\n * When template contains `ngNonBindable` then we need to prevent the runtime from matching\n * directives on children of that element.\n *\n * Example:\n * ```\n * <my-comp my-directive>\n * Should match component / directive.\n * </my-comp>\n * <div ngNonBindable>\n * <my-comp my-directive>\n * Should not match component / directive because we are in ngNonBindable.\n * </my-comp>\n * </div>\n * ```\n */\n bindingsEnabled: boolean;\n\n /**\n * In this mode, any changes in bindings will throw an ExpressionChangedAfterChecked error.\n *\n * Necessary to support ChangeDetectorRef.checkNoChanges().\n *\n * checkNoChanges Runs only in devmode=true and verifies that no unintended changes exist in\n * the change detector or its children.\n */\n isInCheckNoChangesMode: boolean;\n}\n\nconst instructionState: InstructionState = {\n lFrame: createLFrame(null),\n bindingsEnabled: true,\n isInCheckNoChangesMode: false,\n};\n\n/**\n * Returns true if the instruction state stack is empty.\n *\n * Intended to be called from tests only (tree shaken otherwise).\n */\nexport function specOnlyIsInstructionStateEmpty(): boolean {\n return instructionState.lFrame.parent === null;\n}\n\n\nexport function getElementDepthCount() {\n return instructionState.lFrame.elementDepthCount;\n}\n\nexport function increaseElementDepthCount() {\n instructionState.lFrame.elementDepthCount++;\n}\n\nexport function decreaseElementDepthCount() {\n instructionState.lFrame.elementDepthCount--;\n}\n\nexport function getBindingsEnabled(): boolean {\n return instructionState.bindingsEnabled;\n}\n\n\n/**\n * Enables directive matching on elements.\n *\n * * Example:\n * ```\n * <my-comp my-directive>\n * Should match component / directive.\n * </my-comp>\n * <div ngNonBindable>\n * <!-- ɵɵdisableBindings() -->\n * <my-comp my-directive>\n * Should not match component / directive because we are in ngNonBindable.\n * </my-comp>\n * <!-- ɵɵenableBindings() -->\n * </div>\n * ```\n *\n * @codeGenApi\n */\nexport function ɵɵenableBindings(): void {\n instructionState.bindingsEnabled = true;\n}\n\n/**\n * Disables directive matching on element.\n *\n * * Example:\n * ```\n * <my-comp my-directive>\n * Should match component / directive.\n * </my-comp>\n * <div ngNonBindable>\n * <!-- ɵɵdisableBindings() -->\n * <my-comp my-directive>\n * Should not match component / directive because we are in ngNonBindable.\n * </my-comp>\n * <!-- ɵɵenableBindings() -->\n * </div>\n * ```\n *\n * @codeGenApi\n */\nexport function ɵɵdisableBindings(): void {\n instructionState.bindingsEnabled = false;\n}\n\n/**\n * Return the current `LView`.\n */\nexport function getLView(): LView {\n return instructionState.lFrame.lView;\n}\n\n/**\n * Return the current `TView`.\n */\nexport function getTView(): TView {\n return instructionState.lFrame.tView;\n}\n\n/**\n * Restores `contextViewData` to the given OpaqueViewState instance.\n *\n * Used in conjunction with the getCurrentView() instruction to save a snapshot\n * of the current view and restore it when listeners are invoked. This allows\n * walking the declaration view tree in listeners to get vars from parent views.\n *\n * @param viewToRestore The OpaqueViewState instance to restore.\n * @returns Context of the restored OpaqueViewState instance.\n *\n * @codeGenApi\n */\nexport function ɵɵrestoreView<T = any>(viewToRestore: OpaqueViewState): T {\n instructionState.lFrame.contextLView = viewToRestore as any as LView;\n return (viewToRestore as any as LView)[CONTEXT] as T;\n}\n\n\nexport function getCurrentTNode(): TNode|null {\n let currentTNode = getCurrentTNodePlaceholderOk();\n while (currentTNode !== null && currentTNode.type === TNodeType.Placeholder) {\n currentTNode = currentTNode.parent;\n }\n return currentTNode;\n}\n\nexport function getCurrentTNodePlaceholderOk(): TNode|null {\n return instructionState.lFrame.currentTNode;\n}\n\nexport function getCurrentParentTNode(): TNode|null {\n const lFrame = instructionState.lFrame;\n const currentTNode = lFrame.currentTNode;\n return lFrame.isParent ? currentTNode : currentTNode!.parent;\n}\n\nexport function setCurrentTNode(tNode: TNode|null, isParent: boolean) {\n ngDevMode && tNode && assertTNodeForTView(tNode, instructionState.lFrame.tView);\n const lFrame = instructionState.lFrame;\n lFrame.currentTNode = tNode;\n lFrame.isParent = isParent;\n}\n\nexport function isCurrentTNodeParent(): boolean {\n return instructionState.lFrame.isParent;\n}\n\nexport function setCurrentTNodeAsNotParent(): void {\n instructionState.lFrame.isParent = false;\n}\nexport function setCurrentTNodeAsParent(): void {\n instructionState.lFrame.isParent = true;\n}\n\nexport function getContextLView(): LView {\n return instructionState.lFrame.contextLView;\n}\n\nexport function isInCheckNoChangesMode(): boolean {\n // TODO(misko): remove this from the LView since it is ngDevMode=true mode only.\n return instructionState.isInCheckNoChangesMode;\n}\n\nexport function setIsInCheckNoChangesMode(mode: boolean): void {\n instructionState.isInCheckNoChangesMode = mode;\n}\n\n// top level variables should not be exported for performance reasons (PERF_NOTES.md)\nexport function getBindingRoot() {\n const lFrame = instructionState.lFrame;\n let index = lFrame.bindingRootIndex;\n if (index === -1) {\n index = lFrame.bindingRootIndex = lFrame.tView.bindingStartIndex;\n }\n return index;\n}\n\nexport function getBindingIndex(): number {\n return instructionState.lFrame.bindingIndex;\n}\n\nexport function setBindingIndex(value: number): number {\n return instructionState.lFrame.bindingIndex = value;\n}\n\nexport function nextBindingIndex(): number {\n return instructionState.lFrame.bindingIndex++;\n}\n\nexport function incrementBindingIndex(count: number): number {\n const lFrame = instructionState.lFrame;\n const index = lFrame.bindingIndex;\n lFrame.bindingIndex = lFrame.bindingIndex + count;\n return index;\n}\n\nexport function isInI18nBlock() {\n return instructionState.lFrame.inI18n;\n}\n\nexport function setInI18nBlock(isInI18nBlock: boolean): void {\n instructionState.lFrame.inI18n = isInI18nBlock;\n}\n\n/**\n * Set a new binding root index so that host template functions can execute.\n *\n * Bindings inside the host template are 0 index. But because we don't know ahead of time\n * how many host bindings we have we can't pre-compute them. For this reason they are all\n * 0 index and we just shift the root so that they match next available location in the LView.\n *\n * @param bindingRootIndex Root index for `hostBindings`\n * @param currentDirectiveIndex `TData[currentDirectiveIndex]` will point to the current directive\n * whose `hostBindings` are being processed.\n */\nexport function setBindingRootForHostBindings(\n bindingRootIndex: number, currentDirectiveIndex: number) {\n const lFrame = instructionState.lFrame;\n lFrame.bindingIndex = lFrame.bindingRootIndex = bindingRootIndex;\n setCurrentDirectiveIndex(currentDirectiveIndex);\n}\n\n/**\n * When host binding is executing this points to the directive index.\n * `TView.data[getCurrentDirectiveIndex()]` is `DirectiveDef`\n * `LView[getCurrentDirectiveIndex()]` is directive instance.\n */\nexport function getCurrentDirectiveIndex(): number {\n return instructionState.lFrame.currentDirectiveIndex;\n}\n\n/**\n * Sets an index of a directive whose `hostBindings` are being processed.\n *\n * @param currentDirectiveIndex `TData` index where current directive instance can be found.\n */\nexport function setCurrentDirectiveIndex(currentDirectiveIndex: number): void {\n instructionState.lFrame.currentDirectiveIndex = currentDirectiveIndex;\n}\n\n/**\n * Retrieve the current `DirectiveDef` which is active when `hostBindings` instruction is being\n * executed.\n *\n * @param tData Current `TData` where the `DirectiveDef` will be looked up at.\n */\nexport function getCurrentDirectiveDef(tData: TData): DirectiveDef<any>|null {\n const currentDirectiveIndex = instructionState.lFrame.currentDirectiveIndex;\n return currentDirectiveIndex === -1 ? null : tData[currentDirectiveIndex] as DirectiveDef<any>;\n}\n\nexport function getCurrentQueryIndex(): number {\n return instructionState.lFrame.currentQueryIndex;\n}\n\nexport function setCurrentQueryIndex(value: number): void {\n instructionState.lFrame.currentQueryIndex = value;\n}\n\n/**\n * Returns a `TNode` of the location where the current `LView` is declared at.\n *\n * @param lView an `LView` that we want to find parent `TNode` for.\n */\nfunction getDeclarationTNode(lView: LView): TNode|null {\n const tView = lView[TVIEW];\n\n // Return the declaration parent for embedded views\n if (tView.type === TViewType.Embedded) {\n ngDevMode && assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');\n return tView.declTNode;\n }\n\n // Components don't have `TView.declTNode` because each instance of component could be\n // inserted in different location, hence `TView.declTNode` is meaningless.\n // Falling back to `T_HOST` in case we cross component boundary.\n if (tView.type === TViewType.Component) {\n return lView[T_HOST];\n }\n\n // Remaining TNode type is `TViewType.Root` which doesn't have a parent TNode.\n return null;\n}\n\n/**\n * This is a light weight version of the `enterView` which is needed by the DI system.\n *\n * @param lView `LView` location of the DI context.\n * @param tNode `TNode` for DI context\n * @param flags DI context flags. if `SkipSelf` flag is set than we walk up the declaration\n * tree from `tNode` until we find parent declared `TElementNode`.\n * @returns `true` if we have successfully entered DI associated with `tNode` (or with declared\n * `TNode` if `flags` has `SkipSelf`). Failing to enter DI implies that no associated\n * `NodeInjector` can be found and we should instead use `ModuleInjector`.\n * - If `true` than this call must be fallowed by `leaveDI`\n * - If `false` than this call failed and we should NOT call `leaveDI`\n */\nexport function enterDI(lView: LView, tNode: TNode, flags: InjectFlags) {\n ngDevMode && assertLViewOrUndefined(lView);\n\n if (flags & InjectFlags.SkipSelf) {\n ngDevMode && assertTNodeForTView(tNode, lView[TVIEW]);\n\n let parentTNode = tNode as TNode | null;\n let parentLView = lView;\n\n while (true) {\n ngDevMode && assertDefined(parentTNode, 'Parent TNode should be defined');\n parentTNode = parentTNode!.parent as TNode | null;\n if (parentTNode === null && !(flags & InjectFlags.Host)) {\n parentTNode = getDeclarationTNode(parentLView);\n if (parentTNode === null) break;\n\n // In this case, a parent exists and is definitely an element. So it will definitely\n // have an existing lView as the declaration view, which is why we can assume it's defined.\n ngDevMode && assertDefined(parentLView, 'Parent LView should be defined');\n parentLView = parentLView[DECLARATION_VIEW]!;\n\n // In Ivy there are Comment nodes that correspond to ngIf and NgFor embedded directives\n // We want to skip those and look only at Elements and ElementContainers to ensure\n // we're looking at true parent nodes, and not content or other types.\n if (parentTNode.type & (TNodeType.Element | TNodeType.ElementContainer)) {\n break;\n }\n } else {\n break;\n }\n }\n if (parentTNode === null) {\n // If we failed to find a parent TNode this means that we should use module injector.\n return false;\n } else {\n tNode = parentTNode;\n lView = parentLView;\n }\n }\n\n ngDevMode && assertTNodeForLView(tNode, lView);\n const lFrame = instructionState.lFrame = allocLFrame();\n lFrame.currentTNode = tNode;\n lFrame.lView = lView;\n\n return true;\n}\n\n/**\n * Swap the current lView with a new lView.\n *\n * For performance reasons we store the lView in the top level of the module.\n * This way we minimize the number of properties to read. Whenever a new view\n * is entered we have to store the lView for later, and when the view is\n * exited the state has to be restored\n *\n * @param newView New lView to become active\n * @returns the previously active lView;\n */\nexport function enterView(newView: LView): void {\n ngDevMode && assertNotEqual(newView[0], newView[1] as any, '????');\n ngDevMode && assertLViewOrUndefined(newView);\n const newLFrame = allocLFrame();\n if (ngDevMode) {\n assertEqual(newLFrame.isParent, true, 'Expected clean LFrame');\n assertEqual(newLFrame.lView, null, 'Expected clean LFrame');\n assertEqual(newLFrame.tView, null, 'Expected clean LFrame');\n assertEqual(newLFrame.selectedIndex, -1, 'Expected clean LFrame');\n assertEqual(newLFrame.elementDepthCount, 0, 'Expected clean LFrame');\n assertEqual(newLFrame.currentDirectiveIndex, -1, 'Expected clean LFrame');\n assertEqual(newLFrame.currentNamespace, null, 'Expected clean LFrame');\n assertEqual(newLFrame.bindingRootIndex, -1, 'Expected clean LFrame');\n assertEqual(newLFrame.currentQueryIndex, 0, 'Expected clean LFrame');\n }\n const tView = newView[TVIEW];\n instructionState.lFrame = newLFrame;\n ngDevMode && tView.firstChild && assertTNodeForTView(tView.firstChild, tView);\n newLFrame.currentTNode = tView.firstChild!;\n newLFrame.lView = newView;\n newLFrame.tView = tView;\n newLFrame.contextLView = newView!;\n newLFrame.bindingIndex = tView.bindingStartIndex;\n newLFrame.inI18n = false;\n}\n\n/**\n * Allocates next free LFrame. This function tries to reuse the `LFrame`s to lower memory pressure.\n */\nfunction allocLFrame() {\n const currentLFrame = instructionState.lFrame;\n const childLFrame = currentLFrame === null ? null : currentLFrame.child;\n const newLFrame = childLFrame === null ? createLFrame(currentLFrame) : childLFrame;\n return newLFrame;\n}\n\nfunction createLFrame(parent: LFrame|null): LFrame {\n const lFrame: LFrame = {\n currentTNode: null,\n isParent: true,\n lView: null!,\n tView: null!,\n selectedIndex: -1,\n contextLView: null!,\n elementDepthCount: 0,\n currentNamespace: null,\n currentDirectiveIndex: -1,\n bindingRootIndex: -1,\n bindingIndex: -1,\n currentQueryIndex: 0,\n parent: parent!,\n child: null,\n inI18n: false,\n };\n parent !== null && (parent.child = lFrame); // link the new LFrame for reuse.\n return lFrame;\n}\n\n/**\n * A lightweight version of leave which is used with DI.\n *\n * This function only resets `currentTNode` and `LView` as those are the only properties\n * used with DI (`enterDI()`).\n *\n * NOTE: This function is reexported as `leaveDI`. However `leaveDI` has return type of `void` where\n * as `leaveViewLight` has `LFrame`. This is so that `leaveViewLight` can be used in `leaveView`.\n */\nfunction leaveViewLight(): LFrame {\n const oldLFrame = instructionState.lFrame;\n instructionState.lFrame = oldLFrame.parent;\n oldLFrame.currentTNode = null!;\n oldLFrame.lView = null!;\n return oldLFrame;\n}\n\n/**\n * This is a lightweight version of the `leaveView` which is needed by the DI system.\n *\n * NOTE: this function is an alias so that we can change the type of the function to have `void`\n * return type.\n */\nexport const leaveDI: () => void = leaveViewLight;\n\n/**\n * Leave the current `LView`\n *\n * This pops the `LFrame` with the associated `LView` from the stack.\n *\n * IMPORTANT: We must zero out the `LFrame` values here otherwise they will be retained. This is\n * because for performance reasons we don't release `LFrame` but rather keep it for next use.\n */\nexport function leaveView() {\n const oldLFrame = leaveViewLight();\n oldLFrame.isParent = true;\n oldLFrame.tView = null!;\n oldLFrame.selectedIndex = -1;\n oldLFrame.contextLView = null!;\n oldLFrame.elementDepthCount = 0;\n oldLFrame.currentDirectiveIndex = -1;\n oldLFrame.currentNamespace = null;\n oldLFrame.bindingRootIndex = -1;\n oldLFrame.bindingIndex = -1;\n oldLFrame.currentQueryIndex = 0;\n}\n\nexport function nextContextImpl<T = any>(level: number): T {\n const contextLView = instructionState.lFrame.contextLView =\n walkUpViews(level, instructionState.lFrame.contextLView!);\n return contextLView[CONTEXT] as T;\n}\n\nfunction walkUpViews(nestingLevel: number, currentView: LView): LView {\n while (nestingLevel > 0) {\n ngDevMode &&\n assertDefined(\n currentView[DECLARATION_VIEW],\n 'Declaration view should be defined if nesting level is greater than 0.');\n currentView = currentView[DECLARATION_VIEW]!;\n nestingLevel--;\n }\n return currentView;\n}\n\n/**\n * Gets the currently selected element index.\n *\n * Used with {@link property} instruction (and more in the future) to identify the index in the\n * current `LView` to act on.\n */\nexport function getSelectedIndex() {\n return instructionState.lFrame.selectedIndex;\n}\n\n/**\n * Sets the most recent index passed to {@link select}\n *\n * Used with {@link property} instruction (and more in the future) to identify the index in the\n * current `LView` to act on.\n *\n * (Note that if an \"exit function\" was set earlier (via `setElementExitFn()`) then that will be\n * run if and when the provided `index` value is different from the current selected index value.)\n */\nexport function setSelectedIndex(index: number) {\n ngDevMode && index !== -1 &&\n assertGreaterThanOrEqual(index, HEADER_OFFSET, 'Index must be past HEADER_OFFSET (or -1).');\n ngDevMode &&\n assertLessThan(\n index, instructionState.lFrame.lView.length, 'Can\\'t set index passed end of LView');\n instructionState.lFrame.selectedIndex = index;\n}\n\n/**\n * Gets the `tNode` that represents currently selected element.\n */\nexport function getSelectedTNode() {\n const lFrame = instructionState.lFrame;\n return getTNode(lFrame.tView, lFrame.selectedIndex);\n}\n\n/**\n * Sets the namespace used to create elements to `'http://www.w3.org/2000/svg'` in global state.\n *\n * @codeGenApi\n */\nexport function ɵɵnamespaceSVG() {\n instructionState.lFrame.currentNamespace = SVG_NAMESPACE;\n}\n\n/**\n * Sets the namespace used to create elements to `'http://www.w3.org/1998/MathML/'` in global state.\n *\n * @codeGenApi\n */\nexport function ɵɵnamespaceMathML() {\n instructionState.lFrame.currentNamespace = MATH_ML_NAMESPACE;\n}\n\n/**\n * Sets the namespace used to create elements to `null`, which forces element creation to use\n * `createElement` rather than `createElementNS`.\n *\n * @codeGenApi\n */\nexport function ɵɵnamespaceHTML() {\n namespaceHTMLInternal();\n}\n\n/**\n * Sets the namespace used to create elements to `null`, which forces element creation to use\n * `createElement` rather than `createElementNS`.\n */\nexport function namespaceHTMLInternal() {\n instructionState.lFrame.currentNamespace = null;\n}\n\nexport function getNamespace(): string|null {\n return instructionState.lFrame.currentNamespace;\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 {AfterContentChecked, AfterContentInit, AfterViewChecked, AfterViewInit, DoCheck, OnChanges, OnDestroy, OnInit} from '../interface/lifecycle_hooks';\nimport {assertDefined, assertEqual, assertNotEqual} from '../util/assert';\nimport {assertFirstCreatePass} from './assert';\nimport {NgOnChangesFeatureImpl} from './features/ng_onchanges_feature';\nimport {DirectiveDef} from './interfaces/definition';\nimport {TNode} from './interfaces/node';\nimport {FLAGS, HookData, InitPhaseState, LView, LViewFlags, PREORDER_HOOK_FLAGS, PreOrderHookFlags, TView} from './interfaces/view';\nimport {profiler, ProfilerEvent} from './profiler';\nimport {isInCheckNoChangesMode} from './state';\n\n\n\n/**\n * Adds all directive lifecycle hooks from the given `DirectiveDef` to the given `TView`.\n *\n * Must be run *only* on the first template pass.\n *\n * Sets up the pre-order hooks on the provided `tView`,\n * see {@link HookData} for details about the data structure.\n *\n * @param directiveIndex The index of the directive in LView\n * @param directiveDef The definition containing the hooks to setup in tView\n * @param tView The current TView\n */\nexport function registerPreOrderHooks(\n directiveIndex: number, directiveDef: DirectiveDef<any>, tView: TView): void {\n ngDevMode && assertFirstCreatePass(tView);\n const {ngOnChanges, ngOnInit, ngDoCheck} =\n directiveDef.type.prototype as OnChanges & OnInit & DoCheck;\n\n if (ngOnChanges as Function | undefined) {\n const wrappedOnChanges = NgOnChangesFeatureImpl(directiveDef);\n (tView.preOrderHooks || (tView.preOrderHooks = [])).push(directiveIndex, wrappedOnChanges);\n (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = []))\n .push(directiveIndex, wrappedOnChanges);\n }\n\n if (ngOnInit) {\n (tView.preOrderHooks || (tView.preOrderHooks = [])).push(0 - directiveIndex, ngOnInit);\n }\n\n if (ngDoCheck) {\n (tView.preOrderHooks || (tView.preOrderHooks = [])).push(directiveIndex, ngDoCheck);\n (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(directiveIndex, ngDoCheck);\n }\n}\n\n/**\n *\n * Loops through the directives on the provided `tNode` and queues hooks to be\n * run that are not initialization hooks.\n *\n * Should be executed during `elementEnd()` and similar to\n * preserve hook execution order. Content, view, and destroy hooks for projected\n * components and directives must be called *before* their hosts.\n *\n * Sets up the content, view, and destroy hooks on the provided `tView`,\n * see {@link HookData} for details about the data structure.\n *\n * NOTE: This does not set up `onChanges`, `onInit` or `doCheck`, those are set up\n * separately at `elementStart`.\n *\n * @param tView The current TView\n * @param tNode The TNode whose directives are to be searched for hooks to queue\n */\nexport function registerPostOrderHooks(tView: TView, tNode: TNode): void {\n ngDevMode && assertFirstCreatePass(tView);\n // It's necessary to loop through the directives at elementEnd() (rather than processing in\n // directiveCreate) so we can preserve the current hook order. Content, view, and destroy\n // hooks for projected components and directives must be called *before* their hosts.\n for (let i = tNode.directiveStart, end = tNode.directiveEnd; i < end; i++) {\n const directiveDef = tView.data[i] as DirectiveDef<any>;\n ngDevMode && assertDefined(directiveDef, 'Expecting DirectiveDef');\n const lifecycleHooks: AfterContentInit&AfterContentChecked&AfterViewInit&AfterViewChecked&\n OnDestroy = directiveDef.type.prototype;\n const {\n ngAfterContentInit,\n ngAfterContentChecked,\n ngAfterViewInit,\n ngAfterViewChecked,\n ngOnDestroy\n } = lifecycleHooks;\n\n if (ngAfterContentInit) {\n (tView.contentHooks || (tView.contentHooks = [])).push(-i, ngAfterContentInit);\n }\n\n if (ngAfterContentChecked) {\n (tView.contentHooks || (tView.contentHooks = [])).push(i, ngAfterContentChecked);\n (tView.contentCheckHooks || (tView.contentCheckHooks = [])).push(i, ngAfterContentChecked);\n }\n\n if (ngAfterViewInit) {\n (tView.viewHooks || (tView.viewHooks = [])).push(-i, ngAfterViewInit);\n }\n\n if (ngAfterViewChecked) {\n (tView.viewHooks || (tView.viewHooks = [])).push(i, ngAfterViewChecked);\n (tView.viewCheckHooks || (tView.viewCheckHooks = [])).push(i, ngAfterViewChecked);\n }\n\n if (ngOnDestroy != null) {\n (tView.destroyHooks || (tView.destroyHooks = [])).push(i, ngOnDestroy);\n }\n }\n}\n\n/**\n * Executing hooks requires complex logic as we need to deal with 2 constraints.\n *\n * 1. Init hooks (ngOnInit, ngAfterContentInit, ngAfterViewInit) must all be executed once and only\n * once, across many change detection cycles. This must be true even if some hooks throw, or if\n * some recursively trigger a change detection cycle.\n * To solve that, it is required to track the state of the execution of these init hooks.\n * This is done by storing and maintaining flags in the view: the {@link InitPhaseState},\n * and the index within that phase. They can be seen as a cursor in the following structure:\n * [[onInit1, onInit2], [afterContentInit1], [afterViewInit1, afterViewInit2, afterViewInit3]]\n * They are are stored as flags in LView[FLAGS].\n *\n * 2. Pre-order hooks can be executed in batches, because of the select instruction.\n * To be able to pause and resume their execution, we also need some state about the hook's array\n * that is being processed:\n * - the index of the next hook to be executed\n * - the number of init hooks already found in the processed part of the array\n * They are are stored as flags in LView[PREORDER_HOOK_FLAGS].\n */\n\n\n/**\n * Executes pre-order check hooks ( OnChanges, DoChanges) given a view where all the init hooks were\n * executed once. This is a light version of executeInitAndCheckPreOrderHooks where we can skip read\n * / write of the init-hooks related flags.\n * @param lView The LView where hooks are defined\n * @param hooks Hooks to be run\n * @param nodeIndex 3 cases depending on the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nexport function executeCheckHooks(lView: LView, hooks: HookData, nodeIndex?: number|null) {\n callHooks(lView, hooks, InitPhaseState.InitPhaseCompleted, nodeIndex);\n}\n\n/**\n * Executes post-order init and check hooks (one of AfterContentInit, AfterContentChecked,\n * AfterViewInit, AfterViewChecked) given a view where there are pending init hooks to be executed.\n * @param lView The LView where hooks are defined\n * @param hooks Hooks to be run\n * @param initPhase A phase for which hooks should be run\n * @param nodeIndex 3 cases depending on the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nexport function executeInitAndCheckHooks(\n lView: LView, hooks: HookData, initPhase: InitPhaseState, nodeIndex?: number|null) {\n ngDevMode &&\n assertNotEqual(\n initPhase, InitPhaseState.InitPhaseCompleted,\n 'Init pre-order hooks should not be called more than once');\n if ((lView[FLAGS] & LViewFlags.InitPhaseStateMask) === initPhase) {\n callHooks(lView, hooks, initPhase, nodeIndex);\n }\n}\n\nexport function incrementInitPhaseFlags(lView: LView, initPhase: InitPhaseState): void {\n ngDevMode &&\n assertNotEqual(\n initPhase, InitPhaseState.InitPhaseCompleted,\n 'Init hooks phase should not be incremented after all init hooks have been run.');\n let flags = lView[FLAGS];\n if ((flags & LViewFlags.InitPhaseStateMask) === initPhase) {\n flags &= LViewFlags.IndexWithinInitPhaseReset;\n flags += LViewFlags.InitPhaseStateIncrementer;\n lView[FLAGS] = flags;\n }\n}\n\n/**\n * Calls lifecycle hooks with their contexts, skipping init hooks if it's not\n * the first LView pass\n *\n * @param currentView The current view\n * @param arr The array in which the hooks are found\n * @param initPhaseState the current state of the init phase\n * @param currentNodeIndex 3 cases depending on the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nfunction callHooks(\n currentView: LView, arr: HookData, initPhase: InitPhaseState,\n currentNodeIndex: number|null|undefined): void {\n ngDevMode &&\n assertEqual(\n isInCheckNoChangesMode(), false,\n 'Hooks should never be run when in check no changes mode.');\n const startIndex = currentNodeIndex !== undefined ?\n (currentView[PREORDER_HOOK_FLAGS] & PreOrderHookFlags.IndexOfTheNextPreOrderHookMaskMask) :\n 0;\n const nodeIndexLimit = currentNodeIndex != null ? currentNodeIndex : -1;\n const max = arr.length - 1; // Stop the loop at length - 1, because we look for the hook at i + 1\n let lastNodeIndexFound = 0;\n for (let i = startIndex; i < max; i++) {\n const hook = arr[i + 1] as number | (() => void);\n if (typeof hook === 'number') {\n lastNodeIndexFound = arr[i] as number;\n if (currentNodeIndex != null && lastNodeIndexFound >= currentNodeIndex) {\n break;\n }\n } else {\n const isInitHook = arr[i] < 0;\n if (isInitHook)\n currentView[PREORDER_HOOK_FLAGS] += PreOrderHookFlags.NumberOfInitHooksCalledIncrementer;\n if (lastNodeIndexFound < nodeIndexLimit || nodeIndexLimit == -1) {\n callHook(currentView, initPhase, arr, i);\n currentView[PREORDER_HOOK_FLAGS] =\n (currentView[PREORDER_HOOK_FLAGS] & PreOrderHookFlags.NumberOfInitHooksCalledMask) + i +\n 2;\n }\n i++;\n }\n }\n}\n\n/**\n * Execute one hook against the current `LView`.\n *\n * @param currentView The current view\n * @param initPhaseState the current state of the init phase\n * @param arr The array in which the hooks are found\n * @param i The current index within the hook data array\n */\nfunction callHook(currentView: LView, initPhase: InitPhaseState, arr: HookData, i: number) {\n const isInitHook = arr[i] < 0;\n const hook = arr[i + 1] as () => void;\n const directiveIndex = isInitHook ? -arr[i] : arr[i] as number;\n const directive = currentView[directiveIndex];\n if (isInitHook) {\n const indexWithintInitPhase = currentView[FLAGS] >> LViewFlags.IndexWithinInitPhaseShift;\n // The init phase state must be always checked here as it may have been recursively updated.\n if (indexWithintInitPhase <\n (currentView[PREORDER_HOOK_FLAGS] >> PreOrderHookFlags.NumberOfInitHooksCalledShift) &&\n (currentView[FLAGS] & LViewFlags.InitPhaseStateMask) === initPhase) {\n currentView[FLAGS] += LViewFlags.IndexWithinInitPhaseIncrementer;\n profiler(ProfilerEvent.LifecycleHookStart, directive, hook);\n try {\n hook.call(directive);\n } finally {\n profiler(ProfilerEvent.LifecycleHookEnd, directive, hook);\n }\n }\n } else {\n profiler(ProfilerEvent.LifecycleHookStart, directive, hook);\n try {\n hook.call(directive);\n } finally {\n profiler(ProfilerEvent.LifecycleHookEnd, directive, hook);\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 {InjectFlags} from '../../di/interface/injector';\nimport {ProviderToken} from '../../di/provider_token';\nimport {assertDefined, assertEqual} from '../../util/assert';\n\nimport {TDirectiveHostNode} from './node';\nimport {LView, TData} from './view';\n\n/**\n * Offsets of the `NodeInjector` data structure in the expando.\n *\n * `NodeInjector` is stored in both `LView` as well as `TView.data`. All storage requires 9 words.\n * First 8 are reserved for bloom filter and the 9th is reserved for the associated `TNode` as well\n * as parent `NodeInjector` pointer. All indexes are starting with `index` and have an offset as\n * shown.\n *\n * `LView` layout:\n * ```\n * index + 0: cumulative bloom filter\n * index + 1: cumulative bloom filter\n * index + 2: cumulative bloom filter\n * index + 3: cumulative bloom filter\n * index + 4: cumulative bloom filter\n * index + 5: cumulative bloom filter\n * index + 6: cumulative bloom filter\n * index + 7: cumulative bloom filter\n * index + 8: cumulative bloom filter\n * index + PARENT: Index to the parent injector. See `RelativeInjectorLocation`\n * `const parent = lView[index + NodeInjectorOffset.PARENT]`\n * ```\n *\n * `TViewData` layout:\n * ```\n * index + 0: cumulative bloom filter\n * index + 1: cumulative bloom filter\n * index + 2: cumulative bloom filter\n * index + 3: cumulative bloom filter\n * index + 4: cumulative bloom filter\n * index + 5: cumulative bloom filter\n * index + 6: cumulative bloom filter\n * index + 7: cumulative bloom filter\n * index + 8: cumulative bloom filter\n * index + TNODE: TNode associated with this `NodeInjector`\n * `canst tNode = tView.data[index + NodeInjectorOffset.TNODE]`\n * ```\n */\nexport const enum NodeInjectorOffset {\n TNODE = 8,\n PARENT = 8,\n BLOOM_SIZE = 8,\n SIZE = 9,\n}\n\n/**\n * Represents a relative location of parent injector.\n *\n * The interfaces encodes number of parents `LView`s to traverse and index in the `LView`\n * pointing to the parent injector.\n */\nexport interface RelativeInjectorLocation {\n __brand__: 'RelativeInjectorLocationFlags';\n}\n\nexport const enum RelativeInjectorLocationFlags {\n InjectorIndexMask = 0b111111111111111,\n ViewOffsetShift = 16,\n NO_PARENT = -1,\n}\n\nexport const NO_PARENT_INJECTOR: RelativeInjectorLocation = -1 as any;\n\n/**\n * Each injector is saved in 9 contiguous slots in `LView` and 9 contiguous slots in\n * `TView.data`. This allows us to store information about the current node's tokens (which\n * can be shared in `TView`) as well as the tokens of its ancestor nodes (which cannot be\n * shared, so they live in `LView`).\n *\n * Each of these slots (aside from the last slot) contains a bloom filter. This bloom filter\n * determines whether a directive is available on the associated node or not. This prevents us\n * from searching the directives array at this level unless it's probable the directive is in it.\n *\n * See: https://en.wikipedia.org/wiki/Bloom_filter for more about bloom filters.\n *\n * Because all injectors have been flattened into `LView` and `TViewData`, they cannot typed\n * using interfaces as they were previously. The start index of each `LInjector` and `TInjector`\n * will differ based on where it is flattened into the main array, so it's not possible to know\n * the indices ahead of time and save their types here. The interfaces are still included here\n * for documentation purposes.\n *\n * export interface LInjector extends Array<any> {\n *\n * // Cumulative bloom for directive IDs 0-31 (IDs are % BLOOM_SIZE)\n * [0]: number;\n *\n * // Cumulative bloom for directive IDs 32-63\n * [1]: number;\n *\n * // Cumulative bloom for directive IDs 64-95\n * [2]: number;\n *\n * // Cumulative bloom for directive IDs 96-127\n * [3]: number;\n *\n * // Cumulative bloom for directive IDs 128-159\n * [4]: number;\n *\n * // Cumulative bloom for directive IDs 160 - 191\n * [5]: number;\n *\n * // Cumulative bloom for directive IDs 192 - 223\n * [6]: number;\n *\n * // Cumulative bloom for directive IDs 224 - 255\n * [7]: number;\n *\n * // We need to store a reference to the injector's parent so DI can keep looking up\n * // the injector tree until it finds the dependency it's looking for.\n * [PARENT_INJECTOR]: number;\n * }\n *\n * export interface TInjector extends Array<any> {\n *\n * // Shared node bloom for directive IDs 0-31 (IDs are % BLOOM_SIZE)\n * [0]: number;\n *\n * // Shared node bloom for directive IDs 32-63\n * [1]: number;\n *\n * // Shared node bloom for directive IDs 64-95\n * [2]: number;\n *\n * // Shared node bloom for directive IDs 96-127\n * [3]: number;\n *\n * // Shared node bloom for directive IDs 128-159\n * [4]: number;\n *\n * // Shared node bloom for directive IDs 160 - 191\n * [5]: number;\n *\n * // Shared node bloom for directive IDs 192 - 223\n * [6]: number;\n *\n * // Shared node bloom for directive IDs 224 - 255\n * [7]: number;\n *\n * // Necessary to find directive indices for a particular node.\n * [TNODE]: TElementNode|TElementContainerNode|TContainerNode;\n * }\n */\n\n/**\n * Factory for creating instances of injectors in the NodeInjector.\n *\n * This factory is complicated by the fact that it can resolve `multi` factories as well.\n *\n * NOTE: Some of the fields are optional which means that this class has two hidden classes.\n * - One without `multi` support (most common)\n * - One with `multi` values, (rare).\n *\n * Since VMs can cache up to 4 inline hidden classes this is OK.\n *\n * - Single factory: Only `resolving` and `factory` is defined.\n * - `providers` factory: `componentProviders` is a number and `index = -1`.\n * - `viewProviders` factory: `componentProviders` is a number and `index` points to `providers`.\n */\nexport class NodeInjectorFactory {\n /**\n * The inject implementation to be activated when using the factory.\n */\n injectImpl: null|(<T>(token: ProviderToken<T>, flags?: InjectFlags) => T);\n\n /**\n * Marker set to true during factory invocation to see if we get into recursive loop.\n * Recursive loop causes an error to be displayed.\n */\n resolving = false;\n\n /**\n * Marks that the token can see other Tokens declared in `viewProviders` on the same node.\n */\n canSeeViewProviders: boolean;\n\n /**\n * An array of factories to use in case of `multi` provider.\n */\n multi?: Array<() => any>;\n\n /**\n * Number of `multi`-providers which belong to the component.\n *\n * This is needed because when multiple components and directives declare the `multi` provider\n * they have to be concatenated in the correct order.\n *\n * Example:\n *\n * If we have a component and directive active an a single element as declared here\n * ```\n * component:\n * provides: [ {provide: String, useValue: 'component', multi: true} ],\n * viewProvides: [ {provide: String, useValue: 'componentView', multi: true} ],\n *\n * directive:\n * provides: [ {provide: String, useValue: 'directive', multi: true} ],\n * ```\n *\n * Then the expected results are:\n *\n * ```\n * providers: ['component', 'directive']\n * viewProviders: ['component', 'componentView', 'directive']\n * ```\n *\n * The way to think about it is that the `viewProviders` have been inserted after the component\n * but before the directives, which is why we need to know how many `multi`s have been declared by\n * the component.\n */\n componentProviders?: number;\n\n /**\n * Current index of the Factory in the `data`. Needed for `viewProviders` and `providers` merging.\n * See `providerFactory`.\n */\n index?: number;\n\n /**\n * Because the same `multi` provider can be declared in `provides` and `viewProvides` it is\n * possible for `viewProvides` to shadow the `provides`. For this reason we store the\n * `provideFactory` of the `providers` so that `providers` can be extended with `viewProviders`.\n *\n * Example:\n *\n * Given:\n * ```\n * provides: [ {provide: String, useValue: 'all', multi: true} ],\n * viewProvides: [ {provide: String, useValue: 'viewOnly', multi: true} ],\n * ```\n *\n * We have to return `['all']` in case of content injection, but `['all', 'viewOnly']` in case\n * of view injection. We further have to make sure that the shared instances (in our case\n * `all`) are the exact same instance in both the content as well as the view injection. (We\n * have to make sure that we don't double instantiate.) For this reason the `viewProvides`\n * `Factory` has a pointer to the shadowed `provides` factory so that it can instantiate the\n * `providers` (`['all']`) and then extend it with `viewProviders` (`['all'] + ['viewOnly'] =\n * ['all', 'viewOnly']`).\n */\n providerFactory?: NodeInjectorFactory|null;\n\n\n constructor(\n /**\n * Factory to invoke in order to create a new instance.\n */\n public factory:\n (this: NodeInjectorFactory, _: undefined,\n /**\n * array where injectables tokens are stored. This is used in\n * case of an error reporting to produce friendlier errors.\n */\n tData: TData,\n /**\n * array where existing instances of injectables are stored. This is used in case\n * of multi shadow is needed. See `multi` field documentation.\n */\n lView: LView,\n /**\n * The TNode of the same element injector.\n */\n tNode: TDirectiveHostNode) => any,\n /**\n * Set to `true` if the token is declared in `viewProviders` (or if it is component).\n */\n isViewProvider: boolean,\n injectImplementation: null|(<T>(token: ProviderToken<T>, flags?: InjectFlags) => T)) {\n ngDevMode && assertDefined(factory, 'Factory not specified');\n ngDevMode && assertEqual(typeof factory, 'function', 'Expected factory function.');\n this.canSeeViewProviders = isViewProvider;\n this.injectImpl = injectImplementation;\n }\n}\n\nexport function isFactory(obj: any): obj is NodeInjectorFactory {\n return obj instanceof NodeInjectorFactory;\n}\n\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nexport const unusedValueExportToPlacateAjd = 1;\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 */\nimport {KeyValueArray} from '../../util/array_utils';\nimport {TStylingRange} from '../interfaces/styling';\nimport {TIcu} from './i18n';\nimport {CssSelector} from './projection';\nimport {RNode} from './renderer_dom';\nimport {LView, TView} from './view';\n\n\n/**\n * TNodeType corresponds to the {@link TNode} `type` property.\n *\n * NOTE: type IDs are such that we use each bit to denote a type. This is done so that we can easily\n * check if the `TNode` is of more than one type.\n *\n * `if (tNode.type === TNodeType.Text || tNode.type === TNode.Element)`\n * can be written as:\n * `if (tNode.type & (TNodeType.Text | TNodeType.Element))`\n *\n * However any given `TNode` can only be of one type.\n */\nexport const enum TNodeType {\n /**\n * The TNode contains information about a DOM element aka {@link RText}.\n */\n Text = 0b1,\n\n /**\n * The TNode contains information about a DOM element aka {@link RElement}.\n */\n Element = 0b10,\n\n /**\n * The TNode contains information about an {@link LContainer} for embedded views.\n */\n Container = 0b100,\n\n /**\n * The TNode contains information about an `<ng-container>` element {@link RNode}.\n */\n ElementContainer = 0b1000,\n\n /**\n * The TNode contains information about an `<ng-content>` projection\n */\n Projection = 0b10000,\n\n /**\n * The TNode contains information about an ICU comment used in `i18n`.\n */\n Icu = 0b100000,\n\n /**\n * Special node type representing a placeholder for future `TNode` at this location.\n *\n * I18n translation blocks are created before the element nodes which they contain. (I18n blocks\n * can span over many elements.) Because i18n `TNode`s (representing text) are created first they\n * often may need to point to element `TNode`s which are not yet created. In such a case we create\n * a `Placeholder` `TNode`. This allows the i18n to structurally link the `TNode`s together\n * without knowing any information about the future nodes which will be at that location.\n *\n * On `firstCreatePass` When element instruction executes it will try to create a `TNode` at that\n * location. Seeing a `Placeholder` `TNode` already there tells the system that it should reuse\n * existing `TNode` (rather than create a new one) and just update the missing information.\n */\n Placeholder = 0b1000000,\n\n // Combined Types These should never be used for `TNode.type` only as a useful way to check\n // if `TNode.type` is one of several choices.\n\n // See: https://github.com/microsoft/TypeScript/issues/35875 why we can't refer to existing enum.\n AnyRNode = 0b11, // Text | Element,\n AnyContainer = 0b1100, // Container | ElementContainer, // See:\n}\n\n/**\n * Converts `TNodeType` into human readable text.\n * Make sure this matches with `TNodeType`\n */\nexport function toTNodeTypeAsString(tNodeType: TNodeType): string {\n let text = '';\n (tNodeType & TNodeType.Text) && (text += '|Text');\n (tNodeType & TNodeType.Element) && (text += '|Element');\n (tNodeType & TNodeType.Container) && (text += '|Container');\n (tNodeType & TNodeType.ElementContainer) && (text += '|ElementContainer');\n (tNodeType & TNodeType.Projection) && (text += '|Projection');\n (tNodeType & TNodeType.Icu) && (text += '|IcuContainer');\n (tNodeType & TNodeType.Placeholder) && (text += '|Placeholder');\n return text.length > 0 ? text.substring(1) : text;\n}\n\n/**\n * Corresponds to the TNode.flags property.\n */\nexport const enum TNodeFlags {\n /** Bit #1 - This bit is set if the node is a host for any directive (including a component) */\n isDirectiveHost = 0x1,\n\n /**\n * Bit #2 - This bit is set if the node is a host for a component.\n *\n * Setting this bit implies that the `isDirectiveHost` bit is set as well.\n * */\n isComponentHost = 0x2,\n\n /** Bit #3 - This bit is set if the node has been projected */\n isProjected = 0x4,\n\n /** Bit #4 - This bit is set if any directive on this node has content queries */\n hasContentQuery = 0x8,\n\n /** Bit #5 - This bit is set if the node has any \"class\" inputs */\n hasClassInput = 0x10,\n\n /** Bit #6 - This bit is set if the node has any \"style\" inputs */\n hasStyleInput = 0x20,\n\n /** Bit #7 This bit is set if the node has been detached by i18n */\n isDetached = 0x40,\n\n /**\n * Bit #8 - This bit is set if the node has directives with host bindings.\n *\n * This flags allows us to guard host-binding logic and invoke it only on nodes\n * that actually have directives with host bindings.\n */\n hasHostBindings = 0x80,\n}\n\n/**\n * Corresponds to the TNode.providerIndexes property.\n */\nexport const enum TNodeProviderIndexes {\n /** The index of the first provider on this node is encoded on the least significant bits. */\n ProvidersStartIndexMask = 0b00000000000011111111111111111111,\n\n /**\n * The count of view providers from the component on this node is\n * encoded on the 20 most significant bits.\n */\n CptViewProvidersCountShift = 20,\n CptViewProvidersCountShifter = 0b00000000000100000000000000000000,\n}\n\n/**\n * A set of marker values to be used in the attributes arrays. These markers indicate that some\n * items are not regular attributes and the processing should be adapted accordingly.\n */\nexport const enum AttributeMarker {\n /**\n * An implicit marker which indicates that the value in the array are of `attributeKey`,\n * `attributeValue` format.\n *\n * NOTE: This is implicit as it is the type when no marker is present in array. We indicate that\n * it should not be present at runtime by the negative number.\n */\n ImplicitAttributes = -1,\n\n /**\n * Marker indicates that the following 3 values in the attributes array are:\n * namespaceUri, attributeName, attributeValue\n * in that order.\n */\n NamespaceURI = 0,\n\n /**\n * Signals class declaration.\n *\n * Each value following `Classes` designates a class name to include on the element.\n * ## Example:\n *\n * Given:\n * ```\n * <div class=\"foo bar baz\">...<d/vi>\n * ```\n *\n * the generated code is:\n * ```\n * var _c1 = [AttributeMarker.Classes, 'foo', 'bar', 'baz'];\n * ```\n */\n Classes = 1,\n\n /**\n * Signals style declaration.\n *\n * Each pair of values following `Styles` designates a style name and value to include on the\n * element.\n * ## Example:\n *\n * Given:\n * ```\n * <div style=\"width:100px; height:200px; color:red\">...</div>\n * ```\n *\n * the generated code is:\n * ```\n * var _c1 = [AttributeMarker.Styles, 'width', '100px', 'height'. '200px', 'color', 'red'];\n * ```\n */\n Styles = 2,\n\n /**\n * Signals that the following attribute names were extracted from input or output bindings.\n *\n * For example, given the following HTML:\n *\n * ```\n * <div moo=\"car\" [foo]=\"exp\" (bar)=\"doSth()\">\n * ```\n *\n * the generated code is:\n *\n * ```\n * var _c1 = ['moo', 'car', AttributeMarker.Bindings, 'foo', 'bar'];\n * ```\n */\n Bindings = 3,\n\n /**\n * Signals that the following attribute names were hoisted from an inline-template declaration.\n *\n * For example, given the following HTML:\n *\n * ```\n * <div *ngFor=\"let value of values; trackBy:trackBy\" dirA [dirB]=\"value\">\n * ```\n *\n * the generated code for the `template()` instruction would include:\n *\n * ```\n * ['dirA', '', AttributeMarker.Bindings, 'dirB', AttributeMarker.Template, 'ngFor', 'ngForOf',\n * 'ngForTrackBy', 'let-value']\n * ```\n *\n * while the generated code for the `element()` instruction inside the template function would\n * include:\n *\n * ```\n * ['dirA', '', AttributeMarker.Bindings, 'dirB']\n * ```\n */\n Template = 4,\n\n /**\n * Signals that the following attribute is `ngProjectAs` and its value is a parsed\n * `CssSelector`.\n *\n * For example, given the following HTML:\n *\n * ```\n * <h1 attr=\"value\" ngProjectAs=\"[title]\">\n * ```\n *\n * the generated code for the `element()` instruction would include:\n *\n * ```\n * ['attr', 'value', AttributeMarker.ProjectAs, ['', 'title', '']]\n * ```\n */\n ProjectAs = 5,\n\n /**\n * Signals that the following attribute will be translated by runtime i18n\n *\n * For example, given the following HTML:\n *\n * ```\n * <div moo=\"car\" foo=\"value\" i18n-foo [bar]=\"binding\" i18n-bar>\n * ```\n *\n * the generated code is:\n *\n * ```\n * var _c1 = ['moo', 'car', AttributeMarker.I18n, 'foo', 'bar'];\n */\n I18n = 6,\n}\n\n/**\n * A combination of:\n * - Attribute names and values.\n * - Special markers acting as flags to alter attributes processing.\n * - Parsed ngProjectAs selectors.\n */\nexport type TAttributes = (string|AttributeMarker|CssSelector)[];\n\n/**\n * Constants that are associated with a view. Includes:\n * - Attribute arrays.\n * - Local definition arrays.\n * - Translated messages (i18n).\n */\nexport type TConstants = (TAttributes|string)[];\n\n/**\n * Factory function that returns an array of consts. Consts can be represented as a function in\n * case any additional statements are required to define consts in the list. An example is i18n\n * where additional i18n calls are generated, which should be executed when consts are requested\n * for the first time.\n */\nexport type TConstantsFactory = () => TConstants;\n\n/**\n * TConstants type that describes how the `consts` field is generated on ComponentDef: it can be\n * either an array or a factory function that returns that array.\n */\nexport type TConstantsOrFactory = TConstants|TConstantsFactory;\n\n/**\n * Binding data (flyweight) for a particular node that is shared between all templates\n * of a specific type.\n *\n * If a property is:\n * - PropertyAliases: that property's data was generated and this is it\n * - Null: that property's data was already generated and nothing was found.\n * - Undefined: that property's data has not yet been generated\n *\n * see: https://en.wikipedia.org/wiki/Flyweight_pattern for more on the Flyweight pattern\n */\nexport interface TNode {\n /** The type of the TNode. See TNodeType. */\n type: TNodeType;\n\n /**\n * Index of the TNode in TView.data and corresponding native element in LView.\n *\n * This is necessary to get from any TNode to its corresponding native element when\n * traversing the node tree.\n *\n * If index is -1, this is a dynamically created container node or embedded view node.\n */\n index: number;\n\n /**\n * Insert before existing DOM node index.\n *\n * When DOM nodes are being inserted, normally they are being appended as they are created.\n * Under i18n case, the translated text nodes are created ahead of time as part of the\n * `ɵɵi18nStart` instruction which means that this `TNode` can't just be appended and instead\n * needs to be inserted using `insertBeforeIndex` semantics.\n *\n * Additionally sometimes it is necessary to insert new text nodes as a child of this `TNode`. In\n * such a case the value stores an array of text nodes to insert.\n *\n * Example:\n * ```\n * <div i18n>\n * Hello <span>World</span>!\n * </div>\n * ```\n * In the above example the `ɵɵi18nStart` instruction can create `Hello `, `World` and `!` text\n * nodes. It can also insert `Hello ` and `!` text node as a child of `<div>`, but it can't\n * insert `World` because the `<span>` node has not yet been created. In such a case the\n * `<span>` `TNode` will have an array which will direct the `<span>` to not only insert\n * itself in front of `!` but also to insert the `World` (created by `ɵɵi18nStart`) into\n * `<span>` itself.\n *\n * Pseudo code:\n * ```\n * if (insertBeforeIndex === null) {\n * // append as normal\n * } else if (Array.isArray(insertBeforeIndex)) {\n * // First insert current `TNode` at correct location\n * const currentNode = lView[this.index];\n * parentNode.insertBefore(currentNode, lView[this.insertBeforeIndex[0]]);\n * // Now append all of the children\n * for(let i=1; i<this.insertBeforeIndex; i++) {\n * currentNode.appendChild(lView[this.insertBeforeIndex[i]]);\n * }\n * } else {\n * parentNode.insertBefore(lView[this.index], lView[this.insertBeforeIndex])\n * }\n * ```\n * - null: Append as normal using `parentNode.appendChild`\n * - `number`: Append using\n * `parentNode.insertBefore(lView[this.index], lView[this.insertBeforeIndex])`\n *\n * *Initialization*\n *\n * Because `ɵɵi18nStart` executes before nodes are created, on `TView.firstCreatePass` it is not\n * possible for `ɵɵi18nStart` to set the `insertBeforeIndex` value as the corresponding `TNode`\n * has not yet been created. For this reason the `ɵɵi18nStart` creates a `TNodeType.Placeholder`\n * `TNode` at that location. See `TNodeType.Placeholder` for more information.\n */\n insertBeforeIndex: InsertBeforeIndex;\n\n /**\n * The index of the closest injector in this node's LView.\n *\n * If the index === -1, there is no injector on this node or any ancestor node in this view.\n *\n * If the index !== -1, it is the index of this node's injector OR the index of a parent\n * injector in the same view. We pass the parent injector index down the node tree of a view so\n * it's possible to find the parent injector without walking a potentially deep node tree.\n * Injector indices are not set across view boundaries because there could be multiple component\n * hosts.\n *\n * If tNode.injectorIndex === tNode.parent.injectorIndex, then the index belongs to a parent\n * injector.\n */\n injectorIndex: number;\n\n /**\n * Stores starting index of the directives.\n *\n * NOTE: The first directive is always component (if present).\n */\n directiveStart: number;\n\n /**\n * Stores final exclusive index of the directives.\n *\n * The area right behind the `directiveStart-directiveEnd` range is used to allocate the\n * `HostBindingFunction` `vars` (or null if no bindings.) Therefore `directiveEnd` is used to set\n * `LFrame.bindingRootIndex` before `HostBindingFunction` is executed.\n */\n directiveEnd: number;\n\n /**\n * Stores the last directive which had a styling instruction.\n *\n * Initial value of this is `-1` which means that no `hostBindings` styling instruction has\n * executed. As `hostBindings` instructions execute they set the value to the index of the\n * `DirectiveDef` which contained the last `hostBindings` styling instruction.\n *\n * Valid values are:\n * - `-1` No `hostBindings` instruction has executed.\n * - `directiveStart <= directiveStylingLast < directiveEnd`: Points to the `DirectiveDef` of\n * the last styling instruction which executed in the `hostBindings`.\n *\n * This data is needed so that styling instructions know which static styling data needs to be\n * collected from the `DirectiveDef.hostAttrs`. A styling instruction needs to collect all data\n * since last styling instruction.\n */\n directiveStylingLast: number;\n\n /**\n * Stores indexes of property bindings. This field is only set in the ngDevMode and holds\n * indexes of property bindings so TestBed can get bound property metadata for a given node.\n */\n propertyBindings: number[]|null;\n\n /**\n * Stores if Node isComponent, isProjected, hasContentQuery, hasClassInput and hasStyleInput\n * etc.\n */\n flags: TNodeFlags;\n\n /**\n * This number stores two values using its bits:\n *\n * - the index of the first provider on that node (first 16 bits)\n * - the count of view providers from the component on this node (last 16 bits)\n */\n // TODO(misko): break this into actual vars.\n providerIndexes: TNodeProviderIndexes;\n\n /**\n * The value name associated with this node.\n * if type:\n * `TNodeType.Text`: text value\n * `TNodeType.Element`: tag name\n * `TNodeType.ICUContainer`: `TIcu`\n */\n value: any;\n\n /**\n * Attributes associated with an element. We need to store attributes to support various\n * use-cases (attribute injection, content projection with selectors, directives matching).\n * Attributes are stored statically because reading them from the DOM would be way too slow for\n * content projection and queries.\n *\n * Since attrs will always be calculated first, they will never need to be marked undefined by\n * other instructions.\n *\n * For regular attributes a name of an attribute and its value alternate in the array.\n * e.g. ['role', 'checkbox']\n * This array can contain flags that will indicate \"special attributes\" (attributes with\n * namespaces, attributes extracted from bindings and outputs).\n */\n attrs: TAttributes|null;\n\n /**\n * Same as `TNode.attrs` but contains merged data across all directive host bindings.\n *\n * We need to keep `attrs` as unmerged so that it can be used for attribute selectors.\n * We merge attrs here so that it can be used in a performant way for initial rendering.\n *\n * The `attrs` are merged in first pass in following order:\n * - Component's `hostAttrs`\n * - Directives' `hostAttrs`\n * - Template `TNode.attrs` associated with the current `TNode`.\n */\n mergedAttrs: TAttributes|null;\n\n /**\n * A set of local names under which a given element is exported in a template and\n * visible to queries. An entry in this array can be created for different reasons:\n * - an element itself is referenced, ex.: `<div #foo>`\n * - a component is referenced, ex.: `<my-cmpt #foo>`\n * - a directive is referenced, ex.: `<my-cmpt #foo=\"directiveExportAs\">`.\n *\n * A given element might have different local names and those names can be associated\n * with a directive. We store local names at even indexes while odd indexes are reserved\n * for directive index in a view (or `-1` if there is no associated directive).\n *\n * Some examples:\n * - `<div #foo>` => `[\"foo\", -1]`\n * - `<my-cmpt #foo>` => `[\"foo\", myCmptIdx]`\n * - `<my-cmpt #foo #bar=\"directiveExportAs\">` => `[\"foo\", myCmptIdx, \"bar\", directiveIdx]`\n * - `<div #foo #bar=\"directiveExportAs\">` => `[\"foo\", -1, \"bar\", directiveIdx]`\n */\n localNames: (string|number)[]|null;\n\n /** Information about input properties that need to be set once from attribute data. */\n initialInputs: InitialInputData|null|undefined;\n\n /**\n * Input data for all directives on this node. `null` means that there are no directives with\n * inputs on this node.\n */\n inputs: PropertyAliases|null;\n\n /**\n * Output data for all directives on this node. `null` means that there are no directives with\n * outputs on this node.\n */\n outputs: PropertyAliases|null;\n\n /**\n * The TView or TViews attached to this node.\n *\n * If this TNode corresponds to an LContainer with inline views, the container will\n * need to store separate static data for each of its view blocks (TView[]). Otherwise,\n * nodes in inline views with the same index as nodes in their parent views will overwrite\n * each other, as they are in the same template.\n *\n * Each index in this array corresponds to the static data for a certain\n * view. So if you had V(0) and V(1) in a container, you might have:\n *\n * [\n * [{tagName: 'div', attrs: ...}, null], // V(0) TView\n * [{tagName: 'button', attrs ...}, null] // V(1) TView\n *\n * If this TNode corresponds to an LContainer with a template (e.g. structural\n * directive), the template's TView will be stored here.\n *\n * If this TNode corresponds to an element, tViews will be null .\n */\n tViews: TView|TView[]|null;\n\n /**\n * The next sibling node. Necessary so we can propagate through the root nodes of a view\n * to insert them or remove them from the DOM.\n */\n next: TNode|null;\n\n /**\n * The next projected sibling. Since in Angular content projection works on the node-by-node\n * basis the act of projecting nodes might change nodes relationship at the insertion point\n * (target view). At the same time we need to keep initial relationship between nodes as\n * expressed in content view.\n */\n projectionNext: TNode|null;\n\n /**\n * First child of the current node.\n *\n * For component nodes, the child will always be a ContentChild (in same view).\n * For embedded view nodes, the child will be in their child view.\n */\n child: TNode|null;\n\n /**\n * Parent node (in the same view only).\n *\n * We need a reference to a node's parent so we can append the node to its parent's native\n * element at the appropriate time.\n *\n * If the parent would be in a different view (e.g. component host), this property will be null.\n * It's important that we don't try to cross component boundaries when retrieving the parent\n * because the parent will change (e.g. index, attrs) depending on where the component was\n * used (and thus shouldn't be stored on TNode). In these cases, we retrieve the parent through\n * LView.node instead (which will be instance-specific).\n *\n * If this is an inline view node (V), the parent will be its container.\n */\n parent: TElementNode|TContainerNode|null;\n\n /**\n * List of projected TNodes for a given component host element OR index into the said nodes.\n *\n * For easier discussion assume this example:\n * `<parent>`'s view definition:\n * ```\n * <child id=\"c1\">content1</child>\n * <child id=\"c2\"><span>content2</span></child>\n * ```\n * `<child>`'s view definition:\n * ```\n * <ng-content id=\"cont1\"></ng-content>\n * ```\n *\n * If `Array.isArray(projection)` then `TNode` is a host element:\n * - `projection` stores the content nodes which are to be projected.\n * - The nodes represent categories defined by the selector: For example:\n * `<ng-content/><ng-content select=\"abc\"/>` would represent the heads for `<ng-content/>`\n * and `<ng-content select=\"abc\"/>` respectively.\n * - The nodes we store in `projection` are heads only, we used `.next` to get their\n * siblings.\n * - The nodes `.next` is sorted/rewritten as part of the projection setup.\n * - `projection` size is equal to the number of projections `<ng-content>`. The size of\n * `c1` will be `1` because `<child>` has only one `<ng-content>`.\n * - we store `projection` with the host (`c1`, `c2`) rather than the `<ng-content>` (`cont1`)\n * because the same component (`<child>`) can be used in multiple locations (`c1`, `c2`) and\n * as a result have different set of nodes to project.\n * - without `projection` it would be difficult to efficiently traverse nodes to be projected.\n *\n * If `typeof projection == 'number'` then `TNode` is a `<ng-content>` element:\n * - `projection` is an index of the host's `projection`Nodes.\n * - This would return the first head node to project:\n * `getHost(currentTNode).projection[currentTNode.projection]`.\n * - When projecting nodes the parent node retrieved may be a `<ng-content>` node, in which case\n * the process is recursive in nature.\n *\n * If `projection` is of type `RNode[][]` than we have a collection of native nodes passed as\n * projectable nodes during dynamic component creation.\n */\n projection: (TNode|RNode[])[]|number|null;\n\n /**\n * A collection of all `style` static values for an element (including from host).\n *\n * This field will be populated if and when:\n *\n * - There are one or more initial `style`s on an element (e.g. `<div style=\"width:200px;\">`)\n * - There are one or more initial `style`s on a directive/component host\n * (e.g. `@Directive({host: {style: \"width:200px;\" } }`)\n */\n styles: string|null;\n\n\n /**\n * A collection of all `style` static values for an element excluding host sources.\n *\n * Populated when there are one or more initial `style`s on an element\n * (e.g. `<div style=\"width:200px;\">`)\n * Must be stored separately from `tNode.styles` to facilitate setting directive\n * inputs that shadow the `style` property. If we used `tNode.styles` as is for shadowed inputs,\n * we would feed host styles back into directives as \"inputs\". If we used `tNode.attrs`, we\n * would have to concatenate the attributes on every template pass. Instead, we process once on\n * first create pass and store here.\n */\n stylesWithoutHost: string|null;\n\n /**\n * A `KeyValueArray` version of residual `styles`.\n *\n * When there are styling instructions than each instruction stores the static styling\n * which is of lower priority than itself. This means that there may be a higher priority\n * styling than the instruction.\n *\n * Imagine:\n * ```\n * <div style=\"color: highest;\" my-dir>\n *\n * @Directive({\n * host: {\n * style: 'color: lowest; ',\n * '[styles.color]': 'exp' // ɵɵstyleProp('color', ctx.exp);\n * }\n * })\n * ```\n *\n * In the above case:\n * - `color: lowest` is stored with `ɵɵstyleProp('color', ctx.exp);` instruction\n * - `color: highest` is the residual and is stored here.\n *\n * - `undefined': not initialized.\n * - `null`: initialized but `styles` is `null`\n * - `KeyValueArray`: parsed version of `styles`.\n */\n residualStyles: KeyValueArray<any>|undefined|null;\n\n /**\n * A collection of all class static values for an element (including from host).\n *\n * This field will be populated if and when:\n *\n * - There are one or more initial classes on an element (e.g. `<div class=\"one two three\">`)\n * - There are one or more initial classes on an directive/component host\n * (e.g. `@Directive({host: {class: \"SOME_CLASS\" } }`)\n */\n classes: string|null;\n\n /**\n * A collection of all class static values for an element excluding host sources.\n *\n * Populated when there are one or more initial classes on an element\n * (e.g. `<div class=\"SOME_CLASS\">`)\n * Must be stored separately from `tNode.classes` to facilitate setting directive\n * inputs that shadow the `class` property. If we used `tNode.classes` as is for shadowed\n * inputs, we would feed host classes back into directives as \"inputs\". If we used\n * `tNode.attrs`, we would have to concatenate the attributes on every template pass. Instead,\n * we process once on first create pass and store here.\n */\n classesWithoutHost: string|null;\n\n /**\n * A `KeyValueArray` version of residual `classes`.\n *\n * Same as `TNode.residualStyles` but for classes.\n *\n * - `undefined': not initialized.\n * - `null`: initialized but `classes` is `null`\n * - `KeyValueArray`: parsed version of `classes`.\n */\n residualClasses: KeyValueArray<any>|undefined|null;\n\n /**\n * Stores the head/tail index of the class bindings.\n *\n * - If no bindings, the head and tail will both be 0.\n * - If there are template bindings, stores the head/tail of the class bindings in the template.\n * - If no template bindings but there are host bindings, the head value will point to the last\n * host binding for \"class\" (not the head of the linked list), tail will be 0.\n *\n * See: `style_binding_list.ts` for details.\n *\n * This is used by `insertTStylingBinding` to know where the next styling binding should be\n * inserted so that they can be sorted in priority order.\n */\n classBindings: TStylingRange;\n\n /**\n * Stores the head/tail index of the class bindings.\n *\n * - If no bindings, the head and tail will both be 0.\n * - If there are template bindings, stores the head/tail of the style bindings in the template.\n * - If no template bindings but there are host bindings, the head value will point to the last\n * host binding for \"style\" (not the head of the linked list), tail will be 0.\n *\n * See: `style_binding_list.ts` for details.\n *\n * This is used by `insertTStylingBinding` to know where the next styling binding should be\n * inserted so that they can be sorted in priority order.\n */\n styleBindings: TStylingRange;\n}\n\n/**\n * See `TNode.insertBeforeIndex`\n */\nexport type InsertBeforeIndex = null|number|number[];\n\n/** Static data for an element */\nexport interface TElementNode extends TNode {\n /** Index in the data[] array */\n index: number;\n child: TElementNode|TTextNode|TElementContainerNode|TContainerNode|TProjectionNode|null;\n /**\n * Element nodes will have parents unless they are the first node of a component or\n * embedded view (which means their parent is in a different view and must be\n * retrieved using viewData[HOST_NODE]).\n */\n parent: TElementNode|TElementContainerNode|null;\n tViews: null;\n\n /**\n * If this is a component TNode with projection, this will be an array of projected\n * TNodes or native nodes (see TNode.projection for more info). If it's a regular element node\n * or a component without projection, it will be null.\n */\n projection: (TNode|RNode[])[]|null;\n\n /**\n * Stores TagName\n */\n value: string;\n}\n\n/** Static data for a text node */\nexport interface TTextNode extends TNode {\n /** Index in the data[] array */\n index: number;\n child: null;\n /**\n * Text nodes will have parents unless they are the first node of a component or\n * embedded view (which means their parent is in a different view and must be\n * retrieved using LView.node).\n */\n parent: TElementNode|TElementContainerNode|null;\n tViews: null;\n projection: null;\n}\n\n/** Static data for an LContainer */\nexport interface TContainerNode extends TNode {\n /**\n * Index in the data[] array.\n *\n * If it's -1, this is a dynamically created container node that isn't stored in\n * data[] (e.g. when you inject ViewContainerRef) .\n */\n index: number;\n child: null;\n\n /**\n * Container nodes will have parents unless:\n *\n * - They are the first node of a component or embedded view\n * - They are dynamically created\n */\n parent: TElementNode|TElementContainerNode|null;\n tViews: TView|TView[]|null;\n projection: null;\n value: null;\n}\n\n/** Static data for an <ng-container> */\nexport interface TElementContainerNode extends TNode {\n /** Index in the LView[] array. */\n index: number;\n child: TElementNode|TTextNode|TContainerNode|TElementContainerNode|TProjectionNode|null;\n parent: TElementNode|TElementContainerNode|null;\n tViews: null;\n projection: null;\n}\n\n/** Static data for an ICU expression */\nexport interface TIcuContainerNode extends TNode {\n /** Index in the LView[] array. */\n index: number;\n child: null;\n parent: TElementNode|TElementContainerNode|null;\n tViews: null;\n projection: null;\n value: TIcu;\n}\n\n/** Static data for an LProjectionNode */\nexport interface TProjectionNode extends TNode {\n /** Index in the data[] array */\n child: null;\n /**\n * Projection nodes will have parents unless they are the first node of a component\n * or embedded view (which means their parent is in a different view and must be\n * retrieved using LView.node).\n */\n parent: TElementNode|TElementContainerNode|null;\n tViews: null;\n\n /** Index of the projection node. (See TNode.projection for more info.) */\n projection: number;\n value: null;\n}\n\n/**\n * A union type representing all TNode types that can host a directive.\n */\nexport type TDirectiveHostNode = TElementNode|TContainerNode|TElementContainerNode;\n\n/**\n * This mapping is necessary so we can set input properties and output listeners\n * properly at runtime when property names are minified or aliased.\n *\n * Key: unminified / public input or output name\n * Value: array containing minified / internal name and related directive index\n *\n * The value must be an array to support inputs and outputs with the same name\n * on the same node.\n */\nexport type PropertyAliases = {\n // This uses an object map because using the Map type would be too slow\n [key: string]: PropertyAliasValue\n};\n\n/**\n * Store the runtime input or output names for all the directives.\n *\n * i+0: directive instance index\n * i+1: privateName\n *\n * e.g. [0, 'change-minified']\n */\nexport type PropertyAliasValue = (number|string)[];\n\n/**\n * This array contains information about input properties that\n * need to be set once from attribute data. It's ordered by\n * directive index (relative to element) so it's simple to\n * look up a specific directive's initial input data.\n *\n * Within each sub-array:\n *\n * i+0: attribute name\n * i+1: minified/internal input name\n * i+2: initial value\n *\n * If a directive on a node does not have any input properties\n * that should be set from attributes, its index is set to null\n * to avoid a sparse array.\n *\n * e.g. [null, ['role-min', 'minified-input', 'button']]\n */\nexport type InitialInputData = (InitialInputs|null)[];\n\n/**\n * Used by InitialInputData to store input properties\n * that should be set once from attributes.\n *\n * i+0: attribute name\n * i+1: minified/internal input name\n * i+2: initial value\n *\n * e.g. ['role-min', 'minified-input', 'button']\n */\nexport type InitialInputs = string[];\n\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nexport const unusedValueExportToPlacateAjd = 1;\n\n/**\n * Type representing a set of TNodes that can have local refs (`#foo`) placed on them.\n */\nexport type TNodeWithLocalRefs = TContainerNode|TElementNode|TElementContainerNode;\n\n/**\n * Type for a function that extracts a value for a local refs.\n * Example:\n * - `<div #nativeDivEl>` - `nativeDivEl` should point to the native `<div>` element;\n * - `<ng-template #tplRef>` - `tplRef` should point to the `TemplateRef` instance;\n */\nexport type LocalRefExtractor = (tNode: TNodeWithLocalRefs, currentView: LView) => any;\n\n/**\n * Returns `true` if the `TNode` has a directive which has `@Input()` for `class` binding.\n *\n * ```\n * <div my-dir [class]=\"exp\"></div>\n * ```\n * and\n * ```\n * @Directive({\n * })\n * class MyDirective {\n * @Input()\n * class: string;\n * }\n * ```\n *\n * In the above case it is necessary to write the reconciled styling information into the\n * directive's input.\n *\n * @param tNode\n */\nexport function hasClassInput(tNode: TNode) {\n return (tNode.flags & TNodeFlags.hasClassInput) !== 0;\n}\n\n/**\n * Returns `true` if the `TNode` has a directive which has `@Input()` for `style` binding.\n *\n * ```\n * <div my-dir [style]=\"exp\"></div>\n * ```\n * and\n * ```\n * @Directive({\n * })\n * class MyDirective {\n * @Input()\n * class: string;\n * }\n * ```\n *\n * In the above case it is necessary to write the reconciled styling information into the\n * directive's input.\n *\n * @param tNode\n */\nexport function hasStyleInput(tNode: TNode) {\n return (tNode.flags & TNodeFlags.hasStyleInput) !== 0;\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 {assertDefined, throwError} from '../util/assert';\nimport {TNode, TNodeType, toTNodeTypeAsString} from './interfaces/node';\n\nexport function assertTNodeType(\n tNode: TNode|null, expectedTypes: TNodeType, message?: string): void {\n assertDefined(tNode, 'should be called with a TNode');\n if ((tNode.type & expectedTypes) === 0) {\n throwError(\n message ||\n `Expected [${toTNodeTypeAsString(expectedTypes)}] but got ${\n toTNodeTypeAsString(tNode.type)}.`);\n }\n}\n\nexport function assertPureTNodeType(type: TNodeType) {\n if (!(type === TNodeType.Element || //\n type === TNodeType.Text || //\n type === TNodeType.Container || //\n type === TNodeType.ElementContainer || //\n type === TNodeType.Icu || //\n type === TNodeType.Projection || //\n type === TNodeType.Placeholder)) {\n throwError(`Expected TNodeType to have only a single type selected, but got ${\n toTNodeTypeAsString(type)}.`);\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 */\nimport {CharCode} from '../../util/char_code';\nimport {AttributeMarker, TAttributes} from '../interfaces/node';\nimport {CssSelector} from '../interfaces/projection';\nimport {isProceduralRenderer, ProceduralRenderer3, Renderer3} from '../interfaces/renderer';\nimport {RElement} from '../interfaces/renderer_dom';\n\n\n\n/**\n * Assigns all attribute values to the provided element via the inferred renderer.\n *\n * This function accepts two forms of attribute entries:\n *\n * default: (key, value):\n * attrs = [key1, value1, key2, value2]\n *\n * namespaced: (NAMESPACE_MARKER, uri, name, value)\n * attrs = [NAMESPACE_MARKER, uri, name, value, NAMESPACE_MARKER, uri, name, value]\n *\n * The `attrs` array can contain a mix of both the default and namespaced entries.\n * The \"default\" values are set without a marker, but if the function comes across\n * a marker value then it will attempt to set a namespaced value. If the marker is\n * not of a namespaced value then the function will quit and return the index value\n * where it stopped during the iteration of the attrs array.\n *\n * See [AttributeMarker] to understand what the namespace marker value is.\n *\n * Note that this instruction does not support assigning style and class values to\n * an element. See `elementStart` and `elementHostAttrs` to learn how styling values\n * are applied to an element.\n * @param renderer The renderer to be used\n * @param native The element that the attributes will be assigned to\n * @param attrs The attribute array of values that will be assigned to the element\n * @returns the index value that was last accessed in the attributes array\n */\nexport function setUpAttributes(renderer: Renderer3, native: RElement, attrs: TAttributes): number {\n const isProc = isProceduralRenderer(renderer);\n\n let i = 0;\n while (i < attrs.length) {\n const value = attrs[i];\n if (typeof value === 'number') {\n // only namespaces are supported. Other value types (such as style/class\n // entries) are not supported in this function.\n if (value !== AttributeMarker.NamespaceURI) {\n break;\n }\n\n // we just landed on the marker value ... therefore\n // we should skip to the next entry\n i++;\n\n const namespaceURI = attrs[i++] as string;\n const attrName = attrs[i++] as string;\n const attrVal = attrs[i++] as string;\n ngDevMode && ngDevMode.rendererSetAttribute++;\n isProc ?\n (renderer as ProceduralRenderer3).setAttribute(native, attrName, attrVal, namespaceURI) :\n native.setAttributeNS(namespaceURI, attrName, attrVal);\n } else {\n // attrName is string;\n const attrName = value as string;\n const attrVal = attrs[++i];\n // Standard attributes\n ngDevMode && ngDevMode.rendererSetAttribute++;\n if (isAnimationProp(attrName)) {\n if (isProc) {\n (renderer as ProceduralRenderer3).setProperty(native, attrName, attrVal);\n }\n } else {\n isProc ?\n (renderer as ProceduralRenderer3).setAttribute(native, attrName, attrVal as string) :\n native.setAttribute(attrName, attrVal as string);\n }\n i++;\n }\n }\n\n // another piece of code may iterate over the same attributes array. Therefore\n // it may be helpful to return the exact spot where the attributes array exited\n // whether by running into an unsupported marker or if all the static values were\n // iterated over.\n return i;\n}\n\n/**\n * Test whether the given value is a marker that indicates that the following\n * attribute values in a `TAttributes` array are only the names of attributes,\n * and not name-value pairs.\n * @param marker The attribute marker to test.\n * @returns true if the marker is a \"name-only\" marker (e.g. `Bindings`, `Template` or `I18n`).\n */\nexport function isNameOnlyAttributeMarker(marker: string|AttributeMarker|CssSelector) {\n return marker === AttributeMarker.Bindings || marker === AttributeMarker.Template ||\n marker === AttributeMarker.I18n;\n}\n\nexport function isAnimationProp(name: string): boolean {\n // Perf note: accessing charCodeAt to check for the first character of a string is faster as\n // compared to accessing a character at index 0 (ex. name[0]). The main reason for this is that\n // charCodeAt doesn't allocate memory to return a substring.\n return name.charCodeAt(0) === CharCode.AT_SIGN;\n}\n\n/**\n * Merges `src` `TAttributes` into `dst` `TAttributes` removing any duplicates in the process.\n *\n * This merge function keeps the order of attrs same.\n *\n * @param dst Location of where the merged `TAttributes` should end up.\n * @param src `TAttributes` which should be appended to `dst`\n */\nexport function mergeHostAttrs(dst: TAttributes|null, src: TAttributes|null): TAttributes|null {\n if (src === null || src.length === 0) {\n // do nothing\n } else if (dst === null || dst.length === 0) {\n // We have source, but dst is empty, just make a copy.\n dst = src.slice();\n } else {\n let srcMarker: AttributeMarker = AttributeMarker.ImplicitAttributes;\n for (let i = 0; i < src.length; i++) {\n const item = src[i];\n if (typeof item === 'number') {\n srcMarker = item;\n } else {\n if (srcMarker === AttributeMarker.NamespaceURI) {\n // Case where we need to consume `key1`, `key2`, `value` items.\n } else if (\n srcMarker === AttributeMarker.ImplicitAttributes ||\n srcMarker === AttributeMarker.Styles) {\n // Case where we have to consume `key1` and `value` only.\n mergeHostAttribute(dst, srcMarker, item as string, null, src[++i] as string);\n } else {\n // Case where we have to consume `key1` only.\n mergeHostAttribute(dst, srcMarker, item as string, null, null);\n }\n }\n }\n }\n return dst;\n}\n\n/**\n * Append `key`/`value` to existing `TAttributes` taking region marker and duplicates into account.\n *\n * @param dst `TAttributes` to append to.\n * @param marker Region where the `key`/`value` should be added.\n * @param key1 Key to add to `TAttributes`\n * @param key2 Key to add to `TAttributes` (in case of `AttributeMarker.NamespaceURI`)\n * @param value Value to add or to overwrite to `TAttributes` Only used if `marker` is not Class.\n */\nexport function mergeHostAttribute(\n dst: TAttributes, marker: AttributeMarker, key1: string, key2: string|null,\n value: string|null): void {\n let i = 0;\n // Assume that new markers will be inserted at the end.\n let markerInsertPosition = dst.length;\n // scan until correct type.\n if (marker === AttributeMarker.ImplicitAttributes) {\n markerInsertPosition = -1;\n } else {\n while (i < dst.length) {\n const dstValue = dst[i++];\n if (typeof dstValue === 'number') {\n if (dstValue === marker) {\n markerInsertPosition = -1;\n break;\n } else if (dstValue > marker) {\n // We need to save this as we want the markers to be inserted in specific order.\n markerInsertPosition = i - 1;\n break;\n }\n }\n }\n }\n\n // search until you find place of insertion\n while (i < dst.length) {\n const item = dst[i];\n if (typeof item === 'number') {\n // since `i` started as the index after the marker, we did not find it if we are at the next\n // marker\n break;\n } else if (item === key1) {\n // We already have same token\n if (key2 === null) {\n if (value !== null) {\n dst[i + 1] = value;\n }\n return;\n } else if (key2 === dst[i + 1]) {\n dst[i + 2] = value!;\n return;\n }\n }\n // Increment counter.\n i++;\n if (key2 !== null) i++;\n if (value !== null) i++;\n }\n\n // insert at location.\n if (markerInsertPosition !== -1) {\n dst.splice(markerInsertPosition, 0, marker);\n i = markerInsertPosition + 1;\n }\n dst.splice(i++, 0, key1);\n if (key2 !== null) {\n dst.splice(i++, 0, key2);\n }\n if (value !== null) {\n dst.splice(i++, 0, 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 {assertGreaterThan, assertNotEqual, assertNumber} from '../../util/assert';\nimport {NO_PARENT_INJECTOR, RelativeInjectorLocation, RelativeInjectorLocationFlags} from '../interfaces/injector';\nimport {DECLARATION_VIEW, HEADER_OFFSET, LView} from '../interfaces/view';\n\n\n/// Parent Injector Utils ///////////////////////////////////////////////////////////////\nexport function hasParentInjector(parentLocation: RelativeInjectorLocation): boolean {\n return parentLocation !== NO_PARENT_INJECTOR;\n}\n\nexport function getParentInjectorIndex(parentLocation: RelativeInjectorLocation): number {\n ngDevMode && assertNumber(parentLocation, 'Number expected');\n ngDevMode && assertNotEqual(parentLocation as any, -1, 'Not a valid state.');\n const parentInjectorIndex =\n (parentLocation as any as number) & RelativeInjectorLocationFlags.InjectorIndexMask;\n ngDevMode &&\n assertGreaterThan(\n parentInjectorIndex, HEADER_OFFSET,\n 'Parent injector must be pointing past HEADER_OFFSET.');\n return (parentLocation as any as number) & RelativeInjectorLocationFlags.InjectorIndexMask;\n}\n\nexport function getParentInjectorViewOffset(parentLocation: RelativeInjectorLocation): number {\n return (parentLocation as any as number) >> RelativeInjectorLocationFlags.ViewOffsetShift;\n}\n\n/**\n * Unwraps a parent injector location number to find the view offset from the current injector,\n * then walks up the declaration view tree until the view is found that contains the parent\n * injector.\n *\n * @param location The location of the parent injector, which contains the view offset\n * @param startView The LView instance from which to start walking up the view tree\n * @returns The LView instance that contains the parent injector\n */\nexport function getParentInjectorView(location: RelativeInjectorLocation, startView: LView): LView {\n let viewOffset = getParentInjectorViewOffset(location);\n let parentView = startView;\n // For most cases, the parent injector can be found on the host node (e.g. for component\n // or container), but we must keep the loop here to support the rarer case of deeply nested\n // <ng-template> tags or inline views, where the parent injector might live many views\n // above the child injector.\n while (viewOffset > 0) {\n parentView = parentView[DECLARATION_VIEW]!;\n viewOffset--;\n }\n return parentView;\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 {isForwardRef, resolveForwardRef} from '../di/forward_ref';\nimport {injectRootLimpMode, setInjectImplementation} from '../di/inject_switch';\nimport {Injector} from '../di/injector';\nimport {InjectorMarkers} from '../di/injector_marker';\nimport {InjectFlags} from '../di/interface/injector';\nimport {ProviderToken} from '../di/provider_token';\nimport {Type} from '../interface/type';\nimport {assertDefined, assertEqual, assertIndexInRange} from '../util/assert';\nimport {noSideEffects} from '../util/closure';\n\nimport {assertDirectiveDef, assertNodeInjector, assertTNodeForLView} from './assert';\nimport {FactoryFn, getFactoryDef} from './definition_factory';\nimport {throwCyclicDependencyError, throwProviderNotFoundError} from './errors_di';\nimport {NG_ELEMENT_ID, NG_FACTORY_DEF} from './fields';\nimport {registerPreOrderHooks} from './hooks';\nimport {DirectiveDef} from './interfaces/definition';\nimport {isFactory, NO_PARENT_INJECTOR, NodeInjectorFactory, NodeInjectorOffset, RelativeInjectorLocation, RelativeInjectorLocationFlags} from './interfaces/injector';\nimport {AttributeMarker, TContainerNode, TDirectiveHostNode, TElementContainerNode, TElementNode, TNode, TNodeProviderIndexes, TNodeType} from './interfaces/node';\nimport {isComponentDef, isComponentHost} from './interfaces/type_checks';\nimport {DECLARATION_COMPONENT_VIEW, DECLARATION_VIEW, INJECTOR, LView, T_HOST, TData, TVIEW, TView, TViewType} from './interfaces/view';\nimport {assertTNodeType} from './node_assert';\nimport {enterDI, getCurrentTNode, getLView, leaveDI} from './state';\nimport {isNameOnlyAttributeMarker} from './util/attrs_utils';\nimport {getParentInjectorIndex, getParentInjectorView, hasParentInjector} from './util/injector_utils';\nimport {stringifyForError} from './util/stringify_utils';\n\n\n\n/**\n * Defines if the call to `inject` should include `viewProviders` in its resolution.\n *\n * This is set to true when we try to instantiate a component. This value is reset in\n * `getNodeInjectable` to a value which matches the declaration location of the token about to be\n * instantiated. This is done so that if we are injecting a token which was declared outside of\n * `viewProviders` we don't accidentally pull `viewProviders` in.\n *\n * Example:\n *\n * ```\n * @Injectable()\n * class MyService {\n * constructor(public value: String) {}\n * }\n *\n * @Component({\n * providers: [\n * MyService,\n * {provide: String, value: 'providers' }\n * ]\n * viewProviders: [\n * {provide: String, value: 'viewProviders'}\n * ]\n * })\n * class MyComponent {\n * constructor(myService: MyService, value: String) {\n * // We expect that Component can see into `viewProviders`.\n * expect(value).toEqual('viewProviders');\n * // `MyService` was not declared in `viewProviders` hence it can't see it.\n * expect(myService.value).toEqual('providers');\n * }\n * }\n *\n * ```\n */\nlet includeViewProviders = true;\n\nexport function setIncludeViewProviders(v: boolean): boolean {\n const oldValue = includeViewProviders;\n includeViewProviders = v;\n return oldValue;\n}\n\n/**\n * The number of slots in each bloom filter (used by DI). The larger this number, the fewer\n * directives that will share slots, and thus, the fewer false positives when checking for\n * the existence of a directive.\n */\nconst BLOOM_SIZE = 256;\nconst BLOOM_MASK = BLOOM_SIZE - 1;\n\n/**\n * The number of bits that is represented by a single bloom bucket. JS bit operations are 32 bits,\n * so each bucket represents 32 distinct tokens which accounts for log2(32) = 5 bits of a bloom hash\n * number.\n */\nconst BLOOM_BUCKET_BITS = 5;\n\n/** Counter used to generate unique IDs for directives. */\nlet nextNgElementId = 0;\n\n/**\n * Registers this directive as present in its node's injector by flipping the directive's\n * corresponding bit in the injector's bloom filter.\n *\n * @param injectorIndex The index of the node injector where this token should be registered\n * @param tView The TView for the injector's bloom filters\n * @param type The directive token to register\n */\nexport function bloomAdd(\n injectorIndex: number, tView: TView, type: ProviderToken<any>|string): void {\n ngDevMode && assertEqual(tView.firstCreatePass, true, 'expected firstCreatePass to be true');\n let id: number|undefined;\n if (typeof type === 'string') {\n id = type.charCodeAt(0) || 0;\n } else if (type.hasOwnProperty(NG_ELEMENT_ID)) {\n id = (type as any)[NG_ELEMENT_ID];\n }\n\n // Set a unique ID on the directive type, so if something tries to inject the directive,\n // we can easily retrieve the ID and hash it into the bloom bit that should be checked.\n if (id == null) {\n id = (type as any)[NG_ELEMENT_ID] = nextNgElementId++;\n }\n\n // We only have BLOOM_SIZE (256) slots in our bloom filter (8 buckets * 32 bits each),\n // so all unique IDs must be modulo-ed into a number from 0 - 255 to fit into the filter.\n const bloomHash = id & BLOOM_MASK;\n\n // Create a mask that targets the specific bit associated with the directive.\n // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding\n // to bit positions 0 - 31 in a 32 bit integer.\n const mask = 1 << bloomHash;\n\n // Each bloom bucket in `tData` represents `BLOOM_BUCKET_BITS` number of bits of `bloomHash`.\n // Any bits in `bloomHash` beyond `BLOOM_BUCKET_BITS` indicate the bucket offset that the mask\n // should be written to.\n (tView.data as number[])[injectorIndex + (bloomHash >> BLOOM_BUCKET_BITS)] |= mask;\n}\n\n/**\n * Creates (or gets an existing) injector for a given element or container.\n *\n * @param tNode for which an injector should be retrieved / created.\n * @param lView View where the node is stored\n * @returns Node injector\n */\nexport function getOrCreateNodeInjectorForNode(\n tNode: TElementNode|TContainerNode|TElementContainerNode, lView: LView): number {\n const existingInjectorIndex = getInjectorIndex(tNode, lView);\n if (existingInjectorIndex !== -1) {\n return existingInjectorIndex;\n }\n\n const tView = lView[TVIEW];\n if (tView.firstCreatePass) {\n tNode.injectorIndex = lView.length;\n insertBloom(tView.data, tNode); // foundation for node bloom\n insertBloom(lView, null); // foundation for cumulative bloom\n insertBloom(tView.blueprint, null);\n }\n\n const parentLoc = getParentInjectorLocation(tNode, lView);\n const injectorIndex = tNode.injectorIndex;\n\n // If a parent injector can't be found, its location is set to -1.\n // In that case, we don't need to set up a cumulative bloom\n if (hasParentInjector(parentLoc)) {\n const parentIndex = getParentInjectorIndex(parentLoc);\n const parentLView = getParentInjectorView(parentLoc, lView);\n const parentData = parentLView[TVIEW].data as any;\n // Creates a cumulative bloom filter that merges the parent's bloom filter\n // and its own cumulative bloom (which contains tokens for all ancestors)\n for (let i = 0; i < NodeInjectorOffset.BLOOM_SIZE; i++) {\n lView[injectorIndex + i] = parentLView[parentIndex + i] | parentData[parentIndex + i];\n }\n }\n\n lView[injectorIndex + NodeInjectorOffset.PARENT] = parentLoc;\n return injectorIndex;\n}\n\nfunction insertBloom(arr: any[], footer: TNode|null): void {\n arr.push(0, 0, 0, 0, 0, 0, 0, 0, footer);\n}\n\n\nexport function getInjectorIndex(tNode: TNode, lView: LView): number {\n if (tNode.injectorIndex === -1 ||\n // If the injector index is the same as its parent's injector index, then the index has been\n // copied down from the parent node. No injector has been created yet on this node.\n (tNode.parent && tNode.parent.injectorIndex === tNode.injectorIndex) ||\n // After the first template pass, the injector index might exist but the parent values\n // might not have been calculated yet for this instance\n lView[tNode.injectorIndex + NodeInjectorOffset.PARENT] === null) {\n return -1;\n } else {\n ngDevMode && assertIndexInRange(lView, tNode.injectorIndex);\n return tNode.injectorIndex;\n }\n}\n\n/**\n * Finds the index of the parent injector, with a view offset if applicable. Used to set the\n * parent injector initially.\n *\n * @returns Returns a number that is the combination of the number of LViews that we have to go up\n * to find the LView containing the parent inject AND the index of the injector within that LView.\n */\nexport function getParentInjectorLocation(tNode: TNode, lView: LView): RelativeInjectorLocation {\n if (tNode.parent && tNode.parent.injectorIndex !== -1) {\n // If we have a parent `TNode` and there is an injector associated with it we are done, because\n // the parent injector is within the current `LView`.\n return tNode.parent.injectorIndex as any; // ViewOffset is 0\n }\n\n // When parent injector location is computed it may be outside of the current view. (ie it could\n // be pointing to a declared parent location). This variable stores number of declaration parents\n // we need to walk up in order to find the parent injector location.\n let declarationViewOffset = 0;\n let parentTNode: TNode|null = null;\n let lViewCursor: LView|null = lView;\n\n // The parent injector is not in the current `LView`. We will have to walk the declared parent\n // `LView` hierarchy and look for it. If we walk of the top, that means that there is no parent\n // `NodeInjector`.\n while (lViewCursor !== null) {\n // First determine the `parentTNode` location. The parent pointer differs based on `TView.type`.\n const tView = lViewCursor[TVIEW];\n const tViewType = tView.type;\n if (tViewType === TViewType.Embedded) {\n ngDevMode &&\n assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');\n parentTNode = tView.declTNode;\n } else if (tViewType === TViewType.Component) {\n // Components don't have `TView.declTNode` because each instance of component could be\n // inserted in different location, hence `TView.declTNode` is meaningless.\n parentTNode = lViewCursor[T_HOST];\n } else {\n ngDevMode && assertEqual(tView.type, TViewType.Root, 'Root type expected');\n parentTNode = null;\n }\n if (parentTNode === null) {\n // If we have no parent, than we are done.\n return NO_PARENT_INJECTOR;\n }\n\n ngDevMode && parentTNode && assertTNodeForLView(parentTNode!, lViewCursor[DECLARATION_VIEW]!);\n // Every iteration of the loop requires that we go to the declared parent.\n declarationViewOffset++;\n lViewCursor = lViewCursor[DECLARATION_VIEW];\n\n if (parentTNode.injectorIndex !== -1) {\n // We found a NodeInjector which points to something.\n return (parentTNode.injectorIndex |\n (declarationViewOffset << RelativeInjectorLocationFlags.ViewOffsetShift)) as any;\n }\n }\n return NO_PARENT_INJECTOR;\n}\n/**\n * Makes a type or an injection token public to the DI system by adding it to an\n * injector's bloom filter.\n *\n * @param di The node injector in which a directive will be added\n * @param token The type or the injection token to be made public\n */\nexport function diPublicInInjector(\n injectorIndex: number, tView: TView, token: ProviderToken<any>): void {\n bloomAdd(injectorIndex, tView, token);\n}\n\n/**\n * Inject static attribute value into directive constructor.\n *\n * This method is used with `factory` functions which are generated as part of\n * `defineDirective` or `defineComponent`. The method retrieves the static value\n * of an attribute. (Dynamic attributes are not supported since they are not resolved\n * at the time of injection and can change over time.)\n *\n * # Example\n * Given:\n * ```\n * @Component(...)\n * class MyComponent {\n * constructor(@Attribute('title') title: string) { ... }\n * }\n * ```\n * When instantiated with\n * ```\n * <my-component title=\"Hello\"></my-component>\n * ```\n *\n * Then factory method generated is:\n * ```\n * MyComponent.ɵcmp = defineComponent({\n * factory: () => new MyComponent(injectAttribute('title'))\n * ...\n * })\n * ```\n *\n * @publicApi\n */\nexport function injectAttributeImpl(tNode: TNode, attrNameToInject: string): string|null {\n ngDevMode && assertTNodeType(tNode, TNodeType.AnyContainer | TNodeType.AnyRNode);\n ngDevMode && assertDefined(tNode, 'expecting tNode');\n if (attrNameToInject === 'class') {\n return tNode.classes;\n }\n if (attrNameToInject === 'style') {\n return tNode.styles;\n }\n\n const attrs = tNode.attrs;\n if (attrs) {\n const attrsLength = attrs.length;\n let i = 0;\n while (i < attrsLength) {\n const value = attrs[i];\n\n // If we hit a `Bindings` or `Template` marker then we are done.\n if (isNameOnlyAttributeMarker(value)) break;\n\n // Skip namespaced attributes\n if (value === AttributeMarker.NamespaceURI) {\n // we skip the next two values\n // as namespaced attributes looks like\n // [..., AttributeMarker.NamespaceURI, 'http://someuri.com/test', 'test:exist',\n // 'existValue', ...]\n i = i + 2;\n } else if (typeof value === 'number') {\n // Skip to the first value of the marked attribute.\n i++;\n while (i < attrsLength && typeof attrs[i] === 'string') {\n i++;\n }\n } else if (value === attrNameToInject) {\n return attrs[i + 1] as string;\n } else {\n i = i + 2;\n }\n }\n }\n return null;\n}\n\n\nfunction notFoundValueOrThrow<T>(\n notFoundValue: T|null, token: ProviderToken<T>, flags: InjectFlags): T|null {\n if (flags & InjectFlags.Optional) {\n return notFoundValue;\n } else {\n throwProviderNotFoundError(token, 'NodeInjector');\n }\n}\n\n/**\n * Returns the value associated to the given token from the ModuleInjector or throws exception\n *\n * @param lView The `LView` that contains the `tNode`\n * @param token The token to look for\n * @param flags Injection flags\n * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`\n * @returns the value from the injector or throws an exception\n */\nfunction lookupTokenUsingModuleInjector<T>(\n lView: LView, token: ProviderToken<T>, flags: InjectFlags, notFoundValue?: any): T|null {\n if (flags & InjectFlags.Optional && notFoundValue === undefined) {\n // This must be set or the NullInjector will throw for optional deps\n notFoundValue = null;\n }\n\n if ((flags & (InjectFlags.Self | InjectFlags.Host)) === 0) {\n const moduleInjector = lView[INJECTOR];\n // switch to `injectInjectorOnly` implementation for module injector, since module injector\n // should not have access to Component/Directive DI scope (that may happen through\n // `directiveInject` implementation)\n const previousInjectImplementation = setInjectImplementation(undefined);\n try {\n if (moduleInjector) {\n return moduleInjector.get(token, notFoundValue, flags & InjectFlags.Optional);\n } else {\n return injectRootLimpMode(token, notFoundValue, flags & InjectFlags.Optional);\n }\n } finally {\n setInjectImplementation(previousInjectImplementation);\n }\n }\n return notFoundValueOrThrow<T>(notFoundValue, token, flags);\n}\n\n/**\n * Returns the value associated to the given token from the NodeInjectors => ModuleInjector.\n *\n * Look for the injector providing the token by walking up the node injector tree and then\n * the module injector tree.\n *\n * This function patches `token` with `__NG_ELEMENT_ID__` which contains the id for the bloom\n * filter. `-1` is reserved for injecting `Injector` (implemented by `NodeInjector`)\n *\n * @param tNode The Node where the search for the injector should start\n * @param lView The `LView` that contains the `tNode`\n * @param token The token to look for\n * @param flags Injection flags\n * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`\n * @returns the value from the injector, `null` when not found, or `notFoundValue` if provided\n */\nexport function getOrCreateInjectable<T>(\n tNode: TDirectiveHostNode|null, lView: LView, token: ProviderToken<T>,\n flags: InjectFlags = InjectFlags.Default, notFoundValue?: any): T|null {\n if (tNode !== null) {\n const bloomHash = bloomHashBitOrFactory(token);\n // If the ID stored here is a function, this is a special object like ElementRef or TemplateRef\n // so just call the factory function to create it.\n if (typeof bloomHash === 'function') {\n if (!enterDI(lView, tNode, flags)) {\n // Failed to enter DI, try module injector instead. If a token is injected with the @Host\n // flag, the module injector is not searched for that token in Ivy.\n return (flags & InjectFlags.Host) ?\n notFoundValueOrThrow<T>(notFoundValue, token, flags) :\n lookupTokenUsingModuleInjector<T>(lView, token, flags, notFoundValue);\n }\n try {\n const value = bloomHash(flags);\n if (value == null && !(flags & InjectFlags.Optional)) {\n throwProviderNotFoundError(token);\n } else {\n return value;\n }\n } finally {\n leaveDI();\n }\n } else if (typeof bloomHash === 'number') {\n // A reference to the previous injector TView that was found while climbing the element\n // injector tree. This is used to know if viewProviders can be accessed on the current\n // injector.\n let previousTView: TView|null = null;\n let injectorIndex = getInjectorIndex(tNode, lView);\n let parentLocation: RelativeInjectorLocation = NO_PARENT_INJECTOR;\n let hostTElementNode: TNode|null =\n flags & InjectFlags.Host ? lView[DECLARATION_COMPONENT_VIEW][T_HOST] : null;\n\n // If we should skip this injector, or if there is no injector on this node, start by\n // searching the parent injector.\n if (injectorIndex === -1 || flags & InjectFlags.SkipSelf) {\n parentLocation = injectorIndex === -1 ? getParentInjectorLocation(tNode, lView) :\n lView[injectorIndex + NodeInjectorOffset.PARENT];\n\n if (parentLocation === NO_PARENT_INJECTOR || !shouldSearchParent(flags, false)) {\n injectorIndex = -1;\n } else {\n previousTView = lView[TVIEW];\n injectorIndex = getParentInjectorIndex(parentLocation);\n lView = getParentInjectorView(parentLocation, lView);\n }\n }\n\n // Traverse up the injector tree until we find a potential match or until we know there\n // *isn't* a match.\n while (injectorIndex !== -1) {\n ngDevMode && assertNodeInjector(lView, injectorIndex);\n\n // Check the current injector. If it matches, see if it contains token.\n const tView = lView[TVIEW];\n ngDevMode &&\n assertTNodeForLView(\n tView.data[injectorIndex + NodeInjectorOffset.TNODE] as TNode, lView);\n if (bloomHasToken(bloomHash, injectorIndex, tView.data)) {\n // At this point, we have an injector which *may* contain the token, so we step through\n // the providers and directives associated with the injector's corresponding node to get\n // the instance.\n const instance: T|null = searchTokensOnInjector<T>(\n injectorIndex, lView, token, previousTView, flags, hostTElementNode);\n if (instance !== NOT_FOUND) {\n return instance;\n }\n }\n parentLocation = lView[injectorIndex + NodeInjectorOffset.PARENT];\n if (parentLocation !== NO_PARENT_INJECTOR &&\n shouldSearchParent(\n flags,\n lView[TVIEW].data[injectorIndex + NodeInjectorOffset.TNODE] === hostTElementNode) &&\n bloomHasToken(bloomHash, injectorIndex, lView)) {\n // The def wasn't found anywhere on this node, so it was a false positive.\n // Traverse up the tree and continue searching.\n previousTView = tView;\n injectorIndex = getParentInjectorIndex(parentLocation);\n lView = getParentInjectorView(parentLocation, lView);\n } else {\n // If we should not search parent OR If the ancestor bloom filter value does not have the\n // bit corresponding to the directive we can give up on traversing up to find the specific\n // injector.\n injectorIndex = -1;\n }\n }\n }\n }\n\n return lookupTokenUsingModuleInjector<T>(lView, token, flags, notFoundValue);\n}\n\nconst NOT_FOUND = {};\n\nexport function createNodeInjector(): Injector {\n return new NodeInjector(getCurrentTNode()! as TDirectiveHostNode, getLView()) as any;\n}\n\nfunction searchTokensOnInjector<T>(\n injectorIndex: number, lView: LView, token: ProviderToken<T>, previousTView: TView|null,\n flags: InjectFlags, hostTElementNode: TNode|null) {\n const currentTView = lView[TVIEW];\n const tNode = currentTView.data[injectorIndex + NodeInjectorOffset.TNODE] as TNode;\n // First, we need to determine if view providers can be accessed by the starting element.\n // There are two possibilities\n const canAccessViewProviders = previousTView == null ?\n // 1) This is the first invocation `previousTView == null` which means that we are at the\n // `TNode` of where injector is starting to look. In such a case the only time we are allowed\n // to look into the ViewProviders is if:\n // - we are on a component\n // - AND the injector set `includeViewProviders` to true (implying that the token can see\n // ViewProviders because it is the Component or a Service which itself was declared in\n // ViewProviders)\n (isComponentHost(tNode) && includeViewProviders) :\n // 2) `previousTView != null` which means that we are now walking across the parent nodes.\n // In such a case we are only allowed to look into the ViewProviders if:\n // - We just crossed from child View to Parent View `previousTView != currentTView`\n // - AND the parent TNode is an Element.\n // This means that we just came from the Component's View and therefore are allowed to see\n // into the ViewProviders.\n (previousTView != currentTView && ((tNode.type & TNodeType.AnyRNode) !== 0));\n\n // This special case happens when there is a @host on the inject and when we are searching\n // on the host element node.\n const isHostSpecialCase = (flags & InjectFlags.Host) && hostTElementNode === tNode;\n\n const injectableIdx = locateDirectiveOrProvider(\n tNode, currentTView, token, canAccessViewProviders, isHostSpecialCase);\n if (injectableIdx !== null) {\n return getNodeInjectable(lView, currentTView, injectableIdx, tNode as TElementNode);\n } else {\n return NOT_FOUND;\n }\n}\n\n/**\n * Searches for the given token among the node's directives and providers.\n *\n * @param tNode TNode on which directives are present.\n * @param tView The tView we are currently processing\n * @param token Provider token or type of a directive to look for.\n * @param canAccessViewProviders Whether view providers should be considered.\n * @param isHostSpecialCase Whether the host special case applies.\n * @returns Index of a found directive or provider, or null when none found.\n */\nexport function locateDirectiveOrProvider<T>(\n tNode: TNode, tView: TView, token: ProviderToken<T>|string, canAccessViewProviders: boolean,\n isHostSpecialCase: boolean|number): number|null {\n const nodeProviderIndexes = tNode.providerIndexes;\n const tInjectables = tView.data;\n\n const injectablesStart = nodeProviderIndexes & TNodeProviderIndexes.ProvidersStartIndexMask;\n const directivesStart = tNode.directiveStart;\n const directiveEnd = tNode.directiveEnd;\n const cptViewProvidersCount =\n nodeProviderIndexes >> TNodeProviderIndexes.CptViewProvidersCountShift;\n const startingIndex =\n canAccessViewProviders ? injectablesStart : injectablesStart + cptViewProvidersCount;\n // When the host special case applies, only the viewProviders and the component are visible\n const endIndex = isHostSpecialCase ? injectablesStart + cptViewProvidersCount : directiveEnd;\n for (let i = startingIndex; i < endIndex; i++) {\n const providerTokenOrDef = tInjectables[i] as ProviderToken<any>| DirectiveDef<any>| string;\n if (i < directivesStart && token === providerTokenOrDef ||\n i >= directivesStart && (providerTokenOrDef as DirectiveDef<any>).type === token) {\n return i;\n }\n }\n if (isHostSpecialCase) {\n const dirDef = tInjectables[directivesStart] as DirectiveDef<any>;\n if (dirDef && isComponentDef(dirDef) && dirDef.type === token) {\n return directivesStart;\n }\n }\n return null;\n}\n\n/**\n * Retrieve or instantiate the injectable from the `LView` at particular `index`.\n *\n * This function checks to see if the value has already been instantiated and if so returns the\n * cached `injectable`. Otherwise if it detects that the value is still a factory it\n * instantiates the `injectable` and caches the value.\n */\nexport function getNodeInjectable(\n lView: LView, tView: TView, index: number, tNode: TDirectiveHostNode): any {\n let value = lView[index];\n const tData = tView.data;\n if (isFactory(value)) {\n const factory: NodeInjectorFactory = value;\n if (factory.resolving) {\n throwCyclicDependencyError(stringifyForError(tData[index]));\n }\n const previousIncludeViewProviders = setIncludeViewProviders(factory.canSeeViewProviders);\n factory.resolving = true;\n const previousInjectImplementation =\n factory.injectImpl ? setInjectImplementation(factory.injectImpl) : null;\n const success = enterDI(lView, tNode, InjectFlags.Default);\n ngDevMode &&\n assertEqual(\n success, true,\n 'Because flags do not contain \\`SkipSelf\\' we expect this to always succeed.');\n try {\n value = lView[index] = factory.factory(undefined, tData, lView, tNode);\n // This code path is hit for both directives and providers.\n // For perf reasons, we want to avoid searching for hooks on providers.\n // It does no harm to try (the hooks just won't exist), but the extra\n // checks are unnecessary and this is a hot path. So we check to see\n // if the index of the dependency is in the directive range for this\n // tNode. If it's not, we know it's a provider and skip hook registration.\n if (tView.firstCreatePass && index >= tNode.directiveStart) {\n ngDevMode && assertDirectiveDef(tData[index]);\n registerPreOrderHooks(index, tData[index] as DirectiveDef<any>, tView);\n }\n } finally {\n previousInjectImplementation !== null &&\n setInjectImplementation(previousInjectImplementation);\n setIncludeViewProviders(previousIncludeViewProviders);\n factory.resolving = false;\n leaveDI();\n }\n }\n return value;\n}\n\n/**\n * Returns the bit in an injector's bloom filter that should be used to determine whether or not\n * the directive might be provided by the injector.\n *\n * When a directive is public, it is added to the bloom filter and given a unique ID that can be\n * retrieved on the Type. When the directive isn't public or the token is not a directive `null`\n * is returned as the node injector can not possibly provide that token.\n *\n * @param token the injection token\n * @returns the matching bit to check in the bloom filter or `null` if the token is not known.\n * When the returned value is negative then it represents special values such as `Injector`.\n */\nexport function bloomHashBitOrFactory(token: ProviderToken<any>|string): number|Function|undefined {\n ngDevMode && assertDefined(token, 'token must be defined');\n if (typeof token === 'string') {\n return token.charCodeAt(0) || 0;\n }\n const tokenId: number|undefined =\n // First check with `hasOwnProperty` so we don't get an inherited ID.\n token.hasOwnProperty(NG_ELEMENT_ID) ? (token as any)[NG_ELEMENT_ID] : undefined;\n // Negative token IDs are used for special objects such as `Injector`\n if (typeof tokenId === 'number') {\n if (tokenId >= 0) {\n return tokenId & BLOOM_MASK;\n } else {\n ngDevMode &&\n assertEqual(tokenId, InjectorMarkers.Injector, 'Expecting to get Special Injector Id');\n return createNodeInjector;\n }\n } else {\n return tokenId;\n }\n}\n\nexport function bloomHasToken(bloomHash: number, injectorIndex: number, injectorView: LView|TData) {\n // Create a mask that targets the specific bit associated with the directive we're looking for.\n // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding\n // to bit positions 0 - 31 in a 32 bit integer.\n const mask = 1 << bloomHash;\n\n // Each bloom bucket in `injectorView` represents `BLOOM_BUCKET_BITS` number of bits of\n // `bloomHash`. Any bits in `bloomHash` beyond `BLOOM_BUCKET_BITS` indicate the bucket offset\n // that should be used.\n const value = injectorView[injectorIndex + (bloomHash >> BLOOM_BUCKET_BITS)];\n\n // If the bloom filter value has the bit corresponding to the directive's bloomBit flipped on,\n // this injector is a potential match.\n return !!(value & mask);\n}\n\n/** Returns true if flags prevent parent injector from being searched for tokens */\nfunction shouldSearchParent(flags: InjectFlags, isFirstHostTNode: boolean): boolean|number {\n return !(flags & InjectFlags.Self) && !(flags & InjectFlags.Host && isFirstHostTNode);\n}\n\nexport class NodeInjector implements Injector {\n constructor(\n private _tNode: TElementNode|TContainerNode|TElementContainerNode|null,\n private _lView: LView) {}\n\n get(token: any, notFoundValue?: any, flags?: InjectFlags): any {\n return getOrCreateInjectable(this._tNode, this._lView, token, flags, notFoundValue);\n }\n}\n\n/**\n * @codeGenApi\n */\nexport function ɵɵgetInheritedFactory<T>(type: Type<any>): (type: Type<T>) => T {\n return noSideEffects(() => {\n const ownConstructor = type.prototype.constructor;\n const ownFactory = ownConstructor[NG_FACTORY_DEF] || getFactoryOf(ownConstructor);\n const objectPrototype = Object.prototype;\n let parent = Object.getPrototypeOf(type.prototype).constructor;\n\n // Go up the prototype until we hit `Object`.\n while (parent && parent !== objectPrototype) {\n const factory = parent[NG_FACTORY_DEF] || getFactoryOf(parent);\n\n // If we hit something that has a factory and the factory isn't the same as the type,\n // we've found the inherited factory. Note the check that the factory isn't the type's\n // own factory is redundant in most cases, but if the user has custom decorators on the\n // class, this lookup will start one level down in the prototype chain, causing us to\n // find the own factory first and potentially triggering an infinite loop downstream.\n if (factory && factory !== ownFactory) {\n return factory;\n }\n\n parent = Object.getPrototypeOf(parent);\n }\n\n // There is no factory defined. Either this was improper usage of inheritance\n // (no Angular decorator on the superclass) or there is no constructor at all\n // in the inheritance chain. Since the two cases cannot be distinguished, the\n // latter has to be assumed.\n return t => new t();\n });\n}\n\nfunction getFactoryOf<T>(type: Type<any>): ((type?: Type<T>) => T | null)|null {\n if (isForwardRef(type)) {\n return () => {\n const factory = getFactoryOf<T>(resolveForwardRef(type));\n return factory && factory();\n };\n }\n return getFactoryDef<T>(type);\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 */\nimport {injectAttributeImpl} from '../di';\nimport {getCurrentTNode} from '../state';\n\n/**\n * Facade for the attribute injection from DI.\n *\n * @codeGenApi\n */\nexport function ɵɵinjectAttribute(attrNameToInject: string): string|null {\n return injectAttributeImpl(getCurrentTNode()!, attrNameToInject);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\n\nimport {noSideEffects} from './closure';\n\n\n\n/**\n * An interface implemented by all Angular type decorators, which allows them to be used as\n * decorators as well as Angular syntax.\n *\n * ```\n * @ng.Component({...})\n * class MyClass {...}\n * ```\n *\n * @publicApi\n */\nexport interface TypeDecorator {\n /**\n * Invoke as decorator.\n */\n <T extends Type<any>>(type: T): T;\n\n // Make TypeDecorator assignable to built-in ParameterDecorator type.\n // ParameterDecorator is declared in lib.d.ts as a `declare type`\n // so we cannot declare this interface as a subtype.\n // see https://github.com/angular/angular/issues/3379#issuecomment-126169417\n (target: Object, propertyKey?: string|symbol, parameterIndex?: number): void;\n}\n\nexport const ANNOTATIONS = '__annotations__';\nexport const PARAMETERS = '__parameters__';\nexport const PROP_METADATA = '__prop__metadata__';\n\n/**\n * @suppress {globalThis}\n */\nexport function makeDecorator<T>(\n name: string, props?: (...args: any[]) => any, parentClass?: any,\n additionalProcessing?: (type: Type<T>) => void,\n typeFn?: (type: Type<T>, ...args: any[]) => void):\n {new (...args: any[]): any; (...args: any[]): any; (...args: any[]): (cls: any) => any;} {\n return noSideEffects(() => {\n const metaCtor = makeMetadataCtor(props);\n\n function DecoratorFactory(\n this: unknown|typeof DecoratorFactory, ...args: any[]): (cls: Type<T>) => any {\n if (this instanceof DecoratorFactory) {\n metaCtor.call(this, ...args);\n return this as typeof DecoratorFactory;\n }\n\n const annotationInstance = new (DecoratorFactory as any)(...args);\n return function TypeDecorator(cls: Type<T>) {\n if (typeFn) typeFn(cls, ...args);\n // Use of Object.defineProperty is important since it creates non-enumerable property which\n // prevents the property is copied during subclassing.\n const annotations = cls.hasOwnProperty(ANNOTATIONS) ?\n (cls as any)[ANNOTATIONS] :\n (Object.defineProperty(cls, ANNOTATIONS, {value: []}) as any)[ANNOTATIONS];\n annotations.push(annotationInstance);\n\n\n if (additionalProcessing) additionalProcessing(cls);\n\n return cls;\n };\n }\n\n if (parentClass) {\n DecoratorFactory.prototype = Object.create(parentClass.prototype);\n }\n\n DecoratorFactory.prototype.ngMetadataName = name;\n (DecoratorFactory as any).annotationCls = DecoratorFactory;\n return DecoratorFactory as any;\n });\n}\n\nfunction makeMetadataCtor(props?: (...args: any[]) => any): any {\n return function ctor(this: any, ...args: any[]) {\n if (props) {\n const values = props(...args);\n for (const propName in values) {\n this[propName] = values[propName];\n }\n }\n };\n}\n\nexport function makeParamDecorator(\n name: string, props?: (...args: any[]) => any, parentClass?: any): any {\n return noSideEffects(() => {\n const metaCtor = makeMetadataCtor(props);\n function ParamDecoratorFactory(\n this: unknown|typeof ParamDecoratorFactory, ...args: any[]): any {\n if (this instanceof ParamDecoratorFactory) {\n metaCtor.apply(this, args);\n return this;\n }\n const annotationInstance = new (<any>ParamDecoratorFactory)(...args);\n\n (<any>ParamDecorator).annotation = annotationInstance;\n return ParamDecorator;\n\n function ParamDecorator(cls: any, unusedKey: any, index: number): any {\n // Use of Object.defineProperty is important since it creates non-enumerable property which\n // prevents the property is copied during subclassing.\n const parameters = cls.hasOwnProperty(PARAMETERS) ?\n (cls as any)[PARAMETERS] :\n Object.defineProperty(cls, PARAMETERS, {value: []})[PARAMETERS];\n\n // there might be gaps if some in between parameters do not have annotations.\n // we pad with nulls.\n while (parameters.length <= index) {\n parameters.push(null);\n }\n\n (parameters[index] = parameters[index] || []).push(annotationInstance);\n return cls;\n }\n }\n if (parentClass) {\n ParamDecoratorFactory.prototype = Object.create(parentClass.prototype);\n }\n ParamDecoratorFactory.prototype.ngMetadataName = name;\n (<any>ParamDecoratorFactory).annotationCls = ParamDecoratorFactory;\n return ParamDecoratorFactory;\n });\n}\n\nexport function makePropDecorator(\n name: string, props?: (...args: any[]) => any, parentClass?: any,\n additionalProcessing?: (target: any, name: string, ...args: any[]) => void): any {\n return noSideEffects(() => {\n const metaCtor = makeMetadataCtor(props);\n\n function PropDecoratorFactory(this: unknown|typeof PropDecoratorFactory, ...args: any[]): any {\n if (this instanceof PropDecoratorFactory) {\n metaCtor.apply(this, args);\n return this;\n }\n\n const decoratorInstance = new (<any>PropDecoratorFactory)(...args);\n\n function PropDecorator(target: any, name: string) {\n const constructor = target.constructor;\n // Use of Object.defineProperty is important because it creates a non-enumerable property\n // which prevents the property from being copied during subclassing.\n const meta = constructor.hasOwnProperty(PROP_METADATA) ?\n (constructor as any)[PROP_METADATA] :\n Object.defineProperty(constructor, PROP_METADATA, {value: {}})[PROP_METADATA];\n meta[name] = meta.hasOwnProperty(name) && meta[name] || [];\n meta[name].unshift(decoratorInstance);\n\n if (additionalProcessing) additionalProcessing(target, name, ...args);\n }\n\n return PropDecorator;\n }\n\n if (parentClass) {\n PropDecoratorFactory.prototype = Object.create(parentClass.prototype);\n }\n\n PropDecoratorFactory.prototype.ngMetadataName = name;\n (<any>PropDecoratorFactory).annotationCls = PropDecoratorFactory;\n return PropDecoratorFactory;\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 {ɵɵinjectAttribute} from '../render3/instructions/di_attr';\nimport {makeParamDecorator} from '../util/decorators';\n\n\n/**\n * Type of the Attribute decorator / constructor function.\n *\n * @publicApi\n */\nexport interface AttributeDecorator {\n /**\n * Parameter decorator for a directive constructor that designates\n * a host-element attribute whose value is injected as a constant string literal.\n *\n * @usageNotes\n *\n * Suppose we have an `<input>` element and want to know its `type`.\n *\n * ```html\n * <input type=\"text\">\n * ```\n *\n * The following example uses the decorator to inject the string literal `text` in a directive.\n *\n * {@example core/ts/metadata/metadata.ts region='attributeMetadata'}\n *\n * The following example uses the decorator in a component constructor.\n *\n * {@example core/ts/metadata/metadata.ts region='attributeFactory'}\n *\n */\n (name: string): any;\n new(name: string): Attribute;\n}\n\n/**\n * Type of the Attribute metadata.\n *\n * @publicApi\n */\nexport interface Attribute {\n /**\n * The name of the attribute whose value can be injected.\n */\n attributeName: string;\n}\n\nfunction CREATE_ATTRIBUTE_DECORATOR__PRE_R3__(): AttributeDecorator {\n return makeParamDecorator('Attribute', (attributeName?: string) => ({attributeName}));\n}\n\nexport function CREATE_ATTRIBUTE_DECORATOR__POST_R3__(): AttributeDecorator {\n return makeParamDecorator(\n 'Attribute',\n (attributeName?: string) =>\n ({attributeName, __NG_ELEMENT_ID__: () => ɵɵinjectAttribute(attributeName!)}));\n}\n\nconst CREATE_ATTRIBUTE_DECORATOR_IMPL = CREATE_ATTRIBUTE_DECORATOR__PRE_R3__;\n\n/**\n * Attribute decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Attribute: AttributeDecorator = CREATE_ATTRIBUTE_DECORATOR_IMPL();\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {assertLessThan} from '../util/assert';\n\nimport {ɵɵdefineInjectable} from './interface/defs';\n\n/**\n * Creates a token that can be used in a DI Provider.\n *\n * Use an `InjectionToken` whenever the type you are injecting is not reified (does not have a\n * runtime representation) such as when injecting an interface, callable type, array or\n * parameterized type.\n *\n * `InjectionToken` is parameterized on `T` which is the type of object which will be returned by\n * the `Injector`. This provides an additional level of type safety.\n *\n * ```\n * interface MyInterface {...}\n * const myInterface = injector.get(new InjectionToken<MyInterface>('SomeToken'));\n * // myInterface is inferred to be MyInterface.\n * ```\n *\n * When creating an `InjectionToken`, you can optionally specify a factory function which returns\n * (possibly by creating) a default value of the parameterized type `T`. This sets up the\n * `InjectionToken` using this factory as a provider as if it was defined explicitly in the\n * application's root injector. If the factory function, which takes zero arguments, needs to inject\n * dependencies, it can do so using the `inject` function.\n * As you can see in the Tree-shakable InjectionToken example below.\n *\n * Additionally, if a `factory` is specified you can also specify the `providedIn` option, which\n * overrides the above behavior and marks the token as belonging to a particular `@NgModule`. As\n * mentioned above, `'root'` is the default value for `providedIn`.\n *\n * @usageNotes\n * ### Basic Examples\n *\n * ### Plain InjectionToken\n *\n * {@example core/di/ts/injector_spec.ts region='InjectionToken'}\n *\n * ### Tree-shakable InjectionToken\n *\n * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}\n *\n *\n * @publicApi\n */\nexport class InjectionToken<T> {\n /** @internal */\n readonly ngMetadataName = 'InjectionToken';\n\n readonly ɵprov: unknown;\n\n /**\n * @param _desc Description for the token,\n * used only for debugging purposes,\n * it should but does not need to be unique\n * @param options Options for the token's usage, as described above\n */\n constructor(protected _desc: string, options?: {\n providedIn?: Type<any>|'root'|'platform'|'any'|null, factory: () => T\n }) {\n this.ɵprov = undefined;\n if (typeof options == 'number') {\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n assertLessThan(options, 0, 'Only negative numbers are supported here');\n // This is a special hack to assign __NG_ELEMENT_ID__ to this instance.\n // See `InjectorMarkers`\n (this as any).__NG_ELEMENT_ID__ = options;\n } else if (options !== undefined) {\n this.ɵprov = ɵɵdefineInjectable({\n token: this,\n providedIn: options.providedIn || 'root',\n factory: options.factory,\n });\n }\n }\n\n toString(): string {\n return `InjectionToken ${this._desc}`;\n }\n}\n\nexport interface InjectableDefToken<T> extends InjectionToken<T> {\n ɵprov: unknown;\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 {InjectionToken} from '../di/injection_token';\nimport {ProviderToken} from '../di/provider_token';\nimport {makePropDecorator} from '../util/decorators';\n\n/**\n * A DI token that you can use to create a virtual [provider](guide/glossary#provider)\n * that will populate the `entryComponents` field of components and NgModules\n * based on its `useValue` property value.\n * All components that are referenced in the `useValue` value (either directly\n * or in a nested array or map) are added to the `entryComponents` property.\n *\n * @usageNotes\n *\n * The following example shows how the router can populate the `entryComponents`\n * field of an NgModule based on a router configuration that refers\n * to components.\n *\n * ```typescript\n * // helper function inside the router\n * function provideRoutes(routes) {\n * return [\n * {provide: ROUTES, useValue: routes},\n * {provide: ANALYZE_FOR_ENTRY_COMPONENTS, useValue: routes, multi: true}\n * ];\n * }\n *\n * // user code\n * let routes = [\n * {path: '/root', component: RootComp},\n * {path: '/teams', component: TeamsComp}\n * ];\n *\n * @NgModule({\n * providers: [provideRoutes(routes)]\n * })\n * class ModuleWithRoutes {}\n * ```\n *\n * @publicApi\n * @deprecated Since 9.0.0. With Ivy, this property is no longer necessary.\n */\nexport const ANALYZE_FOR_ENTRY_COMPONENTS = new InjectionToken<any>('AnalyzeForEntryComponents');\n\n/**\n * Type of the `Attribute` decorator / constructor function.\n *\n * @publicApi\n */\nexport interface AttributeDecorator {\n /**\n * Specifies that a constant attribute value should be injected.\n *\n * The directive can inject constant string literals of host element attributes.\n *\n * @usageNotes\n *\n * Suppose we have an `<input>` element and want to know its `type`.\n *\n * ```html\n * <input type=\"text\">\n * ```\n *\n * A decorator can inject string literal `text` as in the following example.\n *\n * {@example core/ts/metadata/metadata.ts region='attributeMetadata'}\n *\n * @publicApi\n */\n (name: string): any;\n new(name: string): Attribute;\n}\n\n\n/**\n * Type of the Attribute metadata.\n *\n * @publicApi\n */\nexport interface Attribute {\n /**\n * The name of the attribute to be injected into the constructor.\n */\n attributeName?: string;\n}\n\n/**\n * Type of the Query metadata.\n *\n * @publicApi\n */\nexport interface Query {\n descendants: boolean;\n emitDistinctChangesOnly: boolean;\n first: boolean;\n read: any;\n isViewQuery: boolean;\n selector: any;\n static?: boolean;\n}\n\n// Stores the default value of `emitDistinctChangesOnly` when the `emitDistinctChangesOnly` is not\n// explicitly set.\nexport const emitDistinctChangesOnlyDefaultValue = true;\n\n\n/**\n * Base class for query metadata.\n *\n * @see `ContentChildren`.\n * @see `ContentChild`.\n * @see `ViewChildren`.\n * @see `ViewChild`.\n *\n * @publicApi\n */\nexport abstract class Query {}\n\n/**\n * Type of the ContentChildren decorator / constructor function.\n *\n * @see `ContentChildren`.\n * @publicApi\n */\nexport interface ContentChildrenDecorator {\n /**\n * @description\n * Property decorator that configures a content query.\n *\n * Use to get the `QueryList` of elements or directives from the content DOM.\n * Any time a child element is added, removed, or moved, the query list will be\n * updated, and the changes observable of the query list will emit a new value.\n *\n * Content queries are set before the `ngAfterContentInit` callback is called.\n *\n * Does not retrieve elements or directives that are in other components' templates,\n * since a component's template is always a black box to its ancestors.\n *\n * **Metadata Properties**:\n *\n * * **selector** - The directive type or the name used for querying.\n * * **descendants** - If `true` include all descendants of the element. If `false` then only\n * query direct children of the element.\n * * **emitDistinctChangesOnly** - The ` QueryList#changes` observable will emit new values only\n * if the QueryList result has changed. When `false` the `changes` observable might emit even\n * if the QueryList has not changed.\n * ** Note: *** This config option is **deprecated**, it will be permanently set to `true` and\n * removed in future versions of Angular.\n * * **read** - Used to read a different token from the queried elements.\n *\n * The following selectors are supported.\n * * Any class with the `@Component` or `@Directive` decorator\n * * A template reference variable as a string (e.g. query `<my-component #cmp></my-component>`\n * with `@ContentChildren('cmp')`)\n * * Any provider defined in the child component tree of the current component (e.g.\n * `@ContentChildren(SomeService) someService: SomeService`)\n * * Any provider defined through a string token (e.g. `@ContentChildren('someToken')\n * someTokenVal: any`)\n * * A `TemplateRef` (e.g. query `<ng-template></ng-template>` with\n * `@ContentChildren(TemplateRef) template;`)\n *\n * In addition, multiple string selectors can be separated with a comma (e.g.\n * `@ContentChildren('cmp1,cmp2')`)\n *\n * The following values are supported by `read`:\n * * Any class with the `@Component` or `@Directive` decorator\n * * Any provider defined on the injector of the component that is matched by the `selector` of\n * this query\n * * Any provider defined through a string token (e.g. `{provide: 'token', useValue: 'val'}`)\n * * `TemplateRef`, `ElementRef`, and `ViewContainerRef`\n *\n * @usageNotes\n *\n * Here is a simple demonstration of how the `ContentChildren` decorator can be used.\n *\n * {@example core/di/ts/contentChildren/content_children_howto.ts region='HowTo'}\n *\n * ### Tab-pane example\n *\n * Here is a slightly more realistic example that shows how `ContentChildren` decorators\n * can be used to implement a tab pane component.\n *\n * {@example core/di/ts/contentChildren/content_children_example.ts region='Component'}\n *\n * @Annotation\n */\n (selector: ProviderToken<unknown>|Function|string, opts?: {\n descendants?: boolean,\n emitDistinctChangesOnly?: boolean,\n read?: any,\n }): any;\n new(selector: ProviderToken<unknown>|Function|string,\n opts?: {descendants?: boolean, emitDistinctChangesOnly?: boolean, read?: any}): Query;\n}\n\n/**\n * Type of the ContentChildren metadata.\n *\n *\n * @Annotation\n * @publicApi\n */\nexport type ContentChildren = Query;\n\n/**\n * ContentChildren decorator and metadata.\n *\n *\n * @Annotation\n * @publicApi\n */\nexport const ContentChildren: ContentChildrenDecorator = makePropDecorator(\n 'ContentChildren', (selector?: any, data: any = {}) => ({\n selector,\n first: false,\n isViewQuery: false,\n descendants: false,\n emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue,\n ...data\n }),\n Query);\n\n/**\n * Type of the ContentChild decorator / constructor function.\n *\n * @publicApi\n */\nexport interface ContentChildDecorator {\n /**\n * @description\n * Property decorator that configures a content query.\n *\n * Use to get the first element or the directive matching the selector from the content DOM.\n * If the content DOM changes, and a new child matches the selector,\n * the property will be updated.\n *\n * Content queries are set before the `ngAfterContentInit` callback is called.\n *\n * Does not retrieve elements or directives that are in other components' templates,\n * since a component's template is always a black box to its ancestors.\n *\n * **Metadata Properties**:\n *\n * * **selector** - The directive type or the name used for querying.\n * * **read** - Used to read a different token from the queried element.\n * * **static** - True to resolve query results before change detection runs,\n * false to resolve after change detection. Defaults to false.\n *\n * The following selectors are supported.\n * * Any class with the `@Component` or `@Directive` decorator\n * * A template reference variable as a string (e.g. query `<my-component #cmp></my-component>`\n * with `@ContentChild('cmp')`)\n * * Any provider defined in the child component tree of the current component (e.g.\n * `@ContentChild(SomeService) someService: SomeService`)\n * * Any provider defined through a string token (e.g. `@ContentChild('someToken') someTokenVal:\n * any`)\n * * A `TemplateRef` (e.g. query `<ng-template></ng-template>` with `@ContentChild(TemplateRef)\n * template;`)\n *\n * The following values are supported by `read`:\n * * Any class with the `@Component` or `@Directive` decorator\n * * Any provider defined on the injector of the component that is matched by the `selector` of\n * this query\n * * Any provider defined through a string token (e.g. `{provide: 'token', useValue: 'val'}`)\n * * `TemplateRef`, `ElementRef`, and `ViewContainerRef`\n *\n * @usageNotes\n *\n * {@example core/di/ts/contentChild/content_child_howto.ts region='HowTo'}\n *\n * ### Example\n *\n * {@example core/di/ts/contentChild/content_child_example.ts region='Component'}\n *\n * @Annotation\n */\n (selector: ProviderToken<unknown>|Function|string, opts?: {read?: any, static?: boolean}): any;\n new(selector: ProviderToken<unknown>|Function|string,\n opts?: {read?: any, static?: boolean}): ContentChild;\n}\n\n/**\n * Type of the ContentChild metadata.\n *\n * @publicApi\n */\nexport type ContentChild = Query;\n\n/**\n * ContentChild decorator and metadata.\n *\n *\n * @Annotation\n *\n * @publicApi\n */\nexport const ContentChild: ContentChildDecorator = makePropDecorator(\n 'ContentChild',\n (selector?: any, data: any = {}) =>\n ({selector, first: true, isViewQuery: false, descendants: true, ...data}),\n Query);\n\n/**\n * Type of the ViewChildren decorator / constructor function.\n *\n * @see `ViewChildren`.\n *\n * @publicApi\n */\nexport interface ViewChildrenDecorator {\n /**\n * @description\n * Property decorator that configures a view query.\n *\n * Use to get the `QueryList` of elements or directives from the view DOM.\n * Any time a child element is added, removed, or moved, the query list will be updated,\n * and the changes observable of the query list will emit a new value.\n *\n * View queries are set before the `ngAfterViewInit` callback is called.\n *\n * **Metadata Properties**:\n *\n * * **selector** - The directive type or the name used for querying.\n * * **read** - Used to read a different token from the queried elements.\n * * **emitDistinctChangesOnly** - The ` QueryList#changes` observable will emit new values only\n * if the QueryList result has changed. When `false` the `changes` observable might emit even\n * if the QueryList has not changed.\n * ** Note: *** This config option is **deprecated**, it will be permanently set to `true` and\n * removed in future versions of Angular.\n *\n * The following selectors are supported.\n * * Any class with the `@Component` or `@Directive` decorator\n * * A template reference variable as a string (e.g. query `<my-component #cmp></my-component>`\n * with `@ViewChildren('cmp')`)\n * * Any provider defined in the child component tree of the current component (e.g.\n * `@ViewChildren(SomeService) someService!: SomeService`)\n * * Any provider defined through a string token (e.g. `@ViewChildren('someToken')\n * someTokenVal!: any`)\n * * A `TemplateRef` (e.g. query `<ng-template></ng-template>` with `@ViewChildren(TemplateRef)\n * template;`)\n *\n * In addition, multiple string selectors can be separated with a comma (e.g.\n * `@ViewChildren('cmp1,cmp2')`)\n *\n * The following values are supported by `read`:\n * * Any class with the `@Component` or `@Directive` decorator\n * * Any provider defined on the injector of the component that is matched by the `selector` of\n * this query\n * * Any provider defined through a string token (e.g. `{provide: 'token', useValue: 'val'}`)\n * * `TemplateRef`, `ElementRef`, and `ViewContainerRef`\n *\n * @usageNotes\n *\n * {@example core/di/ts/viewChildren/view_children_howto.ts region='HowTo'}\n *\n * ### Another example\n *\n * {@example core/di/ts/viewChildren/view_children_example.ts region='Component'}\n *\n * @Annotation\n */\n (selector: ProviderToken<unknown>|Function|string,\n opts?: {read?: any, emitDistinctChangesOnly?: boolean}): any;\n new(selector: ProviderToken<unknown>|Function|string,\n opts?: {read?: any, emitDistinctChangesOnly?: boolean}): ViewChildren;\n}\n\n/**\n * Type of the ViewChildren metadata.\n *\n * @publicApi\n */\nexport type ViewChildren = Query;\n\n/**\n * ViewChildren decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const ViewChildren: ViewChildrenDecorator = makePropDecorator(\n 'ViewChildren', (selector?: any, data: any = {}) => ({\n selector,\n first: false,\n isViewQuery: true,\n descendants: true,\n emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue,\n ...data\n }),\n Query);\n\n/**\n * Type of the ViewChild decorator / constructor function.\n *\n * @see `ViewChild`.\n * @publicApi\n */\nexport interface ViewChildDecorator {\n /**\n * @description\n * Property decorator that configures a view query.\n * The change detector looks for the first element or the directive matching the selector\n * in the view DOM. If the view DOM changes, and a new child matches the selector,\n * the property is updated.\n *\n * View queries are set before the `ngAfterViewInit` callback is called.\n *\n * **Metadata Properties**:\n *\n * * **selector** - The directive type or the name used for querying.\n * * **read** - Used to read a different token from the queried elements.\n * * **static** - True to resolve query results before change detection runs,\n * false to resolve after change detection. Defaults to false.\n *\n *\n * The following selectors are supported.\n * * Any class with the `@Component` or `@Directive` decorator\n * * A template reference variable as a string (e.g. query `<my-component #cmp></my-component>`\n * with `@ViewChild('cmp')`)\n * * Any provider defined in the child component tree of the current component (e.g.\n * `@ViewChild(SomeService) someService: SomeService`)\n * * Any provider defined through a string token (e.g. `@ViewChild('someToken') someTokenVal:\n * any`)\n * * A `TemplateRef` (e.g. query `<ng-template></ng-template>` with `@ViewChild(TemplateRef)\n * template;`)\n *\n * The following values are supported by `read`:\n * * Any class with the `@Component` or `@Directive` decorator\n * * Any provider defined on the injector of the component that is matched by the `selector` of\n * this query\n * * Any provider defined through a string token (e.g. `{provide: 'token', useValue: 'val'}`)\n * * `TemplateRef`, `ElementRef`, and `ViewContainerRef`\n *\n * @usageNotes\n *\n * {@example core/di/ts/viewChild/view_child_example.ts region='Component'}\n *\n * ### Example 2\n *\n * {@example core/di/ts/viewChild/view_child_howto.ts region='HowTo'}\n *\n * @Annotation\n */\n (selector: ProviderToken<unknown>|Function|string, opts?: {read?: any, static?: boolean}): any;\n new(selector: ProviderToken<unknown>|Function|string,\n opts?: {read?: any, static?: boolean}): ViewChild;\n}\n\n/**\n * Type of the ViewChild metadata.\n *\n * @publicApi\n */\nexport type ViewChild = Query;\n\n/**\n * ViewChild decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const ViewChild: ViewChildDecorator = makePropDecorator(\n 'ViewChild',\n (selector: any, data: any) =>\n ({selector, first: true, isViewQuery: true, descendants: true, ...data}),\n Query);\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/**\n * A set of interfaces which are shared between `@angular/core` and `@angular/compiler` to allow\n * for late binding of `@angular/compiler` for JIT purposes.\n *\n * This file has two copies. Please ensure that they are in sync:\n * - packages/compiler/src/compiler_facade_interface.ts (main)\n * - packages/core/src/compiler/compiler_facade_interface.ts (replica)\n *\n * Please ensure that the two files are in sync using this command:\n * ```\n * cp packages/compiler/src/compiler_facade_interface.ts \\\n * packages/core/src/compiler/compiler_facade_interface.ts\n * ```\n */\n\nexport interface ExportedCompilerFacade {\n ɵcompilerFacade: CompilerFacade;\n}\n\nexport interface CompilerFacade {\n compilePipe(angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3PipeMetadataFacade):\n any;\n compilePipeDeclaration(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string, declaration: R3DeclarePipeFacade): any;\n compileInjectable(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3InjectableMetadataFacade): any;\n compileInjectableDeclaration(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3DeclareInjectableFacade): any;\n compileInjector(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3InjectorMetadataFacade): any;\n compileInjectorDeclaration(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string,\n declaration: R3DeclareInjectorFacade): any;\n compileNgModule(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3NgModuleMetadataFacade): any;\n compileNgModuleDeclaration(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string,\n declaration: R3DeclareNgModuleFacade): any;\n compileDirective(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3DirectiveMetadataFacade): any;\n compileDirectiveDeclaration(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string,\n declaration: R3DeclareDirectiveFacade): any;\n compileComponent(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3ComponentMetadataFacade): any;\n compileComponentDeclaration(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string,\n declaration: R3DeclareComponentFacade): any;\n compileFactory(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3FactoryDefMetadataFacade): any;\n compileFactoryDeclaration(\n angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3DeclareFactoryFacade): any;\n\n createParseSourceSpan(kind: string, typeName: string, sourceUrl: string): ParseSourceSpan;\n\n FactoryTarget: typeof FactoryTarget;\n // Note that we do not use `{new(): ResourceLoader}` here because\n // the resource loader class is abstract and not constructable.\n ResourceLoader: Function&{prototype: ResourceLoader};\n}\n\nexport interface CoreEnvironment {\n [name: string]: Function;\n}\n\nexport type ResourceLoader = {\n get(url: string): Promise<string>|string;\n};\n\nexport type StringMap = {\n [key: string]: string;\n};\n\nexport type StringMapWithRename = {\n [key: string]: string|[string, string];\n};\n\nexport type Provider = unknown;\nexport type Type = Function;\nexport type OpaqueValue = unknown;\n\nexport enum FactoryTarget {\n Directive = 0,\n Component = 1,\n Injectable = 2,\n Pipe = 3,\n NgModule = 4,\n}\n\nexport interface R3DependencyMetadataFacade {\n token: OpaqueValue;\n attribute: string|null;\n host: boolean;\n optional: boolean;\n self: boolean;\n skipSelf: boolean;\n}\n\nexport interface R3DeclareDependencyMetadataFacade {\n token: OpaqueValue;\n attribute?: boolean;\n host?: boolean;\n optional?: boolean;\n self?: boolean;\n skipSelf?: boolean;\n}\n\nexport interface R3PipeMetadataFacade {\n name: string;\n type: Type;\n pipeName: string;\n pure: boolean;\n}\n\nexport interface R3InjectableMetadataFacade {\n name: string;\n type: Type;\n typeArgumentCount: number;\n providedIn?: Type|'root'|'platform'|'any'|null;\n useClass?: OpaqueValue;\n useFactory?: OpaqueValue;\n useExisting?: OpaqueValue;\n useValue?: OpaqueValue;\n deps?: R3DependencyMetadataFacade[];\n}\n\nexport interface R3NgModuleMetadataFacade {\n type: Type;\n bootstrap: Function[];\n declarations: Function[];\n imports: Function[];\n exports: Function[];\n schemas: {name: string}[]|null;\n id: string|null;\n}\n\nexport interface R3InjectorMetadataFacade {\n name: string;\n type: Type;\n providers: Provider[];\n imports: OpaqueValue[];\n}\n\nexport interface R3DirectiveMetadataFacade {\n name: string;\n type: Type;\n typeSourceSpan: ParseSourceSpan;\n selector: string|null;\n queries: R3QueryMetadataFacade[];\n host: {[key: string]: string};\n propMetadata: {[key: string]: OpaqueValue[]};\n lifecycle: {usesOnChanges: boolean;};\n inputs: string[];\n outputs: string[];\n usesInheritance: boolean;\n exportAs: string[]|null;\n providers: Provider[]|null;\n viewQueries: R3QueryMetadataFacade[];\n}\n\nexport interface R3ComponentMetadataFacade extends R3DirectiveMetadataFacade {\n template: string;\n preserveWhitespaces: boolean;\n animations: OpaqueValue[]|undefined;\n pipes: Map<string, any>;\n directives: R3UsedDirectiveMetadata[];\n styles: string[];\n encapsulation: ViewEncapsulation;\n viewProviders: Provider[]|null;\n interpolation?: [string, string];\n changeDetection?: ChangeDetectionStrategy;\n}\n\nexport interface R3DeclareDirectiveFacade {\n selector?: string;\n type: Type;\n inputs?: {[classPropertyName: string]: string|[string, string]};\n outputs?: {[classPropertyName: string]: string};\n host?: {\n attributes?: {[key: string]: OpaqueValue};\n listeners?: {[key: string]: string};\n properties?: {[key: string]: string};\n classAttribute?: string;\n styleAttribute?: string;\n };\n queries?: R3DeclareQueryMetadataFacade[];\n viewQueries?: R3DeclareQueryMetadataFacade[];\n providers?: OpaqueValue;\n exportAs?: string[];\n usesInheritance?: boolean;\n usesOnChanges?: boolean;\n}\n\nexport interface R3DeclareComponentFacade extends R3DeclareDirectiveFacade {\n template: string;\n isInline?: boolean;\n styles?: string[];\n components?: R3DeclareUsedDirectiveFacade[];\n directives?: R3DeclareUsedDirectiveFacade[];\n pipes?: {[pipeName: string]: OpaqueValue|(() => OpaqueValue)};\n viewProviders?: OpaqueValue;\n animations?: OpaqueValue;\n changeDetection?: ChangeDetectionStrategy;\n encapsulation?: ViewEncapsulation;\n interpolation?: [string, string];\n preserveWhitespaces?: boolean;\n}\n\nexport interface R3DeclareUsedDirectiveFacade {\n selector: string;\n type: OpaqueValue|(() => OpaqueValue);\n inputs?: string[];\n outputs?: string[];\n exportAs?: string[];\n}\n\nexport interface R3UsedDirectiveMetadata {\n selector: string;\n inputs: string[];\n outputs: string[];\n exportAs: string[]|null;\n type: any;\n}\n\nexport interface R3FactoryDefMetadataFacade {\n name: string;\n type: Type;\n typeArgumentCount: number;\n deps: R3DependencyMetadataFacade[]|null;\n target: FactoryTarget;\n}\n\nexport interface R3DeclareFactoryFacade {\n type: Type;\n deps: R3DeclareDependencyMetadataFacade[]|'invalid'|null;\n target: FactoryTarget;\n}\n\nexport interface R3DeclareInjectableFacade {\n type: Type;\n providedIn?: Type|'root'|'platform'|'any'|null;\n useClass?: OpaqueValue;\n useFactory?: OpaqueValue;\n useExisting?: OpaqueValue;\n useValue?: OpaqueValue;\n deps?: R3DeclareDependencyMetadataFacade[];\n}\n\nexport enum ViewEncapsulation {\n Emulated = 0,\n // Historically the 1 value was for `Native` encapsulation which has been removed as of v11.\n None = 2,\n ShadowDom = 3\n}\n\nexport type ChangeDetectionStrategy = number;\n\nexport interface R3QueryMetadataFacade {\n propertyName: string;\n first: boolean;\n predicate: OpaqueValue|string[];\n descendants: boolean;\n emitDistinctChangesOnly: boolean;\n read: OpaqueValue|null;\n static: boolean;\n}\n\nexport interface R3DeclareQueryMetadataFacade {\n propertyName: string;\n first?: boolean;\n predicate: OpaqueValue|string[];\n descendants?: boolean;\n read?: OpaqueValue;\n static?: boolean;\n emitDistinctChangesOnly?: boolean;\n}\n\nexport interface R3DeclareInjectorFacade {\n type: Type;\n imports?: OpaqueValue[];\n providers?: OpaqueValue[];\n}\n\nexport interface R3DeclareNgModuleFacade {\n type: Type;\n bootstrap?: OpaqueValue[]|(() => OpaqueValue[]);\n declarations?: OpaqueValue[]|(() => OpaqueValue[]);\n imports?: OpaqueValue[]|(() => OpaqueValue[]);\n exports?: OpaqueValue[]|(() => OpaqueValue[]);\n schemas?: OpaqueValue[];\n id?: OpaqueValue;\n}\n\nexport interface R3DeclarePipeFacade {\n type: Type;\n name: string;\n pure?: boolean;\n}\n\nexport interface ParseSourceSpan {\n start: any;\n end: any;\n details: any;\n fullStart: any;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {global} from '../util/global';\nimport {CompilerFacade, ExportedCompilerFacade, Type} from './compiler_facade_interface';\nexport * from './compiler_facade_interface';\n\nexport const enum JitCompilerUsage {\n Decorator,\n PartialDeclaration,\n}\n\ninterface JitCompilerUsageRequest {\n usage: JitCompilerUsage;\n kind: 'directive'|'component'|'pipe'|'injectable'|'NgModule';\n type: Type;\n}\n\nexport function getCompilerFacade(request: JitCompilerUsageRequest): CompilerFacade {\n const globalNg: ExportedCompilerFacade = global['ng'];\n if (globalNg && globalNg.ɵcompilerFacade) {\n return globalNg.ɵcompilerFacade;\n }\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n // Log the type as an error so that a developer can easily navigate to the type from the\n // console.\n console.error(`JIT compilation failed for ${request.kind}`, request.type);\n\n let message = `The ${request.kind} '${\n request\n .type.name}' needs to be compiled using the JIT compiler, but '@angular/compiler' is not available.\\n\\n`;\n if (request.usage === JitCompilerUsage.PartialDeclaration) {\n message += `The ${request.kind} is part of a library that has been partially compiled.\\n`;\n message +=\n `However, the Angular Linker has not processed the library such that JIT compilation is used as fallback.\\n`;\n message += '\\n';\n message +=\n `Ideally, the library is processed using the Angular Linker to become fully AOT compiled.\\n`;\n } else {\n message +=\n `JIT compilation is discouraged for production use-cases! Consider using AOT mode instead.\\n`;\n }\n message +=\n `Alternatively, the JIT compiler should be loaded by bootstrapping using '@angular/platform-browser-dynamic' or '@angular/platform-server',\\n`;\n message +=\n `or manually provide the compiler with 'import \"@angular/compiler\";' before bootstrapping.`;\n throw new Error(message);\n } else {\n throw new Error('JIT compiler unavailable');\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 * @description\n *\n * Represents a type that a Component or other object is instances of.\n *\n * An example of a `Type` is `MyCustomComponent` class, which in JavaScript is represented by\n * the `MyCustomComponent` constructor function.\n *\n * @publicApi\n */\nexport const Type = Function;\n\nexport function isType(v: any): v is Type<any> {\n return typeof v === 'function';\n}\n\n/**\n * @description\n *\n * Represents an abstract class `T`, if applied to a concrete class it would stop being\n * instantiable.\n *\n * @publicApi\n */\nexport interface AbstractType<T> extends Function {\n prototype: T;\n}\n\nexport interface Type<T> extends Function {\n new(...args: any[]): T;\n}\n\nexport type Mutable<T extends {[x: string]: any}, K extends string> = {\n [P in K]: T[P];\n};\n\n/**\n * Returns a writable type version of type.\n *\n * USAGE:\n * Given:\n * ```\n * interface Person {readonly name: string}\n * ```\n *\n * We would like to get a read/write version of `Person`.\n * ```\n * const WritablePerson = Writable<Person>;\n * ```\n *\n * The result is that you can do:\n *\n * ```\n * const readonlyPerson: Person = {name: 'Marry'};\n * readonlyPerson.name = 'John'; // TypeError\n * (readonlyPerson as WritablePerson).name = 'John'; // OK\n *\n * // Error: Correctly detects that `Person` did not have `age` property.\n * (readonlyPerson as WritablePerson).age = 30;\n * ```\n */\nexport type Writable<T> = {\n -readonly[K in keyof T]: T[K];\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 {assertEqual, assertLessThanOrEqual} from './assert';\n\n/**\n * Equivalent to ES6 spread, add each item to an array.\n *\n * @param items The items to add\n * @param arr The array to which you want to add the items\n */\nexport function addAllToArray(items: any[], arr: any[]) {\n for (let i = 0; i < items.length; i++) {\n arr.push(items[i]);\n }\n}\n\n/**\n * Determines if the contents of two arrays is identical\n *\n * @param a first array\n * @param b second array\n * @param identityAccessor Optional function for extracting stable object identity from a value in\n * the array.\n */\nexport function arrayEquals<T>(a: T[], b: T[], identityAccessor?: (value: T) => unknown): boolean {\n if (a.length !== b.length) return false;\n for (let i = 0; i < a.length; i++) {\n let valueA = a[i];\n let valueB = b[i];\n if (identityAccessor) {\n valueA = identityAccessor(valueA) as any;\n valueB = identityAccessor(valueB) as any;\n }\n if (valueB !== valueA) {\n return false;\n }\n }\n return true;\n}\n\n\n/**\n * Flattens an array.\n */\nexport function flatten(list: any[], dst?: any[]): any[] {\n if (dst === undefined) dst = list;\n for (let i = 0; i < list.length; i++) {\n let item = list[i];\n if (Array.isArray(item)) {\n // we need to inline it.\n if (dst === list) {\n // Our assumption that the list was already flat was wrong and\n // we need to clone flat since we need to write to it.\n dst = list.slice(0, i);\n }\n flatten(item, dst);\n } else if (dst !== list) {\n dst.push(item);\n }\n }\n return dst;\n}\n\nexport function deepForEach<T>(input: (T|any[])[], fn: (value: T) => void): void {\n input.forEach(value => Array.isArray(value) ? deepForEach(value, fn) : fn(value));\n}\n\nexport function addToArray(arr: any[], index: number, value: any): void {\n // perf: array.push is faster than array.splice!\n if (index >= arr.length) {\n arr.push(value);\n } else {\n arr.splice(index, 0, value);\n }\n}\n\nexport function removeFromArray(arr: any[], index: number): any {\n // perf: array.pop is faster than array.splice!\n if (index >= arr.length - 1) {\n return arr.pop();\n } else {\n return arr.splice(index, 1)[0];\n }\n}\n\nexport function newArray<T = any>(size: number): T[];\nexport function newArray<T>(size: number, value: T): T[];\nexport function newArray<T>(size: number, value?: T): T[] {\n const list: T[] = [];\n for (let i = 0; i < size; i++) {\n list.push(value!);\n }\n return list;\n}\n\n/**\n * Remove item from array (Same as `Array.splice()` but faster.)\n *\n * `Array.splice()` is not as fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * https://jsperf.com/fast-array-splice (About 20x faster)\n *\n * @param array Array to splice\n * @param index Index of element in array to remove.\n * @param count Number of items to remove.\n */\nexport function arraySplice(array: any[], index: number, count: number): void {\n const length = array.length - count;\n while (index < length) {\n array[index] = array[index + count];\n index++;\n }\n while (count--) {\n array.pop(); // shrink the array\n }\n}\n\n/**\n * Same as `Array.splice(index, 0, value)` but faster.\n *\n * `Array.splice()` is not fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * @param array Array to splice.\n * @param index Index in array where the `value` should be added.\n * @param value Value to add to array.\n */\nexport function arrayInsert(array: any[], index: number, value: any): void {\n ngDevMode && assertLessThanOrEqual(index, array.length, 'Can\\'t insert past array end.');\n let end = array.length;\n while (end > index) {\n const previousEnd = end - 1;\n array[end] = array[previousEnd];\n end = previousEnd;\n }\n array[index] = value;\n}\n\n/**\n * Same as `Array.splice2(index, 0, value1, value2)` but faster.\n *\n * `Array.splice()` is not fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * @param array Array to splice.\n * @param index Index in array where the `value` should be added.\n * @param value1 Value to add to array.\n * @param value2 Value to add to array.\n */\nexport function arrayInsert2(array: any[], index: number, value1: any, value2: any): void {\n ngDevMode && assertLessThanOrEqual(index, array.length, 'Can\\'t insert past array end.');\n let end = array.length;\n if (end == index) {\n // inserting at the end.\n array.push(value1, value2);\n } else if (end === 1) {\n // corner case when we have less items in array than we have items to insert.\n array.push(value2, array[0]);\n array[0] = value1;\n } else {\n end--;\n array.push(array[end - 1], array[end]);\n while (end > index) {\n const previousEnd = end - 2;\n array[end] = array[previousEnd];\n end--;\n }\n array[index] = value1;\n array[index + 1] = value2;\n }\n}\n\n/**\n * Insert a `value` into an `array` so that the array remains sorted.\n *\n * NOTE:\n * - Duplicates are not allowed, and are ignored.\n * - This uses binary search algorithm for fast inserts.\n *\n * @param array A sorted array to insert into.\n * @param value The value to insert.\n * @returns index of the inserted value.\n */\nexport function arrayInsertSorted(array: string[], value: string): number {\n let index = arrayIndexOfSorted(array, value);\n if (index < 0) {\n // if we did not find it insert it.\n index = ~index;\n arrayInsert(array, index, value);\n }\n return index;\n}\n\n/**\n * Remove `value` from a sorted `array`.\n *\n * NOTE:\n * - This uses binary search algorithm for fast removals.\n *\n * @param array A sorted array to remove from.\n * @param value The value to remove.\n * @returns index of the removed value.\n * - positive index if value found and removed.\n * - negative index if value not found. (`~index` to get the value where it should have been\n * inserted)\n */\nexport function arrayRemoveSorted(array: string[], value: string): number {\n const index = arrayIndexOfSorted(array, value);\n if (index >= 0) {\n arraySplice(array, index, 1);\n }\n return index;\n}\n\n\n/**\n * Get an index of an `value` in a sorted `array`.\n *\n * NOTE:\n * - This uses binary search algorithm for fast removals.\n *\n * @param array A sorted array to binary search.\n * @param value The value to look for.\n * @returns index of the value.\n * - positive index if value found.\n * - negative index if value not found. (`~index` to get the value where it should have been\n * located)\n */\nexport function arrayIndexOfSorted(array: string[], value: string): number {\n return _arrayIndexOfSorted(array, value, 0);\n}\n\n\n/**\n * `KeyValueArray` is an array where even positions contain keys and odd positions contain values.\n *\n * `KeyValueArray` provides a very efficient way of iterating over its contents. For small\n * sets (~10) the cost of binary searching an `KeyValueArray` has about the same performance\n * characteristics that of a `Map` with significantly better memory footprint.\n *\n * If used as a `Map` the keys are stored in alphabetical order so that they can be binary searched\n * for retrieval.\n *\n * See: `keyValueArraySet`, `keyValueArrayGet`, `keyValueArrayIndexOf`, `keyValueArrayDelete`.\n */\nexport interface KeyValueArray<VALUE> extends Array<VALUE|string> {\n __brand__: 'array-map';\n}\n\n/**\n * Set a `value` for a `key`.\n *\n * @param keyValueArray to modify.\n * @param key The key to locate or create.\n * @param value The value to set for a `key`.\n * @returns index (always even) of where the value vas set.\n */\nexport function keyValueArraySet<V>(\n keyValueArray: KeyValueArray<V>, key: string, value: V): number {\n let index = keyValueArrayIndexOf(keyValueArray, key);\n if (index >= 0) {\n // if we found it set it.\n keyValueArray[index | 1] = value;\n } else {\n index = ~index;\n arrayInsert2(keyValueArray, index, key, value);\n }\n return index;\n}\n\n/**\n * Retrieve a `value` for a `key` (on `undefined` if not found.)\n *\n * @param keyValueArray to search.\n * @param key The key to locate.\n * @return The `value` stored at the `key` location or `undefined if not found.\n */\nexport function keyValueArrayGet<V>(keyValueArray: KeyValueArray<V>, key: string): V|undefined {\n const index = keyValueArrayIndexOf(keyValueArray, key);\n if (index >= 0) {\n // if we found it retrieve it.\n return keyValueArray[index | 1] as V;\n }\n return undefined;\n}\n\n/**\n * Retrieve a `key` index value in the array or `-1` if not found.\n *\n * @param keyValueArray to search.\n * @param key The key to locate.\n * @returns index of where the key is (or should have been.)\n * - positive (even) index if key found.\n * - negative index if key not found. (`~index` (even) to get the index where it should have\n * been inserted.)\n */\nexport function keyValueArrayIndexOf<V>(keyValueArray: KeyValueArray<V>, key: string): number {\n return _arrayIndexOfSorted(keyValueArray as string[], key, 1);\n}\n\n/**\n * Delete a `key` (and `value`) from the `KeyValueArray`.\n *\n * @param keyValueArray to modify.\n * @param key The key to locate or delete (if exist).\n * @returns index of where the key was (or should have been.)\n * - positive (even) index if key found and deleted.\n * - negative index if key not found. (`~index` (even) to get the index where it should have\n * been.)\n */\nexport function keyValueArrayDelete<V>(keyValueArray: KeyValueArray<V>, key: string): number {\n const index = keyValueArrayIndexOf(keyValueArray, key);\n if (index >= 0) {\n // if we found it remove it.\n arraySplice(keyValueArray, index, 2);\n }\n return index;\n}\n\n\n/**\n * INTERNAL: Get an index of an `value` in a sorted `array` by grouping search by `shift`.\n *\n * NOTE:\n * - This uses binary search algorithm for fast removals.\n *\n * @param array A sorted array to binary search.\n * @param value The value to look for.\n * @param shift grouping shift.\n * - `0` means look at every location\n * - `1` means only look at every other (even) location (the odd locations are to be ignored as\n * they are values.)\n * @returns index of the value.\n * - positive index if value found.\n * - negative index if value not found. (`~index` to get the value where it should have been\n * inserted)\n */\nfunction _arrayIndexOfSorted(array: string[], value: string, shift: number): number {\n ngDevMode && assertEqual(Array.isArray(array), true, 'Expecting an array');\n let start = 0;\n let end = array.length >> shift;\n while (end !== start) {\n const middle = start + ((end - start) >> 1); // find the middle.\n const current = array[middle << shift];\n if (value === current) {\n return (middle << shift);\n } else if (current > value) {\n end = middle;\n } else {\n start = middle + 1; // We already searched middle so make it non-inclusive by adding 1\n }\n }\n return ~(end << shift);\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 {isType, Type} from '../interface/type';\nimport {newArray} from '../util/array_utils';\nimport {ANNOTATIONS, PARAMETERS, PROP_METADATA} from '../util/decorators';\nimport {global} from '../util/global';\nimport {stringify} from '../util/stringify';\n\nimport {PlatformReflectionCapabilities} from './platform_reflection_capabilities';\nimport {GetterFn, MethodFn, SetterFn} from './types';\n\n\n\n/*\n * #########################\n * Attention: These Regular expressions have to hold even if the code is minified!\n * ##########################\n */\n\n/**\n * Regular expression that detects pass-through constructors for ES5 output. This Regex\n * intends to capture the common delegation pattern emitted by TypeScript and Babel. Also\n * it intends to capture the pattern where existing constructors have been downleveled from\n * ES2015 to ES5 using TypeScript w/ downlevel iteration. e.g.\n *\n * ```\n * function MyClass() {\n * var _this = _super.apply(this, arguments) || this;\n * ```\n *\n * downleveled to ES5 with `downlevelIteration` for TypeScript < 4.2:\n * ```\n * function MyClass() {\n * var _this = _super.apply(this, __spread(arguments)) || this;\n * ```\n *\n * or downleveled to ES5 with `downlevelIteration` for TypeScript >= 4.2:\n * ```\n * function MyClass() {\n * var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;\n * ```\n *\n * More details can be found in: https://github.com/angular/angular/issues/38453.\n */\nexport const ES5_DELEGATE_CTOR =\n /^function\\s+\\S+\\(\\)\\s*{[\\s\\S]+\\.apply\\(this,\\s*(arguments|(?:[^()]+\\(\\[\\],)?[^()]+\\(arguments\\))\\)/;\n/** Regular expression that detects ES2015 classes which extend from other classes. */\nexport const ES2015_INHERITED_CLASS = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{/;\n/**\n * Regular expression that detects ES2015 classes which extend from other classes and\n * have an explicit constructor defined.\n */\nexport const ES2015_INHERITED_CLASS_WITH_CTOR =\n /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{[\\s\\S]*constructor\\s*\\(/;\n/**\n * Regular expression that detects ES2015 classes which extend from other classes\n * and inherit a constructor.\n */\nexport const ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR =\n /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{[\\s\\S]*constructor\\s*\\(\\)\\s*{\\s*super\\(\\.\\.\\.arguments\\)/;\n\n/**\n * Determine whether a stringified type is a class which delegates its constructor\n * to its parent.\n *\n * This is not trivial since compiled code can actually contain a constructor function\n * even if the original source code did not. For instance, when the child class contains\n * an initialized instance property.\n */\nexport function isDelegateCtor(typeStr: string): boolean {\n return ES5_DELEGATE_CTOR.test(typeStr) ||\n ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR.test(typeStr) ||\n (ES2015_INHERITED_CLASS.test(typeStr) && !ES2015_INHERITED_CLASS_WITH_CTOR.test(typeStr));\n}\n\nexport class ReflectionCapabilities implements PlatformReflectionCapabilities {\n private _reflect: any;\n\n constructor(reflect?: any) {\n this._reflect = reflect || global['Reflect'];\n }\n\n isReflectionEnabled(): boolean {\n return true;\n }\n\n factory<T>(t: Type<T>): (args: any[]) => T {\n return (...args: any[]) => new t(...args);\n }\n\n /** @internal */\n _zipTypesAndAnnotations(paramTypes: any[], paramAnnotations: any[]): any[][] {\n let result: any[][];\n\n if (typeof paramTypes === 'undefined') {\n result = newArray(paramAnnotations.length);\n } else {\n result = newArray(paramTypes.length);\n }\n\n for (let i = 0; i < result.length; i++) {\n // TS outputs Object for parameters without types, while Traceur omits\n // the annotations. For now we preserve the Traceur behavior to aid\n // migration, but this can be revisited.\n if (typeof paramTypes === 'undefined') {\n result[i] = [];\n } else if (paramTypes[i] && paramTypes[i] != Object) {\n result[i] = [paramTypes[i]];\n } else {\n result[i] = [];\n }\n if (paramAnnotations && paramAnnotations[i] != null) {\n result[i] = result[i].concat(paramAnnotations[i]);\n }\n }\n return result;\n }\n\n private _ownParameters(type: Type<any>, parentCtor: any): any[][]|null {\n const typeStr = type.toString();\n // If we have no decorators, we only have function.length as metadata.\n // In that case, to detect whether a child class declared an own constructor or not,\n // we need to look inside of that constructor to check whether it is\n // just calling the parent.\n // This also helps to work around for https://github.com/Microsoft/TypeScript/issues/12439\n // that sets 'design:paramtypes' to []\n // if a class inherits from another class but has no ctor declared itself.\n if (isDelegateCtor(typeStr)) {\n return null;\n }\n\n // Prefer the direct API.\n if ((<any>type).parameters && (<any>type).parameters !== parentCtor.parameters) {\n return (<any>type).parameters;\n }\n\n // API of tsickle for lowering decorators to properties on the class.\n const tsickleCtorParams = (<any>type).ctorParameters;\n if (tsickleCtorParams && tsickleCtorParams !== parentCtor.ctorParameters) {\n // Newer tsickle uses a function closure\n // Retain the non-function case for compatibility with older tsickle\n const ctorParameters =\n typeof tsickleCtorParams === 'function' ? tsickleCtorParams() : tsickleCtorParams;\n const paramTypes = ctorParameters.map((ctorParam: any) => ctorParam && ctorParam.type);\n const paramAnnotations = ctorParameters.map(\n (ctorParam: any) =>\n ctorParam && convertTsickleDecoratorIntoMetadata(ctorParam.decorators));\n return this._zipTypesAndAnnotations(paramTypes, paramAnnotations);\n }\n\n // API for metadata created by invoking the decorators.\n const paramAnnotations = type.hasOwnProperty(PARAMETERS) && (type as any)[PARAMETERS];\n const paramTypes = this._reflect && this._reflect.getOwnMetadata &&\n this._reflect.getOwnMetadata('design:paramtypes', type);\n if (paramTypes || paramAnnotations) {\n return this._zipTypesAndAnnotations(paramTypes, paramAnnotations);\n }\n\n // If a class has no decorators, at least create metadata\n // based on function.length.\n // Note: We know that this is a real constructor as we checked\n // the content of the constructor above.\n return newArray<any[]>(type.length);\n }\n\n parameters(type: Type<any>): any[][] {\n // Note: only report metadata if we have at least one class decorator\n // to stay in sync with the static reflector.\n if (!isType(type)) {\n return [];\n }\n const parentCtor = getParentCtor(type);\n let parameters = this._ownParameters(type, parentCtor);\n if (!parameters && parentCtor !== Object) {\n parameters = this.parameters(parentCtor);\n }\n return parameters || [];\n }\n\n private _ownAnnotations(typeOrFunc: Type<any>, parentCtor: any): any[]|null {\n // Prefer the direct API.\n if ((<any>typeOrFunc).annotations && (<any>typeOrFunc).annotations !== parentCtor.annotations) {\n let annotations = (<any>typeOrFunc).annotations;\n if (typeof annotations === 'function' && annotations.annotations) {\n annotations = annotations.annotations;\n }\n return annotations;\n }\n\n // API of tsickle for lowering decorators to properties on the class.\n if ((<any>typeOrFunc).decorators && (<any>typeOrFunc).decorators !== parentCtor.decorators) {\n return convertTsickleDecoratorIntoMetadata((<any>typeOrFunc).decorators);\n }\n\n // API for metadata created by invoking the decorators.\n if (typeOrFunc.hasOwnProperty(ANNOTATIONS)) {\n return (typeOrFunc as any)[ANNOTATIONS];\n }\n return null;\n }\n\n annotations(typeOrFunc: Type<any>): any[] {\n if (!isType(typeOrFunc)) {\n return [];\n }\n const parentCtor = getParentCtor(typeOrFunc);\n const ownAnnotations = this._ownAnnotations(typeOrFunc, parentCtor) || [];\n const parentAnnotations = parentCtor !== Object ? this.annotations(parentCtor) : [];\n return parentAnnotations.concat(ownAnnotations);\n }\n\n private _ownPropMetadata(typeOrFunc: any, parentCtor: any): {[key: string]: any[]}|null {\n // Prefer the direct API.\n if ((<any>typeOrFunc).propMetadata &&\n (<any>typeOrFunc).propMetadata !== parentCtor.propMetadata) {\n let propMetadata = (<any>typeOrFunc).propMetadata;\n if (typeof propMetadata === 'function' && propMetadata.propMetadata) {\n propMetadata = propMetadata.propMetadata;\n }\n return propMetadata;\n }\n\n // API of tsickle for lowering decorators to properties on the class.\n if ((<any>typeOrFunc).propDecorators &&\n (<any>typeOrFunc).propDecorators !== parentCtor.propDecorators) {\n const propDecorators = (<any>typeOrFunc).propDecorators;\n const propMetadata = <{[key: string]: any[]}>{};\n Object.keys(propDecorators).forEach(prop => {\n propMetadata[prop] = convertTsickleDecoratorIntoMetadata(propDecorators[prop]);\n });\n return propMetadata;\n }\n\n // API for metadata created by invoking the decorators.\n if (typeOrFunc.hasOwnProperty(PROP_METADATA)) {\n return (typeOrFunc as any)[PROP_METADATA];\n }\n return null;\n }\n\n propMetadata(typeOrFunc: any): {[key: string]: any[]} {\n if (!isType(typeOrFunc)) {\n return {};\n }\n const parentCtor = getParentCtor(typeOrFunc);\n const propMetadata: {[key: string]: any[]} = {};\n if (parentCtor !== Object) {\n const parentPropMetadata = this.propMetadata(parentCtor);\n Object.keys(parentPropMetadata).forEach((propName) => {\n propMetadata[propName] = parentPropMetadata[propName];\n });\n }\n const ownPropMetadata = this._ownPropMetadata(typeOrFunc, parentCtor);\n if (ownPropMetadata) {\n Object.keys(ownPropMetadata).forEach((propName) => {\n const decorators: any[] = [];\n if (propMetadata.hasOwnProperty(propName)) {\n decorators.push(...propMetadata[propName]);\n }\n decorators.push(...ownPropMetadata[propName]);\n propMetadata[propName] = decorators;\n });\n }\n return propMetadata;\n }\n\n ownPropMetadata(typeOrFunc: any): {[key: string]: any[]} {\n if (!isType(typeOrFunc)) {\n return {};\n }\n return this._ownPropMetadata(typeOrFunc, getParentCtor(typeOrFunc)) || {};\n }\n\n hasLifecycleHook(type: any, lcProperty: string): boolean {\n return type instanceof Type && lcProperty in type.prototype;\n }\n\n guards(type: any): {[key: string]: any} {\n return {};\n }\n\n getter(name: string): GetterFn {\n return <GetterFn>new Function('o', 'return o.' + name + ';');\n }\n\n setter(name: string): SetterFn {\n return <SetterFn>new Function('o', 'v', 'return o.' + name + ' = v;');\n }\n\n method(name: string): MethodFn {\n const functionBody = `if (!o.${name}) throw new Error('\"${name}\" is undefined');\n return o.${name}.apply(o, args);`;\n return <MethodFn>new Function('o', 'args', functionBody);\n }\n\n // There is not a concept of import uri in Js, but this is useful in developing Dart applications.\n importUri(type: any): string {\n // StaticSymbol\n if (typeof type === 'object' && type['filePath']) {\n return type['filePath'];\n }\n // Runtime type\n return `./${stringify(type)}`;\n }\n\n resourceUri(type: any): string {\n return `./${stringify(type)}`;\n }\n\n resolveIdentifier(name: string, moduleUrl: string, members: string[], runtime: any): any {\n return runtime;\n }\n resolveEnum(enumIdentifier: any, name: string): any {\n return enumIdentifier[name];\n }\n}\n\nfunction convertTsickleDecoratorIntoMetadata(decoratorInvocations: any[]): any[] {\n if (!decoratorInvocations) {\n return [];\n }\n return decoratorInvocations.map(decoratorInvocation => {\n const decoratorType = decoratorInvocation.type;\n const annotationCls = decoratorType.annotationCls;\n const annotationArgs = decoratorInvocation.args ? decoratorInvocation.args : [];\n return new annotationCls(...annotationArgs);\n });\n}\n\nfunction getParentCtor(ctor: Function): Type<any> {\n const parentProto = ctor.prototype ? Object.getPrototypeOf(ctor.prototype) : null;\n const parentCtor = parentProto ? parentProto.constructor : null;\n // Note: We always use `Object` as the null value\n // to simplify checking later on.\n return parentCtor || Object;\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 '../util/ng_dev_mode';\n\nimport {Type} from '../interface/type';\nimport {getClosureSafeProperty} from '../util/property';\nimport {stringify} from '../util/stringify';\n\nimport {resolveForwardRef} from './forward_ref';\nimport {getInjectImplementation, injectRootLimpMode} from './inject_switch';\nimport {Injector} from './injector';\nimport {DecoratorFlags, InjectFlags, InternalInjectFlags} from './interface/injector';\nimport {ValueProvider} from './interface/provider';\nimport {ProviderToken} from './provider_token';\n\n\nconst _THROW_IF_NOT_FOUND = {};\nexport const THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;\n\n/*\n * Name of a property (that we patch onto DI decorator), which is used as an annotation of which\n * InjectFlag this decorator represents. This allows to avoid direct references to the DI decorators\n * in the code, thus making them tree-shakable.\n */\nconst DI_DECORATOR_FLAG = '__NG_DI_FLAG__';\n\nexport const NG_TEMP_TOKEN_PATH = 'ngTempTokenPath';\nconst NG_TOKEN_PATH = 'ngTokenPath';\nconst NEW_LINE = /\\n/gm;\nconst NO_NEW_LINE = 'ɵ';\nexport const SOURCE = '__source';\n\nexport const USE_VALUE =\n getClosureSafeProperty<ValueProvider>({provide: String, useValue: getClosureSafeProperty});\n\n/**\n * Current injector value used by `inject`.\n * - `undefined`: it is an error to call `inject`\n * - `null`: `inject` can be called but there is no injector (limp-mode).\n * - Injector instance: Use the injector for resolution.\n */\nlet _currentInjector: Injector|undefined|null = undefined;\n\nexport function setCurrentInjector(injector: Injector|null|undefined): Injector|undefined|null {\n const former = _currentInjector;\n _currentInjector = injector;\n return former;\n}\n\nexport function injectInjectorOnly<T>(token: ProviderToken<T>): T;\nexport function injectInjectorOnly<T>(token: ProviderToken<T>, flags?: InjectFlags): T|null;\nexport function injectInjectorOnly<T>(token: ProviderToken<T>, flags = InjectFlags.Default): T|\n null {\n if (_currentInjector === undefined) {\n throw new Error(`inject() must be called from an injection context`);\n } else if (_currentInjector === null) {\n return injectRootLimpMode(token, undefined, flags);\n } else {\n return _currentInjector.get(token, flags & InjectFlags.Optional ? null : undefined, flags);\n }\n}\n\n/**\n * Generated instruction: Injects a token from the currently active injector.\n *\n * Must be used in the context of a factory function such as one defined for an\n * `InjectionToken`. Throws an error if not called from such a context.\n *\n * (Additional documentation moved to `inject`, as it is the public API, and an alias for this\n * instruction)\n *\n * @see inject\n * @codeGenApi\n * @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm.\n */\nexport function ɵɵinject<T>(token: ProviderToken<T>): T;\nexport function ɵɵinject<T>(token: ProviderToken<T>, flags?: InjectFlags): T|null;\nexport function ɵɵinject<T>(token: ProviderToken<T>, flags = InjectFlags.Default): T|null {\n return (getInjectImplementation() || injectInjectorOnly)(resolveForwardRef(token), flags);\n}\n\n/**\n * Throws an error indicating that a factory function could not be generated by the compiler for a\n * particular class.\n *\n * This instruction allows the actual error message to be optimized away when ngDevMode is turned\n * off, saving bytes of generated code while still providing a good experience in dev mode.\n *\n * The name of the class is not mentioned here, but will be in the generated factory function name\n * and thus in the stack trace.\n *\n * @codeGenApi\n */\nexport function ɵɵinvalidFactoryDep(index: number): never {\n const msg = ngDevMode ?\n `This constructor is not compatible with Angular Dependency Injection because its dependency at index ${\n index} of the parameter list is invalid.\nThis can happen if the dependency type is a primitive like a string or if an ancestor of this class is missing an Angular decorator.\n\nPlease check that 1) the type for the parameter at index ${\n index} is correct and 2) the correct Angular decorators are defined for this class and its ancestors.` :\n 'invalid';\n throw new Error(msg);\n}\n\n/**\n * Injects a token from the currently active injector.\n *\n * Must be used in the context of a factory function such as one defined for an\n * `InjectionToken`. Throws an error if not called from such a context.\n *\n * Within such a factory function, using this function to request injection of a dependency\n * is faster and more type-safe than providing an additional array of dependencies\n * (as has been common with `useFactory` providers).\n *\n * @param token The injection token for the dependency to be injected.\n * @param flags Optional flags that control how injection is executed.\n * The flags correspond to injection strategies that can be specified with\n * parameter decorators `@Host`, `@Self`, `@SkipSef`, and `@Optional`.\n * @returns the injected value if injection is successful, `null` otherwise.\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}\n *\n * @publicApi\n */\nexport const inject = ɵɵinject;\n\nexport function injectArgs(types: (ProviderToken<any>|any[])[]): any[] {\n const args: any[] = [];\n for (let i = 0; i < types.length; i++) {\n const arg = resolveForwardRef(types[i]);\n if (Array.isArray(arg)) {\n if (arg.length === 0) {\n throw new Error('Arguments array must have arguments.');\n }\n let type: Type<any>|undefined = undefined;\n let flags: InjectFlags = InjectFlags.Default;\n\n for (let j = 0; j < arg.length; j++) {\n const meta = arg[j];\n const flag = getInjectFlag(meta);\n if (typeof flag === 'number') {\n // Special case when we handle @Inject decorator.\n if (flag === DecoratorFlags.Inject) {\n type = meta.token;\n } else {\n flags |= flag;\n }\n } else {\n type = meta;\n }\n }\n\n args.push(ɵɵinject(type!, flags));\n } else {\n args.push(ɵɵinject(arg));\n }\n }\n return args;\n}\n\n/**\n * Attaches a given InjectFlag to a given decorator using monkey-patching.\n * Since DI decorators can be used in providers `deps` array (when provider is configured using\n * `useFactory`) without initialization (e.g. `Host`) and as an instance (e.g. `new Host()`), we\n * attach the flag to make it available both as a static property and as a field on decorator\n * instance.\n *\n * @param decorator Provided DI decorator.\n * @param flag InjectFlag that should be applied.\n */\nexport function attachInjectFlag(decorator: any, flag: InternalInjectFlags|DecoratorFlags): any {\n decorator[DI_DECORATOR_FLAG] = flag;\n decorator.prototype[DI_DECORATOR_FLAG] = flag;\n return decorator;\n}\n\n/**\n * Reads monkey-patched property that contains InjectFlag attached to a decorator.\n *\n * @param token Token that may contain monkey-patched DI flags property.\n */\nexport function getInjectFlag(token: any): number|undefined {\n return token[DI_DECORATOR_FLAG];\n}\n\nexport function catchInjectorError(\n e: any, token: any, injectorErrorName: string, source: string|null): never {\n const tokenPath: any[] = e[NG_TEMP_TOKEN_PATH];\n if (token[SOURCE]) {\n tokenPath.unshift(token[SOURCE]);\n }\n e.message = formatError('\\n' + e.message, tokenPath, injectorErrorName, source);\n e[NG_TOKEN_PATH] = tokenPath;\n e[NG_TEMP_TOKEN_PATH] = null;\n throw e;\n}\n\nexport function formatError(\n text: string, obj: any, injectorErrorName: string, source: string|null = null): string {\n text = text && text.charAt(0) === '\\n' && text.charAt(1) == NO_NEW_LINE ? text.substr(2) : text;\n let context = stringify(obj);\n if (Array.isArray(obj)) {\n context = obj.map(stringify).join(' -> ');\n } else if (typeof obj === 'object') {\n let parts = <string[]>[];\n for (let key in obj) {\n if (obj.hasOwnProperty(key)) {\n let value = obj[key];\n parts.push(\n key + ':' + (typeof value === 'string' ? JSON.stringify(value) : stringify(value)));\n }\n }\n context = `{${parts.join(', ')}}`;\n }\n return `${injectorErrorName}${source ? '(' + source + ')' : ''}[${context}]: ${\n text.replace(NEW_LINE, '\\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 {makeParamDecorator} from '../util/decorators';\n\nimport {attachInjectFlag} from './injector_compatibility';\nimport {DecoratorFlags, InternalInjectFlags} from './interface/injector';\n\n\n/**\n * Type of the Inject decorator / constructor function.\n *\n * @publicApi\n */\nexport interface InjectDecorator {\n /**\n * Parameter decorator on a dependency parameter of a class constructor\n * that specifies a custom provider of the dependency.\n *\n * @usageNotes\n * The following example shows a class constructor that specifies a\n * custom provider of a dependency using the parameter decorator.\n *\n * When `@Inject()` is not present, the injector uses the type annotation of the\n * parameter as the provider.\n *\n * <code-example path=\"core/di/ts/metadata_spec.ts\" region=\"InjectWithoutDecorator\">\n * </code-example>\n *\n * @see [\"Dependency Injection Guide\"](guide/dependency-injection)\n *\n */\n (token: any): any;\n new(token: any): Inject;\n}\n\n/**\n * Type of the Inject metadata.\n *\n * @publicApi\n */\nexport interface Inject {\n /**\n * A [DI token](guide/glossary#di-token) that maps to the dependency to be injected.\n */\n token: any;\n}\n\n/**\n * Inject decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Inject: InjectDecorator = attachInjectFlag(\n // Disable tslint because `DecoratorFlags` is a const enum which gets inlined.\n // tslint:disable-next-line: no-toplevel-property-access\n makeParamDecorator('Inject', (token: any) => ({token})), DecoratorFlags.Inject);\n\n/**\n * Type of the Optional decorator / constructor function.\n *\n * @publicApi\n */\nexport interface OptionalDecorator {\n /**\n * Parameter decorator to be used on constructor parameters,\n * which marks the parameter as being an optional dependency.\n * The DI framework provides `null` if the dependency is not found.\n *\n * Can be used together with other parameter decorators\n * that modify how dependency injection operates.\n *\n * @usageNotes\n *\n * The following code allows the possibility of a `null` result:\n *\n * <code-example path=\"core/di/ts/metadata_spec.ts\" region=\"Optional\">\n * </code-example>\n *\n * @see [\"Dependency Injection Guide\"](guide/dependency-injection).\n */\n (): any;\n new(): Optional;\n}\n\n/**\n * Type of the Optional metadata.\n *\n * @publicApi\n */\nexport interface Optional {}\n\n/**\n * Optional decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Optional: OptionalDecorator =\n // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n // tslint:disable-next-line: no-toplevel-property-access\n attachInjectFlag(makeParamDecorator('Optional'), InternalInjectFlags.Optional);\n\n/**\n * Type of the Self decorator / constructor function.\n *\n * @publicApi\n */\nexport interface SelfDecorator {\n /**\n * Parameter decorator to be used on constructor parameters,\n * which tells the DI framework to start dependency resolution from the local injector.\n *\n * Resolution works upward through the injector hierarchy, so the children\n * of this class must configure their own providers or be prepared for a `null` result.\n *\n * @usageNotes\n *\n * In the following example, the dependency can be resolved\n * by the local injector when instantiating the class itself, but not\n * when instantiating a child.\n *\n * <code-example path=\"core/di/ts/metadata_spec.ts\" region=\"Self\">\n * </code-example>\n *\n * @see `SkipSelf`\n * @see `Optional`\n *\n */\n (): any;\n new(): Self;\n}\n\n/**\n * Type of the Self metadata.\n *\n * @publicApi\n */\nexport interface Self {}\n\n/**\n * Self decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Self: SelfDecorator =\n // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n // tslint:disable-next-line: no-toplevel-property-access\n attachInjectFlag(makeParamDecorator('Self'), InternalInjectFlags.Self);\n\n\n/**\n * Type of the `SkipSelf` decorator / constructor function.\n *\n * @publicApi\n */\nexport interface SkipSelfDecorator {\n /**\n * Parameter decorator to be used on constructor parameters,\n * which tells the DI framework to start dependency resolution from the parent injector.\n * Resolution works upward through the injector hierarchy, so the local injector\n * is not checked for a provider.\n *\n * @usageNotes\n *\n * In the following example, the dependency can be resolved when\n * instantiating a child, but not when instantiating the class itself.\n *\n * <code-example path=\"core/di/ts/metadata_spec.ts\" region=\"SkipSelf\">\n * </code-example>\n *\n * @see [Dependency Injection guide](guide/dependency-injection-in-action#skip).\n * @see `Self`\n * @see `Optional`\n *\n */\n (): any;\n new(): SkipSelf;\n}\n\n/**\n * Type of the `SkipSelf` metadata.\n *\n * @publicApi\n */\nexport interface SkipSelf {}\n\n/**\n * `SkipSelf` decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const SkipSelf: SkipSelfDecorator =\n // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n // tslint:disable-next-line: no-toplevel-property-access\n attachInjectFlag(makeParamDecorator('SkipSelf'), InternalInjectFlags.SkipSelf);\n\n/**\n * Type of the `Host` decorator / constructor function.\n *\n * @publicApi\n */\nexport interface HostDecorator {\n /**\n * Parameter decorator on a view-provider parameter of a class constructor\n * that tells the DI framework to resolve the view by checking injectors of child\n * elements, and stop when reaching the host element of the current component.\n *\n * @usageNotes\n *\n * The following shows use with the `@Optional` decorator, and allows for a `null` result.\n *\n * <code-example path=\"core/di/ts/metadata_spec.ts\" region=\"Host\">\n * </code-example>\n *\n * For an extended example, see [\"Dependency Injection\n * Guide\"](guide/dependency-injection-in-action#optional).\n */\n (): any;\n new(): Host;\n}\n\n/**\n * Type of the Host metadata.\n *\n * @publicApi\n */\nexport interface Host {}\n\n/**\n * Host decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Host: HostDecorator =\n // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n // tslint:disable-next-line: no-toplevel-property-access\n attachInjectFlag(makeParamDecorator('Host'), InternalInjectFlags.Host);\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 {R3DependencyMetadataFacade} from '../../compiler/compiler_facade';\nimport {Type} from '../../interface/type';\nimport {ReflectionCapabilities} from '../../reflection/reflection_capabilities';\nimport {Host, Inject, Optional, Self, SkipSelf} from '../metadata';\nimport {Attribute} from '../metadata_attr';\n\nlet _reflect: ReflectionCapabilities|null = null;\n\nexport function getReflect(): ReflectionCapabilities {\n return (_reflect = _reflect || new ReflectionCapabilities());\n}\n\nexport function reflectDependencies(type: Type<any>): R3DependencyMetadataFacade[] {\n return convertDependencies(getReflect().parameters(type));\n}\n\nexport function convertDependencies(deps: any[]): R3DependencyMetadataFacade[] {\n return deps.map(dep => reflectDependency(dep));\n}\n\nfunction reflectDependency(dep: any|any[]): R3DependencyMetadataFacade {\n const meta: R3DependencyMetadataFacade = {\n token: null,\n attribute: null,\n host: false,\n optional: false,\n self: false,\n skipSelf: false,\n };\n\n if (Array.isArray(dep) && dep.length > 0) {\n for (let j = 0; j < dep.length; j++) {\n const param = dep[j];\n if (param === undefined) {\n // param may be undefined if type of dep is not set by ngtsc\n continue;\n }\n\n const proto = Object.getPrototypeOf(param);\n\n if (param instanceof Optional || proto.ngMetadataName === 'Optional') {\n meta.optional = true;\n } else if (param instanceof SkipSelf || proto.ngMetadataName === 'SkipSelf') {\n meta.skipSelf = true;\n } else if (param instanceof Self || proto.ngMetadataName === 'Self') {\n meta.self = true;\n } else if (param instanceof Host || proto.ngMetadataName === 'Host') {\n meta.host = true;\n } else if (param instanceof Inject) {\n meta.token = param.token;\n } else if (param instanceof Attribute) {\n if (param.attributeName === undefined) {\n throw new Error(`Attribute name must be defined.`);\n }\n meta.attribute = param.attributeName;\n } else {\n meta.token = param;\n }\n }\n } else if (dep === undefined || (Array.isArray(dep) && dep.length === 0)) {\n meta.token = null;\n } else {\n meta.token = dep;\n }\n return meta;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {Component} from './directives';\n\n\n/**\n * Used to resolve resource URLs on `@Component` when used with JIT compilation.\n *\n * Example:\n * ```\n * @Component({\n * selector: 'my-comp',\n * templateUrl: 'my-comp.html', // This requires asynchronous resolution\n * })\n * class MyComponent{\n * }\n *\n * // Calling `renderComponent` will fail because `renderComponent` is a synchronous process\n * // and `MyComponent`'s `@Component.templateUrl` needs to be resolved asynchronously.\n *\n * // Calling `resolveComponentResources()` will resolve `@Component.templateUrl` into\n * // `@Component.template`, which allows `renderComponent` to proceed in a synchronous manner.\n *\n * // Use browser's `fetch()` function as the default resource resolution strategy.\n * resolveComponentResources(fetch).then(() => {\n * // After resolution all URLs have been converted into `template` strings.\n * renderComponent(MyComponent);\n * });\n *\n * ```\n *\n * NOTE: In AOT the resolution happens during compilation, and so there should be no need\n * to call this method outside JIT mode.\n *\n * @param resourceResolver a function which is responsible for returning a `Promise` to the\n * contents of the resolved URL. Browser's `fetch()` method is a good default implementation.\n */\nexport function resolveComponentResources(\n resourceResolver: (url: string) => (Promise<string|{text(): Promise<string>}>)): Promise<void> {\n // Store all promises which are fetching the resources.\n const componentResolved: Promise<void>[] = [];\n\n // Cache so that we don't fetch the same resource more than once.\n const urlMap = new Map<string, Promise<string>>();\n function cachedResourceResolve(url: string): Promise<string> {\n let promise = urlMap.get(url);\n if (!promise) {\n const resp = resourceResolver(url);\n urlMap.set(url, promise = resp.then(unwrapResponse));\n }\n return promise;\n }\n\n componentResourceResolutionQueue.forEach((component: Component, type: Type<any>) => {\n const promises: Promise<void>[] = [];\n if (component.templateUrl) {\n promises.push(cachedResourceResolve(component.templateUrl).then((template) => {\n component.template = template;\n }));\n }\n const styleUrls = component.styleUrls;\n const styles = component.styles || (component.styles = []);\n const styleOffset = component.styles.length;\n styleUrls && styleUrls.forEach((styleUrl, index) => {\n styles.push(''); // pre-allocate array.\n promises.push(cachedResourceResolve(styleUrl).then((style) => {\n styles[styleOffset + index] = style;\n styleUrls.splice(styleUrls.indexOf(styleUrl), 1);\n if (styleUrls.length == 0) {\n component.styleUrls = undefined;\n }\n }));\n });\n const fullyResolved = Promise.all(promises).then(() => componentDefResolved(type));\n componentResolved.push(fullyResolved);\n });\n clearResolutionOfComponentResourcesQueue();\n return Promise.all(componentResolved).then(() => undefined);\n}\n\nlet componentResourceResolutionQueue = new Map<Type<any>, Component>();\n\n// Track when existing ɵcmp for a Type is waiting on resources.\nconst componentDefPendingResolution = new Set<Type<any>>();\n\nexport function maybeQueueResolutionOfComponentResources(type: Type<any>, metadata: Component) {\n if (componentNeedsResolution(metadata)) {\n componentResourceResolutionQueue.set(type, metadata);\n componentDefPendingResolution.add(type);\n }\n}\n\nexport function isComponentDefPendingResolution(type: Type<any>): boolean {\n return componentDefPendingResolution.has(type);\n}\n\nexport function componentNeedsResolution(component: Component): boolean {\n return !!(\n (component.templateUrl && !component.hasOwnProperty('template')) ||\n component.styleUrls && component.styleUrls.length);\n}\nexport function clearResolutionOfComponentResourcesQueue(): Map<Type<any>, Component> {\n const old = componentResourceResolutionQueue;\n componentResourceResolutionQueue = new Map();\n return old;\n}\n\nexport function restoreComponentResolutionQueue(queue: Map<Type<any>, Component>): void {\n componentDefPendingResolution.clear();\n queue.forEach((_, type) => componentDefPendingResolution.add(type));\n componentResourceResolutionQueue = queue;\n}\n\nexport function isComponentResourceResolutionQueueEmpty() {\n return componentResourceResolutionQueue.size === 0;\n}\n\nfunction unwrapResponse(response: string|{text(): Promise<string>}): string|Promise<string> {\n return typeof response == 'string' ? response : response.text();\n}\n\nfunction componentDefResolved(type: Type<any>): void {\n componentDefPendingResolution.delete(type);\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 * @fileoverview\n * A module to facilitate use of a Trusted Types policy internally within\n * Angular. It lazily constructs the Trusted Types policy, providing helper\n * utilities for promoting strings to Trusted Types. When Trusted Types are not\n * available, strings are used as a fallback.\n * @security All use of this module is security-sensitive and should go through\n * security review.\n */\n\nimport {global} from '../global';\nimport {TrustedHTML, TrustedScript, TrustedScriptURL, TrustedTypePolicy, TrustedTypePolicyFactory} from './trusted_type_defs';\n\n/**\n * The Trusted Types policy, or null if Trusted Types are not\n * enabled/supported, or undefined if the policy has not been created yet.\n */\nlet policy: TrustedTypePolicy|null|undefined;\n\n/**\n * Returns the Trusted Types policy, or null if Trusted Types are not\n * enabled/supported. The first call to this function will create the policy.\n */\nfunction getPolicy(): TrustedTypePolicy|null {\n if (policy === undefined) {\n policy = null;\n if (global.trustedTypes) {\n try {\n policy = (global.trustedTypes as TrustedTypePolicyFactory).createPolicy('angular', {\n createHTML: (s: string) => s,\n createScript: (s: string) => s,\n createScriptURL: (s: string) => s,\n });\n } catch {\n // trustedTypes.createPolicy throws if called with a name that is\n // already registered, even in report-only mode. Until the API changes,\n // catch the error not to break the applications functionally. In such\n // cases, the code will fall back to using strings.\n }\n }\n }\n return policy;\n}\n\n/**\n * Unsafely promote a string to a TrustedHTML, falling back to strings when\n * Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that the\n * provided string will never cause an XSS vulnerability if used in a context\n * that will be interpreted as HTML by a browser, e.g. when assigning to\n * element.innerHTML.\n */\nexport function trustedHTMLFromString(html: string): TrustedHTML|string {\n return getPolicy()?.createHTML(html) || html;\n}\n\n/**\n * Unsafely promote a string to a TrustedScript, falling back to strings when\n * Trusted Types are not available.\n * @security In particular, it must be assured that the provided string will\n * never cause an XSS vulnerability if used in a context that will be\n * interpreted and executed as a script by a browser, e.g. when calling eval.\n */\nexport function trustedScriptFromString(script: string): TrustedScript|string {\n return getPolicy()?.createScript(script) || script;\n}\n\n/**\n * Unsafely promote a string to a TrustedScriptURL, falling back to strings\n * when Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that the\n * provided string will never cause an XSS vulnerability if used in a context\n * that will cause a browser to load and execute a resource, e.g. when\n * assigning to script.src.\n */\nexport function trustedScriptURLFromString(url: string): TrustedScriptURL|string {\n return getPolicy()?.createScriptURL(url) || url;\n}\n\n/**\n * Unsafely call the Function constructor with the given string arguments. It\n * is only available in development mode, and should be stripped out of\n * production code.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that it\n * is only called from development code, as use in production code can lead to\n * XSS vulnerabilities.\n */\nexport function newTrustedFunctionForDev(...args: string[]): Function {\n if (typeof ngDevMode === 'undefined') {\n throw new Error('newTrustedFunctionForDev should never be called in production');\n }\n if (!global.trustedTypes) {\n // In environments that don't support Trusted Types, fall back to the most\n // straightforward implementation:\n return new Function(...args);\n }\n\n // Chrome currently does not support passing TrustedScript to the Function\n // constructor. The following implements the workaround proposed on the page\n // below, where the Chromium bug is also referenced:\n // https://github.com/w3c/webappsec-trusted-types/wiki/Trusted-Types-for-function-constructor\n const fnArgs = args.slice(0, -1).join(',');\n const fnBody = args[args.length - 1];\n const body = `(function anonymous(${fnArgs}\n) { ${fnBody}\n})`;\n\n // Using eval directly confuses the compiler and prevents this module from\n // being stripped out of JS binaries even if not used. The global['eval']\n // indirection fixes that.\n const fn = global['eval'](trustedScriptFromString(body) as string) as Function;\n if (fn.bind === undefined) {\n // Workaround for a browser bug that only exists in Chrome 83, where passing\n // a TrustedScript to eval just returns the TrustedScript back without\n // evaluating it. In that case, fall back to the most straightforward\n // implementation:\n return new Function(...args);\n }\n\n // To completely mimic the behavior of calling \"new Function\", two more\n // things need to happen:\n // 1. Stringifying the resulting function should return its source code\n fn.toString = () => body;\n // 2. When calling the resulting function, `this` should refer to `global`\n return fn.bind(global);\n\n // When Trusted Types support in Function constructors is widely available,\n // the implementation of this function can be simplified to:\n // return new Function(...args.map(a => trustedScriptFromString(a)));\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 * @fileoverview\n * A module to facilitate use of a Trusted Types policy internally within\n * Angular specifically for bypassSecurityTrust* and custom sanitizers. It\n * lazily constructs the Trusted Types policy, providing helper utilities for\n * promoting strings to Trusted Types. When Trusted Types are not available,\n * strings are used as a fallback.\n * @security All use of this module is security-sensitive and should go through\n * security review.\n */\n\nimport {global} from '../global';\nimport {TrustedHTML, TrustedScript, TrustedScriptURL, TrustedTypePolicy, TrustedTypePolicyFactory} from './trusted_type_defs';\n\n/**\n * The Trusted Types policy, or null if Trusted Types are not\n * enabled/supported, or undefined if the policy has not been created yet.\n */\nlet policy: TrustedTypePolicy|null|undefined;\n\n/**\n * Returns the Trusted Types policy, or null if Trusted Types are not\n * enabled/supported. The first call to this function will create the policy.\n */\nfunction getPolicy(): TrustedTypePolicy|null {\n if (policy === undefined) {\n policy = null;\n if (global.trustedTypes) {\n try {\n policy = (global.trustedTypes as TrustedTypePolicyFactory)\n .createPolicy('angular#unsafe-bypass', {\n createHTML: (s: string) => s,\n createScript: (s: string) => s,\n createScriptURL: (s: string) => s,\n });\n } catch {\n // trustedTypes.createPolicy throws if called with a name that is\n // already registered, even in report-only mode. Until the API changes,\n // catch the error not to break the applications functionally. In such\n // cases, the code will fall back to using strings.\n }\n }\n }\n return policy;\n}\n\n/**\n * Unsafely promote a string to a TrustedHTML, falling back to strings when\n * Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that it\n * is only passed strings that come directly from custom sanitizers or the\n * bypassSecurityTrust* functions.\n */\nexport function trustedHTMLFromStringBypass(html: string): TrustedHTML|string {\n return getPolicy()?.createHTML(html) || html;\n}\n\n/**\n * Unsafely promote a string to a TrustedScript, falling back to strings when\n * Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that it\n * is only passed strings that come directly from custom sanitizers or the\n * bypassSecurityTrust* functions.\n */\nexport function trustedScriptFromStringBypass(script: string): TrustedScript|string {\n return getPolicy()?.createScript(script) || script;\n}\n\n/**\n * Unsafely promote a string to a TrustedScriptURL, falling back to strings\n * when Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that it\n * is only passed strings that come directly from custom sanitizers or the\n * bypassSecurityTrust* functions.\n */\nexport function trustedScriptURLFromStringBypass(url: string): TrustedScriptURL|string {\n return getPolicy()?.createScriptURL(url) || url;\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\nexport const enum BypassType {\n Url = 'URL',\n Html = 'HTML',\n ResourceUrl = 'ResourceURL',\n Script = 'Script',\n Style = 'Style',\n}\n\n/**\n * Marker interface for a value that's safe to use in a particular context.\n *\n * @publicApi\n */\nexport interface SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as HTML.\n *\n * @publicApi\n */\nexport interface SafeHtml extends SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as style (CSS).\n *\n * @publicApi\n */\nexport interface SafeStyle extends SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as JavaScript.\n *\n * @publicApi\n */\nexport interface SafeScript extends SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as a URL linking to a document.\n *\n * @publicApi\n */\nexport interface SafeUrl extends SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as a URL to load executable code from.\n *\n * @publicApi\n */\nexport interface SafeResourceUrl extends SafeValue {}\n\n\nabstract class SafeValueImpl implements SafeValue {\n constructor(public changingThisBreaksApplicationSecurity: string) {}\n\n abstract getTypeName(): string;\n\n toString() {\n return `SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity}` +\n ` (see https://g.co/ng/security#xss)`;\n }\n}\n\nclass SafeHtmlImpl extends SafeValueImpl implements SafeHtml {\n override getTypeName() {\n return BypassType.Html;\n }\n}\nclass SafeStyleImpl extends SafeValueImpl implements SafeStyle {\n override getTypeName() {\n return BypassType.Style;\n }\n}\nclass SafeScriptImpl extends SafeValueImpl implements SafeScript {\n override getTypeName() {\n return BypassType.Script;\n }\n}\nclass SafeUrlImpl extends SafeValueImpl implements SafeUrl {\n override getTypeName() {\n return BypassType.Url;\n }\n}\nclass SafeResourceUrlImpl extends SafeValueImpl implements SafeResourceUrl {\n override getTypeName() {\n return BypassType.ResourceUrl;\n }\n}\n\nexport function unwrapSafeValue(value: SafeValue): string;\nexport function unwrapSafeValue<T>(value: T): T;\nexport function unwrapSafeValue<T>(value: T|SafeValue): T {\n return value instanceof SafeValueImpl ? value.changingThisBreaksApplicationSecurity as any as T :\n value as any as T;\n}\n\n\nexport function allowSanitizationBypassAndThrow(\n value: any, type: BypassType.Html): value is SafeHtml;\nexport function allowSanitizationBypassAndThrow(\n value: any, type: BypassType.ResourceUrl): value is SafeResourceUrl;\nexport function allowSanitizationBypassAndThrow(\n value: any, type: BypassType.Script): value is SafeScript;\nexport function allowSanitizationBypassAndThrow(\n value: any, type: BypassType.Style): value is SafeStyle;\nexport function allowSanitizationBypassAndThrow(value: any, type: BypassType.Url): value is SafeUrl;\nexport function allowSanitizationBypassAndThrow(value: any, type: BypassType): boolean;\nexport function allowSanitizationBypassAndThrow(value: any, type: BypassType): boolean {\n const actualType = getSanitizationBypassType(value);\n if (actualType != null && actualType !== type) {\n // Allow ResourceURLs in URL contexts, they are strictly more trusted.\n if (actualType === BypassType.ResourceUrl && type === BypassType.Url) return true;\n throw new Error(\n `Required a safe ${type}, got a ${actualType} (see https://g.co/ng/security#xss)`);\n }\n return actualType === type;\n}\n\nexport function getSanitizationBypassType(value: any): BypassType|null {\n return value instanceof SafeValueImpl && value.getTypeName() as BypassType || null;\n}\n\n/**\n * Mark `html` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link htmlSanitizer} to be trusted implicitly.\n *\n * @param trustedHtml `html` string which needs to be implicitly trusted.\n * @returns a `html` which has been branded to be implicitly trusted.\n */\nexport function bypassSanitizationTrustHtml(trustedHtml: string): SafeHtml {\n return new SafeHtmlImpl(trustedHtml);\n}\n/**\n * Mark `style` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link styleSanitizer} to be trusted implicitly.\n *\n * @param trustedStyle `style` string which needs to be implicitly trusted.\n * @returns a `style` hich has been branded to be implicitly trusted.\n */\nexport function bypassSanitizationTrustStyle(trustedStyle: string): SafeStyle {\n return new SafeStyleImpl(trustedStyle);\n}\n/**\n * Mark `script` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link scriptSanitizer} to be trusted implicitly.\n *\n * @param trustedScript `script` string which needs to be implicitly trusted.\n * @returns a `script` which has been branded to be implicitly trusted.\n */\nexport function bypassSanitizationTrustScript(trustedScript: string): SafeScript {\n return new SafeScriptImpl(trustedScript);\n}\n/**\n * Mark `url` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link urlSanitizer} to be trusted implicitly.\n *\n * @param trustedUrl `url` string which needs to be implicitly trusted.\n * @returns a `url` which has been branded to be implicitly trusted.\n */\nexport function bypassSanitizationTrustUrl(trustedUrl: string): SafeUrl {\n return new SafeUrlImpl(trustedUrl);\n}\n/**\n * Mark `url` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link resourceUrlSanitizer} to be trusted implicitly.\n *\n * @param trustedResourceUrl `url` string which needs to be implicitly trusted.\n * @returns a `url` which has been branded to be implicitly trusted.\n */\nexport function bypassSanitizationTrustResourceUrl(trustedResourceUrl: string): SafeResourceUrl {\n return new SafeResourceUrlImpl(trustedResourceUrl);\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 {trustedHTMLFromString} from '../util/security/trusted_types';\n\n/**\n * This helper is used to get hold of an inert tree of DOM elements containing dirty HTML\n * that needs sanitizing.\n * Depending upon browser support we use one of two strategies for doing this.\n * Default: DOMParser strategy\n * Fallback: InertDocument strategy\n */\nexport function getInertBodyHelper(defaultDoc: Document): InertBodyHelper {\n const inertDocumentHelper = new InertDocumentHelper(defaultDoc);\n return isDOMParserAvailable() ? new DOMParserHelper(inertDocumentHelper) : inertDocumentHelper;\n}\n\nexport interface InertBodyHelper {\n /**\n * Get an inert DOM element containing DOM created from the dirty HTML string provided.\n */\n getInertBodyElement: (html: string) => HTMLElement | null;\n}\n\n/**\n * Uses DOMParser to create and fill an inert body element.\n * This is the default strategy used in browsers that support it.\n */\nclass DOMParserHelper implements InertBodyHelper {\n constructor(private inertDocumentHelper: InertBodyHelper) {}\n\n getInertBodyElement(html: string): HTMLElement|null {\n // We add these extra elements to ensure that the rest of the content is parsed as expected\n // e.g. leading whitespace is maintained and tags like `<meta>` do not get hoisted to the\n // `<head>` tag. Note that the `<body>` tag is closed implicitly to prevent unclosed tags\n // in `html` from consuming the otherwise explicit `</body>` tag.\n html = '<body><remove></remove>' + html;\n try {\n const body = new window.DOMParser()\n .parseFromString(trustedHTMLFromString(html) as string, 'text/html')\n .body as HTMLBodyElement;\n if (body === null) {\n // In some browsers (e.g. Mozilla/5.0 iPad AppleWebKit Mobile) the `body` property only\n // becomes available in the following tick of the JS engine. In that case we fall back to\n // the `inertDocumentHelper` instead.\n return this.inertDocumentHelper.getInertBodyElement(html);\n }\n body.removeChild(body.firstChild!);\n return body;\n } catch {\n return null;\n }\n }\n}\n\n/**\n * Use an HTML5 `template` element, if supported, or an inert body element created via\n * `createHtmlDocument` to create and fill an inert DOM element.\n * This is the fallback strategy if the browser does not support DOMParser.\n */\nclass InertDocumentHelper implements InertBodyHelper {\n private inertDocument: Document;\n\n constructor(private defaultDoc: Document) {\n this.inertDocument = this.defaultDoc.implementation.createHTMLDocument('sanitization-inert');\n\n if (this.inertDocument.body == null) {\n // usually there should be only one body element in the document, but IE doesn't have any, so\n // we need to create one.\n const inertHtml = this.inertDocument.createElement('html');\n this.inertDocument.appendChild(inertHtml);\n const inertBodyElement = this.inertDocument.createElement('body');\n inertHtml.appendChild(inertBodyElement);\n }\n }\n\n getInertBodyElement(html: string): HTMLElement|null {\n // Prefer using <template> element if supported.\n const templateEl = this.inertDocument.createElement('template');\n if ('content' in templateEl) {\n templateEl.innerHTML = trustedHTMLFromString(html) as string;\n return templateEl;\n }\n\n // Note that previously we used to do something like `this.inertDocument.body.innerHTML = html`\n // and we returned the inert `body` node. This was changed, because IE seems to treat setting\n // `innerHTML` on an inserted element differently, compared to one that hasn't been inserted\n // yet. In particular, IE appears to split some of the text into multiple text nodes rather\n // than keeping them in a single one which ends up messing with Ivy's i18n parsing further\n // down the line. This has been worked around by creating a new inert `body` and using it as\n // the root node in which we insert the HTML.\n const inertBody = this.inertDocument.createElement('body');\n inertBody.innerHTML = trustedHTMLFromString(html) as string;\n\n // Support: IE 11 only\n // strip custom-namespaced attributes on IE<=11\n if ((this.defaultDoc as any).documentMode) {\n this.stripCustomNsAttrs(inertBody);\n }\n\n return inertBody;\n }\n\n /**\n * When IE11 comes across an unknown namespaced attribute e.g. 'xlink:foo' it adds 'xmlns:ns1'\n * attribute to declare ns1 namespace and prefixes the attribute with 'ns1' (e.g.\n * 'ns1:xlink:foo').\n *\n * This is undesirable since we don't want to allow any of these custom attributes. This method\n * strips them all.\n */\n private stripCustomNsAttrs(el: Element) {\n const elAttrs = el.attributes;\n // loop backwards so that we can support removals.\n for (let i = elAttrs.length - 1; 0 < i; i--) {\n const attrib = elAttrs.item(i);\n const attrName = attrib!.name;\n if (attrName === 'xmlns:ns1' || attrName.indexOf('ns1:') === 0) {\n el.removeAttribute(attrName);\n }\n }\n let childNode = el.firstChild as Node | null;\n while (childNode) {\n if (childNode.nodeType === Node.ELEMENT_NODE) this.stripCustomNsAttrs(childNode as Element);\n childNode = childNode.nextSibling;\n }\n }\n}\n\n/**\n * We need to determine whether the DOMParser exists in the global context and\n * supports parsing HTML; HTML parsing support is not as wide as other formats, see\n * https://developer.mozilla.org/en-US/docs/Web/API/DOMParser#Browser_compatibility.\n *\n * @suppress {uselessCode}\n */\nexport function isDOMParserAvailable() {\n try {\n return !!new window.DOMParser().parseFromString(\n trustedHTMLFromString('') as string, 'text/html');\n } catch {\n return false;\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/**\n * A pattern that recognizes a commonly useful subset of URLs that are safe.\n *\n * This regular expression matches a subset of URLs that will not cause script\n * execution if used in URL context within a HTML document. Specifically, this\n * regular expression matches if (comment from here on and regex copied from\n * Soy's EscapingConventions):\n * (1) Either an allowed protocol (http, https, mailto or ftp).\n * (2) or no protocol. A protocol must be followed by a colon. The below\n * allows that by allowing colons only after one of the characters [/?#].\n * A colon after a hash (#) must be in the fragment.\n * Otherwise, a colon after a (?) must be in a query.\n * Otherwise, a colon after a single solidus (/) must be in a path.\n * Otherwise, a colon after a double solidus (//) must be in the authority\n * (before port).\n *\n * The pattern disallows &, used in HTML entity declarations before\n * one of the characters in [/?#]. This disallows HTML entities used in the\n * protocol name, which should never happen, e.g. \"http\" for \"http\".\n * It also disallows HTML entities in the first path part of a relative path,\n * e.g. \"foo<bar/baz\". Our existing escaping functions should not produce\n * that. More importantly, it disallows masking of a colon,\n * e.g. \"javascript:...\".\n *\n * This regular expression was taken from the Closure sanitization library.\n */\nconst SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi;\n\n/* A pattern that matches safe srcset values */\nconst SAFE_SRCSET_PATTERN = /^(?:(?:https?|file):|[^&:/?#]*(?:[/?#]|$))/gi;\n\n/** A pattern that matches safe data URLs. Only matches image, video and audio types. */\nconst DATA_URL_PATTERN =\n /^data:(?:image\\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\\/(?:mpeg|mp4|ogg|webm)|audio\\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\\/]+=*$/i;\n\nexport function _sanitizeUrl(url: string): string {\n url = String(url);\n if (url.match(SAFE_URL_PATTERN) || url.match(DATA_URL_PATTERN)) return url;\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n console.warn(`WARNING: sanitizing unsafe URL value ${url} (see https://g.co/ng/security#xss)`);\n }\n\n return 'unsafe:' + url;\n}\n\nexport function sanitizeSrcset(srcset: string): string {\n srcset = String(srcset);\n return srcset.split(',').map((srcset) => _sanitizeUrl(srcset.trim())).join(', ');\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 {TrustedHTML} from '../util/security/trusted_type_defs';\nimport {trustedHTMLFromString} from '../util/security/trusted_types';\nimport {getInertBodyHelper, InertBodyHelper} from './inert_body';\nimport {_sanitizeUrl, sanitizeSrcset} from './url_sanitizer';\n\nfunction tagSet(tags: string): {[k: string]: boolean} {\n const res: {[k: string]: boolean} = {};\n for (const t of tags.split(',')) res[t] = true;\n return res;\n}\n\nfunction merge(...sets: {[k: string]: boolean}[]): {[k: string]: boolean} {\n const res: {[k: string]: boolean} = {};\n for (const s of sets) {\n for (const v in s) {\n if (s.hasOwnProperty(v)) res[v] = true;\n }\n }\n return res;\n}\n\n// Good source of info about elements and attributes\n// https://html.spec.whatwg.org/#semantics\n// https://simon.html5.org/html-elements\n\n// Safe Void Elements - HTML5\n// https://html.spec.whatwg.org/#void-elements\nconst VOID_ELEMENTS = tagSet('area,br,col,hr,img,wbr');\n\n// Elements that you can, intentionally, leave open (and which close themselves)\n// https://html.spec.whatwg.org/#optional-tags\nconst OPTIONAL_END_TAG_BLOCK_ELEMENTS = tagSet('colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr');\nconst OPTIONAL_END_TAG_INLINE_ELEMENTS = tagSet('rp,rt');\nconst OPTIONAL_END_TAG_ELEMENTS =\n merge(OPTIONAL_END_TAG_INLINE_ELEMENTS, OPTIONAL_END_TAG_BLOCK_ELEMENTS);\n\n// Safe Block Elements - HTML5\nconst BLOCK_ELEMENTS = merge(\n OPTIONAL_END_TAG_BLOCK_ELEMENTS,\n tagSet(\n 'address,article,' +\n 'aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,' +\n 'h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul'));\n\n// Inline Elements - HTML5\nconst INLINE_ELEMENTS = merge(\n OPTIONAL_END_TAG_INLINE_ELEMENTS,\n tagSet(\n 'a,abbr,acronym,audio,b,' +\n 'bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,' +\n 'samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video'));\n\nexport const VALID_ELEMENTS =\n merge(VOID_ELEMENTS, BLOCK_ELEMENTS, INLINE_ELEMENTS, OPTIONAL_END_TAG_ELEMENTS);\n\n// Attributes that have href and hence need to be sanitized\nexport const URI_ATTRS = tagSet('background,cite,href,itemtype,longdesc,poster,src,xlink:href');\n\n// Attributes that have special href set hence need to be sanitized\nexport const SRCSET_ATTRS = tagSet('srcset');\n\nconst HTML_ATTRS = tagSet(\n 'abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,' +\n 'compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,' +\n 'ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,' +\n 'scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,' +\n 'valign,value,vspace,width');\n\n// Accessibility attributes as per WAI-ARIA 1.1 (W3C Working Draft 14 December 2018)\nconst ARIA_ATTRS = tagSet(\n 'aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,' +\n 'aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,' +\n 'aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,' +\n 'aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,' +\n 'aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,' +\n 'aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,' +\n 'aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext');\n\n// NB: This currently consciously doesn't support SVG. SVG sanitization has had several security\n// issues in the past, so it seems safer to leave it out if possible. If support for binding SVG via\n// innerHTML is required, SVG attributes should be added here.\n\n// NB: Sanitization does not allow <form> elements or other active elements (<button> etc). Those\n// can be sanitized, but they increase security surface area without a legitimate use case, so they\n// are left out here.\n\nexport const VALID_ATTRS = merge(URI_ATTRS, SRCSET_ATTRS, HTML_ATTRS, ARIA_ATTRS);\n\n// Elements whose content should not be traversed/preserved, if the elements themselves are invalid.\n//\n// Typically, `<invalid>Some content</invalid>` would traverse (and in this case preserve)\n// `Some content`, but strip `invalid-element` opening/closing tags. For some elements, though, we\n// don't want to preserve the content, if the elements themselves are going to be removed.\nconst SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS = tagSet('script,style,template');\n\n/**\n * SanitizingHtmlSerializer serializes a DOM fragment, stripping out any unsafe elements and unsafe\n * attributes.\n */\nclass SanitizingHtmlSerializer {\n // Explicitly track if something was stripped, to avoid accidentally warning of sanitization just\n // because characters were re-encoded.\n public sanitizedSomething = false;\n private buf: string[] = [];\n\n sanitizeChildren(el: Element): string {\n // This cannot use a TreeWalker, as it has to run on Angular's various DOM adapters.\n // However this code never accesses properties off of `document` before deleting its contents\n // again, so it shouldn't be vulnerable to DOM clobbering.\n let current: Node = el.firstChild!;\n let traverseContent = true;\n while (current) {\n if (current.nodeType === Node.ELEMENT_NODE) {\n traverseContent = this.startElement(current as Element);\n } else if (current.nodeType === Node.TEXT_NODE) {\n this.chars(current.nodeValue!);\n } else {\n // Strip non-element, non-text nodes.\n this.sanitizedSomething = true;\n }\n if (traverseContent && current.firstChild) {\n current = current.firstChild!;\n continue;\n }\n while (current) {\n // Leaving the element. Walk up and to the right, closing tags as we go.\n if (current.nodeType === Node.ELEMENT_NODE) {\n this.endElement(current as Element);\n }\n\n let next = this.checkClobberedElement(current, current.nextSibling!);\n\n if (next) {\n current = next;\n break;\n }\n\n current = this.checkClobberedElement(current, current.parentNode!);\n }\n }\n return this.buf.join('');\n }\n\n /**\n * Sanitizes an opening element tag (if valid) and returns whether the element's contents should\n * be traversed. Element content must always be traversed (even if the element itself is not\n * valid/safe), unless the element is one of `SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS`.\n *\n * @param element The element to sanitize.\n * @return True if the element's contents should be traversed.\n */\n private startElement(element: Element): boolean {\n const tagName = element.nodeName.toLowerCase();\n if (!VALID_ELEMENTS.hasOwnProperty(tagName)) {\n this.sanitizedSomething = true;\n return !SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS.hasOwnProperty(tagName);\n }\n this.buf.push('<');\n this.buf.push(tagName);\n const elAttrs = element.attributes;\n for (let i = 0; i < elAttrs.length; i++) {\n const elAttr = elAttrs.item(i);\n const attrName = elAttr!.name;\n const lower = attrName.toLowerCase();\n if (!VALID_ATTRS.hasOwnProperty(lower)) {\n this.sanitizedSomething = true;\n continue;\n }\n let value = elAttr!.value;\n // TODO(martinprobst): Special case image URIs for data:image/...\n if (URI_ATTRS[lower]) value = _sanitizeUrl(value);\n if (SRCSET_ATTRS[lower]) value = sanitizeSrcset(value);\n this.buf.push(' ', attrName, '=\"', encodeEntities(value), '\"');\n }\n this.buf.push('>');\n return true;\n }\n\n private endElement(current: Element) {\n const tagName = current.nodeName.toLowerCase();\n if (VALID_ELEMENTS.hasOwnProperty(tagName) && !VOID_ELEMENTS.hasOwnProperty(tagName)) {\n this.buf.push('</');\n this.buf.push(tagName);\n this.buf.push('>');\n }\n }\n\n private chars(chars: string) {\n this.buf.push(encodeEntities(chars));\n }\n\n checkClobberedElement(node: Node, nextNode: Node): Node {\n if (nextNode &&\n (node.compareDocumentPosition(nextNode) &\n Node.DOCUMENT_POSITION_CONTAINED_BY) === Node.DOCUMENT_POSITION_CONTAINED_BY) {\n throw new Error(`Failed to sanitize html because the element is clobbered: ${\n (node as Element).outerHTML}`);\n }\n return nextNode;\n }\n}\n\n// Regular Expressions for parsing tags and attributes\nconst SURROGATE_PAIR_REGEXP = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n// ! to ~ is the ASCII range.\nconst NON_ALPHANUMERIC_REGEXP = /([^\\#-~ |!])/g;\n\n/**\n * Escapes all potentially dangerous characters, so that the\n * resulting string can be safely inserted into attribute or\n * element text.\n * @param value\n */\nfunction encodeEntities(value: string) {\n return value.replace(/&/g, '&')\n .replace(\n SURROGATE_PAIR_REGEXP,\n function(match: string) {\n const hi = match.charCodeAt(0);\n const low = match.charCodeAt(1);\n return '&#' + (((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000) + ';';\n })\n .replace(\n NON_ALPHANUMERIC_REGEXP,\n function(match: string) {\n return '&#' + match.charCodeAt(0) + ';';\n })\n .replace(/</g, '<')\n .replace(/>/g, '>');\n}\n\nlet inertBodyHelper: InertBodyHelper;\n\n/**\n * Sanitizes the given unsafe, untrusted HTML fragment, and returns HTML text that is safe to add to\n * the DOM in a browser environment.\n */\nexport function _sanitizeHtml(defaultDoc: any, unsafeHtmlInput: string): TrustedHTML|string {\n let inertBodyElement: HTMLElement|null = null;\n try {\n inertBodyHelper = inertBodyHelper || getInertBodyHelper(defaultDoc);\n // Make sure unsafeHtml is actually a string (TypeScript types are not enforced at runtime).\n let unsafeHtml = unsafeHtmlInput ? String(unsafeHtmlInput) : '';\n inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);\n\n // mXSS protection. Repeatedly parse the document to make sure it stabilizes, so that a browser\n // trying to auto-correct incorrect HTML cannot cause formerly inert HTML to become dangerous.\n let mXSSAttempts = 5;\n let parsedHtml = unsafeHtml;\n\n do {\n if (mXSSAttempts === 0) {\n throw new Error('Failed to sanitize html because the input is unstable');\n }\n mXSSAttempts--;\n\n unsafeHtml = parsedHtml;\n parsedHtml = inertBodyElement!.innerHTML;\n inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);\n } while (unsafeHtml !== parsedHtml);\n\n const sanitizer = new SanitizingHtmlSerializer();\n const safeHtml = sanitizer.sanitizeChildren(\n getTemplateContent(inertBodyElement!) as Element || inertBodyElement);\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && sanitizer.sanitizedSomething) {\n console.warn(\n 'WARNING: sanitizing HTML stripped some content, see https://g.co/ng/security#xss');\n }\n\n return trustedHTMLFromString(safeHtml);\n } finally {\n // In case anything goes wrong, clear out inertElement to reset the entire DOM structure.\n if (inertBodyElement) {\n const parent = getTemplateContent(inertBodyElement) || inertBodyElement;\n while (parent.firstChild) {\n parent.removeChild(parent.firstChild);\n }\n }\n }\n}\n\nexport function getTemplateContent(el: Node): Node|null {\n return 'content' in (el as any /** Microsoft/TypeScript#21517 */) && isTemplateElement(el) ?\n el.content :\n null;\n}\nfunction isTemplateElement(el: Node): el is HTMLTemplateElement {\n return el.nodeType === Node.ELEMENT_NODE && el.nodeName === 'TEMPLATE';\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 * A SecurityContext marks a location that has dangerous security implications, e.g. a DOM property\n * like `innerHTML` that could cause Cross Site Scripting (XSS) security bugs when improperly\n * handled.\n *\n * See DomSanitizer for more details on security in Angular applications.\n *\n * @publicApi\n */\nexport enum SecurityContext {\n NONE = 0,\n HTML = 1,\n STYLE = 2,\n SCRIPT = 3,\n URL = 4,\n RESOURCE_URL = 5,\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 {getDocument} from '../render3/interfaces/document';\nimport {SANITIZER} from '../render3/interfaces/view';\nimport {getLView} from '../render3/state';\nimport {renderStringify} from '../render3/util/stringify_utils';\nimport {TrustedHTML, TrustedScript, TrustedScriptURL} from '../util/security/trusted_type_defs';\nimport {trustedHTMLFromString, trustedScriptURLFromString} from '../util/security/trusted_types';\nimport {trustedHTMLFromStringBypass, trustedScriptFromStringBypass, trustedScriptURLFromStringBypass} from '../util/security/trusted_types_bypass';\n\nimport {allowSanitizationBypassAndThrow, BypassType, unwrapSafeValue} from './bypass';\nimport {_sanitizeHtml as _sanitizeHtml} from './html_sanitizer';\nimport {Sanitizer} from './sanitizer';\nimport {SecurityContext} from './security';\nimport {_sanitizeUrl as _sanitizeUrl} from './url_sanitizer';\n\n\n\n/**\n * An `html` sanitizer which converts untrusted `html` **string** into trusted string by removing\n * dangerous content.\n *\n * This method parses the `html` and locates potentially dangerous content (such as urls and\n * javascript) and removes it.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustHtml}.\n *\n * @param unsafeHtml untrusted `html`, typically from the user.\n * @returns `html` string which is safe to display to user, because all of the dangerous javascript\n * and urls have been removed.\n *\n * @codeGenApi\n */\nexport function ɵɵsanitizeHtml(unsafeHtml: any): TrustedHTML|string {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return trustedHTMLFromStringBypass(sanitizer.sanitize(SecurityContext.HTML, unsafeHtml) || '');\n }\n if (allowSanitizationBypassAndThrow(unsafeHtml, BypassType.Html)) {\n return trustedHTMLFromStringBypass(unwrapSafeValue(unsafeHtml));\n }\n return _sanitizeHtml(getDocument(), renderStringify(unsafeHtml));\n}\n\n/**\n * A `style` sanitizer which converts untrusted `style` **string** into trusted string by removing\n * dangerous content.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustStyle}.\n *\n * @param unsafeStyle untrusted `style`, typically from the user.\n * @returns `style` string which is safe to bind to the `style` properties.\n *\n * @codeGenApi\n */\nexport function ɵɵsanitizeStyle(unsafeStyle: any): string {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return sanitizer.sanitize(SecurityContext.STYLE, unsafeStyle) || '';\n }\n if (allowSanitizationBypassAndThrow(unsafeStyle, BypassType.Style)) {\n return unwrapSafeValue(unsafeStyle);\n }\n return renderStringify(unsafeStyle);\n}\n\n/**\n * A `url` sanitizer which converts untrusted `url` **string** into trusted string by removing\n * dangerous\n * content.\n *\n * This method parses the `url` and locates potentially dangerous content (such as javascript) and\n * removes it.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustUrl}.\n *\n * @param unsafeUrl untrusted `url`, typically from the user.\n * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because\n * all of the dangerous javascript has been removed.\n *\n * @codeGenApi\n */\nexport function ɵɵsanitizeUrl(unsafeUrl: any): string {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return sanitizer.sanitize(SecurityContext.URL, unsafeUrl) || '';\n }\n if (allowSanitizationBypassAndThrow(unsafeUrl, BypassType.Url)) {\n return unwrapSafeValue(unsafeUrl);\n }\n return _sanitizeUrl(renderStringify(unsafeUrl));\n}\n\n/**\n * A `url` sanitizer which only lets trusted `url`s through.\n *\n * This passes only `url`s marked trusted by calling {@link bypassSanitizationTrustResourceUrl}.\n *\n * @param unsafeResourceUrl untrusted `url`, typically from the user.\n * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because\n * only trusted `url`s have been allowed to pass.\n *\n * @codeGenApi\n */\nexport function ɵɵsanitizeResourceUrl(unsafeResourceUrl: any): TrustedScriptURL|string {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return trustedScriptURLFromStringBypass(\n sanitizer.sanitize(SecurityContext.RESOURCE_URL, unsafeResourceUrl) || '');\n }\n if (allowSanitizationBypassAndThrow(unsafeResourceUrl, BypassType.ResourceUrl)) {\n return trustedScriptURLFromStringBypass(unwrapSafeValue(unsafeResourceUrl));\n }\n throw new Error('unsafe value used in a resource URL context (see https://g.co/ng/security#xss)');\n}\n\n/**\n * A `script` sanitizer which only lets trusted javascript through.\n *\n * This passes only `script`s marked trusted by calling {@link\n * bypassSanitizationTrustScript}.\n *\n * @param unsafeScript untrusted `script`, typically from the user.\n * @returns `url` string which is safe to bind to the `<script>` element such as `<img src>`,\n * because only trusted `scripts` have been allowed to pass.\n *\n * @codeGenApi\n */\nexport function ɵɵsanitizeScript(unsafeScript: any): TrustedScript|string {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return trustedScriptFromStringBypass(\n sanitizer.sanitize(SecurityContext.SCRIPT, unsafeScript) || '');\n }\n if (allowSanitizationBypassAndThrow(unsafeScript, BypassType.Script)) {\n return trustedScriptFromStringBypass(unwrapSafeValue(unsafeScript));\n }\n throw new Error('unsafe value used in a script context');\n}\n\n/**\n * A template tag function for promoting the associated constant literal to a\n * TrustedHTML. Interpolation is explicitly not allowed.\n *\n * @param html constant template literal containing trusted HTML.\n * @returns TrustedHTML wrapping `html`.\n *\n * @security This is a security-sensitive function and should only be used to\n * convert constant values of attributes and properties found in\n * application-provided Angular templates to TrustedHTML.\n *\n * @codeGenApi\n */\nexport function ɵɵtrustConstantHtml(html: TemplateStringsArray): TrustedHTML|string {\n // The following runtime check ensures that the function was called as a\n // template tag (e.g. ɵɵtrustConstantHtml`content`), without any interpolation\n // (e.g. not ɵɵtrustConstantHtml`content ${variable}`). A TemplateStringsArray\n // is an array with a `raw` property that is also an array. The associated\n // template literal has no interpolation if and only if the length of the\n // TemplateStringsArray is 1.\n if (ngDevMode && (!Array.isArray(html) || !Array.isArray(html.raw) || html.length !== 1)) {\n throw new Error(`Unexpected interpolation in trusted HTML constant: ${html.join('?')}`);\n }\n return trustedHTMLFromString(html[0]);\n}\n\n/**\n * A template tag function for promoting the associated constant literal to a\n * TrustedScriptURL. Interpolation is explicitly not allowed.\n *\n * @param url constant template literal containing a trusted script URL.\n * @returns TrustedScriptURL wrapping `url`.\n *\n * @security This is a security-sensitive function and should only be used to\n * convert constant values of attributes and properties found in\n * application-provided Angular templates to TrustedScriptURL.\n *\n * @codeGenApi\n */\nexport function ɵɵtrustConstantResourceUrl(url: TemplateStringsArray): TrustedScriptURL|string {\n // The following runtime check ensures that the function was called as a\n // template tag (e.g. ɵɵtrustConstantResourceUrl`content`), without any\n // interpolation (e.g. not ɵɵtrustConstantResourceUrl`content ${variable}`). A\n // TemplateStringsArray is an array with a `raw` property that is also an\n // array. The associated template literal has no interpolation if and only if\n // the length of the TemplateStringsArray is 1.\n if (ngDevMode && (!Array.isArray(url) || !Array.isArray(url.raw) || url.length !== 1)) {\n throw new Error(`Unexpected interpolation in trusted URL constant: ${url.join('?')}`);\n }\n return trustedScriptURLFromString(url[0]);\n}\n\n/**\n * Detects which sanitizer to use for URL property, based on tag name and prop name.\n *\n * The rules are based on the RESOURCE_URL context config from\n * `packages/compiler/src/schema/dom_security_schema.ts`.\n * If tag and prop names don't match Resource URL schema, use URL sanitizer.\n */\nexport function getUrlSanitizer(tag: string, prop: string) {\n if ((prop === 'src' &&\n (tag === 'embed' || tag === 'frame' || tag === 'iframe' || tag === 'media' ||\n tag === 'script')) ||\n (prop === 'href' && (tag === 'base' || tag === 'link'))) {\n return ɵɵsanitizeResourceUrl;\n }\n return ɵɵsanitizeUrl;\n}\n\n/**\n * Sanitizes URL, selecting sanitizer function based on tag and property names.\n *\n * This function is used in case we can't define security context at compile time, when only prop\n * name is available. This happens when we generate host bindings for Directives/Components. The\n * host element is unknown at compile time, so we defer calculation of specific sanitizer to\n * runtime.\n *\n * @param unsafeUrl untrusted `url`, typically from the user.\n * @param tag target element tag name.\n * @param prop name of the property that contains the value.\n * @returns `url` string which is safe to bind.\n *\n * @codeGenApi\n */\nexport function ɵɵsanitizeUrlOrResourceUrl(unsafeUrl: any, tag: string, prop: string): any {\n return getUrlSanitizer(tag, prop)(unsafeUrl);\n}\n\nexport function validateAgainstEventProperties(name: string) {\n if (name.toLowerCase().startsWith('on')) {\n const msg = `Binding to event property '${name}' is disallowed for security reasons, ` +\n `please use (${name.slice(2)})=...` +\n `\\nIf '${name}' is a directive input, make sure the directive is imported by the` +\n ` current module.`;\n throw new Error(msg);\n }\n}\n\nexport function validateAgainstEventAttributes(name: string) {\n if (name.toLowerCase().startsWith('on')) {\n const msg = `Binding to event attribute '${name}' is disallowed for security reasons, ` +\n `please use (${name.slice(2)})=...`;\n throw new Error(msg);\n }\n}\n\nfunction getSanitizer(): Sanitizer|null {\n const lView = getLView();\n return lView && lView[SANITIZER];\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 */\nimport '../util/ng_dev_mode';\n\nimport {assertDefined, assertDomNode} from '../util/assert';\n\nimport {EMPTY_ARRAY} from '../util/empty';\nimport {LContext} from './interfaces/context';\nimport {TNode, TNodeFlags} from './interfaces/node';\nimport {RElement, RNode} from './interfaces/renderer_dom';\nimport {CONTEXT, HEADER_OFFSET, HOST, LView, TVIEW} from './interfaces/view';\nimport {getComponentLViewByIndex, unwrapRNode} from './util/view_utils';\n\n\n\n/**\n * Returns the matching `LContext` data for a given DOM node, directive or component instance.\n *\n * This function will examine the provided DOM element, component, or directive instance\\'s\n * monkey-patched property to derive the `LContext` data. Once called then the monkey-patched\n * value will be that of the newly created `LContext`.\n *\n * If the monkey-patched value is the `LView` instance then the context value for that\n * target will be created and the monkey-patch reference will be updated. Therefore when this\n * function is called it may mutate the provided element\\'s, component\\'s or any of the associated\n * directive\\'s monkey-patch values.\n *\n * If the monkey-patch value is not detected then the code will walk up the DOM until an element\n * is found which contains a monkey-patch reference. When that occurs then the provided element\n * will be updated with a new context (which is then returned). If the monkey-patch value is not\n * detected for a component/directive instance then it will throw an error (all components and\n * directives should be automatically monkey-patched by ivy).\n *\n * @param target Component, Directive or DOM Node.\n */\nexport function getLContext(target: any): LContext|null {\n let mpValue = readPatchedData(target);\n if (mpValue) {\n // only when it's an array is it considered an LView instance\n // ... otherwise it's an already constructed LContext instance\n if (Array.isArray(mpValue)) {\n const lView: LView = mpValue!;\n let nodeIndex: number;\n let component: any = undefined;\n let directives: any[]|null|undefined = undefined;\n\n if (isComponentInstance(target)) {\n nodeIndex = findViaComponent(lView, target);\n if (nodeIndex == -1) {\n throw new Error('The provided component was not found in the application');\n }\n component = target;\n } else if (isDirectiveInstance(target)) {\n nodeIndex = findViaDirective(lView, target);\n if (nodeIndex == -1) {\n throw new Error('The provided directive was not found in the application');\n }\n directives = getDirectivesAtNodeIndex(nodeIndex, lView, false);\n } else {\n nodeIndex = findViaNativeElement(lView, target as RElement);\n if (nodeIndex == -1) {\n return null;\n }\n }\n\n // the goal is not to fill the entire context full of data because the lookups\n // are expensive. Instead, only the target data (the element, component, container, ICU\n // expression or directive details) are filled into the context. If called multiple times\n // with different target values then the missing target data will be filled in.\n const native = unwrapRNode(lView[nodeIndex]);\n const existingCtx = readPatchedData(native);\n const context: LContext = (existingCtx && !Array.isArray(existingCtx)) ?\n existingCtx :\n createLContext(lView, nodeIndex, native);\n\n // only when the component has been discovered then update the monkey-patch\n if (component && context.component === undefined) {\n context.component = component;\n attachPatchData(context.component, context);\n }\n\n // only when the directives have been discovered then update the monkey-patch\n if (directives && context.directives === undefined) {\n context.directives = directives;\n for (let i = 0; i < directives.length; i++) {\n attachPatchData(directives[i], context);\n }\n }\n\n attachPatchData(context.native, context);\n mpValue = context;\n }\n } else {\n const rElement = target as RElement;\n ngDevMode && assertDomNode(rElement);\n\n // if the context is not found then we need to traverse upwards up the DOM\n // to find the nearest element that has already been monkey patched with data\n let parent = rElement as any;\n while (parent = parent.parentNode) {\n const parentContext = readPatchedData(parent);\n if (parentContext) {\n let lView: LView|null;\n if (Array.isArray(parentContext)) {\n lView = parentContext as LView;\n } else {\n lView = parentContext.lView;\n }\n\n // the edge of the app was also reached here through another means\n // (maybe because the DOM was changed manually).\n if (!lView) {\n return null;\n }\n\n const index = findViaNativeElement(lView, rElement);\n if (index >= 0) {\n const native = unwrapRNode(lView[index]);\n const context = createLContext(lView, index, native);\n attachPatchData(native, context);\n mpValue = context;\n break;\n }\n }\n }\n }\n return (mpValue as LContext) || null;\n}\n\n/**\n * Creates an empty instance of a `LContext` context\n */\nfunction createLContext(lView: LView, nodeIndex: number, native: RNode): LContext {\n return {\n lView,\n nodeIndex,\n native,\n component: undefined,\n directives: undefined,\n localRefs: undefined,\n };\n}\n\n/**\n * Takes a component instance and returns the view for that component.\n *\n * @param componentInstance\n * @returns The component's view\n */\nexport function getComponentViewByInstance(componentInstance: {}): LView {\n let lView = readPatchedData(componentInstance);\n let view: LView;\n\n if (Array.isArray(lView)) {\n const nodeIndex = findViaComponent(lView, componentInstance);\n view = getComponentLViewByIndex(nodeIndex, lView);\n const context = createLContext(lView, nodeIndex, view[HOST] as RElement);\n context.component = componentInstance;\n attachPatchData(componentInstance, context);\n attachPatchData(context.native, context);\n } else {\n const context = lView as any as LContext;\n view = getComponentLViewByIndex(context.nodeIndex, context.lView);\n }\n return view;\n}\n\n/**\n * This property will be monkey-patched on elements, components and directives.\n */\nconst MONKEY_PATCH_KEY_NAME = '__ngContext__';\n\n/**\n * Assigns the given data to the given target (which could be a component,\n * directive or DOM node instance) using monkey-patching.\n */\nexport function attachPatchData(target: any, data: LView|LContext) {\n ngDevMode && assertDefined(target, 'Target expected');\n target[MONKEY_PATCH_KEY_NAME] = data;\n}\n\n/**\n * Returns the monkey-patch value data present on the target (which could be\n * a component, directive or a DOM node).\n */\nexport function readPatchedData(target: any): LView|LContext|null {\n ngDevMode && assertDefined(target, 'Target expected');\n return target[MONKEY_PATCH_KEY_NAME] || null;\n}\n\nexport function readPatchedLView(target: any): LView|null {\n const value = readPatchedData(target);\n if (value) {\n return Array.isArray(value) ? value : (value as LContext).lView;\n }\n return null;\n}\n\nexport function isComponentInstance(instance: any): boolean {\n return instance && instance.constructor && instance.constructor.ɵcmp;\n}\n\nexport function isDirectiveInstance(instance: any): boolean {\n return instance && instance.constructor && instance.constructor.ɵdir;\n}\n\n/**\n * Locates the element within the given LView and returns the matching index\n */\nfunction findViaNativeElement(lView: LView, target: RElement): number {\n const tView = lView[TVIEW];\n for (let i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) {\n if (unwrapRNode(lView[i]) === target) {\n return i;\n }\n }\n\n return -1;\n}\n\n/**\n * Locates the next tNode (child, sibling or parent).\n */\nfunction traverseNextElement(tNode: TNode): TNode|null {\n if (tNode.child) {\n return tNode.child;\n } else if (tNode.next) {\n return tNode.next;\n } else {\n // Let's take the following template: <div><span>text</span></div><component/>\n // After checking the text node, we need to find the next parent that has a \"next\" TNode,\n // in this case the parent `div`, so that we can find the component.\n while (tNode.parent && !tNode.parent.next) {\n tNode = tNode.parent;\n }\n return tNode.parent && tNode.parent.next;\n }\n}\n\n/**\n * Locates the component within the given LView and returns the matching index\n */\nfunction findViaComponent(lView: LView, componentInstance: {}): number {\n const componentIndices = lView[TVIEW].components;\n if (componentIndices) {\n for (let i = 0; i < componentIndices.length; i++) {\n const elementComponentIndex = componentIndices[i];\n const componentView = getComponentLViewByIndex(elementComponentIndex, lView);\n if (componentView[CONTEXT] === componentInstance) {\n return elementComponentIndex;\n }\n }\n } else {\n const rootComponentView = getComponentLViewByIndex(HEADER_OFFSET, lView);\n const rootComponent = rootComponentView[CONTEXT];\n if (rootComponent === componentInstance) {\n // we are dealing with the root element here therefore we know that the\n // element is the very first element after the HEADER data in the lView\n return HEADER_OFFSET;\n }\n }\n return -1;\n}\n\n/**\n * Locates the directive within the given LView and returns the matching index\n */\nfunction findViaDirective(lView: LView, directiveInstance: {}): number {\n // if a directive is monkey patched then it will (by default)\n // have a reference to the LView of the current view. The\n // element bound to the directive being search lives somewhere\n // in the view data. We loop through the nodes and check their\n // list of directives for the instance.\n let tNode = lView[TVIEW].firstChild;\n while (tNode) {\n const directiveIndexStart = tNode.directiveStart;\n const directiveIndexEnd = tNode.directiveEnd;\n for (let i = directiveIndexStart; i < directiveIndexEnd; i++) {\n if (lView[i] === directiveInstance) {\n return tNode.index;\n }\n }\n tNode = traverseNextElement(tNode);\n }\n return -1;\n}\n\n/**\n * Returns a list of directives extracted from the given view based on the\n * provided list of directive index values.\n *\n * @param nodeIndex The node index\n * @param lView The target view data\n * @param includeComponents Whether or not to include components in returned directives\n */\nexport function getDirectivesAtNodeIndex(\n nodeIndex: number, lView: LView, includeComponents: boolean): any[]|null {\n const tNode = lView[TVIEW].data[nodeIndex] as TNode;\n let directiveStartIndex = tNode.directiveStart;\n if (directiveStartIndex == 0) return EMPTY_ARRAY;\n const directiveEndIndex = tNode.directiveEnd;\n if (!includeComponents && tNode.flags & TNodeFlags.isComponentHost) directiveStartIndex++;\n return lView.slice(directiveStartIndex, directiveEndIndex);\n}\n\nexport function getComponentAtNodeIndex(nodeIndex: number, lView: LView): {}|null {\n const tNode = lView[TVIEW].data[nodeIndex] as TNode;\n let directiveStartIndex = tNode.directiveStart;\n return tNode.flags & TNodeFlags.isComponentHost ? lView[directiveStartIndex] : null;\n}\n\n/**\n * Returns a map of local references (local reference name => element or directive instance) that\n * exist on a given element.\n */\nexport function discoverLocalRefs(lView: LView, nodeIndex: number): {[key: string]: any}|null {\n const tNode = lView[TVIEW].data[nodeIndex] as TNode;\n if (tNode && tNode.localNames) {\n const result: {[key: string]: any} = {};\n let localIndex = tNode.index + 1;\n for (let i = 0; i < tNode.localNames.length; i += 2) {\n result[tNode.localNames[i]] = lView[localIndex];\n localIndex++;\n }\n return result;\n }\n\n return null;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport const ERROR_TYPE = 'ngType';\nexport const ERROR_DEBUG_CONTEXT = 'ngDebugContext';\nexport const ERROR_ORIGINAL_ERROR = 'ngOriginalError';\nexport const ERROR_LOGGER = 'ngErrorLogger';\n\n\nexport function wrappedError(message: string, originalError: any): Error {\n const msg = `${message} caused by: ${\n originalError instanceof Error ? originalError.message : originalError}`;\n const error = Error(msg);\n (error as any)[ERROR_ORIGINAL_ERROR] = originalError;\n return error;\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 {ERROR_DEBUG_CONTEXT, ERROR_LOGGER, ERROR_ORIGINAL_ERROR, ERROR_TYPE} from './util/errors';\nimport {DebugContext} from './view/types';\n\nexport function getType(error: Error): Function {\n return (error as any)[ERROR_TYPE];\n}\n\nexport function getDebugContext(error: Error): DebugContext {\n return (error as any)[ERROR_DEBUG_CONTEXT];\n}\n\nexport function getOriginalError(error: Error): Error {\n return (error as any)[ERROR_ORIGINAL_ERROR];\n}\n\nexport function getErrorLogger(error: unknown): (console: Console, ...values: any[]) => void {\n return error && (error as any)[ERROR_LOGGER] || defaultErrorLogger;\n}\n\n\nfunction defaultErrorLogger(console: Console, ...values: any[]) {\n (<any>console.error)(...values);\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 {getDebugContext, getErrorLogger, getOriginalError} from './errors';\nimport {DebugContext} from './view/types';\n\n\n\n/**\n * Provides a hook for centralized exception handling.\n *\n * The default implementation of `ErrorHandler` prints error messages to the `console`. To\n * intercept error handling, write a custom exception handler that replaces this default as\n * appropriate for your app.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * class MyErrorHandler implements ErrorHandler {\n * handleError(error) {\n * // do something with the exception\n * }\n * }\n *\n * @NgModule({\n * providers: [{provide: ErrorHandler, useClass: MyErrorHandler}]\n * })\n * class MyModule {}\n * ```\n *\n * @publicApi\n */\nexport class ErrorHandler {\n /**\n * @internal\n */\n _console: Console = console;\n\n handleError(error: any): void {\n const originalError = this._findOriginalError(error);\n const context = this._findContext(error);\n // Note: Browser consoles show the place from where console.error was called.\n // We can use this to give users additional information about the error.\n const errorLogger = getErrorLogger(error);\n\n errorLogger(this._console, `ERROR`, error);\n if (originalError) {\n errorLogger(this._console, `ORIGINAL ERROR`, originalError);\n }\n if (context) {\n errorLogger(this._console, 'ERROR CONTEXT', context);\n }\n }\n\n /** @internal */\n _findContext(error: any): DebugContext|null {\n return error ? (getDebugContext(error) || this._findContext(getOriginalError(error))) : null;\n }\n\n /** @internal */\n _findOriginalError(error: any): Error|null {\n let e = error && getOriginalError(error);\n while (e && getOriginalError(e)) {\n e = getOriginalError(e);\n }\n\n return e || null;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\n/**\n * A schema definition associated with an NgModule.\n *\n * @see `@NgModule`, `CUSTOM_ELEMENTS_SCHEMA`, `NO_ERRORS_SCHEMA`\n *\n * @param name The name of a defined schema.\n *\n * @publicApi\n */\nexport interface SchemaMetadata {\n name: string;\n}\n\n/**\n * Defines a schema that allows an NgModule to contain the following:\n * - Non-Angular elements named with dash case (`-`).\n * - Element properties named with dash case (`-`).\n * Dash case is the naming convention for custom elements.\n *\n * @publicApi\n */\nexport const CUSTOM_ELEMENTS_SCHEMA: SchemaMetadata = {\n name: 'custom-elements'\n};\n\n/**\n * Defines a schema that allows any property on any element.\n *\n * This schema allows you to ignore the errors related to any unknown elements or properties in a\n * template. The usage of this schema is generally discouraged because it prevents useful validation\n * and may hide real errors in your template. Consider using the `CUSTOM_ELEMENTS_SCHEMA` instead.\n *\n * @publicApi\n */\nexport const NO_ERRORS_SCHEMA: SchemaMetadata = {\n name: 'no-errors-schema'\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 * Disallowed strings in the comment.\n *\n * see: https://html.spec.whatwg.org/multipage/syntax.html#comments\n */\nconst COMMENT_DISALLOWED = /^>|^->|<!--|-->|--!>|<!-$/g;\n/**\n * Delimiter in the disallowed strings which needs to be wrapped with zero with character.\n */\nconst COMMENT_DELIMITER = /(<|>)/;\nconst COMMENT_DELIMITER_ESCAPED = '\\u200B$1\\u200B';\n\n/**\n * Escape the content of comment strings so that it can be safely inserted into a comment node.\n *\n * The issue is that HTML does not specify any way to escape comment end text inside the comment.\n * Consider: `<!-- The way you close a comment is with \">\", and \"->\" at the beginning or by \"-->\" or\n * \"--!>\" at the end. -->`. Above the `\"-->\"` is meant to be text not an end to the comment. This\n * can be created programmatically through DOM APIs. (`<!--` are also disallowed.)\n *\n * see: https://html.spec.whatwg.org/multipage/syntax.html#comments\n *\n * ```\n * div.innerHTML = div.innerHTML\n * ```\n *\n * One would expect that the above code would be safe to do, but it turns out that because comment\n * text is not escaped, the comment may contain text which will prematurely close the comment\n * opening up the application for XSS attack. (In SSR we programmatically create comment nodes which\n * may contain such text and expect them to be safe.)\n *\n * This function escapes the comment text by looking for comment delimiters (`<` and `>`) and\n * surrounding them with `_>_` where the `_` is a zero width space `\\u200B`. The result is that if a\n * comment contains any of the comment start/end delimiters (such as `<!--`, `-->` or `--!>`) the\n * text it will render normally but it will not cause the HTML parser to close/open the comment.\n *\n * @param value text to make safe for comment node by escaping the comment open/close character\n * sequence.\n */\nexport function escapeCommentText(value: string): string {\n return value.replace(\n COMMENT_DISALLOWED, (text) => text.replace(COMMENT_DELIMITER, COMMENT_DELIMITER_ESCAPED));\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 './ng_dev_mode';\nimport {newTrustedFunctionForDev} from './security/trusted_types';\n\n/**\n * THIS FILE CONTAINS CODE WHICH SHOULD BE TREE SHAKEN AND NEVER CALLED FROM PRODUCTION CODE!!!\n */\n\n\n/**\n * Creates an `Array` construction with a given name. This is useful when\n * looking for memory consumption to see what time of array it is.\n *\n *\n * @param name Name to give to the constructor\n * @returns A subclass of `Array` if possible. This can only be done in\n * environments which support `class` construct.\n */\nexport function createNamedArrayType(name: string): typeof Array {\n // This should never be called in prod mode, so let's verify that is the case.\n if (ngDevMode) {\n try {\n // If this function were compromised the following could lead to arbitrary\n // script execution. We bless it with Trusted Types anyway since this\n // function is stripped out of production binaries.\n return (newTrustedFunctionForDev('Array', `return class ${name} extends Array{}`))(Array);\n } catch (e) {\n // If it does not work just give up and fall back to regular Array.\n return Array;\n }\n } else {\n throw new Error(\n 'Looks like we are in \\'prod mode\\', but we are creating a named Array type, which is wrong! Check your code');\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport function normalizeDebugBindingName(name: string) {\n // Attribute names with `$` (eg `x-y$`) are valid per spec, but unsupported by some browsers\n name = camelCaseToDashCase(name.replace(/[$@]/g, '_'));\n return `ng-reflect-${name}`;\n}\n\nconst CAMEL_CASE_REGEXP = /([A-Z])/g;\n\nfunction camelCaseToDashCase(input: string): string {\n return input.replace(CAMEL_CASE_REGEXP, (...m: any[]) => '-' + m[1].toLowerCase());\n}\n\nexport function normalizeDebugBindingValue(value: any): string {\n try {\n // Limit the size of the value as otherwise the DOM just gets polluted.\n return value != null ? value.toString().slice(0, 30) : value;\n } catch (e) {\n return '[ERROR] Exception while trying to serialize the 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 {global} from '../../util/global';\nimport {RElement} from '../interfaces/renderer_dom';\n\n\nexport const defaultScheduler =\n (() => (\n typeof requestAnimationFrame !== 'undefined' &&\n requestAnimationFrame || // browser only\n setTimeout // everything else\n )\n .bind(global))();\n\n/**\n *\n * @codeGenApi\n */\nexport function ɵɵresolveWindow(element: RElement&{ownerDocument: Document}) {\n return element.ownerDocument.defaultView;\n}\n\n/**\n *\n * @codeGenApi\n */\nexport function ɵɵresolveDocument(element: RElement&{ownerDocument: Document}) {\n return element.ownerDocument;\n}\n\n/**\n *\n * @codeGenApi\n */\nexport function ɵɵresolveBody(element: RElement&{ownerDocument: Document}) {\n return element.ownerDocument.body;\n}\n\n/**\n * The special delimiter we use to separate property names, prefixes, and suffixes\n * in property binding metadata. See storeBindingMetadata().\n *\n * We intentionally use the Unicode \"REPLACEMENT CHARACTER\" (U+FFFD) as a delimiter\n * because it is a very uncommon character that is unlikely to be part of a user's\n * property names or interpolation strings. If it is in fact used in a property\n * binding, DebugElement.properties will not return the correct value for that\n * binding. However, there should be no runtime effect for real applications.\n *\n * This character is typically rendered as a question mark inside of a diamond.\n * See https://en.wikipedia.org/wiki/Specials_(Unicode_block)\n *\n */\nexport const INTERPOLATION_DELIMITER = `�`;\n\n/**\n * Unwrap a value which might be behind a closure (for forward declaration reasons).\n */\nexport function maybeUnwrapFn<T>(value: T|(() => T)): T {\n if (value instanceof Function) {\n return value();\n } else {\n return value;\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 */\nimport {RuntimeError, RuntimeErrorCode} from './error_code';\nimport {TNode} from './interfaces/node';\nimport {LView, TVIEW} from './interfaces/view';\nimport {INTERPOLATION_DELIMITER} from './util/misc_utils';\n\n\n\n/** Called when there are multiple component selectors that match a given node */\nexport function throwMultipleComponentError(tNode: TNode): never {\n throw new RuntimeError(\n RuntimeErrorCode.MULTIPLE_COMPONENTS_MATCH,\n `Multiple components match node with tagname ${tNode.value}`);\n}\n\n/** Throws an ExpressionChangedAfterChecked error if checkNoChanges mode is on. */\nexport function throwErrorIfNoChangesMode(\n creationMode: boolean, oldValue: any, currValue: any, propName?: string): never {\n const field = propName ? ` for '${propName}'` : '';\n let msg =\n `ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value${\n field}: '${oldValue}'. Current value: '${currValue}'.`;\n if (creationMode) {\n msg +=\n ` It seems like the view has been created after its parent and its children have been dirty checked.` +\n ` Has it been created in a change detection hook?`;\n }\n // TODO: include debug context, see `viewDebugError` function in\n // `packages/core/src/view/errors.ts` for reference.\n throw new RuntimeError(RuntimeErrorCode.EXPRESSION_CHANGED_AFTER_CHECKED, msg);\n}\n\nfunction constructDetailsForInterpolation(\n lView: LView, rootIndex: number, expressionIndex: number, meta: string, changedValue: any) {\n const [propName, prefix, ...chunks] = meta.split(INTERPOLATION_DELIMITER);\n let oldValue = prefix, newValue = prefix;\n for (let i = 0; i < chunks.length; i++) {\n const slotIdx = rootIndex + i;\n oldValue += `${lView[slotIdx]}${chunks[i]}`;\n newValue += `${slotIdx === expressionIndex ? changedValue : lView[slotIdx]}${chunks[i]}`;\n }\n return {propName, oldValue, newValue};\n}\n\n/**\n * Constructs an object that contains details for the ExpressionChangedAfterItHasBeenCheckedError:\n * - property name (for property bindings or interpolations)\n * - old and new values, enriched using information from metadata\n *\n * More information on the metadata storage format can be found in `storePropertyBindingMetadata`\n * function description.\n */\nexport function getExpressionChangedErrorDetails(\n lView: LView, bindingIndex: number, oldValue: any,\n newValue: any): {propName?: string, oldValue: any, newValue: any} {\n const tData = lView[TVIEW].data;\n const metadata = tData[bindingIndex];\n\n if (typeof metadata === 'string') {\n // metadata for property interpolation\n if (metadata.indexOf(INTERPOLATION_DELIMITER) > -1) {\n return constructDetailsForInterpolation(\n lView, bindingIndex, bindingIndex, metadata, newValue);\n }\n // metadata for property binding\n return {propName: metadata, oldValue, newValue};\n }\n\n // metadata is not available for this expression, check if this expression is a part of the\n // property interpolation by going from the current binding index left and look for a string that\n // contains INTERPOLATION_DELIMITER, the layout in tView.data for this case will look like this:\n // [..., 'id�Prefix � and � suffix', null, null, null, ...]\n if (metadata === null) {\n let idx = bindingIndex - 1;\n while (typeof tData[idx] !== 'string' && tData[idx + 1] === null) {\n idx--;\n }\n const meta = tData[idx];\n if (typeof meta === 'string') {\n const matches = meta.match(new RegExp(INTERPOLATION_DELIMITER, 'g'));\n // first interpolation delimiter separates property name from interpolation parts (in case of\n // property interpolations), so we subtract one from total number of found delimiters\n if (matches && (matches.length - 1) > bindingIndex - idx) {\n return constructDetailsForInterpolation(lView, idx, bindingIndex, meta, newValue);\n }\n }\n }\n return {propName: undefined, oldValue, newValue};\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 {ViewEncapsulation} from '../metadata/view';\n\n\n/**\n * Used by `RendererFactory2` to associate custom rendering data and styles\n * with a rendering implementation.\n * @publicApi\n */\nexport interface RendererType2 {\n /**\n * A unique identifying string for the new renderer, used when creating\n * unique styles for encapsulation.\n */\n id: string;\n /**\n * The view encapsulation type, which determines how styles are applied to\n * DOM elements. One of\n * - `Emulated` (default): Emulate native scoping of styles.\n * - `Native`: Use the native encapsulation mechanism of the renderer.\n * - `ShadowDom`: Use modern [Shadow\n * DOM](https://w3c.github.io/webcomponents/spec/shadow/) and\n * create a ShadowRoot for component's host element.\n * - `None`: Do not provide any template or style encapsulation.\n */\n encapsulation: ViewEncapsulation;\n /**\n * Defines CSS styles to be stored on a renderer instance.\n */\n styles: (string|any[])[];\n /**\n * Defines arbitrary developer-defined data to be stored on a renderer instance.\n * This is useful for renderers that delegate to other renderers.\n */\n data: {[kind: string]: any};\n}\n\n\n/**\n * Flags for renderer-specific style modifiers.\n * @publicApi\n */\nexport enum RendererStyleFlags2 {\n // TODO(misko): This needs to be refactored into a separate file so that it can be imported from\n // `node_manipulation.ts` Currently doing the import cause resolution order to change and fails\n // the tests. The work around is to have hard coded value in `node_manipulation.ts` for now.\n /**\n * Marks a style as important.\n */\n Important = 1 << 0,\n /**\n * Marks a style as using dash case naming (this-is-dash-case).\n */\n DashCase = 1 << 1\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 * @fileoverview\n *\n * This file provides mechanism by which code relevant to the `TIcuContainerNode` is only loaded if\n * ICU is present in the template.\n */\n\nimport {TIcuContainerNode} from '../interfaces/node';\nimport {RNode} from '../interfaces/renderer_dom';\nimport {LView} from '../interfaces/view';\n\n\nlet _icuContainerIterate: (tIcuContainerNode: TIcuContainerNode, lView: LView) =>\n (() => RNode | null);\n\n/**\n * Iterator which provides ability to visit all of the `TIcuContainerNode` root `RNode`s.\n */\nexport function icuContainerIterate(tIcuContainerNode: TIcuContainerNode, lView: LView): () =>\n RNode | null {\n return _icuContainerIterate(tIcuContainerNode, lView);\n}\n\n/**\n * Ensures that `IcuContainerVisitor`'s implementation is present.\n *\n * This function is invoked when i18n instruction comes across an ICU. The purpose is to allow the\n * bundler to tree shake ICU logic and only load it if ICU instruction is executed.\n */\nexport function ensureIcuContainerVisitorLoaded(\n loader: () => ((tIcuContainerNode: TIcuContainerNode, lView: LView) => (() => RNode | null))) {\n if (_icuContainerIterate === undefined) {\n // Do not inline this function. We want to keep `ensureIcuContainerVisitorLoaded` light, so it\n // can be inlined into call-site.\n _icuContainerIterate = loader();\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\n\n/**\n * Expresses a single CSS Selector.\n *\n * Beginning of array\n * - First index: element name\n * - Subsequent odd indices: attr keys\n * - Subsequent even indices: attr values\n *\n * After SelectorFlags.CLASS flag\n * - Class name values\n *\n * SelectorFlags.NOT flag\n * - Changes the mode to NOT\n * - Can be combined with other flags to set the element / attr / class mode\n *\n * e.g. SelectorFlags.NOT | SelectorFlags.ELEMENT\n *\n * Example:\n * Original: `div.foo.bar[attr1=val1][attr2]`\n * Parsed: ['div', 'attr1', 'val1', 'attr2', '', SelectorFlags.CLASS, 'foo', 'bar']\n *\n * Original: 'div[attr1]:not(.foo[attr2])\n * Parsed: [\n * 'div', 'attr1', '',\n * SelectorFlags.NOT | SelectorFlags.ATTRIBUTE 'attr2', '', SelectorFlags.CLASS, 'foo'\n * ]\n *\n * See more examples in node_selector_matcher_spec.ts\n */\nexport type CssSelector = (string|SelectorFlags)[];\n\n/**\n * A list of CssSelectors.\n *\n * A directive or component can have multiple selectors. This type is used for\n * directive defs so any of the selectors in the list will match that directive.\n *\n * Original: 'form, [ngForm]'\n * Parsed: [['form'], ['', 'ngForm', '']]\n */\nexport type CssSelectorList = CssSelector[];\n\n/**\n * List of slots for a projection. A slot can be either based on a parsed CSS selector\n * which will be used to determine nodes which are projected into that slot.\n *\n * When set to \"*\", the slot is reserved and can be used for multi-slot projection\n * using {@link ViewContainerRef#createComponent}. The last slot that specifies the\n * wildcard selector will retrieve all projectable nodes which do not match any selector.\n */\nexport type ProjectionSlots = (CssSelectorList|'*')[];\n\n/** Flags used to build up CssSelectors */\nexport const enum SelectorFlags {\n /** Indicates this is the beginning of a new negative selector */\n NOT = 0b0001,\n\n /** Mode for matching attributes */\n ATTRIBUTE = 0b0010,\n\n /** Mode for matching tag names */\n ELEMENT = 0b0100,\n\n /** Mode for matching class names */\n CLASS = 0b1000,\n}\n\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nexport const unusedValueExportToPlacateAjd = 1;\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 {assertDefined} from '../../util/assert';\nimport {assertLView} from '../assert';\nimport {readPatchedLView} from '../context_discovery';\nimport {LContainer} from '../interfaces/container';\nimport {isLContainer, isLView} from '../interfaces/type_checks';\nimport {CHILD_HEAD, CONTEXT, FLAGS, LView, LViewFlags, NEXT, PARENT, RootContext} from '../interfaces/view';\n\n\n/**\n * Gets the parent LView of the passed LView, if the PARENT is an LContainer, will get the parent of\n * that LContainer, which is an LView\n * @param lView the lView whose parent to get\n */\nexport function getLViewParent(lView: LView): LView|null {\n ngDevMode && assertLView(lView);\n const parent = lView[PARENT];\n return isLContainer(parent) ? parent[PARENT]! : parent;\n}\n\n/**\n * Retrieve the root view from any component or `LView` by walking the parent `LView` until\n * reaching the root `LView`.\n *\n * @param componentOrLView any component or `LView`\n */\nexport function getRootView(componentOrLView: LView|{}): LView {\n ngDevMode && assertDefined(componentOrLView, 'component');\n let lView = isLView(componentOrLView) ? componentOrLView : readPatchedLView(componentOrLView)!;\n while (lView && !(lView[FLAGS] & LViewFlags.IsRoot)) {\n lView = getLViewParent(lView)!;\n }\n ngDevMode && assertLView(lView);\n return lView;\n}\n\n/**\n * Returns the `RootContext` instance that is associated with\n * the application where the target is situated. It does this by walking the parent views until it\n * gets to the root view, then getting the context off of that.\n *\n * @param viewOrComponent the `LView` or component to get the root context for.\n */\nexport function getRootContext(viewOrComponent: LView|{}): RootContext {\n const rootView = getRootView(viewOrComponent);\n ngDevMode &&\n assertDefined(rootView[CONTEXT], 'RootView has no context. Perhaps it is disconnected?');\n return rootView[CONTEXT] as RootContext;\n}\n\n\n/**\n * Gets the first `LContainer` in the LView or `null` if none exists.\n */\nexport function getFirstLContainer(lView: LView): LContainer|null {\n return getNearestLContainer(lView[CHILD_HEAD]);\n}\n\n/**\n * Gets the next `LContainer` that is a sibling of the given container.\n */\nexport function getNextLContainer(container: LContainer): LContainer|null {\n return getNearestLContainer(container[NEXT]);\n}\n\nfunction getNearestLContainer(viewOrContainer: LContainer|LView|null) {\n while (viewOrContainer !== null && !isLContainer(viewOrContainer)) {\n viewOrContainer = viewOrContainer[NEXT];\n }\n return viewOrContainer;\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 {ViewEncapsulation} from '../metadata/view';\nimport {Renderer2} from '../render/api';\nimport {RendererStyleFlags2} from '../render/api_flags';\nimport {addToArray, removeFromArray} from '../util/array_utils';\nimport {assertDefined, assertDomNode, assertEqual, assertFunction, assertString} from '../util/assert';\nimport {escapeCommentText} from '../util/dom';\n\nimport {assertLContainer, assertLView, assertParentView, assertProjectionSlots, assertTNodeForLView} from './assert';\nimport {attachPatchData} from './context_discovery';\nimport {icuContainerIterate} from './i18n/i18n_tree_shaking';\nimport {CONTAINER_HEADER_OFFSET, HAS_TRANSPLANTED_VIEWS, LContainer, MOVED_VIEWS, NATIVE, unusedValueExportToPlacateAjd as unused1} from './interfaces/container';\nimport {ComponentDef} from './interfaces/definition';\nimport {NodeInjectorFactory} from './interfaces/injector';\nimport {TElementNode, TIcuContainerNode, TNode, TNodeFlags, TNodeType, TProjectionNode, unusedValueExportToPlacateAjd as unused2} from './interfaces/node';\nimport {unusedValueExportToPlacateAjd as unused3} from './interfaces/projection';\nimport {isProceduralRenderer, ProceduralRenderer3, Renderer3, unusedValueExportToPlacateAjd as unused4} from './interfaces/renderer';\nimport {RComment, RElement, RNode, RText} from './interfaces/renderer_dom';\nimport {isLContainer, isLView} from './interfaces/type_checks';\nimport {CHILD_HEAD, CLEANUP, DECLARATION_COMPONENT_VIEW, DECLARATION_LCONTAINER, DestroyHookData, FLAGS, HookData, HookFn, HOST, LView, LViewFlags, NEXT, PARENT, QUERIES, RENDERER, T_HOST, TVIEW, TView, TViewType, unusedValueExportToPlacateAjd as unused5} from './interfaces/view';\nimport {assertTNodeType} from './node_assert';\nimport {profiler, ProfilerEvent} from './profiler';\nimport {getLViewParent} from './util/view_traversal_utils';\nimport {getNativeByTNode, unwrapRNode, updateTransplantedViewCount} from './util/view_utils';\n\n\n\nconst unusedValueToPlacateAjd = unused1 + unused2 + unused3 + unused4 + unused5;\n\nconst enum WalkTNodeTreeAction {\n /** node create in the native environment. Run on initial creation. */\n Create = 0,\n\n /**\n * node insert in the native environment.\n * Run when existing node has been detached and needs to be re-attached.\n */\n Insert = 1,\n\n /** node detach from the native environment */\n Detach = 2,\n\n /** node destruction using the renderer's API */\n Destroy = 3,\n}\n\n\n\n/**\n * NOTE: for performance reasons, the possible actions are inlined within the function instead of\n * being passed as an argument.\n */\nfunction applyToElementOrContainer(\n action: WalkTNodeTreeAction, renderer: Renderer3, parent: RElement|null,\n lNodeToHandle: RNode|LContainer|LView, beforeNode?: RNode|null) {\n // If this slot was allocated for a text node dynamically created by i18n, the text node itself\n // won't be created until i18nApply() in the update block, so this node should be skipped.\n // For more info, see \"ICU expressions should work inside an ngTemplateOutlet inside an ngFor\"\n // in `i18n_spec.ts`.\n if (lNodeToHandle != null) {\n let lContainer: LContainer|undefined;\n let isComponent = false;\n // We are expecting an RNode, but in the case of a component or LContainer the `RNode` is\n // wrapped in an array which needs to be unwrapped. We need to know if it is a component and if\n // it has LContainer so that we can process all of those cases appropriately.\n if (isLContainer(lNodeToHandle)) {\n lContainer = lNodeToHandle;\n } else if (isLView(lNodeToHandle)) {\n isComponent = true;\n ngDevMode && assertDefined(lNodeToHandle[HOST], 'HOST must be defined for a component LView');\n lNodeToHandle = lNodeToHandle[HOST]!;\n }\n const rNode: RNode = unwrapRNode(lNodeToHandle);\n ngDevMode && !isProceduralRenderer(renderer) && assertDomNode(rNode);\n\n if (action === WalkTNodeTreeAction.Create && parent !== null) {\n if (beforeNode == null) {\n nativeAppendChild(renderer, parent, rNode);\n } else {\n nativeInsertBefore(renderer, parent, rNode, beforeNode || null, true);\n }\n } else if (action === WalkTNodeTreeAction.Insert && parent !== null) {\n nativeInsertBefore(renderer, parent, rNode, beforeNode || null, true);\n } else if (action === WalkTNodeTreeAction.Detach) {\n nativeRemoveNode(renderer, rNode, isComponent);\n } else if (action === WalkTNodeTreeAction.Destroy) {\n ngDevMode && ngDevMode.rendererDestroyNode++;\n (renderer as ProceduralRenderer3).destroyNode!(rNode);\n }\n if (lContainer != null) {\n applyContainer(renderer, action, lContainer, parent, beforeNode);\n }\n }\n}\n\nexport function createTextNode(renderer: Renderer3, value: string): RText {\n ngDevMode && ngDevMode.rendererCreateTextNode++;\n ngDevMode && ngDevMode.rendererSetText++;\n return isProceduralRenderer(renderer) ? renderer.createText(value) :\n renderer.createTextNode(value);\n}\n\nexport function updateTextNode(renderer: Renderer3, rNode: RText, value: string): void {\n ngDevMode && ngDevMode.rendererSetText++;\n isProceduralRenderer(renderer) ? renderer.setValue(rNode, value) : rNode.textContent = value;\n}\n\nexport function createCommentNode(renderer: Renderer3, value: string): RComment {\n ngDevMode && ngDevMode.rendererCreateComment++;\n // isProceduralRenderer check is not needed because both `Renderer2` and `Renderer3` have the same\n // method name.\n return renderer.createComment(escapeCommentText(value));\n}\n\n/**\n * Creates a native element from a tag name, using a renderer.\n * @param renderer A renderer to use\n * @param name the tag name\n * @param namespace Optional namespace for element.\n * @returns the element created\n */\nexport function createElementNode(\n renderer: Renderer3, name: string, namespace: string|null): RElement {\n ngDevMode && ngDevMode.rendererCreateElement++;\n if (isProceduralRenderer(renderer)) {\n return renderer.createElement(name, namespace);\n } else {\n return namespace === null ? renderer.createElement(name) :\n renderer.createElementNS(namespace, name);\n }\n}\n\n\n/**\n * Removes all DOM elements associated with a view.\n *\n * Because some root nodes of the view may be containers, we sometimes need\n * to propagate deeply into the nested containers to remove all elements in the\n * views beneath it.\n *\n * @param tView The `TView' of the `LView` from which elements should be added or removed\n * @param lView The view from which elements should be added or removed\n */\nexport function removeViewFromContainer(tView: TView, lView: LView): void {\n const renderer = lView[RENDERER];\n applyView(tView, lView, renderer, WalkTNodeTreeAction.Detach, null, null);\n lView[HOST] = null;\n lView[T_HOST] = null;\n}\n\n/**\n * Adds all DOM elements associated with a view.\n *\n * Because some root nodes of the view may be containers, we sometimes need\n * to propagate deeply into the nested containers to add all elements in the\n * views beneath it.\n *\n * @param tView The `TView' of the `LView` from which elements should be added or removed\n * @param parentTNode The `TNode` where the `LView` should be attached to.\n * @param renderer Current renderer to use for DOM manipulations.\n * @param lView The view from which elements should be added or removed\n * @param parentNativeNode The parent `RElement` where it should be inserted into.\n * @param beforeNode The node before which elements should be added, if insert mode\n */\nexport function addViewToContainer(\n tView: TView, parentTNode: TNode, renderer: Renderer3, lView: LView, parentNativeNode: RElement,\n beforeNode: RNode|null): void {\n lView[HOST] = parentNativeNode;\n lView[T_HOST] = parentTNode;\n applyView(tView, lView, renderer, WalkTNodeTreeAction.Insert, parentNativeNode, beforeNode);\n}\n\n\n/**\n * Detach a `LView` from the DOM by detaching its nodes.\n *\n * @param tView The `TView' of the `LView` to be detached\n * @param lView the `LView` to be detached.\n */\nexport function renderDetachView(tView: TView, lView: LView) {\n applyView(tView, lView, lView[RENDERER], WalkTNodeTreeAction.Detach, null, null);\n}\n\n/**\n * Traverses down and up the tree of views and containers to remove listeners and\n * call onDestroy callbacks.\n *\n * Notes:\n * - Because it's used for onDestroy calls, it needs to be bottom-up.\n * - Must process containers instead of their views to avoid splicing\n * when views are destroyed and re-added.\n * - Using a while loop because it's faster than recursion\n * - Destroy only called on movement to sibling or movement to parent (laterally or up)\n *\n * @param rootView The view to destroy\n */\nexport function destroyViewTree(rootView: LView): void {\n // If the view has no children, we can clean it up and return early.\n let lViewOrLContainer = rootView[CHILD_HEAD];\n if (!lViewOrLContainer) {\n return cleanUpView(rootView[TVIEW], rootView);\n }\n\n while (lViewOrLContainer) {\n let next: LView|LContainer|null = null;\n\n if (isLView(lViewOrLContainer)) {\n // If LView, traverse down to child.\n next = lViewOrLContainer[CHILD_HEAD];\n } else {\n ngDevMode && assertLContainer(lViewOrLContainer);\n // If container, traverse down to its first LView.\n const firstView: LView|undefined = lViewOrLContainer[CONTAINER_HEADER_OFFSET];\n if (firstView) next = firstView;\n }\n\n if (!next) {\n // Only clean up view when moving to the side or up, as destroy hooks\n // should be called in order from the bottom up.\n while (lViewOrLContainer && !lViewOrLContainer![NEXT] && lViewOrLContainer !== rootView) {\n if (isLView(lViewOrLContainer)) {\n cleanUpView(lViewOrLContainer[TVIEW], lViewOrLContainer);\n }\n lViewOrLContainer = lViewOrLContainer[PARENT];\n }\n if (lViewOrLContainer === null) lViewOrLContainer = rootView;\n if (isLView(lViewOrLContainer)) {\n cleanUpView(lViewOrLContainer[TVIEW], lViewOrLContainer);\n }\n next = lViewOrLContainer && lViewOrLContainer![NEXT];\n }\n lViewOrLContainer = next;\n }\n}\n\n/**\n * Inserts a view into a container.\n *\n * This adds the view to the container's array of active views in the correct\n * position. It also adds the view's elements to the DOM if the container isn't a\n * root node of another view (in that case, the view's elements will be added when\n * the container's parent view is added later).\n *\n * @param tView The `TView' of the `LView` to insert\n * @param lView The view to insert\n * @param lContainer The container into which the view should be inserted\n * @param index Which index in the container to insert the child view into\n */\nexport function insertView(tView: TView, lView: LView, lContainer: LContainer, index: number) {\n ngDevMode && assertLView(lView);\n ngDevMode && assertLContainer(lContainer);\n const indexInContainer = CONTAINER_HEADER_OFFSET + index;\n const containerLength = lContainer.length;\n\n if (index > 0) {\n // This is a new view, we need to add it to the children.\n lContainer[indexInContainer - 1][NEXT] = lView;\n }\n if (index < containerLength - CONTAINER_HEADER_OFFSET) {\n lView[NEXT] = lContainer[indexInContainer];\n addToArray(lContainer, CONTAINER_HEADER_OFFSET + index, lView);\n } else {\n lContainer.push(lView);\n lView[NEXT] = null;\n }\n\n lView[PARENT] = lContainer;\n\n // track views where declaration and insertion points are different\n const declarationLContainer = lView[DECLARATION_LCONTAINER];\n if (declarationLContainer !== null && lContainer !== declarationLContainer) {\n trackMovedView(declarationLContainer, lView);\n }\n\n // notify query that a new view has been added\n const lQueries = lView[QUERIES];\n if (lQueries !== null) {\n lQueries.insertView(tView);\n }\n\n // Sets the attached flag\n lView[FLAGS] |= LViewFlags.Attached;\n}\n\n/**\n * Track views created from the declaration container (TemplateRef) and inserted into a\n * different LContainer.\n */\nfunction trackMovedView(declarationContainer: LContainer, lView: LView) {\n ngDevMode && assertDefined(lView, 'LView required');\n ngDevMode && assertLContainer(declarationContainer);\n const movedViews = declarationContainer[MOVED_VIEWS];\n const insertedLContainer = lView[PARENT] as LContainer;\n ngDevMode && assertLContainer(insertedLContainer);\n const insertedComponentLView = insertedLContainer[PARENT]![DECLARATION_COMPONENT_VIEW];\n ngDevMode && assertDefined(insertedComponentLView, 'Missing insertedComponentLView');\n const declaredComponentLView = lView[DECLARATION_COMPONENT_VIEW];\n ngDevMode && assertDefined(declaredComponentLView, 'Missing declaredComponentLView');\n if (declaredComponentLView !== insertedComponentLView) {\n // At this point the declaration-component is not same as insertion-component; this means that\n // this is a transplanted view. Mark the declared lView as having transplanted views so that\n // those views can participate in CD.\n declarationContainer[HAS_TRANSPLANTED_VIEWS] = true;\n }\n if (movedViews === null) {\n declarationContainer[MOVED_VIEWS] = [lView];\n } else {\n movedViews.push(lView);\n }\n}\n\nfunction detachMovedView(declarationContainer: LContainer, lView: LView) {\n ngDevMode && assertLContainer(declarationContainer);\n ngDevMode &&\n assertDefined(\n declarationContainer[MOVED_VIEWS],\n 'A projected view should belong to a non-empty projected views collection');\n const movedViews = declarationContainer[MOVED_VIEWS]!;\n const declarationViewIndex = movedViews.indexOf(lView);\n const insertionLContainer = lView[PARENT] as LContainer;\n ngDevMode && assertLContainer(insertionLContainer);\n\n // If the view was marked for refresh but then detached before it was checked (where the flag\n // would be cleared and the counter decremented), we need to decrement the view counter here\n // instead.\n if (lView[FLAGS] & LViewFlags.RefreshTransplantedView) {\n lView[FLAGS] &= ~LViewFlags.RefreshTransplantedView;\n updateTransplantedViewCount(insertionLContainer, -1);\n }\n\n movedViews.splice(declarationViewIndex, 1);\n}\n\n/**\n * Detaches a view from a container.\n *\n * This method removes the view from the container's array of active views. It also\n * removes the view's elements from the DOM.\n *\n * @param lContainer The container from which to detach a view\n * @param removeIndex The index of the view to detach\n * @returns Detached LView instance.\n */\nexport function detachView(lContainer: LContainer, removeIndex: number): LView|undefined {\n if (lContainer.length <= CONTAINER_HEADER_OFFSET) return;\n\n const indexInContainer = CONTAINER_HEADER_OFFSET + removeIndex;\n const viewToDetach = lContainer[indexInContainer];\n\n if (viewToDetach) {\n const declarationLContainer = viewToDetach[DECLARATION_LCONTAINER];\n if (declarationLContainer !== null && declarationLContainer !== lContainer) {\n detachMovedView(declarationLContainer, viewToDetach);\n }\n\n\n if (removeIndex > 0) {\n lContainer[indexInContainer - 1][NEXT] = viewToDetach[NEXT] as LView;\n }\n const removedLView = removeFromArray(lContainer, CONTAINER_HEADER_OFFSET + removeIndex);\n removeViewFromContainer(viewToDetach[TVIEW], viewToDetach);\n\n // notify query that a view has been removed\n const lQueries = removedLView[QUERIES];\n if (lQueries !== null) {\n lQueries.detachView(removedLView[TVIEW]);\n }\n\n viewToDetach[PARENT] = null;\n viewToDetach[NEXT] = null;\n // Unsets the attached flag\n viewToDetach[FLAGS] &= ~LViewFlags.Attached;\n }\n return viewToDetach;\n}\n\n/**\n * A standalone function which destroys an LView,\n * conducting clean up (e.g. removing listeners, calling onDestroys).\n *\n * @param tView The `TView' of the `LView` to be destroyed\n * @param lView The view to be destroyed.\n */\nexport function destroyLView(tView: TView, lView: LView) {\n if (!(lView[FLAGS] & LViewFlags.Destroyed)) {\n const renderer = lView[RENDERER];\n if (isProceduralRenderer(renderer) && renderer.destroyNode) {\n applyView(tView, lView, renderer, WalkTNodeTreeAction.Destroy, null, null);\n }\n\n destroyViewTree(lView);\n }\n}\n\n/**\n * Calls onDestroys hooks for all directives and pipes in a given view and then removes all\n * listeners. Listeners are removed as the last step so events delivered in the onDestroys hooks\n * can be propagated to @Output listeners.\n *\n * @param tView `TView` for the `LView` to clean up.\n * @param lView The LView to clean up\n */\nfunction cleanUpView(tView: TView, lView: LView): void {\n if (!(lView[FLAGS] & LViewFlags.Destroyed)) {\n // Usually the Attached flag is removed when the view is detached from its parent, however\n // if it's a root view, the flag won't be unset hence why we're also removing on destroy.\n lView[FLAGS] &= ~LViewFlags.Attached;\n\n // Mark the LView as destroyed *before* executing the onDestroy hooks. An onDestroy hook\n // runs arbitrary user code, which could include its own `viewRef.destroy()` (or similar). If\n // We don't flag the view as destroyed before the hooks, this could lead to an infinite loop.\n // This also aligns with the ViewEngine behavior. It also means that the onDestroy hook is\n // really more of an \"afterDestroy\" hook if you think about it.\n lView[FLAGS] |= LViewFlags.Destroyed;\n\n executeOnDestroys(tView, lView);\n processCleanups(tView, lView);\n // For component views only, the local renderer is destroyed at clean up time.\n if (lView[TVIEW].type === TViewType.Component && isProceduralRenderer(lView[RENDERER])) {\n ngDevMode && ngDevMode.rendererDestroy++;\n (lView[RENDERER] as ProceduralRenderer3).destroy();\n }\n\n const declarationContainer = lView[DECLARATION_LCONTAINER];\n // we are dealing with an embedded view that is still inserted into a container\n if (declarationContainer !== null && isLContainer(lView[PARENT])) {\n // and this is a projected view\n if (declarationContainer !== lView[PARENT]) {\n detachMovedView(declarationContainer, lView);\n }\n\n // For embedded views still attached to a container: remove query result from this view.\n const lQueries = lView[QUERIES];\n if (lQueries !== null) {\n lQueries.detachView(tView);\n }\n }\n }\n}\n\n/** Removes listeners and unsubscribes from output subscriptions */\nfunction processCleanups(tView: TView, lView: LView): void {\n const tCleanup = tView.cleanup;\n const lCleanup = lView[CLEANUP]!;\n // `LCleanup` contains both share information with `TCleanup` as well as instance specific\n // information appended at the end. We need to know where the end of the `TCleanup` information\n // is, and we track this with `lastLCleanupIndex`.\n let lastLCleanupIndex = -1;\n if (tCleanup !== null) {\n for (let i = 0; i < tCleanup.length - 1; i += 2) {\n if (typeof tCleanup[i] === 'string') {\n // This is a native DOM listener\n const idxOrTargetGetter = tCleanup[i + 1];\n const target = typeof idxOrTargetGetter === 'function' ?\n idxOrTargetGetter(lView) :\n unwrapRNode(lView[idxOrTargetGetter]);\n const listener = lCleanup[lastLCleanupIndex = tCleanup[i + 2]];\n const useCaptureOrSubIdx = tCleanup[i + 3];\n if (typeof useCaptureOrSubIdx === 'boolean') {\n // native DOM listener registered with Renderer3\n target.removeEventListener(tCleanup[i], listener, useCaptureOrSubIdx);\n } else {\n if (useCaptureOrSubIdx >= 0) {\n // unregister\n lCleanup[lastLCleanupIndex = useCaptureOrSubIdx]();\n } else {\n // Subscription\n lCleanup[lastLCleanupIndex = -useCaptureOrSubIdx].unsubscribe();\n }\n }\n i += 2;\n } else {\n // This is a cleanup function that is grouped with the index of its context\n const context = lCleanup[lastLCleanupIndex = tCleanup[i + 1]];\n tCleanup[i].call(context);\n }\n }\n }\n if (lCleanup !== null) {\n for (let i = lastLCleanupIndex + 1; i < lCleanup.length; i++) {\n const instanceCleanupFn = lCleanup[i];\n ngDevMode && assertFunction(instanceCleanupFn, 'Expecting instance cleanup function.');\n instanceCleanupFn();\n }\n lView[CLEANUP] = null;\n }\n}\n\n/** Calls onDestroy hooks for this view */\nfunction executeOnDestroys(tView: TView, lView: LView): void {\n let destroyHooks: DestroyHookData|null;\n\n if (tView != null && (destroyHooks = tView.destroyHooks) != null) {\n for (let i = 0; i < destroyHooks.length; i += 2) {\n const context = lView[destroyHooks[i] as number];\n\n // Only call the destroy hook if the context has been requested.\n if (!(context instanceof NodeInjectorFactory)) {\n const toCall = destroyHooks[i + 1] as HookFn | HookData;\n\n if (Array.isArray(toCall)) {\n for (let j = 0; j < toCall.length; j += 2) {\n const callContext = context[toCall[j] as number];\n const hook = toCall[j + 1] as HookFn;\n profiler(ProfilerEvent.LifecycleHookStart, callContext, hook);\n try {\n hook.call(callContext);\n } finally {\n profiler(ProfilerEvent.LifecycleHookEnd, callContext, hook);\n }\n }\n } else {\n profiler(ProfilerEvent.LifecycleHookStart, context, toCall);\n try {\n toCall.call(context);\n } finally {\n profiler(ProfilerEvent.LifecycleHookEnd, context, toCall);\n }\n }\n }\n }\n }\n}\n\n/**\n * Returns a native element if a node can be inserted into the given parent.\n *\n * There are two reasons why we may not be able to insert a element immediately.\n * - Projection: When creating a child content element of a component, we have to skip the\n * insertion because the content of a component will be projected.\n * `<component><content>delayed due to projection</content></component>`\n * - Parent container is disconnected: This can happen when we are inserting a view into\n * parent container, which itself is disconnected. For example the parent container is part\n * of a View which has not be inserted or is made for projection but has not been inserted\n * into destination.\n *\n * @param tView: Current `TView`.\n * @param tNode: `TNode` for which we wish to retrieve render parent.\n * @param lView: Current `LView`.\n */\nexport function getParentRElement(tView: TView, tNode: TNode, lView: LView): RElement|null {\n return getClosestRElement(tView, tNode.parent, lView);\n}\n\n/**\n * Get closest `RElement` or `null` if it can't be found.\n *\n * If `TNode` is `TNodeType.Element` => return `RElement` at `LView[tNode.index]` location.\n * If `TNode` is `TNodeType.ElementContainer|IcuContain` => return the parent (recursively).\n * If `TNode` is `null` then return host `RElement`:\n * - return `null` if projection\n * - return `null` if parent container is disconnected (we have no parent.)\n *\n * @param tView: Current `TView`.\n * @param tNode: `TNode` for which we wish to retrieve `RElement` (or `null` if host element is\n * needed).\n * @param lView: Current `LView`.\n * @returns `null` if the `RElement` can't be determined at this time (no parent / projection)\n */\nexport function getClosestRElement(tView: TView, tNode: TNode|null, lView: LView): RElement|null {\n let parentTNode: TNode|null = tNode;\n // Skip over element and ICU containers as those are represented by a comment node and\n // can't be used as a render parent.\n while (parentTNode !== null &&\n (parentTNode.type & (TNodeType.ElementContainer | TNodeType.Icu))) {\n tNode = parentTNode;\n parentTNode = tNode.parent;\n }\n\n // If the parent tNode is null, then we are inserting across views: either into an embedded view\n // or a component view.\n if (parentTNode === null) {\n // We are inserting a root element of the component view into the component host element and\n // it should always be eager.\n return lView[HOST];\n } else {\n ngDevMode && assertTNodeType(parentTNode, TNodeType.AnyRNode | TNodeType.Container);\n if (parentTNode.flags & TNodeFlags.isComponentHost) {\n ngDevMode && assertTNodeForLView(parentTNode, lView);\n const encapsulation =\n (tView.data[parentTNode.directiveStart] as ComponentDef<unknown>).encapsulation;\n // We've got a parent which is an element in the current view. We just need to verify if the\n // parent element is not a component. Component's content nodes are not inserted immediately\n // because they will be projected, and so doing insert at this point would be wasteful.\n // Since the projection would then move it to its final destination. Note that we can't\n // make this assumption when using the Shadow DOM, because the native projection placeholders\n // (<content> or <slot>) have to be in place as elements are being inserted.\n if (encapsulation === ViewEncapsulation.None ||\n encapsulation === ViewEncapsulation.Emulated) {\n return null;\n }\n }\n\n return getNativeByTNode(parentTNode, lView) as RElement;\n }\n}\n\n/**\n * Inserts a native node before another native node for a given parent using {@link Renderer3}.\n * This is a utility function that can be used when native nodes were determined - it abstracts an\n * actual renderer being used.\n */\nexport function nativeInsertBefore(\n renderer: Renderer3, parent: RElement, child: RNode, beforeNode: RNode|null,\n isMove: boolean): void {\n ngDevMode && ngDevMode.rendererInsertBefore++;\n if (isProceduralRenderer(renderer)) {\n renderer.insertBefore(parent, child, beforeNode, isMove);\n } else {\n parent.insertBefore(child, beforeNode, isMove);\n }\n}\n\nfunction nativeAppendChild(renderer: Renderer3, parent: RElement, child: RNode): void {\n ngDevMode && ngDevMode.rendererAppendChild++;\n ngDevMode && assertDefined(parent, 'parent node must be defined');\n if (isProceduralRenderer(renderer)) {\n renderer.appendChild(parent, child);\n } else {\n parent.appendChild(child);\n }\n}\n\nfunction nativeAppendOrInsertBefore(\n renderer: Renderer3, parent: RElement, child: RNode, beforeNode: RNode|null, isMove: boolean) {\n if (beforeNode !== null) {\n nativeInsertBefore(renderer, parent, child, beforeNode, isMove);\n } else {\n nativeAppendChild(renderer, parent, child);\n }\n}\n\n/** Removes a node from the DOM given its native parent. */\nfunction nativeRemoveChild(\n renderer: Renderer3, parent: RElement, child: RNode, isHostElement?: boolean): void {\n if (isProceduralRenderer(renderer)) {\n renderer.removeChild(parent, child, isHostElement);\n } else {\n parent.removeChild(child);\n }\n}\n\n/**\n * Returns a native parent of a given native node.\n */\nexport function nativeParentNode(renderer: Renderer3, node: RNode): RElement|null {\n return (isProceduralRenderer(renderer) ? renderer.parentNode(node) : node.parentNode) as RElement;\n}\n\n/**\n * Returns a native sibling of a given native node.\n */\nexport function nativeNextSibling(renderer: Renderer3, node: RNode): RNode|null {\n return isProceduralRenderer(renderer) ? renderer.nextSibling(node) : node.nextSibling;\n}\n\n/**\n * Find a node in front of which `currentTNode` should be inserted.\n *\n * This method determines the `RNode` in front of which we should insert the `currentRNode`. This\n * takes `TNode.insertBeforeIndex` into account if i18n code has been invoked.\n *\n * @param parentTNode parent `TNode`\n * @param currentTNode current `TNode` (The node which we would like to insert into the DOM)\n * @param lView current `LView`\n */\nfunction getInsertInFrontOfRNode(parentTNode: TNode, currentTNode: TNode, lView: LView): RNode|\n null {\n return _getInsertInFrontOfRNodeWithI18n(parentTNode, currentTNode, lView);\n}\n\n\n/**\n * Find a node in front of which `currentTNode` should be inserted. (Does not take i18n into\n * account)\n *\n * This method determines the `RNode` in front of which we should insert the `currentRNode`. This\n * does not take `TNode.insertBeforeIndex` into account.\n *\n * @param parentTNode parent `TNode`\n * @param currentTNode current `TNode` (The node which we would like to insert into the DOM)\n * @param lView current `LView`\n */\nexport function getInsertInFrontOfRNodeWithNoI18n(\n parentTNode: TNode, currentTNode: TNode, lView: LView): RNode|null {\n if (parentTNode.type & (TNodeType.ElementContainer | TNodeType.Icu)) {\n return getNativeByTNode(parentTNode, lView);\n }\n return null;\n}\n\n/**\n * Tree shakable boundary for `getInsertInFrontOfRNodeWithI18n` function.\n *\n * This function will only be set if i18n code runs.\n */\nlet _getInsertInFrontOfRNodeWithI18n: (parentTNode: TNode, currentTNode: TNode, lView: LView) =>\n RNode | null = getInsertInFrontOfRNodeWithNoI18n;\n\n/**\n * Tree shakable boundary for `processI18nInsertBefore` function.\n *\n * This function will only be set if i18n code runs.\n */\nlet _processI18nInsertBefore: (\n renderer: Renderer3, childTNode: TNode, lView: LView, childRNode: RNode|RNode[],\n parentRElement: RElement|null) => void;\n\nexport function setI18nHandling(\n getInsertInFrontOfRNodeWithI18n: (parentTNode: TNode, currentTNode: TNode, lView: LView) =>\n RNode | null,\n processI18nInsertBefore: (\n renderer: Renderer3, childTNode: TNode, lView: LView, childRNode: RNode|RNode[],\n parentRElement: RElement|null) => void) {\n _getInsertInFrontOfRNodeWithI18n = getInsertInFrontOfRNodeWithI18n;\n _processI18nInsertBefore = processI18nInsertBefore;\n}\n\n/**\n * Appends the `child` native node (or a collection of nodes) to the `parent`.\n *\n * @param tView The `TView' to be appended\n * @param lView The current LView\n * @param childRNode The native child (or children) that should be appended\n * @param childTNode The TNode of the child element\n */\nexport function appendChild(\n tView: TView, lView: LView, childRNode: RNode|RNode[], childTNode: TNode): void {\n const parentRNode = getParentRElement(tView, childTNode, lView);\n const renderer = lView[RENDERER];\n const parentTNode: TNode = childTNode.parent || lView[T_HOST]!;\n const anchorNode = getInsertInFrontOfRNode(parentTNode, childTNode, lView);\n if (parentRNode != null) {\n if (Array.isArray(childRNode)) {\n for (let i = 0; i < childRNode.length; i++) {\n nativeAppendOrInsertBefore(renderer, parentRNode, childRNode[i], anchorNode, false);\n }\n } else {\n nativeAppendOrInsertBefore(renderer, parentRNode, childRNode, anchorNode, false);\n }\n }\n\n _processI18nInsertBefore !== undefined &&\n _processI18nInsertBefore(renderer, childTNode, lView, childRNode, parentRNode);\n}\n\n/**\n * Returns the first native node for a given LView, starting from the provided TNode.\n *\n * Native nodes are returned in the order in which those appear in the native tree (DOM).\n */\nfunction getFirstNativeNode(lView: LView, tNode: TNode|null): RNode|null {\n if (tNode !== null) {\n ngDevMode &&\n assertTNodeType(\n tNode,\n TNodeType.AnyRNode | TNodeType.AnyContainer | TNodeType.Icu | TNodeType.Projection);\n\n const tNodeType = tNode.type;\n if (tNodeType & TNodeType.AnyRNode) {\n return getNativeByTNode(tNode, lView);\n } else if (tNodeType & TNodeType.Container) {\n return getBeforeNodeForView(-1, lView[tNode.index]);\n } else if (tNodeType & TNodeType.ElementContainer) {\n const elIcuContainerChild = tNode.child;\n if (elIcuContainerChild !== null) {\n return getFirstNativeNode(lView, elIcuContainerChild);\n } else {\n const rNodeOrLContainer = lView[tNode.index];\n if (isLContainer(rNodeOrLContainer)) {\n return getBeforeNodeForView(-1, rNodeOrLContainer);\n } else {\n return unwrapRNode(rNodeOrLContainer);\n }\n }\n } else if (tNodeType & TNodeType.Icu) {\n let nextRNode = icuContainerIterate(tNode as TIcuContainerNode, lView);\n let rNode: RNode|null = nextRNode();\n // If the ICU container has no nodes, than we use the ICU anchor as the node.\n return rNode || unwrapRNode(lView[tNode.index]);\n } else {\n const projectionNodes = getProjectionNodes(lView, tNode);\n if (projectionNodes !== null) {\n if (Array.isArray(projectionNodes)) {\n return projectionNodes[0];\n }\n const parentView = getLViewParent(lView[DECLARATION_COMPONENT_VIEW]);\n ngDevMode && assertParentView(parentView);\n return getFirstNativeNode(parentView!, projectionNodes);\n } else {\n return getFirstNativeNode(lView, tNode.next);\n }\n }\n }\n\n return null;\n}\n\nexport function getProjectionNodes(lView: LView, tNode: TNode|null): TNode|RNode[]|null {\n if (tNode !== null) {\n const componentView = lView[DECLARATION_COMPONENT_VIEW];\n const componentHost = componentView[T_HOST] as TElementNode;\n const slotIdx = tNode.projection as number;\n ngDevMode && assertProjectionSlots(lView);\n return componentHost.projection![slotIdx];\n }\n return null;\n}\n\nexport function getBeforeNodeForView(viewIndexInContainer: number, lContainer: LContainer): RNode|\n null {\n const nextViewIndex = CONTAINER_HEADER_OFFSET + viewIndexInContainer + 1;\n if (nextViewIndex < lContainer.length) {\n const lView = lContainer[nextViewIndex] as LView;\n const firstTNodeOfView = lView[TVIEW].firstChild;\n if (firstTNodeOfView !== null) {\n return getFirstNativeNode(lView, firstTNodeOfView);\n }\n }\n\n return lContainer[NATIVE];\n}\n\n/**\n * Removes a native node itself using a given renderer. To remove the node we are looking up its\n * parent from the native tree as not all platforms / browsers support the equivalent of\n * node.remove().\n *\n * @param renderer A renderer to be used\n * @param rNode The native node that should be removed\n * @param isHostElement A flag indicating if a node to be removed is a host of a component.\n */\nexport function nativeRemoveNode(renderer: Renderer3, rNode: RNode, isHostElement?: boolean): void {\n ngDevMode && ngDevMode.rendererRemoveNode++;\n const nativeParent = nativeParentNode(renderer, rNode);\n if (nativeParent) {\n nativeRemoveChild(renderer, nativeParent, rNode, isHostElement);\n }\n}\n\n\n/**\n * Performs the operation of `action` on the node. Typically this involves inserting or removing\n * nodes on the LView or projection boundary.\n */\nfunction applyNodes(\n renderer: Renderer3, action: WalkTNodeTreeAction, tNode: TNode|null, lView: LView,\n parentRElement: RElement|null, beforeNode: RNode|null, isProjection: boolean) {\n while (tNode != null) {\n ngDevMode && assertTNodeForLView(tNode, lView);\n ngDevMode &&\n assertTNodeType(\n tNode,\n TNodeType.AnyRNode | TNodeType.AnyContainer | TNodeType.Projection | TNodeType.Icu);\n const rawSlotValue = lView[tNode.index];\n const tNodeType = tNode.type;\n if (isProjection) {\n if (action === WalkTNodeTreeAction.Create) {\n rawSlotValue && attachPatchData(unwrapRNode(rawSlotValue), lView);\n tNode.flags |= TNodeFlags.isProjected;\n }\n }\n if ((tNode.flags & TNodeFlags.isDetached) !== TNodeFlags.isDetached) {\n if (tNodeType & TNodeType.ElementContainer) {\n applyNodes(renderer, action, tNode.child, lView, parentRElement, beforeNode, false);\n applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode);\n } else if (tNodeType & TNodeType.Icu) {\n const nextRNode = icuContainerIterate(tNode as TIcuContainerNode, lView);\n let rNode: RNode|null;\n while (rNode = nextRNode()) {\n applyToElementOrContainer(action, renderer, parentRElement, rNode, beforeNode);\n }\n applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode);\n } else if (tNodeType & TNodeType.Projection) {\n applyProjectionRecursive(\n renderer, action, lView, tNode as TProjectionNode, parentRElement, beforeNode);\n } else {\n ngDevMode && assertTNodeType(tNode, TNodeType.AnyRNode | TNodeType.Container);\n applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode);\n }\n }\n tNode = isProjection ? tNode.projectionNext : tNode.next;\n }\n}\n\n\n/**\n * `applyView` performs operation on the view as specified in `action` (insert, detach, destroy)\n *\n * Inserting a view without projection or containers at top level is simple. Just iterate over the\n * root nodes of the View, and for each node perform the `action`.\n *\n * Things get more complicated with containers and projections. That is because coming across:\n * - Container: implies that we have to insert/remove/destroy the views of that container as well\n * which in turn can have their own Containers at the View roots.\n * - Projection: implies that we have to insert/remove/destroy the nodes of the projection. The\n * complication is that the nodes we are projecting can themselves have Containers\n * or other Projections.\n *\n * As you can see this is a very recursive problem. Yes recursion is not most efficient but the\n * code is complicated enough that trying to implemented with recursion becomes unmaintainable.\n *\n * @param tView The `TView' which needs to be inserted, detached, destroyed\n * @param lView The LView which needs to be inserted, detached, destroyed.\n * @param renderer Renderer to use\n * @param action action to perform (insert, detach, destroy)\n * @param parentRElement parent DOM element for insertion (Removal does not need it).\n * @param beforeNode Before which node the insertions should happen.\n */\nfunction applyView(\n tView: TView, lView: LView, renderer: Renderer3, action: WalkTNodeTreeAction.Destroy,\n parentRElement: null, beforeNode: null): void;\nfunction applyView(\n tView: TView, lView: LView, renderer: Renderer3, action: WalkTNodeTreeAction,\n parentRElement: RElement|null, beforeNode: RNode|null): void;\nfunction applyView(\n tView: TView, lView: LView, renderer: Renderer3, action: WalkTNodeTreeAction,\n parentRElement: RElement|null, beforeNode: RNode|null): void {\n applyNodes(renderer, action, tView.firstChild, lView, parentRElement, beforeNode, false);\n}\n\n/**\n * `applyProjection` performs operation on the projection.\n *\n * Inserting a projection requires us to locate the projected nodes from the parent component. The\n * complication is that those nodes themselves could be re-projected from their parent component.\n *\n * @param tView The `TView` of `LView` which needs to be inserted, detached, destroyed\n * @param lView The `LView` which needs to be inserted, detached, destroyed.\n * @param tProjectionNode node to project\n */\nexport function applyProjection(tView: TView, lView: LView, tProjectionNode: TProjectionNode) {\n const renderer = lView[RENDERER];\n const parentRNode = getParentRElement(tView, tProjectionNode, lView);\n const parentTNode = tProjectionNode.parent || lView[T_HOST]!;\n let beforeNode = getInsertInFrontOfRNode(parentTNode, tProjectionNode, lView);\n applyProjectionRecursive(\n renderer, WalkTNodeTreeAction.Create, lView, tProjectionNode, parentRNode, beforeNode);\n}\n\n/**\n * `applyProjectionRecursive` performs operation on the projection specified by `action` (insert,\n * detach, destroy)\n *\n * Inserting a projection requires us to locate the projected nodes from the parent component. The\n * complication is that those nodes themselves could be re-projected from their parent component.\n *\n * @param renderer Render to use\n * @param action action to perform (insert, detach, destroy)\n * @param lView The LView which needs to be inserted, detached, destroyed.\n * @param tProjectionNode node to project\n * @param parentRElement parent DOM element for insertion/removal.\n * @param beforeNode Before which node the insertions should happen.\n */\nfunction applyProjectionRecursive(\n renderer: Renderer3, action: WalkTNodeTreeAction, lView: LView,\n tProjectionNode: TProjectionNode, parentRElement: RElement|null, beforeNode: RNode|null) {\n const componentLView = lView[DECLARATION_COMPONENT_VIEW];\n const componentNode = componentLView[T_HOST] as TElementNode;\n ngDevMode &&\n assertEqual(typeof tProjectionNode.projection, 'number', 'expecting projection index');\n const nodeToProjectOrRNodes = componentNode.projection![tProjectionNode.projection]!;\n if (Array.isArray(nodeToProjectOrRNodes)) {\n // This should not exist, it is a bit of a hack. When we bootstrap a top level node and we\n // need to support passing projectable nodes, so we cheat and put them in the TNode\n // of the Host TView. (Yes we put instance info at the T Level). We can get away with it\n // because we know that that TView is not shared and therefore it will not be a problem.\n // This should be refactored and cleaned up.\n for (let i = 0; i < nodeToProjectOrRNodes.length; i++) {\n const rNode = nodeToProjectOrRNodes[i];\n applyToElementOrContainer(action, renderer, parentRElement, rNode, beforeNode);\n }\n } else {\n let nodeToProject: TNode|null = nodeToProjectOrRNodes;\n const projectedComponentLView = componentLView[PARENT] as LView;\n applyNodes(\n renderer, action, nodeToProject, projectedComponentLView, parentRElement, beforeNode, true);\n }\n}\n\n\n/**\n * `applyContainer` performs an operation on the container and its views as specified by\n * `action` (insert, detach, destroy)\n *\n * Inserting a Container is complicated by the fact that the container may have Views which\n * themselves have containers or projections.\n *\n * @param renderer Renderer to use\n * @param action action to perform (insert, detach, destroy)\n * @param lContainer The LContainer which needs to be inserted, detached, destroyed.\n * @param parentRElement parent DOM element for insertion/removal.\n * @param beforeNode Before which node the insertions should happen.\n */\nfunction applyContainer(\n renderer: Renderer3, action: WalkTNodeTreeAction, lContainer: LContainer,\n parentRElement: RElement|null, beforeNode: RNode|null|undefined) {\n ngDevMode && assertLContainer(lContainer);\n const anchor = lContainer[NATIVE]; // LContainer has its own before node.\n const native = unwrapRNode(lContainer);\n // An LContainer can be created dynamically on any node by injecting ViewContainerRef.\n // Asking for a ViewContainerRef on an element will result in a creation of a separate anchor\n // node (comment in the DOM) that will be different from the LContainer's host node. In this\n // particular case we need to execute action on 2 nodes:\n // - container's host node (this is done in the executeActionOnElementOrContainer)\n // - container's host node (this is done here)\n if (anchor !== native) {\n // This is very strange to me (Misko). I would expect that the native is same as anchor. I\n // don't see a reason why they should be different, but they are.\n //\n // If they are we need to process the second anchor as well.\n applyToElementOrContainer(action, renderer, parentRElement, anchor, beforeNode);\n }\n for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n const lView = lContainer[i] as LView;\n applyView(lView[TVIEW], lView, renderer, action, parentRElement, anchor);\n }\n}\n\n/**\n * Writes class/style to element.\n *\n * @param renderer Renderer to use.\n * @param isClassBased `true` if it should be written to `class` (`false` to write to `style`)\n * @param rNode The Node to write to.\n * @param prop Property to write to. This would be the class/style name.\n * @param value Value to write. If `null`/`undefined`/`false` this is considered a remove (set/add\n * otherwise).\n */\nexport function applyStyling(\n renderer: Renderer3, isClassBased: boolean, rNode: RElement, prop: string, value: any) {\n const isProcedural = isProceduralRenderer(renderer);\n if (isClassBased) {\n // We actually want JS true/false here because any truthy value should add the class\n if (!value) {\n ngDevMode && ngDevMode.rendererRemoveClass++;\n if (isProcedural) {\n (renderer as Renderer2).removeClass(rNode, prop);\n } else {\n (rNode as HTMLElement).classList.remove(prop);\n }\n } else {\n ngDevMode && ngDevMode.rendererAddClass++;\n if (isProcedural) {\n (renderer as Renderer2).addClass(rNode, prop);\n } else {\n ngDevMode && assertDefined((rNode as HTMLElement).classList, 'HTMLElement expected');\n (rNode as HTMLElement).classList.add(prop);\n }\n }\n } else {\n let flags = prop.indexOf('-') === -1 ? undefined : RendererStyleFlags2.DashCase as number;\n if (value == null /** || value === undefined */) {\n ngDevMode && ngDevMode.rendererRemoveStyle++;\n if (isProcedural) {\n (renderer as Renderer2).removeStyle(rNode, prop, flags);\n } else {\n (rNode as HTMLElement).style.removeProperty(prop);\n }\n } else {\n // A value is important if it ends with `!important`. The style\n // parser strips any semicolons at the end of the value.\n const isImportant = typeof value === 'string' ? value.endsWith('!important') : false;\n\n if (isImportant) {\n // !important has to be stripped from the value for it to be valid.\n value = value.slice(0, -10);\n flags! |= RendererStyleFlags2.Important;\n }\n\n ngDevMode && ngDevMode.rendererSetStyle++;\n if (isProcedural) {\n (renderer as Renderer2).setStyle(rNode, prop, value, flags);\n } else {\n ngDevMode && assertDefined((rNode as HTMLElement).style, 'HTMLElement expected');\n (rNode as HTMLElement).style.setProperty(prop, value, isImportant ? 'important' : '');\n }\n }\n }\n}\n\n\n/**\n * Write `cssText` to `RElement`.\n *\n * This function does direct write without any reconciliation. Used for writing initial values, so\n * that static styling values do not pull in the style parser.\n *\n * @param renderer Renderer to use\n * @param element The element which needs to be updated.\n * @param newValue The new class list to write.\n */\nexport function writeDirectStyle(renderer: Renderer3, element: RElement, newValue: string) {\n ngDevMode && assertString(newValue, '\\'newValue\\' should be a string');\n if (isProceduralRenderer(renderer)) {\n renderer.setAttribute(element, 'style', newValue);\n } else {\n (element as HTMLElement).style.cssText = newValue;\n }\n ngDevMode && ngDevMode.rendererSetStyle++;\n}\n\n/**\n * Write `className` to `RElement`.\n *\n * This function does direct write without any reconciliation. Used for writing initial values, so\n * that static styling values do not pull in the style parser.\n *\n * @param renderer Renderer to use\n * @param element The element which needs to be updated.\n * @param newValue The new class list to write.\n */\nexport function writeDirectClass(renderer: Renderer3, element: RElement, newValue: string) {\n ngDevMode && assertString(newValue, '\\'newValue\\' should be a string');\n if (isProceduralRenderer(renderer)) {\n if (newValue === '') {\n // There are tests in `google3` which expect `element.getAttribute('class')` to be `null`.\n renderer.removeAttribute(element, 'class');\n } else {\n renderer.setAttribute(element, 'class', newValue);\n }\n } else {\n element.className = newValue;\n }\n ngDevMode && ngDevMode.rendererSetClassName++;\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 {assertNotEqual} from '../../util/assert';\nimport {CharCode} from '../../util/char_code';\n\n\n/**\n * Returns an index of `classToSearch` in `className` taking token boundaries into account.\n *\n * `classIndexOf('AB A', 'A', 0)` will be 3 (not 0 since `AB!==A`)\n *\n * @param className A string containing classes (whitespace separated)\n * @param classToSearch A class name to locate\n * @param startingIndex Starting location of search\n * @returns an index of the located class (or -1 if not found)\n */\nexport function classIndexOf(\n className: string, classToSearch: string, startingIndex: number): number {\n ngDevMode && assertNotEqual(classToSearch, '', 'can not look for \"\" string.');\n let end = className.length;\n while (true) {\n const foundIndex = className.indexOf(classToSearch, startingIndex);\n if (foundIndex === -1) return foundIndex;\n if (foundIndex === 0 || className.charCodeAt(foundIndex - 1) <= CharCode.SPACE) {\n // Ensure that it has leading whitespace\n const length = classToSearch.length;\n if (foundIndex + length === end ||\n className.charCodeAt(foundIndex + length) <= CharCode.SPACE) {\n // Ensure that it has trailing whitespace\n return foundIndex;\n }\n }\n // False positive, keep searching from where we left off.\n startingIndex = foundIndex + 1;\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 '../util/ng_dev_mode';\n\nimport {assertDefined, assertEqual, assertNotEqual} from '../util/assert';\n\nimport {AttributeMarker, TAttributes, TNode, TNodeType, unusedValueExportToPlacateAjd as unused1} from './interfaces/node';\nimport {CssSelector, CssSelectorList, SelectorFlags, unusedValueExportToPlacateAjd as unused2} from './interfaces/projection';\nimport {classIndexOf} from './styling/class_differ';\nimport {isNameOnlyAttributeMarker} from './util/attrs_utils';\n\nconst unusedValueToPlacateAjd = unused1 + unused2;\n\nconst NG_TEMPLATE_SELECTOR = 'ng-template';\n\n/**\n * Search the `TAttributes` to see if it contains `cssClassToMatch` (case insensitive)\n *\n * @param attrs `TAttributes` to search through.\n * @param cssClassToMatch class to match (lowercase)\n * @param isProjectionMode Whether or not class matching should look into the attribute `class` in\n * addition to the `AttributeMarker.Classes`.\n */\nfunction isCssClassMatching(\n attrs: TAttributes, cssClassToMatch: string, isProjectionMode: boolean): boolean {\n // TODO(misko): The fact that this function needs to know about `isProjectionMode` seems suspect.\n // It is strange to me that sometimes the class information comes in form of `class` attribute\n // and sometimes in form of `AttributeMarker.Classes`. Some investigation is needed to determine\n // if that is the right behavior.\n ngDevMode &&\n assertEqual(\n cssClassToMatch, cssClassToMatch.toLowerCase(), 'Class name expected to be lowercase.');\n let i = 0;\n while (i < attrs.length) {\n let item = attrs[i++];\n if (isProjectionMode && item === 'class') {\n item = attrs[i] as string;\n if (classIndexOf(item.toLowerCase(), cssClassToMatch, 0) !== -1) {\n return true;\n }\n } else if (item === AttributeMarker.Classes) {\n // We found the classes section. Start searching for the class.\n while (i < attrs.length && typeof (item = attrs[i++]) == 'string') {\n // while we have strings\n if (item.toLowerCase() === cssClassToMatch) return true;\n }\n return false;\n }\n }\n return false;\n}\n\n/**\n * Checks whether the `tNode` represents an inline template (e.g. `*ngFor`).\n *\n * @param tNode current TNode\n */\nexport function isInlineTemplate(tNode: TNode): boolean {\n return tNode.type === TNodeType.Container && tNode.value !== NG_TEMPLATE_SELECTOR;\n}\n\n/**\n * Function that checks whether a given tNode matches tag-based selector and has a valid type.\n *\n * Matching can be performed in 2 modes: projection mode (when we project nodes) and regular\n * directive matching mode:\n * - in the \"directive matching\" mode we do _not_ take TContainer's tagName into account if it is\n * different from NG_TEMPLATE_SELECTOR (value different from NG_TEMPLATE_SELECTOR indicates that a\n * tag name was extracted from * syntax so we would match the same directive twice);\n * - in the \"projection\" mode, we use a tag name potentially extracted from the * syntax processing\n * (applicable to TNodeType.Container only).\n */\nfunction hasTagAndTypeMatch(\n tNode: TNode, currentSelector: string, isProjectionMode: boolean): boolean {\n const tagNameToCompare =\n tNode.type === TNodeType.Container && !isProjectionMode ? NG_TEMPLATE_SELECTOR : tNode.value;\n return currentSelector === tagNameToCompare;\n}\n\n/**\n * A utility function to match an Ivy node static data against a simple CSS selector\n *\n * @param node static data of the node to match\n * @param selector The selector to try matching against the node.\n * @param isProjectionMode if `true` we are matching for content projection, otherwise we are doing\n * directive matching.\n * @returns true if node matches the selector.\n */\nexport function isNodeMatchingSelector(\n tNode: TNode, selector: CssSelector, isProjectionMode: boolean): boolean {\n ngDevMode && assertDefined(selector[0], 'Selector should have a tag name');\n let mode: SelectorFlags = SelectorFlags.ELEMENT;\n const nodeAttrs = tNode.attrs || [];\n\n // Find the index of first attribute that has no value, only a name.\n const nameOnlyMarkerIdx = getNameOnlyMarkerIndex(nodeAttrs);\n\n // When processing \":not\" selectors, we skip to the next \":not\" if the\n // current one doesn't match\n let skipToNextSelector = false;\n\n for (let i = 0; i < selector.length; i++) {\n const current = selector[i];\n if (typeof current === 'number') {\n // If we finish processing a :not selector and it hasn't failed, return false\n if (!skipToNextSelector && !isPositive(mode) && !isPositive(current)) {\n return false;\n }\n // If we are skipping to the next :not() and this mode flag is positive,\n // it's a part of the current :not() selector, and we should keep skipping\n if (skipToNextSelector && isPositive(current)) continue;\n skipToNextSelector = false;\n mode = (current as number) | (mode & SelectorFlags.NOT);\n continue;\n }\n\n if (skipToNextSelector) continue;\n\n if (mode & SelectorFlags.ELEMENT) {\n mode = SelectorFlags.ATTRIBUTE | mode & SelectorFlags.NOT;\n if (current !== '' && !hasTagAndTypeMatch(tNode, current, isProjectionMode) ||\n current === '' && selector.length === 1) {\n if (isPositive(mode)) return false;\n skipToNextSelector = true;\n }\n } else {\n const selectorAttrValue = mode & SelectorFlags.CLASS ? current : selector[++i];\n\n // special case for matching against classes when a tNode has been instantiated with\n // class and style values as separate attribute values (e.g. ['title', CLASS, 'foo'])\n if ((mode & SelectorFlags.CLASS) && tNode.attrs !== null) {\n if (!isCssClassMatching(tNode.attrs, selectorAttrValue as string, isProjectionMode)) {\n if (isPositive(mode)) return false;\n skipToNextSelector = true;\n }\n continue;\n }\n\n const attrName = (mode & SelectorFlags.CLASS) ? 'class' : current;\n const attrIndexInNode =\n findAttrIndexInNode(attrName, nodeAttrs, isInlineTemplate(tNode), isProjectionMode);\n\n if (attrIndexInNode === -1) {\n if (isPositive(mode)) return false;\n skipToNextSelector = true;\n continue;\n }\n\n if (selectorAttrValue !== '') {\n let nodeAttrValue: string;\n if (attrIndexInNode > nameOnlyMarkerIdx) {\n nodeAttrValue = '';\n } else {\n ngDevMode &&\n assertNotEqual(\n nodeAttrs[attrIndexInNode], AttributeMarker.NamespaceURI,\n 'We do not match directives on namespaced attributes');\n // we lowercase the attribute value to be able to match\n // selectors without case-sensitivity\n // (selectors are already in lowercase when generated)\n nodeAttrValue = (nodeAttrs[attrIndexInNode + 1] as string).toLowerCase();\n }\n\n const compareAgainstClassName = mode & SelectorFlags.CLASS ? nodeAttrValue : null;\n if (compareAgainstClassName &&\n classIndexOf(compareAgainstClassName, selectorAttrValue as string, 0) !== -1 ||\n mode & SelectorFlags.ATTRIBUTE && selectorAttrValue !== nodeAttrValue) {\n if (isPositive(mode)) return false;\n skipToNextSelector = true;\n }\n }\n }\n }\n\n return isPositive(mode) || skipToNextSelector;\n}\n\nfunction isPositive(mode: SelectorFlags): boolean {\n return (mode & SelectorFlags.NOT) === 0;\n}\n\n/**\n * Examines the attribute's definition array for a node to find the index of the\n * attribute that matches the given `name`.\n *\n * NOTE: This will not match namespaced attributes.\n *\n * Attribute matching depends upon `isInlineTemplate` and `isProjectionMode`.\n * The following table summarizes which types of attributes we attempt to match:\n *\n * ===========================================================================================================\n * Modes | Normal Attributes | Bindings Attributes | Template Attributes | I18n\n * Attributes\n * ===========================================================================================================\n * Inline + Projection | YES | YES | NO | YES\n * -----------------------------------------------------------------------------------------------------------\n * Inline + Directive | NO | NO | YES | NO\n * -----------------------------------------------------------------------------------------------------------\n * Non-inline + Projection | YES | YES | NO | YES\n * -----------------------------------------------------------------------------------------------------------\n * Non-inline + Directive | YES | YES | NO | YES\n * ===========================================================================================================\n *\n * @param name the name of the attribute to find\n * @param attrs the attribute array to examine\n * @param isInlineTemplate true if the node being matched is an inline template (e.g. `*ngFor`)\n * rather than a manually expanded template node (e.g `<ng-template>`).\n * @param isProjectionMode true if we are matching against content projection otherwise we are\n * matching against directives.\n */\nfunction findAttrIndexInNode(\n name: string, attrs: TAttributes|null, isInlineTemplate: boolean,\n isProjectionMode: boolean): number {\n if (attrs === null) return -1;\n\n let i = 0;\n\n if (isProjectionMode || !isInlineTemplate) {\n let bindingsMode = false;\n while (i < attrs.length) {\n const maybeAttrName = attrs[i];\n if (maybeAttrName === name) {\n return i;\n } else if (\n maybeAttrName === AttributeMarker.Bindings || maybeAttrName === AttributeMarker.I18n) {\n bindingsMode = true;\n } else if (\n maybeAttrName === AttributeMarker.Classes || maybeAttrName === AttributeMarker.Styles) {\n let value = attrs[++i];\n // We should skip classes here because we have a separate mechanism for\n // matching classes in projection mode.\n while (typeof value === 'string') {\n value = attrs[++i];\n }\n continue;\n } else if (maybeAttrName === AttributeMarker.Template) {\n // We do not care about Template attributes in this scenario.\n break;\n } else if (maybeAttrName === AttributeMarker.NamespaceURI) {\n // Skip the whole namespaced attribute and value. This is by design.\n i += 4;\n continue;\n }\n // In binding mode there are only names, rather than name-value pairs.\n i += bindingsMode ? 1 : 2;\n }\n // We did not match the attribute\n return -1;\n } else {\n return matchTemplateAttribute(attrs, name);\n }\n}\n\nexport function isNodeMatchingSelectorList(\n tNode: TNode, selector: CssSelectorList, isProjectionMode: boolean = false): boolean {\n for (let i = 0; i < selector.length; i++) {\n if (isNodeMatchingSelector(tNode, selector[i], isProjectionMode)) {\n return true;\n }\n }\n\n return false;\n}\n\nexport function getProjectAsAttrValue(tNode: TNode): CssSelector|null {\n const nodeAttrs = tNode.attrs;\n if (nodeAttrs != null) {\n const ngProjectAsAttrIdx = nodeAttrs.indexOf(AttributeMarker.ProjectAs);\n // only check for ngProjectAs in attribute names, don't accidentally match attribute's value\n // (attribute names are stored at even indexes)\n if ((ngProjectAsAttrIdx & 1) === 0) {\n return nodeAttrs[ngProjectAsAttrIdx + 1] as CssSelector;\n }\n }\n return null;\n}\n\nfunction getNameOnlyMarkerIndex(nodeAttrs: TAttributes) {\n for (let i = 0; i < nodeAttrs.length; i++) {\n const nodeAttr = nodeAttrs[i];\n if (isNameOnlyAttributeMarker(nodeAttr)) {\n return i;\n }\n }\n return nodeAttrs.length;\n}\n\nfunction matchTemplateAttribute(attrs: TAttributes, name: string): number {\n let i = attrs.indexOf(AttributeMarker.Template);\n if (i > -1) {\n i++;\n while (i < attrs.length) {\n const attr = attrs[i];\n // Return in case we checked all template attrs and are switching to the next section in the\n // attrs array (that starts with a number that represents an attribute marker).\n if (typeof attr === 'number') return -1;\n if (attr === name) return i;\n i++;\n }\n }\n return -1;\n}\n\n/**\n * Checks whether a selector is inside a CssSelectorList\n * @param selector Selector to be checked.\n * @param list List in which to look for the selector.\n */\nexport function isSelectorInSelectorList(selector: CssSelector, list: CssSelectorList): boolean {\n selectorListLoop: for (let i = 0; i < list.length; i++) {\n const currentSelectorInList = list[i];\n if (selector.length !== currentSelectorInList.length) {\n continue;\n }\n for (let j = 0; j < selector.length; j++) {\n if (selector[j] !== currentSelectorInList[j]) {\n continue selectorListLoop;\n }\n }\n return true;\n }\n return false;\n}\n\nfunction maybeWrapInNotSelector(isNegativeMode: boolean, chunk: string): string {\n return isNegativeMode ? ':not(' + chunk.trim() + ')' : chunk;\n}\n\nfunction stringifyCSSSelector(selector: CssSelector): string {\n let result = selector[0] as string;\n let i = 1;\n let mode = SelectorFlags.ATTRIBUTE;\n let currentChunk = '';\n let isNegativeMode = false;\n while (i < selector.length) {\n let valueOrMarker = selector[i];\n if (typeof valueOrMarker === 'string') {\n if (mode & SelectorFlags.ATTRIBUTE) {\n const attrValue = selector[++i] as string;\n currentChunk +=\n '[' + valueOrMarker + (attrValue.length > 0 ? '=\"' + attrValue + '\"' : '') + ']';\n } else if (mode & SelectorFlags.CLASS) {\n currentChunk += '.' + valueOrMarker;\n } else if (mode & SelectorFlags.ELEMENT) {\n currentChunk += ' ' + valueOrMarker;\n }\n } else {\n //\n // Append current chunk to the final result in case we come across SelectorFlag, which\n // indicates that the previous section of a selector is over. We need to accumulate content\n // between flags to make sure we wrap the chunk later in :not() selector if needed, e.g.\n // ```\n // ['', Flags.CLASS, '.classA', Flags.CLASS | Flags.NOT, '.classB', '.classC']\n // ```\n // should be transformed to `.classA :not(.classB .classC)`.\n //\n // Note: for negative selector part, we accumulate content between flags until we find the\n // next negative flag. This is needed to support a case where `:not()` rule contains more than\n // one chunk, e.g. the following selector:\n // ```\n // ['', Flags.ELEMENT | Flags.NOT, 'p', Flags.CLASS, 'foo', Flags.CLASS | Flags.NOT, 'bar']\n // ```\n // should be stringified to `:not(p.foo) :not(.bar)`\n //\n if (currentChunk !== '' && !isPositive(valueOrMarker)) {\n result += maybeWrapInNotSelector(isNegativeMode, currentChunk);\n currentChunk = '';\n }\n mode = valueOrMarker;\n // According to CssSelector spec, once we come across `SelectorFlags.NOT` flag, the negative\n // mode is maintained for remaining chunks of a selector.\n isNegativeMode = isNegativeMode || !isPositive(mode);\n }\n i++;\n }\n if (currentChunk !== '') {\n result += maybeWrapInNotSelector(isNegativeMode, currentChunk);\n }\n return result;\n}\n\n/**\n * Generates string representation of CSS selector in parsed form.\n *\n * ComponentDef and DirectiveDef are generated with the selector in parsed form to avoid doing\n * additional parsing at runtime (for example, for directive matching). However in some cases (for\n * example, while bootstrapping a component), a string version of the selector is required to query\n * for the host element on the page. This function takes the parsed form of a selector and returns\n * its string representation.\n *\n * @param selectorList selector in parsed form\n * @returns string representation of a given selector\n */\nexport function stringifyCSSSelectorList(selectorList: CssSelectorList): string {\n return selectorList.map(stringifyCSSSelector).join(',');\n}\n\n/**\n * Extracts attributes and classes information from a given CSS selector.\n *\n * This function is used while creating a component dynamically. In this case, the host element\n * (that is created dynamically) should contain attributes and classes specified in component's CSS\n * selector.\n *\n * @param selector CSS selector in parsed form (in a form of array)\n * @returns object with `attrs` and `classes` fields that contain extracted information\n */\nexport function extractAttrsAndClassesFromSelector(selector: CssSelector):\n {attrs: string[], classes: string[]} {\n const attrs: string[] = [];\n const classes: string[] = [];\n let i = 1;\n let mode = SelectorFlags.ATTRIBUTE;\n while (i < selector.length) {\n let valueOrMarker = selector[i];\n if (typeof valueOrMarker === 'string') {\n if (mode === SelectorFlags.ATTRIBUTE) {\n if (valueOrMarker !== '') {\n attrs.push(valueOrMarker, selector[++i] as string);\n }\n } else if (mode === SelectorFlags.CLASS) {\n classes.push(valueOrMarker);\n }\n } else {\n // According to CssSelector spec, once we come across `SelectorFlags.NOT` flag, the negative\n // mode is maintained for remaining chunks of a selector. Since attributes and classes are\n // extracted only for \"positive\" part of the selector, we can stop here.\n if (!isPositive(mode)) break;\n mode = valueOrMarker;\n }\n i++;\n }\n return {attrs, classes};\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport interface NO_CHANGE {\n // This is a brand that ensures that this type can never match anything else\n __brand__: 'NO_CHANGE';\n}\n\n/** A special value which designates that a value has not changed. */\nexport const NO_CHANGE: NO_CHANGE =\n (typeof ngDevMode === 'undefined' || ngDevMode) ? {__brand__: 'NO_CHANGE'} : ({} as NO_CHANGE);\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 */\nimport {assertGreaterThan} from '../../util/assert';\nimport {assertIndexInDeclRange} from '../assert';\nimport {executeCheckHooks, executeInitAndCheckHooks} from '../hooks';\nimport {FLAGS, InitPhaseState, LView, LViewFlags, TView} from '../interfaces/view';\nimport {getLView, getSelectedIndex, getTView, isInCheckNoChangesMode, setSelectedIndex} from '../state';\n\n\n/**\n * Advances to an element for later binding instructions.\n *\n * Used in conjunction with instructions like {@link property} to act on elements with specified\n * indices, for example those created with {@link element} or {@link elementStart}.\n *\n * ```ts\n * (rf: RenderFlags, ctx: any) => {\n * if (rf & 1) {\n * text(0, 'Hello');\n * text(1, 'Goodbye')\n * element(2, 'div');\n * }\n * if (rf & 2) {\n * advance(2); // Advance twice to the <div>.\n * property('title', 'test');\n * }\n * }\n * ```\n * @param delta Number of elements to advance forwards by.\n *\n * @codeGenApi\n */\nexport function ɵɵadvance(delta: number): void {\n ngDevMode && assertGreaterThan(delta, 0, 'Can only advance forward');\n selectIndexInternal(getTView(), getLView(), getSelectedIndex() + delta, isInCheckNoChangesMode());\n}\n\nexport function selectIndexInternal(\n tView: TView, lView: LView, index: number, checkNoChangesMode: boolean) {\n ngDevMode && assertIndexInDeclRange(lView, index);\n\n // Flush the initial hooks for elements in the view that have been added up to this point.\n // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n if (!checkNoChangesMode) {\n const hooksInitPhaseCompleted =\n (lView[FLAGS] & LViewFlags.InitPhaseStateMask) === InitPhaseState.InitPhaseCompleted;\n if (hooksInitPhaseCompleted) {\n const preOrderCheckHooks = tView.preOrderCheckHooks;\n if (preOrderCheckHooks !== null) {\n executeCheckHooks(lView, preOrderCheckHooks, index);\n }\n } else {\n const preOrderHooks = tView.preOrderHooks;\n if (preOrderHooks !== null) {\n executeInitAndCheckHooks(lView, preOrderHooks, InitPhaseState.OnInitHooksToBeRun, index);\n }\n }\n }\n\n // We must set the selected index *after* running the hooks, because hooks may have side-effects\n // that cause other template functions to run, thus updating the selected index, which is global\n // state. If we run `setSelectedIndex` *before* we run the hooks, in some cases the selected index\n // will be altered by the time we leave the `ɵɵadvance` instruction.\n setSelectedIndex(index);\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 {KeyValueArray} from '../../util/array_utils';\nimport {assertNumber, assertNumberInRange} from '../../util/assert';\n\n/**\n * Value stored in the `TData` which is needed to re-concatenate the styling.\n *\n * See: `TStylingKeyPrimitive` and `TStylingStatic`\n */\nexport type TStylingKey = TStylingKeyPrimitive|TStylingStatic;\n\n\n/**\n * The primitive portion (`TStylingStatic` removed) of the value stored in the `TData` which is\n * needed to re-concatenate the styling.\n *\n * - `string`: Stores the property name. Used with `ɵɵstyleProp`/`ɵɵclassProp` instruction.\n * - `null`: Represents map, so there is no name. Used with `ɵɵstyleMap`/`ɵɵclassMap`.\n * - `false`: Represents an ignore case. This happens when `ɵɵstyleProp`/`ɵɵclassProp` instruction\n * is combined with directive which shadows its input `@Input('class')`. That way the binding\n * should not participate in the styling resolution.\n */\nexport type TStylingKeyPrimitive = string|null|false;\n\n/**\n * Store the static values for the styling binding.\n *\n * The `TStylingStatic` is just `KeyValueArray` where key `\"\"` (stored at location 0) contains the\n * `TStylingKey` (stored at location 1). In other words this wraps the `TStylingKey` such that the\n * `\"\"` contains the wrapped value.\n *\n * When instructions are resolving styling they may need to look forward or backwards in the linked\n * list to resolve the value. For this reason we have to make sure that he linked list also contains\n * the static values. However the list only has space for one item per styling instruction. For this\n * reason we store the static values here as part of the `TStylingKey`. This means that the\n * resolution function when looking for a value needs to first look at the binding value, and than\n * at `TStylingKey` (if it exists).\n *\n * Imagine we have:\n *\n * ```\n * <div class=\"TEMPLATE\" my-dir>\n *\n * @Directive({\n * host: {\n * class: 'DIR',\n * '[class.dynamic]': 'exp' // ɵɵclassProp('dynamic', ctx.exp);\n * }\n * })\n * ```\n *\n * In the above case the linked list will contain one item:\n *\n * ```\n * // assume binding location: 10 for `ɵɵclassProp('dynamic', ctx.exp);`\n * tData[10] = <TStylingStatic>[\n * '': 'dynamic', // This is the wrapped value of `TStylingKey`\n * 'DIR': true, // This is the default static value of directive binding.\n * ];\n * tData[10 + 1] = 0; // We don't have prev/next.\n *\n * lView[10] = undefined; // assume `ctx.exp` is `undefined`\n * lView[10 + 1] = undefined; // Just normalized `lView[10]`\n * ```\n *\n * So when the function is resolving styling value, it first needs to look into the linked list\n * (there is none) and than into the static `TStylingStatic` too see if there is a default value for\n * `dynamic` (there is not). Therefore it is safe to remove it.\n *\n * If setting `true` case:\n * ```\n * lView[10] = true; // assume `ctx.exp` is `true`\n * lView[10 + 1] = true; // Just normalized `lView[10]`\n * ```\n * So when the function is resolving styling value, it first needs to look into the linked list\n * (there is none) and than into `TNode.residualClass` (TNode.residualStyle) which contains\n * ```\n * tNode.residualClass = [\n * 'TEMPLATE': true,\n * ];\n * ```\n *\n * This means that it is safe to add class.\n */\nexport interface TStylingStatic extends KeyValueArray<any> {}\n\n/**\n * This is a branded number which contains previous and next index.\n *\n * When we come across styling instructions we need to store the `TStylingKey` in the correct\n * order so that we can re-concatenate the styling value in the desired priority.\n *\n * The insertion can happen either at the:\n * - end of template as in the case of coming across additional styling instruction in the template\n * - in front of the template in the case of coming across additional instruction in the\n * `hostBindings`.\n *\n * We use `TStylingRange` to store the previous and next index into the `TData` where the template\n * bindings can be found.\n *\n * - bit 0 is used to mark that the previous index has a duplicate for current value.\n * - bit 1 is used to mark that the next index has a duplicate for the current value.\n * - bits 2-16 are used to encode the next/tail of the template.\n * - bits 17-32 are used to encode the previous/head of template.\n *\n * NODE: *duplicate* false implies that it is statically known that this binding will not collide\n * with other bindings and therefore there is no need to check other bindings. For example the\n * bindings in `<div [style.color]=\"exp\" [style.width]=\"exp\">` will never collide and will have\n * their bits set accordingly. Previous duplicate means that we may need to check previous if the\n * current binding is `null`. Next duplicate means that we may need to check next bindings if the\n * current binding is not `null`.\n *\n * NOTE: `0` has special significance and represents `null` as in no additional pointer.\n */\nexport interface TStylingRange {\n __brand__: 'TStylingRange';\n}\n\n/**\n * Shift and masks constants for encoding two numbers into and duplicate info into a single number.\n */\nexport const enum StylingRange {\n /// Number of bits to shift for the previous pointer\n PREV_SHIFT = 17,\n /// Previous pointer mask.\n PREV_MASK = 0xFFFE0000,\n\n /// Number of bits to shift for the next pointer\n NEXT_SHIFT = 2,\n /// Next pointer mask.\n NEXT_MASK = 0x001FFFC,\n\n // Mask to remove nagative bit. (interpret number as positive)\n UNSIGNED_MASK = 0x7FFF,\n\n /**\n * This bit is set if the previous bindings contains a binding which could possibly cause a\n * duplicate. For example: `<div [style]=\"map\" [style.width]=\"width\">`, the `width` binding will\n * have previous duplicate set. The implication is that if `width` binding becomes `null`, it is\n * necessary to defer the value to `map.width`. (Because `width` overwrites `map.width`.)\n */\n PREV_DUPLICATE = 0x02,\n\n /**\n * This bit is set to if the next binding contains a binding which could possibly cause a\n * duplicate. For example: `<div [style]=\"map\" [style.width]=\"width\">`, the `map` binding will\n * have next duplicate set. The implication is that if `map.width` binding becomes not `null`, it\n * is necessary to defer the value to `width`. (Because `width` overwrites `map.width`.)\n */\n NEXT_DUPLICATE = 0x01,\n}\n\n\nexport function toTStylingRange(prev: number, next: number): TStylingRange {\n ngDevMode && assertNumberInRange(prev, 0, StylingRange.UNSIGNED_MASK);\n ngDevMode && assertNumberInRange(next, 0, StylingRange.UNSIGNED_MASK);\n return (prev << StylingRange.PREV_SHIFT | next << StylingRange.NEXT_SHIFT) as any;\n}\n\nexport function getTStylingRangePrev(tStylingRange: TStylingRange): number {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return ((tStylingRange as any as number) >> StylingRange.PREV_SHIFT) & StylingRange.UNSIGNED_MASK;\n}\n\nexport function getTStylingRangePrevDuplicate(tStylingRange: TStylingRange): boolean {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return ((tStylingRange as any as number) & StylingRange.PREV_DUPLICATE) ==\n StylingRange.PREV_DUPLICATE;\n}\n\nexport function setTStylingRangePrev(\n tStylingRange: TStylingRange, previous: number): TStylingRange {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n ngDevMode && assertNumberInRange(previous, 0, StylingRange.UNSIGNED_MASK);\n return (((tStylingRange as any as number) & ~StylingRange.PREV_MASK) |\n (previous << StylingRange.PREV_SHIFT)) as any;\n}\n\nexport function setTStylingRangePrevDuplicate(tStylingRange: TStylingRange): TStylingRange {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return ((tStylingRange as any as number) | StylingRange.PREV_DUPLICATE) as any;\n}\n\nexport function getTStylingRangeNext(tStylingRange: TStylingRange): number {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return ((tStylingRange as any as number) & StylingRange.NEXT_MASK) >> StylingRange.NEXT_SHIFT;\n}\n\nexport function setTStylingRangeNext(tStylingRange: TStylingRange, next: number): TStylingRange {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n ngDevMode && assertNumberInRange(next, 0, StylingRange.UNSIGNED_MASK);\n return (((tStylingRange as any as number) & ~StylingRange.NEXT_MASK) | //\n next << StylingRange.NEXT_SHIFT) as any;\n}\n\nexport function getTStylingRangeNextDuplicate(tStylingRange: TStylingRange): boolean {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return ((tStylingRange as any as number) & StylingRange.NEXT_DUPLICATE) ===\n StylingRange.NEXT_DUPLICATE;\n}\n\nexport function setTStylingRangeNextDuplicate(tStylingRange: TStylingRange): TStylingRange {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return ((tStylingRange as any as number) | StylingRange.NEXT_DUPLICATE) as any;\n}\n\nexport function getTStylingRangeTail(tStylingRange: TStylingRange): number {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n const next = getTStylingRangeNext(tStylingRange);\n return next === 0 ? getTStylingRangePrev(tStylingRange) : next;\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 * Patch a `debug` property on top of the existing object.\n *\n * NOTE: always call this method with `ngDevMode && attachDebugObject(...)`\n *\n * @param obj Object to patch\n * @param debug Value to patch\n */\nexport function attachDebugObject(obj: any, debug: any): void {\n if (ngDevMode) {\n Object.defineProperty(obj, 'debug', {value: debug, enumerable: false});\n } else {\n throw new Error(\n 'This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');\n }\n}\n\n/**\n * Patch a `debug` property getter on top of the existing object.\n *\n * NOTE: always call this method with `ngDevMode && attachDebugObject(...)`\n *\n * @param obj Object to patch\n * @param debugGetter Getter returning a value to patch\n */\nexport function attachDebugGetter<T>(obj: T, debugGetter: (this: T) => any): void {\n if (ngDevMode) {\n Object.defineProperty(obj, 'debug', {get: debugGetter, enumerable: false});\n } else {\n throw new Error(\n 'This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');\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 '../../di/injector';\nimport {Type} from '../../interface/type';\nimport {SchemaMetadata} from '../../metadata/schema';\nimport {Sanitizer} from '../../sanitization/sanitizer';\nimport {KeyValueArray} from '../../util/array_utils';\nimport {assertDefined} from '../../util/assert';\nimport {createNamedArrayType} from '../../util/named_array_type';\nimport {initNgDevMode} from '../../util/ng_dev_mode';\nimport {assertNodeInjector} from '../assert';\nimport {getInjectorIndex, getParentInjectorLocation} from '../di';\nimport {CONTAINER_HEADER_OFFSET, HAS_TRANSPLANTED_VIEWS, LContainer, MOVED_VIEWS, NATIVE} from '../interfaces/container';\nimport {ComponentTemplate, DirectiveDef, DirectiveDefList, PipeDefList, ViewQueriesFunction} from '../interfaces/definition';\nimport {NO_PARENT_INJECTOR, NodeInjectorOffset} from '../interfaces/injector';\nimport {AttributeMarker, InsertBeforeIndex, PropertyAliases, TConstants, TContainerNode, TElementNode, TNode as ITNode, TNodeFlags, TNodeProviderIndexes, TNodeType, toTNodeTypeAsString} from '../interfaces/node';\nimport {SelectorFlags} from '../interfaces/projection';\nimport {LQueries, TQueries} from '../interfaces/query';\nimport {Renderer3, RendererFactory3} from '../interfaces/renderer';\nimport {RComment, RElement, RNode} from '../interfaces/renderer_dom';\nimport {getTStylingRangeNext, getTStylingRangeNextDuplicate, getTStylingRangePrev, getTStylingRangePrevDuplicate, TStylingKey, TStylingRange} from '../interfaces/styling';\nimport {CHILD_HEAD, CHILD_TAIL, CLEANUP, CONTEXT, DebugNode, DECLARATION_VIEW, DestroyHookData, FLAGS, HEADER_OFFSET, HookData, HOST, HostBindingOpCodes, INJECTOR, LContainerDebug as ILContainerDebug, LView, LViewDebug as ILViewDebug, LViewDebugRange, LViewDebugRangeContent, LViewFlags, NEXT, NodeInjectorDebug, PARENT, QUERIES, RENDERER, RENDERER_FACTORY, SANITIZER, T_HOST, TData, TView as ITView, TVIEW, TView, TViewType, TViewTypeAsString} from '../interfaces/view';\nimport {attachDebugObject} from '../util/debug_utils';\nimport {getParentInjectorIndex, getParentInjectorView} from '../util/injector_utils';\nimport {unwrapRNode} from '../util/view_utils';\n\nconst NG_DEV_MODE = ((typeof ngDevMode === 'undefined' || !!ngDevMode) && initNgDevMode());\n\n/*\n * This file contains conditionally attached classes which provide human readable (debug) level\n * information for `LView`, `LContainer` and other internal data structures. These data structures\n * are stored internally as array which makes it very difficult during debugging to reason about the\n * current state of the system.\n *\n * Patching the array with extra property does change the array's hidden class' but it does not\n * change the cost of access, therefore this patching should not have significant if any impact in\n * `ngDevMode` mode. (see: https://jsperf.com/array-vs-monkey-patch-array)\n *\n * So instead of seeing:\n * ```\n * Array(30) [Object, 659, null, …]\n * ```\n *\n * You get to see:\n * ```\n * LViewDebug {\n * views: [...],\n * flags: {attached: true, ...}\n * nodes: [\n * {html: '<div id=\"123\">', ..., nodes: [\n * {html: '<span>', ..., nodes: null}\n * ]}\n * ]\n * }\n * ```\n */\n\nlet LVIEW_COMPONENT_CACHE!: Map<string|null, Array<any>>;\nlet LVIEW_EMBEDDED_CACHE!: Map<string|null, Array<any>>;\nlet LVIEW_ROOT!: Array<any>;\n\ninterface TViewDebug extends ITView {\n type: TViewType;\n}\n\n/**\n * This function clones a blueprint and creates LView.\n *\n * Simple slice will keep the same type, and we need it to be LView\n */\nexport function cloneToLViewFromTViewBlueprint(tView: TView): LView {\n const debugTView = tView as TViewDebug;\n const lView = getLViewToClone(debugTView.type, tView.template && tView.template.name);\n return lView.concat(tView.blueprint) as any;\n}\n\nfunction getLViewToClone(type: TViewType, name: string|null): Array<any> {\n switch (type) {\n case TViewType.Root:\n if (LVIEW_ROOT === undefined) LVIEW_ROOT = new (createNamedArrayType('LRootView'))();\n return LVIEW_ROOT;\n case TViewType.Component:\n if (LVIEW_COMPONENT_CACHE === undefined) LVIEW_COMPONENT_CACHE = new Map();\n let componentArray = LVIEW_COMPONENT_CACHE.get(name);\n if (componentArray === undefined) {\n componentArray = new (createNamedArrayType('LComponentView' + nameSuffix(name)))();\n LVIEW_COMPONENT_CACHE.set(name, componentArray);\n }\n return componentArray;\n case TViewType.Embedded:\n if (LVIEW_EMBEDDED_CACHE === undefined) LVIEW_EMBEDDED_CACHE = new Map();\n let embeddedArray = LVIEW_EMBEDDED_CACHE.get(name);\n if (embeddedArray === undefined) {\n embeddedArray = new (createNamedArrayType('LEmbeddedView' + nameSuffix(name)))();\n LVIEW_EMBEDDED_CACHE.set(name, embeddedArray);\n }\n return embeddedArray;\n }\n}\n\nfunction nameSuffix(text: string|null|undefined): string {\n if (text == null) return '';\n const index = text.lastIndexOf('_Template');\n return '_' + (index === -1 ? text : text.substr(0, index));\n}\n\n/**\n * This class is a debug version of Object literal so that we can have constructor name show up\n * in\n * debug tools in ngDevMode.\n */\nexport const TViewConstructor = class TView implements ITView {\n constructor(\n public type: TViewType,\n public blueprint: LView,\n public template: ComponentTemplate<{}>|null,\n public queries: TQueries|null,\n public viewQuery: ViewQueriesFunction<{}>|null,\n public declTNode: ITNode|null,\n public data: TData,\n public bindingStartIndex: number,\n public expandoStartIndex: number,\n public hostBindingOpCodes: HostBindingOpCodes|null,\n public firstCreatePass: boolean,\n public firstUpdatePass: boolean,\n public staticViewQueries: boolean,\n public staticContentQueries: boolean,\n public preOrderHooks: HookData|null,\n public preOrderCheckHooks: HookData|null,\n public contentHooks: HookData|null,\n public contentCheckHooks: HookData|null,\n public viewHooks: HookData|null,\n public viewCheckHooks: HookData|null,\n public destroyHooks: DestroyHookData|null,\n public cleanup: any[]|null,\n public contentQueries: number[]|null,\n public components: number[]|null,\n public directiveRegistry: DirectiveDefList|null,\n public pipeRegistry: PipeDefList|null,\n public firstChild: ITNode|null,\n public schemas: SchemaMetadata[]|null,\n public consts: TConstants|null,\n public incompleteFirstPass: boolean,\n public _decls: number,\n public _vars: number,\n\n ) {}\n\n get template_(): string {\n const buf: string[] = [];\n processTNodeChildren(this.firstChild, buf);\n return buf.join('');\n }\n\n get type_(): string {\n return TViewTypeAsString[this.type] || `TViewType.?${this.type}?`;\n }\n};\n\nclass TNode implements ITNode {\n constructor(\n public tView_: TView, //\n public type: TNodeType, //\n public index: number, //\n public insertBeforeIndex: InsertBeforeIndex, //\n public injectorIndex: number, //\n public directiveStart: number, //\n public directiveEnd: number, //\n public directiveStylingLast: number, //\n public propertyBindings: number[]|null, //\n public flags: TNodeFlags, //\n public providerIndexes: TNodeProviderIndexes, //\n public value: string|null, //\n public attrs: (string|AttributeMarker|(string|SelectorFlags)[])[]|null, //\n public mergedAttrs: (string|AttributeMarker|(string|SelectorFlags)[])[]|null, //\n public localNames: (string|number)[]|null, //\n public initialInputs: (string[]|null)[]|null|undefined, //\n public inputs: PropertyAliases|null, //\n public outputs: PropertyAliases|null, //\n public tViews: ITView|ITView[]|null, //\n public next: ITNode|null, //\n public projectionNext: ITNode|null, //\n public child: ITNode|null, //\n public parent: TElementNode|TContainerNode|null, //\n public projection: number|(ITNode|RNode[])[]|null, //\n public styles: string|null, //\n public stylesWithoutHost: string|null, //\n public residualStyles: KeyValueArray<any>|undefined|null, //\n public classes: string|null, //\n public classesWithoutHost: string|null, //\n public residualClasses: KeyValueArray<any>|undefined|null, //\n public classBindings: TStylingRange, //\n public styleBindings: TStylingRange, //\n ) {}\n\n /**\n * Return a human debug version of the set of `NodeInjector`s which will be consulted when\n * resolving tokens from this `TNode`.\n *\n * When debugging applications, it is often difficult to determine which `NodeInjector`s will be\n * consulted. This method shows a list of `DebugNode`s representing the `TNode`s which will be\n * consulted in order when resolving a token starting at this `TNode`.\n *\n * The original data is stored in `LView` and `TView` with a lot of offset indexes, and so it is\n * difficult to reason about.\n *\n * @param lView The `LView` instance for this `TNode`.\n */\n debugNodeInjectorPath(lView: LView): DebugNode[] {\n const path: DebugNode[] = [];\n let injectorIndex = getInjectorIndex(this, lView);\n if (injectorIndex === -1) {\n // Looks like the current `TNode` does not have `NodeInjector` associated with it => look for\n // parent NodeInjector.\n const parentLocation = getParentInjectorLocation(this, lView);\n if (parentLocation !== NO_PARENT_INJECTOR) {\n // We found a parent, so start searching from the parent location.\n injectorIndex = getParentInjectorIndex(parentLocation);\n lView = getParentInjectorView(parentLocation, lView);\n } else {\n // No parents have been found, so there are no `NodeInjector`s to consult.\n }\n }\n while (injectorIndex !== -1) {\n ngDevMode && assertNodeInjector(lView, injectorIndex);\n const tNode = lView[TVIEW].data[injectorIndex + NodeInjectorOffset.TNODE] as TNode;\n path.push(buildDebugNode(tNode, lView));\n const parentLocation = lView[injectorIndex + NodeInjectorOffset.PARENT];\n if (parentLocation === NO_PARENT_INJECTOR) {\n injectorIndex = -1;\n } else {\n injectorIndex = getParentInjectorIndex(parentLocation);\n lView = getParentInjectorView(parentLocation, lView);\n }\n }\n return path;\n }\n\n get type_(): string {\n return toTNodeTypeAsString(this.type) || `TNodeType.?${this.type}?`;\n }\n\n get flags_(): string {\n const flags: string[] = [];\n if (this.flags & TNodeFlags.hasClassInput) flags.push('TNodeFlags.hasClassInput');\n if (this.flags & TNodeFlags.hasContentQuery) flags.push('TNodeFlags.hasContentQuery');\n if (this.flags & TNodeFlags.hasStyleInput) flags.push('TNodeFlags.hasStyleInput');\n if (this.flags & TNodeFlags.hasHostBindings) flags.push('TNodeFlags.hasHostBindings');\n if (this.flags & TNodeFlags.isComponentHost) flags.push('TNodeFlags.isComponentHost');\n if (this.flags & TNodeFlags.isDirectiveHost) flags.push('TNodeFlags.isDirectiveHost');\n if (this.flags & TNodeFlags.isDetached) flags.push('TNodeFlags.isDetached');\n if (this.flags & TNodeFlags.isProjected) flags.push('TNodeFlags.isProjected');\n return flags.join('|');\n }\n\n get template_(): string {\n if (this.type & TNodeType.Text) return this.value!;\n const buf: string[] = [];\n const tagName = typeof this.value === 'string' && this.value || this.type_;\n buf.push('<', tagName);\n if (this.flags) {\n buf.push(' ', this.flags_);\n }\n if (this.attrs) {\n for (let i = 0; i < this.attrs.length;) {\n const attrName = this.attrs[i++];\n if (typeof attrName == 'number') {\n break;\n }\n const attrValue = this.attrs[i++];\n buf.push(' ', attrName as string, '=\"', attrValue as string, '\"');\n }\n }\n buf.push('>');\n processTNodeChildren(this.child, buf);\n buf.push('</', tagName, '>');\n return buf.join('');\n }\n\n get styleBindings_(): DebugStyleBindings {\n return toDebugStyleBinding(this, false);\n }\n get classBindings_(): DebugStyleBindings {\n return toDebugStyleBinding(this, true);\n }\n\n get providerIndexStart_(): number {\n return this.providerIndexes & TNodeProviderIndexes.ProvidersStartIndexMask;\n }\n get providerIndexEnd_(): number {\n return this.providerIndexStart_ +\n (this.providerIndexes >>> TNodeProviderIndexes.CptViewProvidersCountShift);\n }\n}\nexport const TNodeDebug = TNode;\nexport type TNodeDebug = TNode;\n\nexport interface DebugStyleBindings extends\n Array<KeyValueArray<any>|DebugStyleBinding|string|null> {}\nexport interface DebugStyleBinding {\n key: TStylingKey;\n index: number;\n isTemplate: boolean;\n prevDuplicate: boolean;\n nextDuplicate: boolean;\n prevIndex: number;\n nextIndex: number;\n}\n\nfunction toDebugStyleBinding(tNode: TNode, isClassBased: boolean): DebugStyleBindings {\n const tData = tNode.tView_.data;\n const bindings: DebugStyleBindings = [] as any;\n const range = isClassBased ? tNode.classBindings : tNode.styleBindings;\n const prev = getTStylingRangePrev(range);\n const next = getTStylingRangeNext(range);\n let isTemplate = next !== 0;\n let cursor = isTemplate ? next : prev;\n while (cursor !== 0) {\n const itemKey = tData[cursor] as TStylingKey;\n const itemRange = tData[cursor + 1] as TStylingRange;\n bindings.unshift({\n key: itemKey,\n index: cursor,\n isTemplate: isTemplate,\n prevDuplicate: getTStylingRangePrevDuplicate(itemRange),\n nextDuplicate: getTStylingRangeNextDuplicate(itemRange),\n nextIndex: getTStylingRangeNext(itemRange),\n prevIndex: getTStylingRangePrev(itemRange),\n });\n if (cursor === prev) isTemplate = false;\n cursor = getTStylingRangePrev(itemRange);\n }\n bindings.push((isClassBased ? tNode.residualClasses : tNode.residualStyles) || null);\n return bindings;\n}\n\nfunction processTNodeChildren(tNode: ITNode|null, buf: string[]) {\n while (tNode) {\n buf.push((tNode as any as {template_: string}).template_);\n tNode = tNode.next;\n }\n}\n\nconst TViewData = NG_DEV_MODE && createNamedArrayType('TViewData') || null! as ArrayConstructor;\nlet TVIEWDATA_EMPTY: unknown[]; // can't initialize here or it will not be tree shaken, because\n // `LView` constructor could have side-effects.\n/**\n * This function clones a blueprint and creates TData.\n *\n * Simple slice will keep the same type, and we need it to be TData\n */\nexport function cloneToTViewData(list: any[]): TData {\n if (TVIEWDATA_EMPTY === undefined) TVIEWDATA_EMPTY = new TViewData();\n return TVIEWDATA_EMPTY.concat(list) as any;\n}\n\nexport const LViewBlueprint =\n NG_DEV_MODE && createNamedArrayType('LViewBlueprint') || null! as ArrayConstructor;\nexport const MatchesArray =\n NG_DEV_MODE && createNamedArrayType('MatchesArray') || null! as ArrayConstructor;\nexport const TViewComponents =\n NG_DEV_MODE && createNamedArrayType('TViewComponents') || null! as ArrayConstructor;\nexport const TNodeLocalNames =\n NG_DEV_MODE && createNamedArrayType('TNodeLocalNames') || null! as ArrayConstructor;\nexport const TNodeInitialInputs =\n NG_DEV_MODE && createNamedArrayType('TNodeInitialInputs') || null! as ArrayConstructor;\nexport const TNodeInitialData =\n NG_DEV_MODE && createNamedArrayType('TNodeInitialData') || null! as ArrayConstructor;\nexport const LCleanup =\n NG_DEV_MODE && createNamedArrayType('LCleanup') || null! as ArrayConstructor;\nexport const TCleanup =\n NG_DEV_MODE && createNamedArrayType('TCleanup') || null! as ArrayConstructor;\n\n\n\nexport function attachLViewDebug(lView: LView) {\n attachDebugObject(lView, new LViewDebug(lView));\n}\n\nexport function attachLContainerDebug(lContainer: LContainer) {\n attachDebugObject(lContainer, new LContainerDebug(lContainer));\n}\n\nexport function toDebug(obj: LView): ILViewDebug;\nexport function toDebug(obj: LView|null): ILViewDebug|null;\nexport function toDebug(obj: LView|LContainer|null): ILViewDebug|ILContainerDebug|null;\nexport function toDebug(obj: any): any {\n if (obj) {\n const debug = (obj as any).debug;\n assertDefined(debug, 'Object does not have a debug representation.');\n return debug;\n } else {\n return obj;\n }\n}\n\n/**\n * Use this method to unwrap a native element in `LView` and convert it into HTML for easier\n * reading.\n *\n * @param value possibly wrapped native DOM node.\n * @param includeChildren If `true` then the serialized HTML form will include child elements\n * (same\n * as `outerHTML`). If `false` then the serialized HTML form will only contain the element\n * itself\n * (will not serialize child elements).\n */\nfunction toHtml(value: any, includeChildren: boolean = false): string|null {\n const node: Node|null = unwrapRNode(value) as any;\n if (node) {\n switch (node.nodeType) {\n case Node.TEXT_NODE:\n return node.textContent;\n case Node.COMMENT_NODE:\n return `<!--${(node as Comment).textContent}-->`;\n case Node.ELEMENT_NODE:\n const outerHTML = (node as Element).outerHTML;\n if (includeChildren) {\n return outerHTML;\n } else {\n const innerHTML = '>' + (node as Element).innerHTML + '<';\n return (outerHTML.split(innerHTML)[0]) + '>';\n }\n }\n }\n return null;\n}\n\nexport class LViewDebug implements ILViewDebug {\n constructor(private readonly _raw_lView: LView) {}\n\n /**\n * Flags associated with the `LView` unpacked into a more readable state.\n */\n get flags() {\n const flags = this._raw_lView[FLAGS];\n return {\n __raw__flags__: flags,\n initPhaseState: flags & LViewFlags.InitPhaseStateMask,\n creationMode: !!(flags & LViewFlags.CreationMode),\n firstViewPass: !!(flags & LViewFlags.FirstLViewPass),\n checkAlways: !!(flags & LViewFlags.CheckAlways),\n dirty: !!(flags & LViewFlags.Dirty),\n attached: !!(flags & LViewFlags.Attached),\n destroyed: !!(flags & LViewFlags.Destroyed),\n isRoot: !!(flags & LViewFlags.IsRoot),\n indexWithinInitPhase: flags >> LViewFlags.IndexWithinInitPhaseShift,\n };\n }\n get parent(): ILViewDebug|ILContainerDebug|null {\n return toDebug(this._raw_lView[PARENT]);\n }\n get hostHTML(): string|null {\n return toHtml(this._raw_lView[HOST], true);\n }\n get html(): string {\n return (this.nodes || []).map(mapToHTML).join('');\n }\n get context(): {}|null {\n return this._raw_lView[CONTEXT];\n }\n /**\n * The tree of nodes associated with the current `LView`. The nodes have been normalized into\n * a tree structure with relevant details pulled out for readability.\n */\n get nodes(): DebugNode[] {\n const lView = this._raw_lView;\n const tNode = lView[TVIEW].firstChild;\n return toDebugNodes(tNode, lView);\n }\n get template(): string {\n return (this.tView as any as {template_: string}).template_;\n }\n get tView(): ITView {\n return this._raw_lView[TVIEW];\n }\n get cleanup(): any[]|null {\n return this._raw_lView[CLEANUP];\n }\n get injector(): Injector|null {\n return this._raw_lView[INJECTOR];\n }\n get rendererFactory(): RendererFactory3 {\n return this._raw_lView[RENDERER_FACTORY];\n }\n get renderer(): Renderer3 {\n return this._raw_lView[RENDERER];\n }\n get sanitizer(): Sanitizer|null {\n return this._raw_lView[SANITIZER];\n }\n get childHead(): ILViewDebug|ILContainerDebug|null {\n return toDebug(this._raw_lView[CHILD_HEAD]);\n }\n get next(): ILViewDebug|ILContainerDebug|null {\n return toDebug(this._raw_lView[NEXT]);\n }\n get childTail(): ILViewDebug|ILContainerDebug|null {\n return toDebug(this._raw_lView[CHILD_TAIL]);\n }\n get declarationView(): ILViewDebug|null {\n return toDebug(this._raw_lView[DECLARATION_VIEW]);\n }\n get queries(): LQueries|null {\n return this._raw_lView[QUERIES];\n }\n get tHost(): ITNode|null {\n return this._raw_lView[T_HOST];\n }\n\n get decls(): LViewDebugRange {\n return toLViewRange(this.tView, this._raw_lView, HEADER_OFFSET, this.tView.bindingStartIndex);\n }\n\n get vars(): LViewDebugRange {\n return toLViewRange(\n this.tView, this._raw_lView, this.tView.bindingStartIndex, this.tView.expandoStartIndex);\n }\n\n get expando(): LViewDebugRange {\n return toLViewRange(\n this.tView, this._raw_lView, this.tView.expandoStartIndex, this._raw_lView.length);\n }\n\n /**\n * Normalized view of child views (and containers) attached at this location.\n */\n get childViews(): Array<ILViewDebug|ILContainerDebug> {\n const childViews: Array<ILViewDebug|ILContainerDebug> = [];\n let child = this.childHead;\n while (child) {\n childViews.push(child);\n child = child.next;\n }\n return childViews;\n }\n}\n\nfunction mapToHTML(node: DebugNode): string {\n if (node.type === 'ElementContainer') {\n return (node.children || []).map(mapToHTML).join('');\n } else if (node.type === 'IcuContainer') {\n throw new Error('Not implemented');\n } else {\n return toHtml(node.native, true) || '';\n }\n}\n\nfunction toLViewRange(tView: TView, lView: LView, start: number, end: number): LViewDebugRange {\n let content: LViewDebugRangeContent[] = [];\n for (let index = start; index < end; index++) {\n content.push({index: index, t: tView.data[index], l: lView[index]});\n }\n return {start: start, end: end, length: end - start, content: content};\n}\n\n/**\n * Turns a flat list of nodes into a tree by walking the associated `TNode` tree.\n *\n * @param tNode\n * @param lView\n */\nexport function toDebugNodes(tNode: ITNode|null, lView: LView): DebugNode[] {\n if (tNode) {\n const debugNodes: DebugNode[] = [];\n let tNodeCursor: ITNode|null = tNode;\n while (tNodeCursor) {\n debugNodes.push(buildDebugNode(tNodeCursor, lView));\n tNodeCursor = tNodeCursor.next;\n }\n return debugNodes;\n } else {\n return [];\n }\n}\n\nexport function buildDebugNode(tNode: ITNode, lView: LView): DebugNode {\n const rawValue = lView[tNode.index];\n const native = unwrapRNode(rawValue);\n const factories: Type<any>[] = [];\n const instances: any[] = [];\n const tView = lView[TVIEW];\n for (let i = tNode.directiveStart; i < tNode.directiveEnd; i++) {\n const def = tView.data[i] as DirectiveDef<any>;\n factories.push(def.type);\n instances.push(lView[i]);\n }\n return {\n html: toHtml(native),\n type: toTNodeTypeAsString(tNode.type),\n tNode,\n native: native as any,\n children: toDebugNodes(tNode.child, lView),\n factories,\n instances,\n injector: buildNodeInjectorDebug(tNode, tView, lView),\n get injectorResolutionPath() {\n return (tNode as TNode).debugNodeInjectorPath(lView);\n },\n };\n}\n\nfunction buildNodeInjectorDebug(tNode: ITNode, tView: ITView, lView: LView): NodeInjectorDebug {\n const viewProviders: Type<any>[] = [];\n for (let i = (tNode as TNode).providerIndexStart_; i < (tNode as TNode).providerIndexEnd_; i++) {\n viewProviders.push(tView.data[i] as Type<any>);\n }\n const providers: Type<any>[] = [];\n for (let i = (tNode as TNode).providerIndexEnd_; i < (tNode as TNode).directiveEnd; i++) {\n providers.push(tView.data[i] as Type<any>);\n }\n const nodeInjectorDebug = {\n bloom: toBloom(lView, tNode.injectorIndex),\n cumulativeBloom: toBloom(tView.data, tNode.injectorIndex),\n providers,\n viewProviders,\n parentInjectorIndex: lView[(tNode as TNode).providerIndexStart_ - 1],\n };\n return nodeInjectorDebug;\n}\n\n/**\n * Convert a number at `idx` location in `array` into binary representation.\n *\n * @param array\n * @param idx\n */\nfunction binary(array: any[], idx: number): string {\n const value = array[idx];\n // If not a number we print 8 `?` to retain alignment but let user know that it was called on\n // wrong type.\n if (typeof value !== 'number') return '????????';\n // We prefix 0s so that we have constant length number\n const text = '00000000' + value.toString(2);\n return text.substring(text.length - 8);\n}\n\n/**\n * Convert a bloom filter at location `idx` in `array` into binary representation.\n *\n * @param array\n * @param idx\n */\nfunction toBloom(array: any[], idx: number): string {\n if (idx < 0) {\n return 'NO_NODE_INJECTOR';\n }\n return `${binary(array, idx + 7)}_${binary(array, idx + 6)}_${binary(array, idx + 5)}_${\n binary(array, idx + 4)}_${binary(array, idx + 3)}_${binary(array, idx + 2)}_${\n binary(array, idx + 1)}_${binary(array, idx + 0)}`;\n}\n\nexport class LContainerDebug implements ILContainerDebug {\n constructor(private readonly _raw_lContainer: LContainer) {}\n\n get hasTransplantedViews(): boolean {\n return this._raw_lContainer[HAS_TRANSPLANTED_VIEWS];\n }\n get views(): ILViewDebug[] {\n return this._raw_lContainer.slice(CONTAINER_HEADER_OFFSET)\n .map(toDebug as (l: LView) => ILViewDebug);\n }\n get parent(): ILViewDebug|null {\n return toDebug(this._raw_lContainer[PARENT]);\n }\n get movedViews(): LView[]|null {\n return this._raw_lContainer[MOVED_VIEWS];\n }\n get host(): RElement|RComment|LView {\n return this._raw_lContainer[HOST];\n }\n get native(): RComment {\n return this._raw_lContainer[NATIVE];\n }\n get next() {\n return toDebug(this._raw_lContainer[NEXT]);\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 */\nimport {Injector} from '../../di';\nimport {ErrorHandler} from '../../error_handler';\nimport {DoCheck, OnChanges, OnInit} from '../../interface/lifecycle_hooks';\nimport {CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA, SchemaMetadata} from '../../metadata/schema';\nimport {ViewEncapsulation} from '../../metadata/view';\nimport {validateAgainstEventAttributes, validateAgainstEventProperties} from '../../sanitization/sanitization';\nimport {Sanitizer} from '../../sanitization/sanitizer';\nimport {assertDefined, assertDomNode, assertEqual, assertGreaterThanOrEqual, assertIndexInRange, assertNotEqual, assertNotSame, assertSame, assertString} from '../../util/assert';\nimport {escapeCommentText} from '../../util/dom';\nimport {createNamedArrayType} from '../../util/named_array_type';\nimport {initNgDevMode} from '../../util/ng_dev_mode';\nimport {normalizeDebugBindingName, normalizeDebugBindingValue} from '../../util/ng_reflect';\nimport {stringify} from '../../util/stringify';\nimport {assertFirstCreatePass, assertFirstUpdatePass, assertLContainer, assertLView, assertTNodeForLView, assertTNodeForTView} from '../assert';\nimport {attachPatchData, readPatchedLView} from '../context_discovery';\nimport {getFactoryDef} from '../definition_factory';\nimport {diPublicInInjector, getNodeInjectable, getOrCreateNodeInjectorForNode} from '../di';\nimport {formatRuntimeError, RuntimeError, RuntimeErrorCode} from '../error_code';\nimport {throwMultipleComponentError} from '../errors';\nimport {executeCheckHooks, executeInitAndCheckHooks, incrementInitPhaseFlags} from '../hooks';\nimport {CONTAINER_HEADER_OFFSET, HAS_TRANSPLANTED_VIEWS, LContainer, MOVED_VIEWS} from '../interfaces/container';\nimport {ComponentDef, ComponentTemplate, DirectiveDef, DirectiveDefListOrFactory, HostBindingsFunction, PipeDefListOrFactory, RenderFlags, ViewQueriesFunction} from '../interfaces/definition';\nimport {NodeInjectorFactory} from '../interfaces/injector';\nimport {AttributeMarker, InitialInputData, InitialInputs, LocalRefExtractor, PropertyAliases, PropertyAliasValue, TAttributes, TConstantsOrFactory, TContainerNode, TDirectiveHostNode, TElementContainerNode, TElementNode, TIcuContainerNode, TNode, TNodeFlags, TNodeType, TProjectionNode} from '../interfaces/node';\nimport {isProceduralRenderer, Renderer3, RendererFactory3} from '../interfaces/renderer';\nimport {RComment, RElement, RNode, RText} from '../interfaces/renderer_dom';\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {isComponentDef, isComponentHost, isContentQueryHost, isRootView} from '../interfaces/type_checks';\nimport {CHILD_HEAD, CHILD_TAIL, CLEANUP, CONTEXT, DECLARATION_COMPONENT_VIEW, DECLARATION_VIEW, FLAGS, HEADER_OFFSET, HOST, HostBindingOpCodes, InitPhaseState, INJECTOR, LView, LViewFlags, NEXT, PARENT, RENDERER, RENDERER_FACTORY, RootContext, RootContextFlags, SANITIZER, T_HOST, TData, TRANSPLANTED_VIEWS_TO_REFRESH, TVIEW, TView, TViewType} from '../interfaces/view';\nimport {assertPureTNodeType, assertTNodeType} from '../node_assert';\nimport {updateTextNode} from '../node_manipulation';\nimport {isInlineTemplate, isNodeMatchingSelectorList} from '../node_selector_matcher';\nimport {profiler, ProfilerEvent} from '../profiler';\nimport {enterView, getBindingsEnabled, getCurrentDirectiveIndex, getCurrentParentTNode, getCurrentTNode, getCurrentTNodePlaceholderOk, getSelectedIndex, isCurrentTNodeParent, isInCheckNoChangesMode, isInI18nBlock, leaveView, setBindingIndex, setBindingRootForHostBindings, setCurrentDirectiveIndex, setCurrentQueryIndex, setCurrentTNode, setIsInCheckNoChangesMode, setSelectedIndex} from '../state';\nimport {NO_CHANGE} from '../tokens';\nimport {isAnimationProp, mergeHostAttrs} from '../util/attrs_utils';\nimport {INTERPOLATION_DELIMITER} from '../util/misc_utils';\nimport {renderStringify, stringifyForError} from '../util/stringify_utils';\nimport {getFirstLContainer, getLViewParent, getNextLContainer} from '../util/view_traversal_utils';\nimport {getComponentLViewByIndex, getNativeByIndex, getNativeByTNode, isCreationMode, resetPreOrderHookFlags, unwrapLView, updateTransplantedViewCount, viewAttachedToChangeDetector} from '../util/view_utils';\n\nimport {selectIndexInternal} from './advance';\nimport {attachLContainerDebug, attachLViewDebug, cloneToLViewFromTViewBlueprint, cloneToTViewData, LCleanup, LViewBlueprint, MatchesArray, TCleanup, TNodeDebug, TNodeInitialInputs, TNodeLocalNames, TViewComponents, TViewConstructor} from './lview_debug';\n\n\n\n/**\n * A permanent marker promise which signifies that the current CD tree is\n * clean.\n */\nconst _CLEAN_PROMISE = (() => Promise.resolve(null))();\n\n/**\n * Invoke `HostBindingsFunction`s for view.\n *\n * This methods executes `TView.hostBindingOpCodes`. It is used to execute the\n * `HostBindingsFunction`s associated with the current `LView`.\n *\n * @param tView Current `TView`.\n * @param lView Current `LView`.\n */\nexport function processHostBindingOpCodes(tView: TView, lView: LView): void {\n const hostBindingOpCodes = tView.hostBindingOpCodes;\n if (hostBindingOpCodes === null) return;\n try {\n for (let i = 0; i < hostBindingOpCodes.length; i++) {\n const opCode = hostBindingOpCodes[i] as number;\n if (opCode < 0) {\n // Negative numbers are element indexes.\n setSelectedIndex(~opCode);\n } else {\n // Positive numbers are NumberTuple which store bindingRootIndex and directiveIndex.\n const directiveIdx = opCode;\n const bindingRootIndx = hostBindingOpCodes[++i] as number;\n const hostBindingFn = hostBindingOpCodes[++i] as HostBindingsFunction<any>;\n setBindingRootForHostBindings(bindingRootIndx, directiveIdx);\n const context = lView[directiveIdx];\n hostBindingFn(RenderFlags.Update, context);\n }\n }\n } finally {\n setSelectedIndex(-1);\n }\n}\n\n\n/** Refreshes all content queries declared by directives in a given view */\nfunction refreshContentQueries(tView: TView, lView: LView): void {\n const contentQueries = tView.contentQueries;\n if (contentQueries !== null) {\n for (let i = 0; i < contentQueries.length; i += 2) {\n const queryStartIdx = contentQueries[i];\n const directiveDefIdx = contentQueries[i + 1];\n if (directiveDefIdx !== -1) {\n const directiveDef = tView.data[directiveDefIdx] as DirectiveDef<any>;\n ngDevMode && assertDefined(directiveDef, 'DirectiveDef not found.');\n ngDevMode &&\n assertDefined(directiveDef.contentQueries, 'contentQueries function should be defined');\n setCurrentQueryIndex(queryStartIdx);\n directiveDef.contentQueries!(RenderFlags.Update, lView[directiveDefIdx], directiveDefIdx);\n }\n }\n }\n}\n\n/** Refreshes child components in the current view (update mode). */\nfunction refreshChildComponents(hostLView: LView, components: number[]): void {\n for (let i = 0; i < components.length; i++) {\n refreshComponent(hostLView, components[i]);\n }\n}\n\n/** Renders child components in the current view (creation mode). */\nfunction renderChildComponents(hostLView: LView, components: number[]): void {\n for (let i = 0; i < components.length; i++) {\n renderComponent(hostLView, components[i]);\n }\n}\n\nexport function createLView<T>(\n parentLView: LView|null, tView: TView, context: T|null, flags: LViewFlags, host: RElement|null,\n tHostNode: TNode|null, rendererFactory: RendererFactory3|null, renderer: Renderer3|null,\n sanitizer: Sanitizer|null, injector: Injector|null): LView {\n const lView =\n ngDevMode ? cloneToLViewFromTViewBlueprint(tView) : tView.blueprint.slice() as LView;\n lView[HOST] = host;\n lView[FLAGS] = flags | LViewFlags.CreationMode | LViewFlags.Attached | LViewFlags.FirstLViewPass;\n resetPreOrderHookFlags(lView);\n ngDevMode && tView.declTNode && parentLView && assertTNodeForLView(tView.declTNode, parentLView);\n lView[PARENT] = lView[DECLARATION_VIEW] = parentLView;\n lView[CONTEXT] = context;\n lView[RENDERER_FACTORY] = (rendererFactory || parentLView && parentLView[RENDERER_FACTORY])!;\n ngDevMode && assertDefined(lView[RENDERER_FACTORY], 'RendererFactory is required');\n lView[RENDERER] = (renderer || parentLView && parentLView[RENDERER])!;\n ngDevMode && assertDefined(lView[RENDERER], 'Renderer is required');\n lView[SANITIZER] = sanitizer || parentLView && parentLView[SANITIZER] || null!;\n lView[INJECTOR as any] = injector || parentLView && parentLView[INJECTOR] || null;\n lView[T_HOST] = tHostNode;\n ngDevMode &&\n assertEqual(\n tView.type == TViewType.Embedded ? parentLView !== null : true, true,\n 'Embedded views must have parentLView');\n lView[DECLARATION_COMPONENT_VIEW] =\n tView.type == TViewType.Embedded ? parentLView![DECLARATION_COMPONENT_VIEW] : lView;\n ngDevMode && attachLViewDebug(lView);\n return lView;\n}\n\n/**\n * Create and stores the TNode, and hooks it up to the tree.\n *\n * @param tView The current `TView`.\n * @param index The index at which the TNode should be saved (null if view, since they are not\n * saved).\n * @param type The type of TNode to create\n * @param native The native element for this node, if applicable\n * @param name The tag name of the associated native element, if applicable\n * @param attrs Any attrs for the native element, if applicable\n */\nexport function getOrCreateTNode(\n tView: TView, index: number, type: TNodeType.Element|TNodeType.Text, name: string|null,\n attrs: TAttributes|null): TElementNode;\nexport function getOrCreateTNode(\n tView: TView, index: number, type: TNodeType.Container, name: string|null,\n attrs: TAttributes|null): TContainerNode;\nexport function getOrCreateTNode(\n tView: TView, index: number, type: TNodeType.Projection, name: null,\n attrs: TAttributes|null): TProjectionNode;\nexport function getOrCreateTNode(\n tView: TView, index: number, type: TNodeType.ElementContainer, name: string|null,\n attrs: TAttributes|null): TElementContainerNode;\nexport function getOrCreateTNode(\n tView: TView, index: number, type: TNodeType.Icu, name: null,\n attrs: TAttributes|null): TElementContainerNode;\nexport function getOrCreateTNode(\n tView: TView, index: number, type: TNodeType, name: string|null, attrs: TAttributes|null):\n TElementNode&TContainerNode&TElementContainerNode&TProjectionNode&TIcuContainerNode {\n ngDevMode && index !== 0 && // 0 are bogus nodes and they are OK. See `createContainerRef` in\n // `view_engine_compatibility` for additional context.\n assertGreaterThanOrEqual(index, HEADER_OFFSET, 'TNodes can\\'t be in the LView header.');\n // Keep this function short, so that the VM will inline it.\n ngDevMode && assertPureTNodeType(type);\n let tNode = tView.data[index] as TNode;\n if (tNode === null) {\n tNode = createTNodeAtIndex(tView, index, type, name, attrs);\n if (isInI18nBlock()) {\n // If we are in i18n block then all elements should be pre declared through `Placeholder`\n // See `TNodeType.Placeholder` and `LFrame.inI18n` for more context.\n // If the `TNode` was not pre-declared than it means it was not mentioned which means it was\n // removed, so we mark it as detached.\n tNode.flags |= TNodeFlags.isDetached;\n }\n } else if (tNode.type & TNodeType.Placeholder) {\n tNode.type = type;\n tNode.value = name;\n tNode.attrs = attrs;\n const parent = getCurrentParentTNode();\n tNode.injectorIndex = parent === null ? -1 : parent.injectorIndex;\n ngDevMode && assertTNodeForTView(tNode, tView);\n ngDevMode && assertEqual(index, tNode.index, 'Expecting same index');\n }\n setCurrentTNode(tNode, true);\n return tNode as TElementNode & TContainerNode & TElementContainerNode & TProjectionNode &\n TIcuContainerNode;\n}\n\nexport function createTNodeAtIndex(\n tView: TView, index: number, type: TNodeType, name: string|null, attrs: TAttributes|null) {\n const currentTNode = getCurrentTNodePlaceholderOk();\n const isParent = isCurrentTNodeParent();\n const parent = isParent ? currentTNode : currentTNode && currentTNode.parent;\n // Parents cannot cross component boundaries because components will be used in multiple places.\n const tNode = tView.data[index] =\n createTNode(tView, parent as TElementNode | TContainerNode, type, index, name, attrs);\n // Assign a pointer to the first child node of a given view. The first node is not always the one\n // at index 0, in case of i18n, index 0 can be the instruction `i18nStart` and the first node has\n // the index 1 or more, so we can't just check node index.\n if (tView.firstChild === null) {\n tView.firstChild = tNode;\n }\n if (currentTNode !== null) {\n if (isParent) {\n // FIXME(misko): This logic looks unnecessarily complicated. Could we simplify?\n if (currentTNode.child == null && tNode.parent !== null) {\n // We are in the same view, which means we are adding content node to the parent view.\n currentTNode.child = tNode;\n }\n } else {\n if (currentTNode.next === null) {\n // In the case of i18n the `currentTNode` may already be linked, in which case we don't want\n // to break the links which i18n created.\n currentTNode.next = tNode;\n }\n }\n }\n return tNode;\n}\n\n\n/**\n * When elements are created dynamically after a view blueprint is created (e.g. through\n * i18nApply()), we need to adjust the blueprint for future\n * template passes.\n *\n * @param tView `TView` associated with `LView`\n * @param lView The `LView` containing the blueprint to adjust\n * @param numSlotsToAlloc The number of slots to alloc in the LView, should be >0\n * @param initialValue Initial value to store in blueprint\n */\nexport function allocExpando(\n tView: TView, lView: LView, numSlotsToAlloc: number, initialValue: any): number {\n if (numSlotsToAlloc === 0) return -1;\n if (ngDevMode) {\n assertFirstCreatePass(tView);\n assertSame(tView, lView[TVIEW], '`LView` must be associated with `TView`!');\n assertEqual(tView.data.length, lView.length, 'Expecting LView to be same size as TView');\n assertEqual(\n tView.data.length, tView.blueprint.length, 'Expecting Blueprint to be same size as TView');\n assertFirstUpdatePass(tView);\n }\n const allocIdx = lView.length;\n for (let i = 0; i < numSlotsToAlloc; i++) {\n lView.push(initialValue);\n tView.blueprint.push(initialValue);\n tView.data.push(null);\n }\n return allocIdx;\n}\n\n\n//////////////////////////\n//// Render\n//////////////////////////\n\n/**\n * Processes a view in the creation mode. This includes a number of steps in a specific order:\n * - creating view query functions (if any);\n * - executing a template function in the creation mode;\n * - updating static queries (if any);\n * - creating child components defined in a given view.\n */\nexport function renderView<T>(tView: TView, lView: LView, context: T): void {\n ngDevMode && assertEqual(isCreationMode(lView), true, 'Should be run in creation mode');\n enterView(lView);\n try {\n const viewQuery = tView.viewQuery;\n if (viewQuery !== null) {\n executeViewQueryFn(RenderFlags.Create, viewQuery, context);\n }\n\n // Execute a template associated with this view, if it exists. A template function might not be\n // defined for the root component views.\n const templateFn = tView.template;\n if (templateFn !== null) {\n executeTemplate(tView, lView, templateFn, RenderFlags.Create, context);\n }\n\n // This needs to be set before children are processed to support recursive components.\n // This must be set to false immediately after the first creation run because in an\n // ngFor loop, all the views will be created together before update mode runs and turns\n // off firstCreatePass. If we don't set it here, instances will perform directive\n // matching, etc again and again.\n if (tView.firstCreatePass) {\n tView.firstCreatePass = false;\n }\n\n // We resolve content queries specifically marked as `static` in creation mode. Dynamic\n // content queries are resolved during change detection (i.e. update mode), after embedded\n // views are refreshed (see block above).\n if (tView.staticContentQueries) {\n refreshContentQueries(tView, lView);\n }\n\n // We must materialize query results before child components are processed\n // in case a child component has projected a container. The LContainer needs\n // to exist so the embedded views are properly attached by the container.\n if (tView.staticViewQueries) {\n executeViewQueryFn(RenderFlags.Update, tView.viewQuery!, context);\n }\n\n // Render child component views.\n const components = tView.components;\n if (components !== null) {\n renderChildComponents(lView, components);\n }\n\n } catch (error) {\n // If we didn't manage to get past the first template pass due to\n // an error, mark the view as corrupted so we can try to recover.\n if (tView.firstCreatePass) {\n tView.incompleteFirstPass = true;\n tView.firstCreatePass = false;\n }\n\n throw error;\n } finally {\n lView[FLAGS] &= ~LViewFlags.CreationMode;\n leaveView();\n }\n}\n\n/**\n * Processes a view in update mode. This includes a number of steps in a specific order:\n * - executing a template function in update mode;\n * - executing hooks;\n * - refreshing queries;\n * - setting host bindings;\n * - refreshing child (embedded and component) views.\n */\nexport function refreshView<T>(\n tView: TView, lView: LView, templateFn: ComponentTemplate<{}>|null, context: T) {\n ngDevMode && assertEqual(isCreationMode(lView), false, 'Should be run in update mode');\n const flags = lView[FLAGS];\n if ((flags & LViewFlags.Destroyed) === LViewFlags.Destroyed) return;\n enterView(lView);\n // Check no changes mode is a dev only mode used to verify that bindings have not changed\n // since they were assigned. We do not want to execute lifecycle hooks in that mode.\n const isInCheckNoChangesPass = isInCheckNoChangesMode();\n try {\n resetPreOrderHookFlags(lView);\n\n setBindingIndex(tView.bindingStartIndex);\n if (templateFn !== null) {\n executeTemplate(tView, lView, templateFn, RenderFlags.Update, context);\n }\n\n const hooksInitPhaseCompleted =\n (flags & LViewFlags.InitPhaseStateMask) === InitPhaseState.InitPhaseCompleted;\n\n // execute pre-order hooks (OnInit, OnChanges, DoCheck)\n // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n if (!isInCheckNoChangesPass) {\n if (hooksInitPhaseCompleted) {\n const preOrderCheckHooks = tView.preOrderCheckHooks;\n if (preOrderCheckHooks !== null) {\n executeCheckHooks(lView, preOrderCheckHooks, null);\n }\n } else {\n const preOrderHooks = tView.preOrderHooks;\n if (preOrderHooks !== null) {\n executeInitAndCheckHooks(lView, preOrderHooks, InitPhaseState.OnInitHooksToBeRun, null);\n }\n incrementInitPhaseFlags(lView, InitPhaseState.OnInitHooksToBeRun);\n }\n }\n\n // First mark transplanted views that are declared in this lView as needing a refresh at their\n // insertion points. This is needed to avoid the situation where the template is defined in this\n // `LView` but its declaration appears after the insertion component.\n markTransplantedViewsForRefresh(lView);\n refreshEmbeddedViews(lView);\n\n // Content query results must be refreshed before content hooks are called.\n if (tView.contentQueries !== null) {\n refreshContentQueries(tView, lView);\n }\n\n // execute content hooks (AfterContentInit, AfterContentChecked)\n // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n if (!isInCheckNoChangesPass) {\n if (hooksInitPhaseCompleted) {\n const contentCheckHooks = tView.contentCheckHooks;\n if (contentCheckHooks !== null) {\n executeCheckHooks(lView, contentCheckHooks);\n }\n } else {\n const contentHooks = tView.contentHooks;\n if (contentHooks !== null) {\n executeInitAndCheckHooks(\n lView, contentHooks, InitPhaseState.AfterContentInitHooksToBeRun);\n }\n incrementInitPhaseFlags(lView, InitPhaseState.AfterContentInitHooksToBeRun);\n }\n }\n\n processHostBindingOpCodes(tView, lView);\n\n // Refresh child component views.\n const components = tView.components;\n if (components !== null) {\n refreshChildComponents(lView, components);\n }\n\n // View queries must execute after refreshing child components because a template in this view\n // could be inserted in a child component. If the view query executes before child component\n // refresh, the template might not yet be inserted.\n const viewQuery = tView.viewQuery;\n if (viewQuery !== null) {\n executeViewQueryFn(RenderFlags.Update, viewQuery, context);\n }\n\n // execute view hooks (AfterViewInit, AfterViewChecked)\n // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n if (!isInCheckNoChangesPass) {\n if (hooksInitPhaseCompleted) {\n const viewCheckHooks = tView.viewCheckHooks;\n if (viewCheckHooks !== null) {\n executeCheckHooks(lView, viewCheckHooks);\n }\n } else {\n const viewHooks = tView.viewHooks;\n if (viewHooks !== null) {\n executeInitAndCheckHooks(lView, viewHooks, InitPhaseState.AfterViewInitHooksToBeRun);\n }\n incrementInitPhaseFlags(lView, InitPhaseState.AfterViewInitHooksToBeRun);\n }\n }\n if (tView.firstUpdatePass === true) {\n // We need to make sure that we only flip the flag on successful `refreshView` only\n // Don't do this in `finally` block.\n // If we did this in `finally` block then an exception could block the execution of styling\n // instructions which in turn would be unable to insert themselves into the styling linked\n // list. The result of this would be that if the exception would not be throw on subsequent CD\n // the styling would be unable to process it data and reflect to the DOM.\n tView.firstUpdatePass = false;\n }\n\n // Do not reset the dirty state when running in check no changes mode. We don't want components\n // to behave differently depending on whether check no changes is enabled or not. For example:\n // Marking an OnPush component as dirty from within the `ngAfterViewInit` hook in order to\n // refresh a `NgClass` binding should work. If we would reset the dirty state in the check\n // no changes cycle, the component would be not be dirty for the next update pass. This would\n // be different in production mode where the component dirty state is not reset.\n if (!isInCheckNoChangesPass) {\n lView[FLAGS] &= ~(LViewFlags.Dirty | LViewFlags.FirstLViewPass);\n }\n if (lView[FLAGS] & LViewFlags.RefreshTransplantedView) {\n lView[FLAGS] &= ~LViewFlags.RefreshTransplantedView;\n updateTransplantedViewCount(lView[PARENT] as LContainer, -1);\n }\n } finally {\n leaveView();\n }\n}\n\nexport function renderComponentOrTemplate<T>(\n tView: TView, lView: LView, templateFn: ComponentTemplate<{}>|null, context: T) {\n const rendererFactory = lView[RENDERER_FACTORY];\n const normalExecutionPath = !isInCheckNoChangesMode();\n const creationModeIsActive = isCreationMode(lView);\n try {\n if (normalExecutionPath && !creationModeIsActive && rendererFactory.begin) {\n rendererFactory.begin();\n }\n if (creationModeIsActive) {\n renderView(tView, lView, context);\n }\n refreshView(tView, lView, templateFn, context);\n } finally {\n if (normalExecutionPath && !creationModeIsActive && rendererFactory.end) {\n rendererFactory.end();\n }\n }\n}\n\nfunction executeTemplate<T>(\n tView: TView, lView: LView, templateFn: ComponentTemplate<T>, rf: RenderFlags, context: T) {\n const prevSelectedIndex = getSelectedIndex();\n const isUpdatePhase = rf & RenderFlags.Update;\n try {\n setSelectedIndex(-1);\n if (isUpdatePhase && lView.length > HEADER_OFFSET) {\n // When we're updating, inherently select 0 so we don't\n // have to generate that instruction for most update blocks.\n selectIndexInternal(tView, lView, HEADER_OFFSET, isInCheckNoChangesMode());\n }\n\n const preHookType =\n isUpdatePhase ? ProfilerEvent.TemplateUpdateStart : ProfilerEvent.TemplateCreateStart;\n profiler(preHookType, context);\n templateFn(rf, context);\n } finally {\n setSelectedIndex(prevSelectedIndex);\n\n const postHookType =\n isUpdatePhase ? ProfilerEvent.TemplateUpdateEnd : ProfilerEvent.TemplateCreateEnd;\n profiler(postHookType, context);\n }\n}\n\n//////////////////////////\n//// Element\n//////////////////////////\n\nexport function executeContentQueries(tView: TView, tNode: TNode, lView: LView) {\n if (isContentQueryHost(tNode)) {\n const start = tNode.directiveStart;\n const end = tNode.directiveEnd;\n for (let directiveIndex = start; directiveIndex < end; directiveIndex++) {\n const def = tView.data[directiveIndex] as DirectiveDef<any>;\n if (def.contentQueries) {\n def.contentQueries(RenderFlags.Create, lView[directiveIndex], directiveIndex);\n }\n }\n }\n}\n\n\n/**\n * Creates directive instances.\n */\nexport function createDirectivesInstances(tView: TView, lView: LView, tNode: TDirectiveHostNode) {\n if (!getBindingsEnabled()) return;\n instantiateAllDirectives(tView, lView, tNode, getNativeByTNode(tNode, lView));\n if ((tNode.flags & TNodeFlags.hasHostBindings) === TNodeFlags.hasHostBindings) {\n invokeDirectivesHostBindings(tView, lView, tNode);\n }\n}\n\n/**\n * Takes a list of local names and indices and pushes the resolved local variable values\n * to LView in the same order as they are loaded in the template with load().\n */\nexport function saveResolvedLocalsInData(\n viewData: LView, tNode: TDirectiveHostNode,\n localRefExtractor: LocalRefExtractor = getNativeByTNode): void {\n const localNames = tNode.localNames;\n if (localNames !== null) {\n let localIndex = tNode.index + 1;\n for (let i = 0; i < localNames.length; i += 2) {\n const index = localNames[i + 1] as number;\n const value = index === -1 ?\n localRefExtractor(\n tNode as TElementNode | TContainerNode | TElementContainerNode, viewData) :\n viewData[index];\n viewData[localIndex++] = value;\n }\n }\n}\n\n/**\n * Gets TView from a template function or creates a new TView\n * if it doesn't already exist.\n *\n * @param def ComponentDef\n * @returns TView\n */\nexport function getOrCreateTComponentView(def: ComponentDef<any>): TView {\n const tView = def.tView;\n\n // Create a TView if there isn't one, or recreate it if the first create pass didn't\n // complete successfully since we can't know for sure whether it's in a usable shape.\n if (tView === null || tView.incompleteFirstPass) {\n // Declaration node here is null since this function is called when we dynamically create a\n // component and hence there is no declaration.\n const declTNode = null;\n return def.tView = createTView(\n TViewType.Component, declTNode, def.template, def.decls, def.vars, def.directiveDefs,\n def.pipeDefs, def.viewQuery, def.schemas, def.consts);\n }\n\n return tView;\n}\n\n\n/**\n * Creates a TView instance\n *\n * @param type Type of `TView`.\n * @param declTNode Declaration location of this `TView`.\n * @param templateFn Template function\n * @param decls The number of nodes, local refs, and pipes in this template\n * @param directives Registry of directives for this view\n * @param pipes Registry of pipes for this view\n * @param viewQuery View queries for this view\n * @param schemas Schemas for this view\n * @param consts Constants for this view\n */\nexport function createTView(\n type: TViewType, declTNode: TNode|null, templateFn: ComponentTemplate<any>|null, decls: number,\n vars: number, directives: DirectiveDefListOrFactory|null, pipes: PipeDefListOrFactory|null,\n viewQuery: ViewQueriesFunction<any>|null, schemas: SchemaMetadata[]|null,\n constsOrFactory: TConstantsOrFactory|null): TView {\n ngDevMode && ngDevMode.tView++;\n const bindingStartIndex = HEADER_OFFSET + decls;\n // This length does not yet contain host bindings from child directives because at this point,\n // we don't know which directives are active on this template. As soon as a directive is matched\n // that has a host binding, we will update the blueprint with that def's hostVars count.\n const initialViewLength = bindingStartIndex + vars;\n const blueprint = createViewBlueprint(bindingStartIndex, initialViewLength);\n const consts = typeof constsOrFactory === 'function' ? constsOrFactory() : constsOrFactory;\n const tView = blueprint[TVIEW as any] = ngDevMode ?\n new TViewConstructor(\n type, // type: TViewType,\n blueprint, // blueprint: LView,\n templateFn, // template: ComponentTemplate<{}>|null,\n null, // queries: TQueries|null\n viewQuery, // viewQuery: ViewQueriesFunction<{}>|null,\n declTNode, // declTNode: TNode|null,\n cloneToTViewData(blueprint).fill(null, bindingStartIndex), // data: TData,\n bindingStartIndex, // bindingStartIndex: number,\n initialViewLength, // expandoStartIndex: number,\n null, // hostBindingOpCodes: HostBindingOpCodes,\n true, // firstCreatePass: boolean,\n true, // firstUpdatePass: boolean,\n false, // staticViewQueries: boolean,\n false, // staticContentQueries: boolean,\n null, // preOrderHooks: HookData|null,\n null, // preOrderCheckHooks: HookData|null,\n null, // contentHooks: HookData|null,\n null, // contentCheckHooks: HookData|null,\n null, // viewHooks: HookData|null,\n null, // viewCheckHooks: HookData|null,\n null, // destroyHooks: DestroyHookData|null,\n null, // cleanup: any[]|null,\n null, // contentQueries: number[]|null,\n null, // components: number[]|null,\n typeof directives === 'function' ? //\n directives() : //\n directives, // directiveRegistry: DirectiveDefList|null,\n typeof pipes === 'function' ? pipes() : pipes, // pipeRegistry: PipeDefList|null,\n null, // firstChild: TNode|null,\n schemas, // schemas: SchemaMetadata[]|null,\n consts, // consts: TConstants|null\n false, // incompleteFirstPass: boolean\n decls, // ngDevMode only: decls\n vars, // ngDevMode only: vars\n ) :\n {\n type: type,\n blueprint: blueprint,\n template: templateFn,\n queries: null,\n viewQuery: viewQuery,\n declTNode: declTNode,\n data: blueprint.slice().fill(null, bindingStartIndex),\n bindingStartIndex: bindingStartIndex,\n expandoStartIndex: initialViewLength,\n hostBindingOpCodes: null,\n firstCreatePass: true,\n firstUpdatePass: true,\n staticViewQueries: false,\n staticContentQueries: false,\n preOrderHooks: null,\n preOrderCheckHooks: null,\n contentHooks: null,\n contentCheckHooks: null,\n viewHooks: null,\n viewCheckHooks: null,\n destroyHooks: null,\n cleanup: null,\n contentQueries: null,\n components: null,\n directiveRegistry: typeof directives === 'function' ? directives() : directives,\n pipeRegistry: typeof pipes === 'function' ? pipes() : pipes,\n firstChild: null,\n schemas: schemas,\n consts: consts,\n incompleteFirstPass: false\n };\n if (ngDevMode) {\n // For performance reasons it is important that the tView retains the same shape during runtime.\n // (To make sure that all of the code is monomorphic.) For this reason we seal the object to\n // prevent class transitions.\n Object.seal(tView);\n }\n return tView;\n}\n\nfunction createViewBlueprint(bindingStartIndex: number, initialViewLength: number): LView {\n const blueprint = ngDevMode ? new LViewBlueprint() : [];\n\n for (let i = 0; i < initialViewLength; i++) {\n blueprint.push(i < bindingStartIndex ? null : NO_CHANGE);\n }\n\n return blueprint as LView;\n}\n\nfunction createError(text: string, token: any) {\n return new Error(`Renderer: ${text} [${stringifyForError(token)}]`);\n}\n\nfunction assertHostNodeExists(rElement: RElement, elementOrSelector: RElement|string) {\n if (!rElement) {\n if (typeof elementOrSelector === 'string') {\n throw createError('Host node with selector not found:', elementOrSelector);\n } else {\n throw createError('Host node is required:', elementOrSelector);\n }\n }\n}\n\n/**\n * Locates the host native element, used for bootstrapping existing nodes into rendering pipeline.\n *\n * @param rendererFactory Factory function to create renderer instance.\n * @param elementOrSelector Render element or CSS selector to locate the element.\n * @param encapsulation View Encapsulation defined for component that requests host element.\n */\nexport function locateHostElement(\n renderer: Renderer3, elementOrSelector: RElement|string,\n encapsulation: ViewEncapsulation): RElement {\n if (isProceduralRenderer(renderer)) {\n // When using native Shadow DOM, do not clear host element to allow native slot projection\n const preserveContent = encapsulation === ViewEncapsulation.ShadowDom;\n return renderer.selectRootElement(elementOrSelector, preserveContent);\n }\n\n let rElement = typeof elementOrSelector === 'string' ?\n renderer.querySelector(elementOrSelector)! :\n elementOrSelector;\n ngDevMode && assertHostNodeExists(rElement, elementOrSelector);\n\n // Always clear host element's content when Renderer3 is in use. For procedural renderer case we\n // make it depend on whether ShadowDom encapsulation is used (in which case the content should be\n // preserved to allow native slot projection). ShadowDom encapsulation requires procedural\n // renderer, and procedural renderer case is handled above.\n rElement.textContent = '';\n\n return rElement;\n}\n\n/**\n * Saves context for this cleanup function in LView.cleanupInstances.\n *\n * On the first template pass, saves in TView:\n * - Cleanup function\n * - Index of context we just saved in LView.cleanupInstances\n *\n * This function can also be used to store instance specific cleanup fns. In that case the `context`\n * is `null` and the function is store in `LView` (rather than it `TView`).\n */\nexport function storeCleanupWithContext(\n tView: TView, lView: LView, context: any, cleanupFn: Function): void {\n const lCleanup = getOrCreateLViewCleanup(lView);\n if (context === null) {\n // If context is null that this is instance specific callback. These callbacks can only be\n // inserted after template shared instances. For this reason in ngDevMode we freeze the TView.\n if (ngDevMode) {\n Object.freeze(getOrCreateTViewCleanup(tView));\n }\n lCleanup.push(cleanupFn);\n } else {\n lCleanup.push(context);\n\n if (tView.firstCreatePass) {\n getOrCreateTViewCleanup(tView).push(cleanupFn, lCleanup.length - 1);\n }\n }\n}\n\n/**\n * Constructs a TNode object from the arguments.\n *\n * @param tView `TView` to which this `TNode` belongs (used only in `ngDevMode`)\n * @param tParent Parent `TNode`\n * @param type The type of the node\n * @param index The index of the TNode in TView.data, adjusted for HEADER_OFFSET\n * @param tagName The tag name of the node\n * @param attrs The attributes defined on this node\n * @param tViews Any TViews attached to this node\n * @returns the TNode object\n */\nexport function createTNode(\n tView: TView, tParent: TElementNode|TContainerNode|null, type: TNodeType.Container,\n index: number, tagName: string|null, attrs: TAttributes|null): TContainerNode;\nexport function createTNode(\n tView: TView, tParent: TElementNode|TContainerNode|null, type: TNodeType.Element|TNodeType.Text,\n index: number, tagName: string|null, attrs: TAttributes|null): TElementNode;\nexport function createTNode(\n tView: TView, tParent: TElementNode|TContainerNode|null, type: TNodeType.ElementContainer,\n index: number, tagName: string|null, attrs: TAttributes|null): TElementContainerNode;\nexport function createTNode(\n tView: TView, tParent: TElementNode|TContainerNode|null, type: TNodeType.Icu, index: number,\n tagName: string|null, attrs: TAttributes|null): TIcuContainerNode;\nexport function createTNode(\n tView: TView, tParent: TElementNode|TContainerNode|null, type: TNodeType.Projection,\n index: number, tagName: string|null, attrs: TAttributes|null): TProjectionNode;\nexport function createTNode(\n tView: TView, tParent: TElementNode|TContainerNode|null, type: TNodeType, index: number,\n tagName: string|null, attrs: TAttributes|null): TNode;\nexport function createTNode(\n tView: TView, tParent: TElementNode|TContainerNode|null, type: TNodeType, index: number,\n value: string|null, attrs: TAttributes|null): TNode {\n ngDevMode && index !== 0 && // 0 are bogus nodes and they are OK. See `createContainerRef` in\n // `view_engine_compatibility` for additional context.\n assertGreaterThanOrEqual(index, HEADER_OFFSET, 'TNodes can\\'t be in the LView header.');\n ngDevMode && assertNotSame(attrs, undefined, '\\'undefined\\' is not valid value for \\'attrs\\'');\n ngDevMode && ngDevMode.tNode++;\n ngDevMode && tParent && assertTNodeForTView(tParent, tView);\n let injectorIndex = tParent ? tParent.injectorIndex : -1;\n const tNode = ngDevMode ?\n new TNodeDebug(\n tView, // tView_: TView\n type, // type: TNodeType\n index, // index: number\n null, // insertBeforeIndex: null|-1|number|number[]\n injectorIndex, // injectorIndex: number\n -1, // directiveStart: number\n -1, // directiveEnd: number\n -1, // directiveStylingLast: number\n null, // propertyBindings: number[]|null\n 0, // flags: TNodeFlags\n 0, // providerIndexes: TNodeProviderIndexes\n value, // value: string|null\n attrs, // attrs: (string|AttributeMarker|(string|SelectorFlags)[])[]|null\n null, // mergedAttrs\n null, // localNames: (string|number)[]|null\n undefined, // initialInputs: (string[]|null)[]|null|undefined\n null, // inputs: PropertyAliases|null\n null, // outputs: PropertyAliases|null\n null, // tViews: ITView|ITView[]|null\n null, // next: ITNode|null\n null, // projectionNext: ITNode|null\n null, // child: ITNode|null\n tParent, // parent: TElementNode|TContainerNode|null\n null, // projection: number|(ITNode|RNode[])[]|null\n null, // styles: string|null\n null, // stylesWithoutHost: string|null\n undefined, // residualStyles: string|null\n null, // classes: string|null\n null, // classesWithoutHost: string|null\n undefined, // residualClasses: string|null\n 0 as any, // classBindings: TStylingRange;\n 0 as any, // styleBindings: TStylingRange;\n ) :\n {\n type,\n index,\n insertBeforeIndex: null,\n injectorIndex,\n directiveStart: -1,\n directiveEnd: -1,\n directiveStylingLast: -1,\n propertyBindings: null,\n flags: 0,\n providerIndexes: 0,\n value: value,\n attrs: attrs,\n mergedAttrs: null,\n localNames: null,\n initialInputs: undefined,\n inputs: null,\n outputs: null,\n tViews: null,\n next: null,\n projectionNext: null,\n child: null,\n parent: tParent,\n projection: null,\n styles: null,\n stylesWithoutHost: null,\n residualStyles: undefined,\n classes: null,\n classesWithoutHost: null,\n residualClasses: undefined,\n classBindings: 0 as any,\n styleBindings: 0 as any,\n };\n if (ngDevMode) {\n // For performance reasons it is important that the tNode retains the same shape during runtime.\n // (To make sure that all of the code is monomorphic.) For this reason we seal the object to\n // prevent class transitions.\n Object.seal(tNode);\n }\n return tNode;\n}\n\n\nfunction generatePropertyAliases(\n inputAliasMap: {[publicName: string]: string}, directiveDefIdx: number,\n propStore: PropertyAliases|null): PropertyAliases|null {\n for (let publicName in inputAliasMap) {\n if (inputAliasMap.hasOwnProperty(publicName)) {\n propStore = propStore === null ? {} : propStore;\n const internalName = inputAliasMap[publicName];\n\n if (propStore.hasOwnProperty(publicName)) {\n propStore[publicName].push(directiveDefIdx, internalName);\n } else {\n (propStore[publicName] = [directiveDefIdx, internalName]);\n }\n }\n }\n return propStore;\n}\n\n/**\n * Initializes data structures required to work with directive inputs and outputs.\n * Initialization is done for all directives matched on a given TNode.\n */\nfunction initializeInputAndOutputAliases(tView: TView, tNode: TNode): void {\n ngDevMode && assertFirstCreatePass(tView);\n\n const start = tNode.directiveStart;\n const end = tNode.directiveEnd;\n const tViewData = tView.data;\n\n const tNodeAttrs = tNode.attrs;\n const inputsFromAttrs: InitialInputData = ngDevMode ? new TNodeInitialInputs() : [];\n let inputsStore: PropertyAliases|null = null;\n let outputsStore: PropertyAliases|null = null;\n for (let i = start; i < end; i++) {\n const directiveDef = tViewData[i] as DirectiveDef<any>;\n const directiveInputs = directiveDef.inputs;\n // Do not use unbound attributes as inputs to structural directives, since structural\n // directive inputs can only be set using microsyntax (e.g. `<div *dir=\"exp\">`).\n // TODO(FW-1930): microsyntax expressions may also contain unbound/static attributes, which\n // should be set for inline templates.\n const initialInputs = (tNodeAttrs !== null && !isInlineTemplate(tNode)) ?\n generateInitialInputs(directiveInputs, tNodeAttrs) :\n null;\n inputsFromAttrs.push(initialInputs);\n inputsStore = generatePropertyAliases(directiveInputs, i, inputsStore);\n outputsStore = generatePropertyAliases(directiveDef.outputs, i, outputsStore);\n }\n\n if (inputsStore !== null) {\n if (inputsStore.hasOwnProperty('class')) {\n tNode.flags |= TNodeFlags.hasClassInput;\n }\n if (inputsStore.hasOwnProperty('style')) {\n tNode.flags |= TNodeFlags.hasStyleInput;\n }\n }\n\n tNode.initialInputs = inputsFromAttrs;\n tNode.inputs = inputsStore;\n tNode.outputs = outputsStore;\n}\n\n/**\n * Mapping between attributes names that don't correspond to their element property names.\n *\n * Performance note: this function is written as a series of if checks (instead of, say, a property\n * object lookup) for performance reasons - the series of `if` checks seems to be the fastest way of\n * mapping property names. Do NOT change without benchmarking.\n *\n * Note: this mapping has to be kept in sync with the equally named mapping in the template\n * type-checking machinery of ngtsc.\n */\nfunction mapPropName(name: string): string {\n if (name === 'class') return 'className';\n if (name === 'for') return 'htmlFor';\n if (name === 'formaction') return 'formAction';\n if (name === 'innerHtml') return 'innerHTML';\n if (name === 'readonly') return 'readOnly';\n if (name === 'tabindex') return 'tabIndex';\n return name;\n}\n\nexport function elementPropertyInternal<T>(\n tView: TView, tNode: TNode, lView: LView, propName: string, value: T, renderer: Renderer3,\n sanitizer: SanitizerFn|null|undefined, nativeOnly: boolean): void {\n ngDevMode && assertNotSame(value, NO_CHANGE as any, 'Incoming value should never be NO_CHANGE.');\n const element = getNativeByTNode(tNode, lView) as RElement | RComment;\n let inputData = tNode.inputs;\n let dataValue: PropertyAliasValue|undefined;\n if (!nativeOnly && inputData != null && (dataValue = inputData[propName])) {\n setInputsForProperty(tView, lView, dataValue, propName, value);\n if (isComponentHost(tNode)) markDirtyIfOnPush(lView, tNode.index);\n if (ngDevMode) {\n setNgReflectProperties(lView, element, tNode.type, dataValue, value);\n }\n } else if (tNode.type & TNodeType.AnyRNode) {\n propName = mapPropName(propName);\n\n if (ngDevMode) {\n validateAgainstEventProperties(propName);\n if (!validateProperty(tView, element, propName, tNode)) {\n // Return here since we only log warnings for unknown properties.\n logUnknownPropertyError(propName, tNode);\n return;\n }\n ngDevMode.rendererSetProperty++;\n }\n\n // It is assumed that the sanitizer is only added when the compiler determines that the\n // property is risky, so sanitization can be done without further checks.\n value = sanitizer != null ? (sanitizer(value, tNode.value || '', propName) as any) : value;\n if (isProceduralRenderer(renderer)) {\n renderer.setProperty(element as RElement, propName, value);\n } else if (!isAnimationProp(propName)) {\n (element as RElement).setProperty ? (element as any).setProperty(propName, value) :\n (element as any)[propName] = value;\n }\n } else if (tNode.type & TNodeType.AnyContainer) {\n // If the node is a container and the property didn't\n // match any of the inputs or schemas we should throw.\n if (ngDevMode && !matchingSchemas(tView, tNode.value)) {\n logUnknownPropertyError(propName, tNode);\n }\n }\n}\n\n/** If node is an OnPush component, marks its LView dirty. */\nfunction markDirtyIfOnPush(lView: LView, viewIndex: number): void {\n ngDevMode && assertLView(lView);\n const childComponentLView = getComponentLViewByIndex(viewIndex, lView);\n if (!(childComponentLView[FLAGS] & LViewFlags.CheckAlways)) {\n childComponentLView[FLAGS] |= LViewFlags.Dirty;\n }\n}\n\nfunction setNgReflectProperty(\n lView: LView, element: RElement|RComment, type: TNodeType, attrName: string, value: any) {\n const renderer = lView[RENDERER];\n attrName = normalizeDebugBindingName(attrName);\n const debugValue = normalizeDebugBindingValue(value);\n if (type & TNodeType.AnyRNode) {\n if (value == null) {\n isProceduralRenderer(renderer) ? renderer.removeAttribute((element as RElement), attrName) :\n (element as RElement).removeAttribute(attrName);\n } else {\n isProceduralRenderer(renderer) ?\n renderer.setAttribute((element as RElement), attrName, debugValue) :\n (element as RElement).setAttribute(attrName, debugValue);\n }\n } else {\n const textContent =\n escapeCommentText(`bindings=${JSON.stringify({[attrName]: debugValue}, null, 2)}`);\n if (isProceduralRenderer(renderer)) {\n renderer.setValue((element as RComment), textContent);\n } else {\n (element as RComment).textContent = textContent;\n }\n }\n}\n\nexport function setNgReflectProperties(\n lView: LView, element: RElement|RComment, type: TNodeType, dataValue: PropertyAliasValue,\n value: any) {\n if (type & (TNodeType.AnyRNode | TNodeType.Container)) {\n /**\n * dataValue is an array containing runtime input or output names for the directives:\n * i+0: directive instance index\n * i+1: privateName\n *\n * e.g. [0, 'change', 'change-minified']\n * we want to set the reflected property with the privateName: dataValue[i+1]\n */\n for (let i = 0; i < dataValue.length; i += 2) {\n setNgReflectProperty(lView, element, type, dataValue[i + 1] as string, value);\n }\n }\n}\n\nfunction validateProperty(\n tView: TView, element: RElement|RComment, propName: string, tNode: TNode): boolean {\n // If `schemas` is set to `null`, that's an indication that this Component was compiled in AOT\n // mode where this check happens at compile time. In JIT mode, `schemas` is always present and\n // defined as an array (as an empty array in case `schemas` field is not defined) and we should\n // execute the check below.\n if (tView.schemas === null) return true;\n\n // The property is considered valid if the element matches the schema, it exists on the element\n // or it is synthetic, and we are in a browser context (web worker nodes should be skipped).\n if (matchingSchemas(tView, tNode.value) || propName in element || isAnimationProp(propName)) {\n return true;\n }\n\n // Note: `typeof Node` returns 'function' in most browsers, but on IE it is 'object' so we\n // need to account for both here, while being careful for `typeof null` also returning 'object'.\n return typeof Node === 'undefined' || Node === null || !(element instanceof Node);\n}\n\nexport function matchingSchemas(tView: TView, tagName: string|null): boolean {\n const schemas = tView.schemas;\n\n if (schemas !== null) {\n for (let i = 0; i < schemas.length; i++) {\n const schema = schemas[i];\n if (schema === NO_ERRORS_SCHEMA ||\n schema === CUSTOM_ELEMENTS_SCHEMA && tagName && tagName.indexOf('-') > -1) {\n return true;\n }\n }\n }\n\n return false;\n}\n\n/**\n * Logs an error that a property is not supported on an element.\n * @param propName Name of the invalid property.\n * @param tNode Node on which we encountered the property.\n */\nfunction logUnknownPropertyError(propName: string, tNode: TNode): void {\n let message = `Can't bind to '${propName}' since it isn't a known property of '${tNode.value}'.`;\n console.error(formatRuntimeError(RuntimeErrorCode.UNKNOWN_BINDING, message));\n}\n\n/**\n * Instantiate a root component.\n */\nexport function instantiateRootComponent<T>(tView: TView, lView: LView, def: ComponentDef<T>): T {\n const rootTNode = getCurrentTNode()!;\n if (tView.firstCreatePass) {\n if (def.providersResolver) def.providersResolver(def);\n const directiveIndex = allocExpando(tView, lView, 1, null);\n ngDevMode &&\n assertEqual(\n directiveIndex, rootTNode.directiveStart,\n 'Because this is a root component the allocated expando should match the TNode component.');\n configureViewWithDirective(tView, rootTNode, lView, directiveIndex, def);\n }\n const directive =\n getNodeInjectable(lView, tView, rootTNode.directiveStart, rootTNode as TElementNode);\n attachPatchData(directive, lView);\n const native = getNativeByTNode(rootTNode, lView);\n if (native) {\n attachPatchData(native, lView);\n }\n return directive;\n}\n\n/**\n * Resolve the matched directives on a node.\n */\nexport function resolveDirectives(\n tView: TView, lView: LView, tNode: TElementNode|TContainerNode|TElementContainerNode,\n localRefs: string[]|null): boolean {\n // Please make sure to have explicit type for `exportsMap`. Inferred type triggers bug in\n // tsickle.\n ngDevMode && assertFirstCreatePass(tView);\n\n let hasDirectives = false;\n if (getBindingsEnabled()) {\n const directiveDefs: DirectiveDef<any>[]|null = findDirectiveDefMatches(tView, lView, tNode);\n const exportsMap: ({[key: string]: number}|null) = localRefs === null ? null : {'': -1};\n\n if (directiveDefs !== null) {\n hasDirectives = true;\n initTNodeFlags(tNode, tView.data.length, directiveDefs.length);\n // When the same token is provided by several directives on the same node, some rules apply in\n // the viewEngine:\n // - viewProviders have priority over providers\n // - the last directive in NgModule.declarations has priority over the previous one\n // So to match these rules, the order in which providers are added in the arrays is very\n // important.\n for (let i = 0; i < directiveDefs.length; i++) {\n const def = directiveDefs[i];\n if (def.providersResolver) def.providersResolver(def);\n }\n let preOrderHooksFound = false;\n let preOrderCheckHooksFound = false;\n let directiveIdx = allocExpando(tView, lView, directiveDefs.length, null);\n ngDevMode &&\n assertSame(\n directiveIdx, tNode.directiveStart,\n 'TNode.directiveStart should point to just allocated space');\n\n for (let i = 0; i < directiveDefs.length; i++) {\n const def = directiveDefs[i];\n // Merge the attrs in the order of matches. This assumes that the first directive is the\n // component itself, so that the component has the least priority.\n tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, def.hostAttrs);\n\n configureViewWithDirective(tView, tNode, lView, directiveIdx, def);\n saveNameToExportMap(directiveIdx, def, exportsMap);\n\n if (def.contentQueries !== null) tNode.flags |= TNodeFlags.hasContentQuery;\n if (def.hostBindings !== null || def.hostAttrs !== null || def.hostVars !== 0)\n tNode.flags |= TNodeFlags.hasHostBindings;\n\n const lifeCycleHooks: OnChanges&OnInit&DoCheck = def.type.prototype;\n // Only push a node index into the preOrderHooks array if this is the first\n // pre-order hook found on this node.\n if (!preOrderHooksFound &&\n (lifeCycleHooks.ngOnChanges || lifeCycleHooks.ngOnInit || lifeCycleHooks.ngDoCheck)) {\n // We will push the actual hook function into this array later during dir instantiation.\n // We cannot do it now because we must ensure hooks are registered in the same\n // order that directives are created (i.e. injection order).\n (tView.preOrderHooks || (tView.preOrderHooks = [])).push(tNode.index);\n preOrderHooksFound = true;\n }\n\n if (!preOrderCheckHooksFound && (lifeCycleHooks.ngOnChanges || lifeCycleHooks.ngDoCheck)) {\n (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(tNode.index);\n preOrderCheckHooksFound = true;\n }\n\n directiveIdx++;\n }\n\n initializeInputAndOutputAliases(tView, tNode);\n }\n if (exportsMap) cacheMatchingLocalNames(tNode, localRefs, exportsMap);\n }\n // Merge the template attrs last so that they have the highest priority.\n tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, tNode.attrs);\n return hasDirectives;\n}\n\n/**\n * Add `hostBindings` to the `TView.hostBindingOpCodes`.\n *\n * @param tView `TView` to which the `hostBindings` should be added.\n * @param tNode `TNode` the element which contains the directive\n * @param lView `LView` current `LView`\n * @param directiveIdx Directive index in view.\n * @param directiveVarsIdx Where will the directive's vars be stored\n * @param def `ComponentDef`/`DirectiveDef`, which contains the `hostVars`/`hostBindings` to add.\n */\nexport function registerHostBindingOpCodes(\n tView: TView, tNode: TNode, lView: LView, directiveIdx: number, directiveVarsIdx: number,\n def: ComponentDef<any>|DirectiveDef<any>): void {\n ngDevMode && assertFirstCreatePass(tView);\n\n const hostBindings = def.hostBindings;\n if (hostBindings) {\n let hostBindingOpCodes = tView.hostBindingOpCodes;\n if (hostBindingOpCodes === null) {\n hostBindingOpCodes = tView.hostBindingOpCodes = [] as any as HostBindingOpCodes;\n }\n const elementIndx = ~tNode.index;\n if (lastSelectedElementIdx(hostBindingOpCodes) != elementIndx) {\n // Conditionally add select element so that we are more efficient in execution.\n // NOTE: this is strictly not necessary and it trades code size for runtime perf.\n // (We could just always add it.)\n hostBindingOpCodes.push(elementIndx);\n }\n hostBindingOpCodes.push(directiveIdx, directiveVarsIdx, hostBindings);\n }\n}\n\n/**\n * Returns the last selected element index in the `HostBindingOpCodes`\n *\n * For perf reasons we don't need to update the selected element index in `HostBindingOpCodes` only\n * if it changes. This method returns the last index (or '0' if not found.)\n *\n * Selected element index are only the ones which are negative.\n */\nfunction lastSelectedElementIdx(hostBindingOpCodes: HostBindingOpCodes): number {\n let i = hostBindingOpCodes.length;\n while (i > 0) {\n const value = hostBindingOpCodes[--i];\n if (typeof value === 'number' && value < 0) {\n return value;\n }\n }\n return 0;\n}\n\n\n/**\n * Instantiate all the directives that were previously resolved on the current node.\n */\nfunction instantiateAllDirectives(\n tView: TView, lView: LView, tNode: TDirectiveHostNode, native: RNode) {\n const start = tNode.directiveStart;\n const end = tNode.directiveEnd;\n if (!tView.firstCreatePass) {\n getOrCreateNodeInjectorForNode(tNode, lView);\n }\n\n attachPatchData(native, lView);\n\n const initialInputs = tNode.initialInputs;\n for (let i = start; i < end; i++) {\n const def = tView.data[i] as DirectiveDef<any>;\n const isComponent = isComponentDef(def);\n\n if (isComponent) {\n ngDevMode && assertTNodeType(tNode, TNodeType.AnyRNode);\n addComponentLogic(lView, tNode as TElementNode, def as ComponentDef<any>);\n }\n\n const directive = getNodeInjectable(lView, tView, i, tNode);\n attachPatchData(directive, lView);\n\n if (initialInputs !== null) {\n setInputsFromAttrs(lView, i - start, directive, def, tNode, initialInputs!);\n }\n\n if (isComponent) {\n const componentView = getComponentLViewByIndex(tNode.index, lView);\n componentView[CONTEXT] = directive;\n }\n }\n}\n\nfunction invokeDirectivesHostBindings(tView: TView, lView: LView, tNode: TNode) {\n const start = tNode.directiveStart;\n const end = tNode.directiveEnd;\n const firstCreatePass = tView.firstCreatePass;\n const elementIndex = tNode.index;\n const currentDirectiveIndex = getCurrentDirectiveIndex();\n try {\n setSelectedIndex(elementIndex);\n for (let dirIndex = start; dirIndex < end; dirIndex++) {\n const def = tView.data[dirIndex] as DirectiveDef<unknown>;\n const directive = lView[dirIndex];\n setCurrentDirectiveIndex(dirIndex);\n if (def.hostBindings !== null || def.hostVars !== 0 || def.hostAttrs !== null) {\n invokeHostBindingsInCreationMode(def, directive);\n }\n }\n } finally {\n setSelectedIndex(-1);\n setCurrentDirectiveIndex(currentDirectiveIndex);\n }\n}\n\n/**\n * Invoke the host bindings in creation mode.\n *\n * @param def `DirectiveDef` which may contain the `hostBindings` function.\n * @param directive Instance of directive.\n */\nexport function invokeHostBindingsInCreationMode(def: DirectiveDef<any>, directive: any) {\n if (def.hostBindings !== null) {\n def.hostBindings!(RenderFlags.Create, directive);\n }\n}\n\n/**\n * Matches the current node against all available selectors.\n * If a component is matched (at most one), it is returned in first position in the array.\n */\nfunction findDirectiveDefMatches(\n tView: TView, viewData: LView,\n tNode: TElementNode|TContainerNode|TElementContainerNode): DirectiveDef<any>[]|null {\n ngDevMode && assertFirstCreatePass(tView);\n ngDevMode && assertTNodeType(tNode, TNodeType.AnyRNode | TNodeType.AnyContainer);\n\n const registry = tView.directiveRegistry;\n let matches: any[]|null = null;\n if (registry) {\n for (let i = 0; i < registry.length; i++) {\n const def = registry[i] as ComponentDef<any>| DirectiveDef<any>;\n if (isNodeMatchingSelectorList(tNode, def.selectors!, /* isProjectionMode */ false)) {\n matches || (matches = ngDevMode ? new MatchesArray() : []);\n diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, viewData), tView, def.type);\n\n if (isComponentDef(def)) {\n if (ngDevMode) {\n assertTNodeType(\n tNode, TNodeType.Element,\n `\"${tNode.value}\" tags cannot be used as component hosts. ` +\n `Please use a different tag to activate the ${stringify(def.type)} component.`);\n\n if (tNode.flags & TNodeFlags.isComponentHost) throwMultipleComponentError(tNode);\n }\n markAsComponentHost(tView, tNode);\n // The component is always stored first with directives after.\n matches.unshift(def);\n } else {\n matches.push(def);\n }\n }\n }\n }\n return matches;\n}\n\n/**\n * Marks a given TNode as a component's host. This consists of:\n * - setting appropriate TNode flags;\n * - storing index of component's host element so it will be queued for view refresh during CD.\n */\nexport function markAsComponentHost(tView: TView, hostTNode: TNode): void {\n ngDevMode && assertFirstCreatePass(tView);\n hostTNode.flags |= TNodeFlags.isComponentHost;\n (tView.components || (tView.components = ngDevMode ? new TViewComponents() : []))\n .push(hostTNode.index);\n}\n\n\n/** Caches local names and their matching directive indices for query and template lookups. */\nfunction cacheMatchingLocalNames(\n tNode: TNode, localRefs: string[]|null, exportsMap: {[key: string]: number}): void {\n if (localRefs) {\n const localNames: (string|number)[] = tNode.localNames = ngDevMode ? new TNodeLocalNames() : [];\n\n // Local names must be stored in tNode in the same order that localRefs are defined\n // in the template to ensure the data is loaded in the same slots as their refs\n // in the template (for template queries).\n for (let i = 0; i < localRefs.length; i += 2) {\n const index = exportsMap[localRefs[i + 1]];\n if (index == null)\n throw new RuntimeError(\n RuntimeErrorCode.EXPORT_NOT_FOUND, `Export of name '${localRefs[i + 1]}' not found!`);\n localNames.push(localRefs[i], index);\n }\n }\n}\n\n/**\n * Builds up an export map as directives are created, so local refs can be quickly mapped\n * to their directive instances.\n */\nfunction saveNameToExportMap(\n directiveIdx: number, def: DirectiveDef<any>|ComponentDef<any>,\n exportsMap: {[key: string]: number}|null) {\n if (exportsMap) {\n if (def.exportAs) {\n for (let i = 0; i < def.exportAs.length; i++) {\n exportsMap[def.exportAs[i]] = directiveIdx;\n }\n }\n if (isComponentDef(def)) exportsMap[''] = directiveIdx;\n }\n}\n\n/**\n * Initializes the flags on the current node, setting all indices to the initial index,\n * the directive count to 0, and adding the isComponent flag.\n * @param index the initial index\n */\nexport function initTNodeFlags(tNode: TNode, index: number, numberOfDirectives: number) {\n ngDevMode &&\n assertNotEqual(\n numberOfDirectives, tNode.directiveEnd - tNode.directiveStart,\n 'Reached the max number of directives');\n tNode.flags |= TNodeFlags.isDirectiveHost;\n // When the first directive is created on a node, save the index\n tNode.directiveStart = index;\n tNode.directiveEnd = index + numberOfDirectives;\n tNode.providerIndexes = index;\n}\n\n/**\n * Setup directive for instantiation.\n *\n * We need to create a `NodeInjectorFactory` which is then inserted in both the `Blueprint` as well\n * as `LView`. `TView` gets the `DirectiveDef`.\n *\n * @param tView `TView`\n * @param tNode `TNode`\n * @param lView `LView`\n * @param directiveIndex Index where the directive will be stored in the Expando.\n * @param def `DirectiveDef`\n */\nfunction configureViewWithDirective<T>(\n tView: TView, tNode: TNode, lView: LView, directiveIndex: number, def: DirectiveDef<T>): void {\n ngDevMode &&\n assertGreaterThanOrEqual(directiveIndex, HEADER_OFFSET, 'Must be in Expando section');\n tView.data[directiveIndex] = def;\n const directiveFactory =\n def.factory || ((def as {factory: Function}).factory = getFactoryDef(def.type, true));\n const nodeInjectorFactory = new NodeInjectorFactory(directiveFactory, isComponentDef(def), null);\n tView.blueprint[directiveIndex] = nodeInjectorFactory;\n lView[directiveIndex] = nodeInjectorFactory;\n\n registerHostBindingOpCodes(\n tView, tNode, lView, directiveIndex, allocExpando(tView, lView, def.hostVars, NO_CHANGE),\n def);\n}\n\nfunction addComponentLogic<T>(lView: LView, hostTNode: TElementNode, def: ComponentDef<T>): void {\n const native = getNativeByTNode(hostTNode, lView) as RElement;\n const tView = getOrCreateTComponentView(def);\n\n // Only component views should be added to the view tree directly. Embedded views are\n // accessed through their containers because they may be removed / re-added later.\n const rendererFactory = lView[RENDERER_FACTORY];\n const componentView = addToViewTree(\n lView,\n createLView(\n lView, tView, null, def.onPush ? LViewFlags.Dirty : LViewFlags.CheckAlways, native,\n hostTNode as TElementNode, rendererFactory, rendererFactory.createRenderer(native, def),\n null, null));\n\n // Component view will always be created before any injected LContainers,\n // so this is a regular element, wrap it with the component view\n lView[hostTNode.index] = componentView;\n}\n\nexport function elementAttributeInternal(\n tNode: TNode, lView: LView, name: string, value: any, sanitizer: SanitizerFn|null|undefined,\n namespace: string|null|undefined) {\n if (ngDevMode) {\n assertNotSame(value, NO_CHANGE as any, 'Incoming value should never be NO_CHANGE.');\n validateAgainstEventAttributes(name);\n assertTNodeType(\n tNode, TNodeType.Element,\n `Attempted to set attribute \\`${name}\\` on a container node. ` +\n `Host bindings are not valid on ng-container or ng-template.`);\n }\n const element = getNativeByTNode(tNode, lView) as RElement;\n setElementAttribute(lView[RENDERER], element, namespace, tNode.value, name, value, sanitizer);\n}\n\nexport function setElementAttribute(\n renderer: Renderer3, element: RElement, namespace: string|null|undefined, tagName: string|null,\n name: string, value: any, sanitizer: SanitizerFn|null|undefined) {\n if (value == null) {\n ngDevMode && ngDevMode.rendererRemoveAttribute++;\n isProceduralRenderer(renderer) ? renderer.removeAttribute(element, name, namespace) :\n element.removeAttribute(name);\n } else {\n ngDevMode && ngDevMode.rendererSetAttribute++;\n const strValue =\n sanitizer == null ? renderStringify(value) : sanitizer(value, tagName || '', name);\n\n\n if (isProceduralRenderer(renderer)) {\n renderer.setAttribute(element, name, strValue, namespace);\n } else {\n namespace ? element.setAttributeNS(namespace, name, strValue) :\n element.setAttribute(name, strValue);\n }\n }\n}\n\n/**\n * Sets initial input properties on directive instances from attribute data\n *\n * @param lView Current LView that is being processed.\n * @param directiveIndex Index of the directive in directives array\n * @param instance Instance of the directive on which to set the initial inputs\n * @param def The directive def that contains the list of inputs\n * @param tNode The static data for this node\n */\nfunction setInputsFromAttrs<T>(\n lView: LView, directiveIndex: number, instance: T, def: DirectiveDef<T>, tNode: TNode,\n initialInputData: InitialInputData): void {\n const initialInputs: InitialInputs|null = initialInputData![directiveIndex];\n if (initialInputs !== null) {\n const setInput = def.setInput;\n for (let i = 0; i < initialInputs.length;) {\n const publicName = initialInputs[i++];\n const privateName = initialInputs[i++];\n const value = initialInputs[i++];\n if (setInput !== null) {\n def.setInput!(instance, value, publicName, privateName);\n } else {\n (instance as any)[privateName] = value;\n }\n if (ngDevMode) {\n const nativeElement = getNativeByTNode(tNode, lView) as RElement;\n setNgReflectProperty(lView, nativeElement, tNode.type, privateName, value);\n }\n }\n }\n}\n\n/**\n * Generates initialInputData for a node and stores it in the template's static storage\n * so subsequent template invocations don't have to recalculate it.\n *\n * initialInputData is an array containing values that need to be set as input properties\n * for directives on this node, but only once on creation. We need this array to support\n * the case where you set an @Input property of a directive using attribute-like syntax.\n * e.g. if you have a `name` @Input, you can set it once like this:\n *\n * <my-component name=\"Bess\"></my-component>\n *\n * @param inputs The list of inputs from the directive def\n * @param attrs The static attrs on this node\n */\nfunction generateInitialInputs(inputs: {[key: string]: string}, attrs: TAttributes): InitialInputs|\n null {\n let inputsToStore: InitialInputs|null = null;\n let i = 0;\n while (i < attrs.length) {\n const attrName = attrs[i];\n if (attrName === AttributeMarker.NamespaceURI) {\n // We do not allow inputs on namespaced attributes.\n i += 4;\n continue;\n } else if (attrName === AttributeMarker.ProjectAs) {\n // Skip over the `ngProjectAs` value.\n i += 2;\n continue;\n }\n\n // If we hit any other attribute markers, we're done anyway. None of those are valid inputs.\n if (typeof attrName === 'number') break;\n\n if (inputs.hasOwnProperty(attrName as string)) {\n if (inputsToStore === null) inputsToStore = [];\n inputsToStore.push(attrName as string, inputs[attrName as string], attrs[i + 1] as string);\n }\n\n i += 2;\n }\n return inputsToStore;\n}\n\n//////////////////////////\n//// ViewContainer & View\n//////////////////////////\n\n// Not sure why I need to do `any` here but TS complains later.\nconst LContainerArray: any = ((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode()) &&\n createNamedArrayType('LContainer');\n\n/**\n * Creates a LContainer, either from a container instruction, or for a ViewContainerRef.\n *\n * @param hostNative The host element for the LContainer\n * @param hostTNode The host TNode for the LContainer\n * @param currentView The parent view of the LContainer\n * @param native The native comment element\n * @param isForViewContainerRef Optional a flag indicating the ViewContainerRef case\n * @returns LContainer\n */\nexport function createLContainer(\n hostNative: RElement|RComment|LView, currentView: LView, native: RComment,\n tNode: TNode): LContainer {\n ngDevMode && assertLView(currentView);\n ngDevMode && !isProceduralRenderer(currentView[RENDERER]) && assertDomNode(native);\n // https://jsperf.com/array-literal-vs-new-array-really\n const lContainer: LContainer = new (ngDevMode ? LContainerArray : Array)(\n hostNative, // host native\n true, // Boolean `true` in this position signifies that this is an `LContainer`\n false, // has transplanted views\n currentView, // parent\n null, // next\n 0, // transplanted views to refresh count\n tNode, // t_host\n native, // native,\n null, // view refs\n null, // moved views\n );\n ngDevMode &&\n assertEqual(\n lContainer.length, CONTAINER_HEADER_OFFSET,\n 'Should allocate correct number of slots for LContainer header.');\n ngDevMode && attachLContainerDebug(lContainer);\n return lContainer;\n}\n\n/**\n * Goes over embedded views (ones created through ViewContainerRef APIs) and refreshes\n * them by executing an associated template function.\n */\nfunction refreshEmbeddedViews(lView: LView) {\n for (let lContainer = getFirstLContainer(lView); lContainer !== null;\n lContainer = getNextLContainer(lContainer)) {\n for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n const embeddedLView = lContainer[i];\n const embeddedTView = embeddedLView[TVIEW];\n ngDevMode && assertDefined(embeddedTView, 'TView must be allocated');\n if (viewAttachedToChangeDetector(embeddedLView)) {\n refreshView(embeddedTView, embeddedLView, embeddedTView.template, embeddedLView[CONTEXT]!);\n }\n }\n }\n}\n\n/**\n * Mark transplanted views as needing to be refreshed at their insertion points.\n *\n * @param lView The `LView` that may have transplanted views.\n */\nfunction markTransplantedViewsForRefresh(lView: LView) {\n for (let lContainer = getFirstLContainer(lView); lContainer !== null;\n lContainer = getNextLContainer(lContainer)) {\n if (!lContainer[HAS_TRANSPLANTED_VIEWS]) continue;\n\n const movedViews = lContainer[MOVED_VIEWS]!;\n ngDevMode && assertDefined(movedViews, 'Transplanted View flags set but missing MOVED_VIEWS');\n for (let i = 0; i < movedViews.length; i++) {\n const movedLView = movedViews[i]!;\n const insertionLContainer = movedLView[PARENT] as LContainer;\n ngDevMode && assertLContainer(insertionLContainer);\n // We don't want to increment the counter if the moved LView was already marked for\n // refresh.\n if ((movedLView[FLAGS] & LViewFlags.RefreshTransplantedView) === 0) {\n updateTransplantedViewCount(insertionLContainer, 1);\n }\n // Note, it is possible that the `movedViews` is tracking views that are transplanted *and*\n // those that aren't (declaration component === insertion component). In the latter case,\n // it's fine to add the flag, as we will clear it immediately in\n // `refreshEmbeddedViews` for the view currently being refreshed.\n movedLView[FLAGS] |= LViewFlags.RefreshTransplantedView;\n }\n }\n}\n\n/////////////\n\n/**\n * Refreshes components by entering the component view and processing its bindings, queries, etc.\n *\n * @param componentHostIdx Element index in LView[] (adjusted for HEADER_OFFSET)\n */\nfunction refreshComponent(hostLView: LView, componentHostIdx: number): void {\n ngDevMode && assertEqual(isCreationMode(hostLView), false, 'Should be run in update mode');\n const componentView = getComponentLViewByIndex(componentHostIdx, hostLView);\n // Only attached components that are CheckAlways or OnPush and dirty should be refreshed\n if (viewAttachedToChangeDetector(componentView)) {\n const tView = componentView[TVIEW];\n if (componentView[FLAGS] & (LViewFlags.CheckAlways | LViewFlags.Dirty)) {\n refreshView(tView, componentView, tView.template, componentView[CONTEXT]);\n } else if (componentView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) {\n // Only attached components that are CheckAlways or OnPush and dirty should be refreshed\n refreshContainsDirtyView(componentView);\n }\n }\n}\n\n/**\n * Refreshes all transplanted views marked with `LViewFlags.RefreshTransplantedView` that are\n * children or descendants of the given lView.\n *\n * @param lView The lView which contains descendant transplanted views that need to be refreshed.\n */\nfunction refreshContainsDirtyView(lView: LView) {\n for (let lContainer = getFirstLContainer(lView); lContainer !== null;\n lContainer = getNextLContainer(lContainer)) {\n for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n const embeddedLView = lContainer[i];\n if (embeddedLView[FLAGS] & LViewFlags.RefreshTransplantedView) {\n const embeddedTView = embeddedLView[TVIEW];\n ngDevMode && assertDefined(embeddedTView, 'TView must be allocated');\n refreshView(embeddedTView, embeddedLView, embeddedTView.template, embeddedLView[CONTEXT]!);\n } else if (embeddedLView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) {\n refreshContainsDirtyView(embeddedLView);\n }\n }\n }\n\n const tView = lView[TVIEW];\n // Refresh child component views.\n const components = tView.components;\n if (components !== null) {\n for (let i = 0; i < components.length; i++) {\n const componentView = getComponentLViewByIndex(components[i], lView);\n // Only attached components that are CheckAlways or OnPush and dirty should be refreshed\n if (viewAttachedToChangeDetector(componentView) &&\n componentView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) {\n refreshContainsDirtyView(componentView);\n }\n }\n }\n}\n\nfunction renderComponent(hostLView: LView, componentHostIdx: number) {\n ngDevMode && assertEqual(isCreationMode(hostLView), true, 'Should be run in creation mode');\n const componentView = getComponentLViewByIndex(componentHostIdx, hostLView);\n const componentTView = componentView[TVIEW];\n syncViewWithBlueprint(componentTView, componentView);\n renderView(componentTView, componentView, componentView[CONTEXT]);\n}\n\n/**\n * Syncs an LView instance with its blueprint if they have gotten out of sync.\n *\n * Typically, blueprints and their view instances should always be in sync, so the loop here\n * will be skipped. However, consider this case of two components side-by-side:\n *\n * App template:\n * ```\n * <comp></comp>\n * <comp></comp>\n * ```\n *\n * The following will happen:\n * 1. App template begins processing.\n * 2. First <comp> is matched as a component and its LView is created.\n * 3. Second <comp> is matched as a component and its LView is created.\n * 4. App template completes processing, so it's time to check child templates.\n * 5. First <comp> template is checked. It has a directive, so its def is pushed to blueprint.\n * 6. Second <comp> template is checked. Its blueprint has been updated by the first\n * <comp> template, but its LView was created before this update, so it is out of sync.\n *\n * Note that embedded views inside ngFor loops will never be out of sync because these views\n * are processed as soon as they are created.\n *\n * @param tView The `TView` that contains the blueprint for syncing\n * @param lView The view to sync\n */\nfunction syncViewWithBlueprint(tView: TView, lView: LView) {\n for (let i = lView.length; i < tView.blueprint.length; i++) {\n lView.push(tView.blueprint[i]);\n }\n}\n\n/**\n * Adds LView or LContainer to the end of the current view tree.\n *\n * This structure will be used to traverse through nested views to remove listeners\n * and call onDestroy callbacks.\n *\n * @param lView The view where LView or LContainer should be added\n * @param adjustedHostIndex Index of the view's host node in LView[], adjusted for header\n * @param lViewOrLContainer The LView or LContainer to add to the view tree\n * @returns The state passed in\n */\nexport function addToViewTree<T extends LView|LContainer>(lView: LView, lViewOrLContainer: T): T {\n // TODO(benlesh/misko): This implementation is incorrect, because it always adds the LContainer\n // to the end of the queue, which means if the developer retrieves the LContainers from RNodes out\n // of order, the change detection will run out of order, as the act of retrieving the the\n // LContainer from the RNode is what adds it to the queue.\n if (lView[CHILD_HEAD]) {\n lView[CHILD_TAIL]![NEXT] = lViewOrLContainer;\n } else {\n lView[CHILD_HEAD] = lViewOrLContainer;\n }\n lView[CHILD_TAIL] = lViewOrLContainer;\n return lViewOrLContainer;\n}\n\n///////////////////////////////\n//// Change detection\n///////////////////////////////\n\n\n/**\n * Marks current view and all ancestors dirty.\n *\n * Returns the root view because it is found as a byproduct of marking the view tree\n * dirty, and can be used by methods that consume markViewDirty() to easily schedule\n * change detection. Otherwise, such methods would need to traverse up the view tree\n * an additional time to get the root view and schedule a tick on it.\n *\n * @param lView The starting LView to mark dirty\n * @returns the root LView\n */\nexport function markViewDirty(lView: LView): LView|null {\n while (lView) {\n lView[FLAGS] |= LViewFlags.Dirty;\n const parent = getLViewParent(lView);\n // Stop traversing up as soon as you find a root view that wasn't attached to any container\n if (isRootView(lView) && !parent) {\n return lView;\n }\n // continue otherwise\n lView = parent!;\n }\n return null;\n}\n\n\n/**\n * Used to schedule change detection on the whole application.\n *\n * Unlike `tick`, `scheduleTick` coalesces multiple calls into one change detection run.\n * It is usually called indirectly by calling `markDirty` when the view needs to be\n * re-rendered.\n *\n * Typically `scheduleTick` uses `requestAnimationFrame` to coalesce multiple\n * `scheduleTick` requests. The scheduling function can be overridden in\n * `renderComponent`'s `scheduler` option.\n */\nexport function scheduleTick(rootContext: RootContext, flags: RootContextFlags) {\n const nothingScheduled = rootContext.flags === RootContextFlags.Empty;\n if (nothingScheduled && rootContext.clean == _CLEAN_PROMISE) {\n // https://github.com/angular/angular/issues/39296\n // should only attach the flags when really scheduling a tick\n rootContext.flags |= flags;\n let res: null|((val: null) => void);\n rootContext.clean = new Promise<null>((r) => res = r);\n rootContext.scheduler(() => {\n if (rootContext.flags & RootContextFlags.DetectChanges) {\n rootContext.flags &= ~RootContextFlags.DetectChanges;\n tickRootContext(rootContext);\n }\n\n if (rootContext.flags & RootContextFlags.FlushPlayers) {\n rootContext.flags &= ~RootContextFlags.FlushPlayers;\n const playerHandler = rootContext.playerHandler;\n if (playerHandler) {\n playerHandler.flushPlayers();\n }\n }\n\n rootContext.clean = _CLEAN_PROMISE;\n res!(null);\n });\n }\n}\n\nexport function tickRootContext(rootContext: RootContext) {\n for (let i = 0; i < rootContext.components.length; i++) {\n const rootComponent = rootContext.components[i];\n const lView = readPatchedLView(rootComponent)!;\n const tView = lView[TVIEW];\n renderComponentOrTemplate(tView, lView, tView.template, rootComponent);\n }\n}\n\nexport function detectChangesInternal<T>(tView: TView, lView: LView, context: T) {\n const rendererFactory = lView[RENDERER_FACTORY];\n if (rendererFactory.begin) rendererFactory.begin();\n try {\n refreshView(tView, lView, tView.template, context);\n } catch (error) {\n handleError(lView, error);\n throw error;\n } finally {\n if (rendererFactory.end) rendererFactory.end();\n }\n}\n\n/**\n * Synchronously perform change detection on a root view and its components.\n *\n * @param lView The view which the change detection should be performed on.\n */\nexport function detectChangesInRootView(lView: LView): void {\n tickRootContext(lView[CONTEXT] as RootContext);\n}\n\nexport function checkNoChangesInternal<T>(tView: TView, view: LView, context: T) {\n setIsInCheckNoChangesMode(true);\n try {\n detectChangesInternal(tView, view, context);\n } finally {\n setIsInCheckNoChangesMode(false);\n }\n}\n\n/**\n * Checks the change detector on a root view and its components, and throws if any changes are\n * detected.\n *\n * This is used in development mode to verify that running change detection doesn't\n * introduce other changes.\n *\n * @param lView The view which the change detection should be checked on.\n */\nexport function checkNoChangesInRootView(lView: LView): void {\n setIsInCheckNoChangesMode(true);\n try {\n detectChangesInRootView(lView);\n } finally {\n setIsInCheckNoChangesMode(false);\n }\n}\n\nfunction executeViewQueryFn<T>(\n flags: RenderFlags, viewQueryFn: ViewQueriesFunction<{}>, component: T): void {\n ngDevMode && assertDefined(viewQueryFn, 'View queries function to execute must be defined.');\n setCurrentQueryIndex(0);\n viewQueryFn(flags, component);\n}\n\n\n///////////////////////////////\n//// Bindings & interpolations\n///////////////////////////////\n\n/**\n * Stores meta-data for a property binding to be used by TestBed's `DebugElement.properties`.\n *\n * In order to support TestBed's `DebugElement.properties` we need to save, for each binding:\n * - a bound property name;\n * - a static parts of interpolated strings;\n *\n * A given property metadata is saved at the binding's index in the `TView.data` (in other words, a\n * property binding metadata will be stored in `TView.data` at the same index as a bound value in\n * `LView`). Metadata are represented as `INTERPOLATION_DELIMITER`-delimited string with the\n * following format:\n * - `propertyName` for bound properties;\n * - `propertyName�prefix�interpolation_static_part1�..interpolation_static_partN�suffix` for\n * interpolated properties.\n *\n * @param tData `TData` where meta-data will be saved;\n * @param tNode `TNode` that is a target of the binding;\n * @param propertyName bound property name;\n * @param bindingIndex binding index in `LView`\n * @param interpolationParts static interpolation parts (for property interpolations)\n */\nexport function storePropertyBindingMetadata(\n tData: TData, tNode: TNode, propertyName: string, bindingIndex: number,\n ...interpolationParts: string[]) {\n // Binding meta-data are stored only the first time a given property instruction is processed.\n // Since we don't have a concept of the \"first update pass\" we need to check for presence of the\n // binding meta-data to decide if one should be stored (or if was stored already).\n if (tData[bindingIndex] === null) {\n if (tNode.inputs == null || !tNode.inputs[propertyName]) {\n const propBindingIdxs = tNode.propertyBindings || (tNode.propertyBindings = []);\n propBindingIdxs.push(bindingIndex);\n let bindingMetadata = propertyName;\n if (interpolationParts.length > 0) {\n bindingMetadata +=\n INTERPOLATION_DELIMITER + interpolationParts.join(INTERPOLATION_DELIMITER);\n }\n tData[bindingIndex] = bindingMetadata;\n }\n }\n}\n\nexport const CLEAN_PROMISE = _CLEAN_PROMISE;\n\nexport function getOrCreateLViewCleanup(view: LView): any[] {\n // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n return view[CLEANUP] || (view[CLEANUP] = ngDevMode ? new LCleanup() : []);\n}\n\nexport function getOrCreateTViewCleanup(tView: TView): any[] {\n return tView.cleanup || (tView.cleanup = ngDevMode ? new TCleanup() : []);\n}\n\n/**\n * There are cases where the sub component's renderer needs to be included\n * instead of the current renderer (see the componentSyntheticHost* instructions).\n */\nexport function loadComponentRenderer(\n currentDef: DirectiveDef<any>|null, tNode: TNode, lView: LView): Renderer3 {\n // TODO(FW-2043): the `currentDef` is null when host bindings are invoked while creating root\n // component (see packages/core/src/render3/component.ts). This is not consistent with the process\n // of creating inner components, when current directive index is available in the state. In order\n // to avoid relying on current def being `null` (thus special-casing root component creation), the\n // process of creating root component should be unified with the process of creating inner\n // components.\n if (currentDef === null || isComponentDef(currentDef)) {\n lView = unwrapLView(lView[tNode.index])!;\n }\n return lView[RENDERER];\n}\n\n/** Handles an error thrown in an LView. */\nexport function handleError(lView: LView, error: any): void {\n const injector = lView[INJECTOR];\n const errorHandler = injector ? injector.get(ErrorHandler, null) : null;\n errorHandler && errorHandler.handleError(error);\n}\n\n/**\n * Set the inputs of directives at the current node to corresponding value.\n *\n * @param tView The current TView\n * @param lView the `LView` which contains the directives.\n * @param inputs mapping between the public \"input\" name and privately-known,\n * possibly minified, property names to write to.\n * @param value Value to set.\n */\nexport function setInputsForProperty(\n tView: TView, lView: LView, inputs: PropertyAliasValue, publicName: string, value: any): void {\n for (let i = 0; i < inputs.length;) {\n const index = inputs[i++] as number;\n const privateName = inputs[i++] as string;\n const instance = lView[index];\n ngDevMode && assertIndexInRange(lView, index);\n const def = tView.data[index] as DirectiveDef<any>;\n if (def.setInput !== null) {\n def.setInput!(instance, value, publicName, privateName);\n } else {\n instance[privateName] = value;\n }\n }\n}\n\n/**\n * Updates a text binding at a given index in a given LView.\n */\nexport function textBindingInternal(lView: LView, index: number, value: string): void {\n ngDevMode && assertString(value, 'Value should be a string');\n ngDevMode && assertNotSame(value, NO_CHANGE as any, 'value should not be NO_CHANGE');\n ngDevMode && assertIndexInRange(lView, index);\n const element = getNativeByIndex(index, lView) as any as RText;\n ngDevMode && assertDefined(element, 'native element should exist');\n updateTextNode(lView[RENDERER], element, value);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {concatStringsWithSpace} from '../../util/stringify';\nimport {assertFirstCreatePass} from '../assert';\nimport {AttributeMarker, TAttributes, TNode} from '../interfaces/node';\nimport {getTView} from '../state';\n\n/**\n * Compute the static styling (class/style) from `TAttributes`.\n *\n * This function should be called during `firstCreatePass` only.\n *\n * @param tNode The `TNode` into which the styling information should be loaded.\n * @param attrs `TAttributes` containing the styling information.\n * @param writeToHost Where should the resulting static styles be written?\n * - `false` Write to `TNode.stylesWithoutHost` / `TNode.classesWithoutHost`\n * - `true` Write to `TNode.styles` / `TNode.classes`\n */\nexport function computeStaticStyling(\n tNode: TNode, attrs: TAttributes|null, writeToHost: boolean): void {\n ngDevMode &&\n assertFirstCreatePass(getTView(), 'Expecting to be called in first template pass only');\n let styles: string|null = writeToHost ? tNode.styles : null;\n let classes: string|null = writeToHost ? tNode.classes : null;\n let mode: AttributeMarker|0 = 0;\n if (attrs !== null) {\n for (let i = 0; i < attrs.length; i++) {\n const value = attrs[i];\n if (typeof value === 'number') {\n mode = value;\n } else if (mode == AttributeMarker.Classes) {\n classes = concatStringsWithSpace(classes, value as string);\n } else if (mode == AttributeMarker.Styles) {\n const style = value as string;\n const styleValue = attrs[++i] as string;\n styles = concatStringsWithSpace(styles, style + ': ' + styleValue + ';');\n }\n }\n }\n writeToHost ? tNode.styles = styles : tNode.stylesWithoutHost = styles;\n writeToHost ? tNode.classes = classes : tNode.classesWithoutHost = classes;\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 {assertDefined} from '../../util/assert';\nimport {getComponentViewByInstance} from '../context_discovery';\nimport {CONTEXT, RootContext, RootContextFlags, TVIEW} from '../interfaces/view';\nimport {getRootView} from '../util/view_traversal_utils';\nimport {detectChangesInternal, markViewDirty, scheduleTick, tickRootContext} from './shared';\n\n/**\n * Synchronously perform change detection on a component (and possibly its sub-components).\n *\n * This function triggers change detection in a synchronous way on a component.\n *\n * @param component The component which the change detection should be performed on.\n */\nexport function detectChanges(component: {}): void {\n const view = getComponentViewByInstance(component);\n detectChangesInternal(view[TVIEW], view, component);\n}\n\n/**\n * Marks the component as dirty (needing change detection). Marking a component dirty will\n * schedule a change detection on it at some point in the future.\n *\n * Marking an already dirty component as dirty won't do anything. Only one outstanding change\n * detection can be scheduled per component tree.\n *\n * @param component Component to mark as dirty.\n */\nexport function markDirty(component: {}): void {\n ngDevMode && assertDefined(component, 'component');\n const rootView = markViewDirty(getComponentViewByInstance(component))!;\n\n ngDevMode && assertDefined(rootView[CONTEXT], 'rootContext should be defined');\n scheduleTick(rootView[CONTEXT] as RootContext, RootContextFlags.DetectChanges);\n}\n\n/**\n * Used to perform change detection on the whole application.\n *\n * This is equivalent to `detectChanges`, but invoked on root component. Additionally, `tick`\n * executes lifecycle hooks and conditionally checks components based on their\n * `ChangeDetectionStrategy` and dirtiness.\n *\n * The preferred way to trigger change detection is to call `markDirty`. `markDirty` internally\n * schedules `tick` using a scheduler in order to coalesce multiple `markDirty` calls into a\n * single change detection run. By default, the scheduler is `requestAnimationFrame`, but can\n * be changed when calling `renderComponent` and providing the `scheduler` option.\n */\nexport function tick<T>(component: T): void {\n const rootView = getRootView(component);\n const rootContext = rootView[CONTEXT] as RootContext;\n tickRootContext(rootContext);\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 {InjectionToken} from './injection_token';\nimport {Injector} from './injector';\nimport {InjectorMarkers} from './injector_marker';\n\n\n\n/**\n * An InjectionToken that gets the current `Injector` for `createInjector()`-style injectors.\n *\n * Requesting this token instead of `Injector` allows `StaticInjector` to be tree-shaken from a\n * project.\n *\n * @publicApi\n */\nexport const INJECTOR = new InjectionToken<Injector>(\n 'INJECTOR',\n // Dissable tslint because this is const enum which gets inlined not top level prop access.\n // tslint:disable-next-line: no-toplevel-property-access\n InjectorMarkers.Injector as any, // Special value used by Ivy to identify `Injector`.\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 {stringify} from '../util/stringify';\nimport {Injector} from './injector';\nimport {THROW_IF_NOT_FOUND} from './injector_compatibility';\n\nexport class NullInjector implements Injector {\n get(token: any, notFoundValue: any = THROW_IF_NOT_FOUND): any {\n if (notFoundValue === THROW_IF_NOT_FOUND) {\n const error = new Error(`NullInjectorError: No provider for ${stringify(token)}!`);\n error.name = 'NullInjectorError';\n throw error;\n }\n return notFoundValue;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectionToken} from './injection_token';\n\n\n/**\n * An internal token whose presence in an injector indicates that the injector should treat itself\n * as a root scoped injector when processing requests for unknown tokens which may indicate\n * they are provided in the root scope.\n */\nexport const INJECTOR_SCOPE = new InjectionToken<'root'|'platform'|null>('Set Injector scope.');\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 '../util/ng_dev_mode';\n\nimport {OnDestroy} from '../interface/lifecycle_hooks';\nimport {Type} from '../interface/type';\nimport {FactoryFn, getFactoryDef} from '../render3/definition_factory';\nimport {throwCyclicDependencyError, throwInvalidProviderError, throwMixedMultiProviderError} from '../render3/errors_di';\nimport {deepForEach, newArray} from '../util/array_utils';\nimport {EMPTY_ARRAY} from '../util/empty';\nimport {stringify} from '../util/stringify';\n\nimport {resolveForwardRef} from './forward_ref';\nimport {setInjectImplementation} from './inject_switch';\nimport {InjectionToken} from './injection_token';\nimport {Injector} from './injector';\nimport {catchInjectorError, injectArgs, NG_TEMP_TOKEN_PATH, setCurrentInjector, THROW_IF_NOT_FOUND, USE_VALUE, ɵɵinject} from './injector_compatibility';\nimport {INJECTOR} from './injector_token';\nimport {getInheritedInjectableDef, getInjectableDef, getInjectorDef, InjectorType, InjectorTypeWithProviders, ɵɵInjectableDeclaration} from './interface/defs';\nimport {InjectFlags} from './interface/injector';\nimport {ClassProvider, ConstructorProvider, ExistingProvider, FactoryProvider, StaticClassProvider, StaticProvider, TypeProvider, ValueProvider} from './interface/provider';\nimport {NullInjector} from './null_injector';\nimport {ProviderToken} from './provider_token';\nimport {INJECTOR_SCOPE} from './scope';\n\n\n\n/**\n * Internal type for a single provider in a deep provider array.\n */\ntype SingleProvider = TypeProvider|ValueProvider|ClassProvider|ConstructorProvider|ExistingProvider|\n FactoryProvider|StaticClassProvider;\n\n/**\n * Marker which indicates that a value has not yet been created from the factory function.\n */\nconst NOT_YET = {};\n\n/**\n * Marker which indicates that the factory function for a token is in the process of being called.\n *\n * If the injector is asked to inject a token with its value set to CIRCULAR, that indicates\n * injection of a dependency has recursively attempted to inject the original token, and there is\n * a circular dependency among the providers.\n */\nconst CIRCULAR = {};\n\n/**\n * A lazily initialized NullInjector.\n */\nlet NULL_INJECTOR: Injector|undefined = undefined;\n\nfunction getNullInjector(): Injector {\n if (NULL_INJECTOR === undefined) {\n NULL_INJECTOR = new NullInjector();\n }\n return NULL_INJECTOR;\n}\n\n/**\n * An entry in the injector which tracks information about the given token, including a possible\n * current value.\n */\ninterface Record<T> {\n factory: (() => T)|undefined;\n value: T|{};\n multi: any[]|undefined;\n}\n\n/**\n * Create a new `Injector` which is configured using a `defType` of `InjectorType<any>`s.\n *\n * @publicApi\n */\nexport function createInjector(\n defType: /* InjectorType<any> */ any, parent: Injector|null = null,\n additionalProviders: StaticProvider[]|null = null, name?: string): Injector {\n const injector =\n createInjectorWithoutInjectorInstances(defType, parent, additionalProviders, name);\n injector._resolveInjectorDefTypes();\n return injector;\n}\n\n/**\n * Creates a new injector without eagerly resolving its injector types. Can be used in places\n * where resolving the injector types immediately can lead to an infinite loop. The injector types\n * should be resolved at a later point by calling `_resolveInjectorDefTypes`.\n */\nexport function createInjectorWithoutInjectorInstances(\n defType: /* InjectorType<any> */ any, parent: Injector|null = null,\n additionalProviders: StaticProvider[]|null = null, name?: string): R3Injector {\n return new R3Injector(defType, additionalProviders, parent || getNullInjector(), name);\n}\n\nexport class R3Injector {\n /**\n * Map of tokens to records which contain the instances of those tokens.\n * - `null` value implies that we don't have the record. Used by tree-shakable injectors\n * to prevent further searches.\n */\n private records = new Map<ProviderToken<any>, Record<any>|null>();\n\n /**\n * The transitive set of `InjectorType`s which define this injector.\n */\n private injectorDefTypes = new Set<InjectorType<any>>();\n\n /**\n * Set of values instantiated by this injector which contain `ngOnDestroy` lifecycle hooks.\n */\n private onDestroy = new Set<OnDestroy>();\n\n /**\n * Flag indicating this injector provides the APP_ROOT_SCOPE token, and thus counts as the\n * root scope.\n */\n private readonly scope: 'root'|'platform'|null;\n\n readonly source: string|null;\n\n /**\n * Flag indicating that this injector was previously destroyed.\n */\n get destroyed(): boolean {\n return this._destroyed;\n }\n private _destroyed = false;\n\n constructor(\n def: InjectorType<any>, additionalProviders: StaticProvider[]|null, readonly parent: Injector,\n source: string|null = null) {\n const dedupStack: InjectorType<any>[] = [];\n\n // Start off by creating Records for every provider declared in every InjectorType\n // included transitively in additional providers then do the same for `def`. This order is\n // important because `def` may include providers that override ones in additionalProviders.\n additionalProviders &&\n deepForEach(\n additionalProviders,\n provider => this.processProvider(provider, def, additionalProviders));\n\n deepForEach([def], injectorDef => this.processInjectorType(injectorDef, [], dedupStack));\n\n // Make sure the INJECTOR token provides this injector.\n this.records.set(INJECTOR, makeRecord(undefined, this));\n\n // Detect whether this injector has the APP_ROOT_SCOPE token and thus should provide\n // any injectable scoped to APP_ROOT_SCOPE.\n const record = this.records.get(INJECTOR_SCOPE);\n this.scope = record != null ? record.value : null;\n\n // Source name, used for debugging\n this.source = source || (typeof def === 'object' ? null : stringify(def));\n }\n\n /**\n * Destroy the injector and release references to every instance or provider associated with it.\n *\n * Also calls the `OnDestroy` lifecycle hooks of every instance that was created for which a\n * hook was found.\n */\n destroy(): void {\n this.assertNotDestroyed();\n\n // Set destroyed = true first, in case lifecycle hooks re-enter destroy().\n this._destroyed = true;\n try {\n // Call all the lifecycle hooks.\n this.onDestroy.forEach(service => service.ngOnDestroy());\n } finally {\n // Release all references.\n this.records.clear();\n this.onDestroy.clear();\n this.injectorDefTypes.clear();\n }\n }\n\n get<T>(\n token: ProviderToken<T>, notFoundValue: any = THROW_IF_NOT_FOUND,\n flags = InjectFlags.Default): T {\n this.assertNotDestroyed();\n // Set the injection context.\n const previousInjector = setCurrentInjector(this);\n const previousInjectImplementation = setInjectImplementation(undefined);\n try {\n // Check for the SkipSelf flag.\n if (!(flags & InjectFlags.SkipSelf)) {\n // SkipSelf isn't set, check if the record belongs to this injector.\n let record: Record<T>|undefined|null = this.records.get(token);\n if (record === undefined) {\n // No record, but maybe the token is scoped to this injector. Look for an injectable\n // def with a scope matching this injector.\n const def = couldBeInjectableType(token) && getInjectableDef(token);\n if (def && this.injectableDefInScope(def)) {\n // Found an injectable def and it's scoped to this injector. Pretend as if it was here\n // all along.\n record = makeRecord(injectableDefOrInjectorDefFactory(token), NOT_YET);\n } else {\n record = null;\n }\n this.records.set(token, record);\n }\n // If a record was found, get the instance for it and return it.\n if (record != null /* NOT null || undefined */) {\n return this.hydrate(token, record);\n }\n }\n\n // Select the next injector based on the Self flag - if self is set, the next injector is\n // the NullInjector, otherwise it's the parent.\n const nextInjector = !(flags & InjectFlags.Self) ? this.parent : getNullInjector();\n // Set the notFoundValue based on the Optional flag - if optional is set and notFoundValue\n // is undefined, the value is null, otherwise it's the notFoundValue.\n notFoundValue = (flags & InjectFlags.Optional) && notFoundValue === THROW_IF_NOT_FOUND ?\n null :\n notFoundValue;\n return nextInjector.get(token, notFoundValue);\n } catch (e) {\n if (e.name === 'NullInjectorError') {\n const path: any[] = e[NG_TEMP_TOKEN_PATH] = e[NG_TEMP_TOKEN_PATH] || [];\n path.unshift(stringify(token));\n if (previousInjector) {\n // We still have a parent injector, keep throwing\n throw e;\n } else {\n // Format & throw the final error message when we don't have any previous injector\n return catchInjectorError(e, token, 'R3InjectorError', this.source);\n }\n } else {\n throw e;\n }\n } finally {\n // Lastly, restore the previous injection context.\n setInjectImplementation(previousInjectImplementation);\n setCurrentInjector(previousInjector);\n }\n }\n\n /** @internal */\n _resolveInjectorDefTypes() {\n this.injectorDefTypes.forEach(defType => this.get(defType));\n }\n\n toString() {\n const tokens = <string[]>[], records = this.records;\n records.forEach((v, token) => tokens.push(stringify(token)));\n return `R3Injector[${tokens.join(', ')}]`;\n }\n\n private assertNotDestroyed(): void {\n if (this._destroyed) {\n throw new Error('Injector has already been destroyed.');\n }\n }\n\n /**\n * Add an `InjectorType` or `InjectorTypeWithProviders` and all of its transitive providers\n * to this injector.\n *\n * If an `InjectorTypeWithProviders` that declares providers besides the type is specified,\n * the function will return \"true\" to indicate that the providers of the type definition need\n * to be processed. This allows us to process providers of injector types after all imports of\n * an injector definition are processed. (following View Engine semantics: see FW-1349)\n */\n private processInjectorType(\n defOrWrappedDef: InjectorType<any>|InjectorTypeWithProviders<any>,\n parents: InjectorType<any>[],\n dedupStack: InjectorType<any>[]): defOrWrappedDef is InjectorTypeWithProviders<any> {\n defOrWrappedDef = resolveForwardRef(defOrWrappedDef);\n if (!defOrWrappedDef) return false;\n\n // Either the defOrWrappedDef is an InjectorType (with injector def) or an\n // InjectorDefTypeWithProviders (aka ModuleWithProviders). Detecting either is a megamorphic\n // read, so care is taken to only do the read once.\n\n // First attempt to read the injector def (`ɵinj`).\n let def = getInjectorDef(defOrWrappedDef);\n\n // If that's not present, then attempt to read ngModule from the InjectorDefTypeWithProviders.\n const ngModule =\n (def == null) && (defOrWrappedDef as InjectorTypeWithProviders<any>).ngModule || undefined;\n\n // Determine the InjectorType. In the case where `defOrWrappedDef` is an `InjectorType`,\n // then this is easy. In the case of an InjectorDefTypeWithProviders, then the definition type\n // is the `ngModule`.\n const defType: InjectorType<any> =\n (ngModule === undefined) ? (defOrWrappedDef as InjectorType<any>) : ngModule;\n\n // Check for circular dependencies.\n if (ngDevMode && parents.indexOf(defType) !== -1) {\n const defName = stringify(defType);\n const path = parents.map(stringify);\n throwCyclicDependencyError(defName, path);\n }\n\n // Check for multiple imports of the same module\n const isDuplicate = dedupStack.indexOf(defType) !== -1;\n\n // Finally, if defOrWrappedType was an `InjectorDefTypeWithProviders`, then the actual\n // `InjectorDef` is on its `ngModule`.\n if (ngModule !== undefined) {\n def = getInjectorDef(ngModule);\n }\n\n // If no definition was found, it might be from exports. Remove it.\n if (def == null) {\n return false;\n }\n\n // Add providers in the same way that @NgModule resolution did:\n\n // First, include providers from any imports.\n if (def.imports != null && !isDuplicate) {\n // Before processing defType's imports, add it to the set of parents. This way, if it ends\n // up deeply importing itself, this can be detected.\n ngDevMode && parents.push(defType);\n // Add it to the set of dedups. This way we can detect multiple imports of the same module\n dedupStack.push(defType);\n\n let importTypesWithProviders: (InjectorTypeWithProviders<any>[])|undefined;\n try {\n deepForEach(def.imports, imported => {\n if (this.processInjectorType(imported, parents, dedupStack)) {\n if (importTypesWithProviders === undefined) importTypesWithProviders = [];\n // If the processed import is an injector type with providers, we store it in the\n // list of import types with providers, so that we can process those afterwards.\n importTypesWithProviders.push(imported);\n }\n });\n } finally {\n // Remove it from the parents set when finished.\n ngDevMode && parents.pop();\n }\n\n // Imports which are declared with providers (TypeWithProviders) need to be processed\n // after all imported modules are processed. This is similar to how View Engine\n // processes/merges module imports in the metadata resolver. See: FW-1349.\n if (importTypesWithProviders !== undefined) {\n for (let i = 0; i < importTypesWithProviders.length; i++) {\n const {ngModule, providers} = importTypesWithProviders[i];\n deepForEach(\n providers!,\n provider => this.processProvider(provider, ngModule, providers || EMPTY_ARRAY));\n }\n }\n }\n // Track the InjectorType and add a provider for it. It's important that this is done after the\n // def's imports.\n this.injectorDefTypes.add(defType);\n const factory = getFactoryDef(defType) || (() => new defType());\n this.records.set(defType, makeRecord(factory, NOT_YET));\n\n // Next, include providers listed on the definition itself.\n const defProviders = def.providers;\n if (defProviders != null && !isDuplicate) {\n const injectorType = defOrWrappedDef as InjectorType<any>;\n deepForEach(\n defProviders, provider => this.processProvider(provider, injectorType, defProviders));\n }\n\n return (\n ngModule !== undefined &&\n (defOrWrappedDef as InjectorTypeWithProviders<any>).providers !== undefined);\n }\n\n /**\n * Process a `SingleProvider` and add it.\n */\n private processProvider(\n provider: SingleProvider, ngModuleType: InjectorType<any>, providers: any[]): void {\n // Determine the token from the provider. Either it's its own token, or has a {provide: ...}\n // property.\n provider = resolveForwardRef(provider);\n let token: any =\n isTypeProvider(provider) ? provider : resolveForwardRef(provider && provider.provide);\n\n // Construct a `Record` for the provider.\n const record = providerToRecord(provider, ngModuleType, providers);\n\n if (!isTypeProvider(provider) && provider.multi === true) {\n // If the provider indicates that it's a multi-provider, process it specially.\n // First check whether it's been defined already.\n let multiRecord = this.records.get(token);\n if (multiRecord) {\n // It has. Throw a nice error if\n if (ngDevMode && multiRecord.multi === undefined) {\n throwMixedMultiProviderError();\n }\n } else {\n multiRecord = makeRecord(undefined, NOT_YET, true);\n multiRecord.factory = () => injectArgs(multiRecord!.multi!);\n this.records.set(token, multiRecord);\n }\n token = provider;\n multiRecord.multi!.push(provider);\n } else {\n const existing = this.records.get(token);\n if (ngDevMode && existing && existing.multi !== undefined) {\n throwMixedMultiProviderError();\n }\n }\n this.records.set(token, record);\n }\n\n private hydrate<T>(token: ProviderToken<T>, record: Record<T>): T {\n if (ngDevMode && record.value === CIRCULAR) {\n throwCyclicDependencyError(stringify(token));\n } else if (record.value === NOT_YET) {\n record.value = CIRCULAR;\n record.value = record.factory!();\n }\n if (typeof record.value === 'object' && record.value && hasOnDestroy(record.value)) {\n this.onDestroy.add(record.value);\n }\n return record.value as T;\n }\n\n private injectableDefInScope(def: ɵɵInjectableDeclaration<any>): boolean {\n if (!def.providedIn) {\n return false;\n }\n const providedIn = resolveForwardRef(def.providedIn);\n if (typeof providedIn === 'string') {\n return providedIn === 'any' || (providedIn === this.scope);\n } else {\n return this.injectorDefTypes.has(providedIn);\n }\n }\n}\n\nfunction injectableDefOrInjectorDefFactory(token: ProviderToken<any>): FactoryFn<any> {\n // Most tokens will have an injectable def directly on them, which specifies a factory directly.\n const injectableDef = getInjectableDef(token);\n const factory = injectableDef !== null ? injectableDef.factory : getFactoryDef(token);\n\n if (factory !== null) {\n return factory;\n }\n\n // InjectionTokens should have an injectable def (ɵprov) and thus should be handled above.\n // If it's missing that, it's an error.\n if (token instanceof InjectionToken) {\n throw new Error(`Token ${stringify(token)} is missing a ɵprov definition.`);\n }\n\n // Undecorated types can sometimes be created if they have no constructor arguments.\n if (token instanceof Function) {\n return getUndecoratedInjectableFactory(token);\n }\n\n // There was no way to resolve a factory for this token.\n throw new Error('unreachable');\n}\n\nfunction getUndecoratedInjectableFactory(token: Function) {\n // If the token has parameters then it has dependencies that we cannot resolve implicitly.\n const paramLength = token.length;\n if (paramLength > 0) {\n const args: string[] = newArray(paramLength, '?');\n throw new Error(`Can't resolve all parameters for ${stringify(token)}: (${args.join(', ')}).`);\n }\n\n // The constructor function appears to have no parameters.\n // This might be because it inherits from a super-class. In which case, use an injectable\n // def from an ancestor if there is one.\n // Otherwise this really is a simple class with no dependencies, so return a factory that\n // just instantiates the zero-arg constructor.\n const inheritedInjectableDef = getInheritedInjectableDef(token);\n if (inheritedInjectableDef !== null) {\n return () => inheritedInjectableDef.factory(token as Type<any>);\n } else {\n return () => new (token as Type<any>)();\n }\n}\n\nfunction providerToRecord(\n provider: SingleProvider, ngModuleType: InjectorType<any>, providers: any[]): Record<any> {\n if (isValueProvider(provider)) {\n return makeRecord(undefined, provider.useValue);\n } else {\n const factory: (() => any)|undefined = providerToFactory(provider, ngModuleType, providers);\n return makeRecord(factory, NOT_YET);\n }\n}\n\n/**\n * Converts a `SingleProvider` into a factory function.\n *\n * @param provider provider to convert to factory\n */\nexport function providerToFactory(\n provider: SingleProvider, ngModuleType?: InjectorType<any>, providers?: any[]): () => any {\n let factory: (() => any)|undefined = undefined;\n if (isTypeProvider(provider)) {\n const unwrappedProvider = resolveForwardRef(provider);\n return getFactoryDef(unwrappedProvider) || injectableDefOrInjectorDefFactory(unwrappedProvider);\n } else {\n if (isValueProvider(provider)) {\n factory = () => resolveForwardRef(provider.useValue);\n } else if (isFactoryProvider(provider)) {\n factory = () => provider.useFactory(...injectArgs(provider.deps || []));\n } else if (isExistingProvider(provider)) {\n factory = () => ɵɵinject(resolveForwardRef(provider.useExisting));\n } else {\n const classRef = resolveForwardRef(\n provider &&\n ((provider as StaticClassProvider | ClassProvider).useClass || provider.provide));\n if (ngDevMode && !classRef) {\n throwInvalidProviderError(ngModuleType, providers, provider);\n }\n if (hasDeps(provider)) {\n factory = () => new (classRef)(...injectArgs(provider.deps));\n } else {\n return getFactoryDef(classRef) || injectableDefOrInjectorDefFactory(classRef);\n }\n }\n }\n return factory;\n}\n\nfunction makeRecord<T>(\n factory: (() => T)|undefined, value: T|{}, multi: boolean = false): Record<T> {\n return {\n factory: factory,\n value: value,\n multi: multi ? [] : undefined,\n };\n}\n\nfunction isValueProvider(value: SingleProvider): value is ValueProvider {\n return value !== null && typeof value == 'object' && USE_VALUE in value;\n}\n\nfunction isExistingProvider(value: SingleProvider): value is ExistingProvider {\n return !!(value && (value as ExistingProvider).useExisting);\n}\n\nfunction isFactoryProvider(value: SingleProvider): value is FactoryProvider {\n return !!(value && (value as FactoryProvider).useFactory);\n}\n\nexport function isTypeProvider(value: SingleProvider): value is TypeProvider {\n return typeof value === 'function';\n}\n\nexport function isClassProvider(value: SingleProvider): value is ClassProvider {\n return !!(value as StaticClassProvider | ClassProvider).useClass;\n}\n\nfunction hasDeps(value: ClassProvider|ConstructorProvider|\n StaticClassProvider): value is ClassProvider&{deps: any[]} {\n return !!(value as any).deps;\n}\n\nfunction hasOnDestroy(value: any): value is OnDestroy {\n return value !== null && typeof value === 'object' &&\n typeof (value as OnDestroy).ngOnDestroy === 'function';\n}\n\nfunction couldBeInjectableType(value: any): value is ProviderToken<any> {\n return (typeof value === 'function') ||\n (typeof value === 'object' && value instanceof InjectionToken);\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 {stringify} from '../util/stringify';\n\nimport {resolveForwardRef} from './forward_ref';\nimport {catchInjectorError, formatError, NG_TEMP_TOKEN_PATH, setCurrentInjector, THROW_IF_NOT_FOUND, USE_VALUE, ɵɵinject} from './injector_compatibility';\nimport {InjectorMarkers} from './injector_marker';\nimport {INJECTOR} from './injector_token';\nimport {getInjectableDef, ɵɵdefineInjectable} from './interface/defs';\nimport {InjectFlags} from './interface/injector';\nimport {ConstructorProvider, ExistingProvider, FactoryProvider, StaticClassProvider, StaticProvider, ValueProvider} from './interface/provider';\nimport {Inject, Optional, Self, SkipSelf} from './metadata';\nimport {NullInjector} from './null_injector';\nimport {ProviderToken} from './provider_token';\nimport {createInjector} from './r3_injector';\nimport {INJECTOR_SCOPE} from './scope';\n\nexport function INJECTOR_IMPL__PRE_R3__(\n providers: StaticProvider[], parent: Injector|undefined, name: string) {\n return new StaticInjector(providers, parent, name);\n}\n\nexport function INJECTOR_IMPL__POST_R3__(\n providers: StaticProvider[], parent: Injector|undefined, name: string) {\n return createInjector({name: name}, parent, providers, name);\n}\n\nexport const INJECTOR_IMPL = INJECTOR_IMPL__PRE_R3__;\n\n/**\n * Concrete injectors implement this interface. Injectors are configured\n * with [providers](guide/glossary#provider) that associate\n * dependencies of various types with [injection tokens](guide/glossary#di-token).\n *\n * @see [\"DI Providers\"](guide/dependency-injection-providers).\n * @see `StaticProvider`\n *\n * @usageNotes\n *\n * The following example creates a service injector instance.\n *\n * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}\n *\n * ### Usage example\n *\n * {@example core/di/ts/injector_spec.ts region='Injector'}\n *\n * `Injector` returns itself when given `Injector` as a token:\n *\n * {@example core/di/ts/injector_spec.ts region='injectInjector'}\n *\n * @publicApi\n */\nexport abstract class Injector {\n static THROW_IF_NOT_FOUND = THROW_IF_NOT_FOUND;\n static NULL: Injector = (/* @__PURE__ */ new NullInjector());\n\n /**\n * Retrieves an instance from the injector based on the provided token.\n * @returns The instance from the injector if defined, otherwise the `notFoundValue`.\n * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.\n */\n abstract get<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): T;\n /**\n * @deprecated from v4.0.0 use ProviderToken<T>\n * @suppress {duplicate}\n */\n abstract get(token: any, notFoundValue?: any): any;\n\n /**\n * @deprecated from v5 use the new signature Injector.create(options)\n */\n static create(providers: StaticProvider[], parent?: Injector): Injector;\n\n /**\n * Creates a new injector instance that provides one or more dependencies,\n * according to a given type or types of `StaticProvider`.\n *\n * @param options An object with the following properties:\n * * `providers`: An array of providers of the [StaticProvider type](api/core/StaticProvider).\n * * `parent`: (optional) A parent injector.\n * * `name`: (optional) A developer-defined identifying name for the new injector.\n *\n * @returns The new injector instance.\n *\n */\n static create(options: {providers: StaticProvider[], parent?: Injector, name?: string}): Injector;\n\n\n static create(\n options: StaticProvider[]|{providers: StaticProvider[], parent?: Injector, name?: string},\n parent?: Injector): Injector {\n if (Array.isArray(options)) {\n return INJECTOR_IMPL(options, parent, '');\n } else {\n return INJECTOR_IMPL(options.providers, options.parent, options.name || '');\n }\n }\n\n /** @nocollapse */\n static ɵprov = /** @pureOrBreakMyCode */ ɵɵdefineInjectable({\n token: Injector,\n providedIn: 'any',\n factory: () => ɵɵinject(INJECTOR),\n });\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__ = InjectorMarkers.Injector;\n}\n\n\n\nconst IDENT = function<T>(value: T): T {\n return value;\n};\nconst EMPTY = <any[]>[];\nconst CIRCULAR = IDENT;\nconst MULTI_PROVIDER_FN = function(): any[] {\n return Array.prototype.slice.call(arguments);\n};\n\nconst enum OptionFlags {\n Optional = 1 << 0,\n CheckSelf = 1 << 1,\n CheckParent = 1 << 2,\n Default = CheckSelf | CheckParent\n}\nconst NO_NEW_LINE = 'ɵ';\n\nexport class StaticInjector implements Injector {\n readonly parent: Injector;\n readonly source: string|null;\n readonly scope: string|null;\n\n private _records: Map<any, Record|null>;\n\n constructor(\n providers: StaticProvider[], parent: Injector = Injector.NULL, source: string|null = null) {\n this.parent = parent;\n this.source = source;\n const records = this._records = new Map<any, Record>();\n records.set(\n Injector, <Record>{token: Injector, fn: IDENT, deps: EMPTY, value: this, useNew: false});\n records.set(\n INJECTOR, <Record>{token: INJECTOR, fn: IDENT, deps: EMPTY, value: this, useNew: false});\n this.scope = recursivelyProcessProviders(records, providers);\n }\n\n get<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): T;\n get(token: any, notFoundValue?: any): any;\n get(token: any, notFoundValue?: any, flags: InjectFlags = InjectFlags.Default): any {\n const records = this._records;\n let record = records.get(token);\n if (record === undefined) {\n // This means we have never seen this record, see if it is tree shakable provider.\n const injectableDef = getInjectableDef(token);\n if (injectableDef) {\n const providedIn = injectableDef && resolveForwardRef(injectableDef.providedIn);\n if (providedIn === 'any' || providedIn != null && providedIn === this.scope) {\n records.set(\n token,\n record = resolveProvider(\n {provide: token, useFactory: injectableDef.factory, deps: EMPTY}));\n }\n }\n if (record === undefined) {\n // Set record to null to make sure that we don't go through expensive lookup above again.\n records.set(token, null);\n }\n }\n let lastInjector = setCurrentInjector(this);\n try {\n return tryResolveToken(token, record, records, this.parent, notFoundValue, flags);\n } catch (e) {\n return catchInjectorError(e, token, 'StaticInjectorError', this.source);\n } finally {\n setCurrentInjector(lastInjector);\n }\n }\n\n toString() {\n const tokens = <string[]>[], records = this._records;\n records.forEach((v, token) => tokens.push(stringify(token)));\n return `StaticInjector[${tokens.join(', ')}]`;\n }\n}\n\ntype SupportedProvider =\n ValueProvider|ExistingProvider|StaticClassProvider|ConstructorProvider|FactoryProvider;\n\ninterface Record {\n fn: Function;\n useNew: boolean;\n deps: DependencyRecord[];\n value: any;\n}\n\ninterface DependencyRecord {\n token: any;\n options: number;\n}\n\nfunction resolveProvider(provider: SupportedProvider): Record {\n const deps = computeDeps(provider);\n let fn: Function = IDENT;\n let value: any = EMPTY;\n let useNew: boolean = false;\n let provide = resolveForwardRef(provider.provide);\n if (USE_VALUE in provider) {\n // We need to use USE_VALUE in provider since provider.useValue could be defined as undefined.\n value = (provider as ValueProvider).useValue;\n } else if ((provider as FactoryProvider).useFactory) {\n fn = (provider as FactoryProvider).useFactory;\n } else if ((provider as ExistingProvider).useExisting) {\n // Just use IDENT\n } else if ((provider as StaticClassProvider).useClass) {\n useNew = true;\n fn = resolveForwardRef((provider as StaticClassProvider).useClass);\n } else if (typeof provide == 'function') {\n useNew = true;\n fn = provide;\n } else {\n throw staticError(\n 'StaticProvider does not have [useValue|useFactory|useExisting|useClass] or [provide] is not newable',\n provider);\n }\n return {deps, fn, useNew, value};\n}\n\nfunction multiProviderMixError(token: any) {\n return staticError('Cannot mix multi providers and regular providers', token);\n}\n\nfunction recursivelyProcessProviders(records: Map<any, Record>, provider: StaticProvider): string|\n null {\n let scope: string|null = null;\n if (provider) {\n provider = resolveForwardRef(provider);\n if (Array.isArray(provider)) {\n // if we have an array recurse into the array\n for (let i = 0; i < provider.length; i++) {\n scope = recursivelyProcessProviders(records, provider[i]) || scope;\n }\n } else if (typeof provider === 'function') {\n // Functions were supported in ReflectiveInjector, but are not here. For safety give useful\n // error messages\n throw staticError('Function/Class not supported', provider);\n } else if (provider && typeof provider === 'object' && provider.provide) {\n // At this point we have what looks like a provider: {provide: ?, ....}\n let token = resolveForwardRef(provider.provide);\n const resolvedProvider = resolveProvider(provider);\n if (provider.multi === true) {\n // This is a multi provider.\n let multiProvider: Record|undefined = records.get(token);\n if (multiProvider) {\n if (multiProvider.fn !== MULTI_PROVIDER_FN) {\n throw multiProviderMixError(token);\n }\n } else {\n // Create a placeholder factory which will look up the constituents of the multi provider.\n records.set(token, multiProvider = <Record>{\n token: provider.provide,\n deps: [],\n useNew: false,\n fn: MULTI_PROVIDER_FN,\n value: EMPTY\n });\n }\n // Treat the provider as the token.\n token = provider;\n multiProvider.deps.push({token, options: OptionFlags.Default});\n }\n const record = records.get(token);\n if (record && record.fn == MULTI_PROVIDER_FN) {\n throw multiProviderMixError(token);\n }\n if (token === INJECTOR_SCOPE) {\n scope = resolvedProvider.value;\n }\n records.set(token, resolvedProvider);\n } else {\n throw staticError('Unexpected provider', provider);\n }\n }\n return scope;\n}\n\nfunction tryResolveToken(\n token: any, record: Record|undefined|null, records: Map<any, Record|null>, parent: Injector,\n notFoundValue: any, flags: InjectFlags): any {\n try {\n return resolveToken(token, record, records, parent, notFoundValue, flags);\n } catch (e) {\n // ensure that 'e' is of type Error.\n if (!(e instanceof Error)) {\n e = new Error(e);\n }\n const path: any[] = e[NG_TEMP_TOKEN_PATH] = e[NG_TEMP_TOKEN_PATH] || [];\n path.unshift(token);\n if (record && record.value == CIRCULAR) {\n // Reset the Circular flag.\n record.value = EMPTY;\n }\n throw e;\n }\n}\n\nfunction resolveToken(\n token: any, record: Record|undefined|null, records: Map<any, Record|null>, parent: Injector,\n notFoundValue: any, flags: InjectFlags): any {\n let value;\n if (record && !(flags & InjectFlags.SkipSelf)) {\n // If we don't have a record, this implies that we don't own the provider hence don't know how\n // to resolve it.\n value = record.value;\n if (value == CIRCULAR) {\n throw Error(NO_NEW_LINE + 'Circular dependency');\n } else if (value === EMPTY) {\n record.value = CIRCULAR;\n let obj = undefined;\n let useNew = record.useNew;\n let fn = record.fn;\n let depRecords = record.deps;\n let deps = EMPTY;\n if (depRecords.length) {\n deps = [];\n for (let i = 0; i < depRecords.length; i++) {\n const depRecord: DependencyRecord = depRecords[i];\n const options = depRecord.options;\n const childRecord =\n options & OptionFlags.CheckSelf ? records.get(depRecord.token) : undefined;\n deps.push(tryResolveToken(\n // Current Token to resolve\n depRecord.token,\n // A record which describes how to resolve the token.\n // If undefined, this means we don't have such a record\n childRecord,\n // Other records we know about.\n records,\n // If we don't know how to resolve dependency and we should not check parent for it,\n // than pass in Null injector.\n !childRecord && !(options & OptionFlags.CheckParent) ? Injector.NULL : parent,\n options & OptionFlags.Optional ? null : Injector.THROW_IF_NOT_FOUND,\n InjectFlags.Default));\n }\n }\n record.value = value = useNew ? new (fn as any)(...deps) : fn.apply(obj, deps);\n }\n } else if (!(flags & InjectFlags.Self)) {\n value = parent.get(token, notFoundValue, InjectFlags.Default);\n } else if (!(flags & InjectFlags.Optional)) {\n value = Injector.NULL.get(token, notFoundValue);\n } else {\n value = Injector.NULL.get(token, typeof notFoundValue !== 'undefined' ? notFoundValue : null);\n }\n return value;\n}\n\nfunction computeDeps(provider: StaticProvider): DependencyRecord[] {\n let deps: DependencyRecord[] = EMPTY;\n const providerDeps: any[] =\n (provider as ExistingProvider & StaticClassProvider & ConstructorProvider).deps;\n if (providerDeps && providerDeps.length) {\n deps = [];\n for (let i = 0; i < providerDeps.length; i++) {\n let options = OptionFlags.Default;\n let token = resolveForwardRef(providerDeps[i]);\n if (Array.isArray(token)) {\n for (let j = 0, annotations = token; j < annotations.length; j++) {\n const annotation = annotations[j];\n if (annotation instanceof Optional || annotation == Optional) {\n options = options | OptionFlags.Optional;\n } else if (annotation instanceof SkipSelf || annotation == SkipSelf) {\n options = options & ~OptionFlags.CheckSelf;\n } else if (annotation instanceof Self || annotation == Self) {\n options = options & ~OptionFlags.CheckParent;\n } else if (annotation instanceof Inject) {\n token = (annotation as Inject).token;\n } else {\n token = resolveForwardRef(annotation);\n }\n }\n }\n deps.push({token, options});\n }\n } else if ((provider as ExistingProvider).useExisting) {\n const token = resolveForwardRef((provider as ExistingProvider).useExisting);\n deps = [{token, options: OptionFlags.Default}];\n } else if (!providerDeps && !(USE_VALUE in provider)) {\n // useValue & useExisting are the only ones which are exempt from deps all others need it.\n throw staticError('\\'deps\\' required', provider);\n }\n return deps;\n}\n\nfunction staticError(text: string, obj: any): Error {\n return new Error(formatError(text, obj, 'StaticInjectorError'));\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 {ChangeDetectionStrategy} from '../../change_detection/constants';\nimport {Injector} from '../../di/injector';\nimport {ViewEncapsulation} from '../../metadata/view';\nimport {assertEqual} from '../../util/assert';\nimport {assertLView} from '../assert';\nimport {discoverLocalRefs, getComponentAtNodeIndex, getDirectivesAtNodeIndex, getLContext} from '../context_discovery';\nimport {getComponentDef, getDirectiveDef} from '../definition';\nimport {NodeInjector} from '../di';\nimport {buildDebugNode} from '../instructions/lview_debug';\nimport {LContext} from '../interfaces/context';\nimport {DirectiveDef} from '../interfaces/definition';\nimport {TElementNode, TNode, TNodeProviderIndexes} from '../interfaces/node';\nimport {isLView} from '../interfaces/type_checks';\nimport {CLEANUP, CONTEXT, DebugNode, FLAGS, LView, LViewFlags, T_HOST, TVIEW, TViewType} from '../interfaces/view';\nimport {stringifyForError} from './stringify_utils';\nimport {getLViewParent, getRootContext} from './view_traversal_utils';\nimport {getTNode, unwrapRNode} from './view_utils';\n\n\n\n/**\n * Retrieves the component instance associated with a given DOM element.\n *\n * @usageNotes\n * Given the following DOM structure:\n *\n * ```html\n * <app-root>\n * <div>\n * <child-comp></child-comp>\n * </div>\n * </app-root>\n * ```\n *\n * Calling `getComponent` on `<child-comp>` will return the instance of `ChildComponent`\n * associated with this DOM element.\n *\n * Calling the function on `<app-root>` will return the `MyApp` instance.\n *\n *\n * @param element DOM element from which the component should be retrieved.\n * @returns Component instance associated with the element or `null` if there\n * is no component associated with it.\n *\n * @publicApi\n * @globalApi ng\n */\nexport function getComponent<T>(element: Element): T|null {\n assertDomElement(element);\n const context = getLContext(element);\n if (context === null) return null;\n\n if (context.component === undefined) {\n context.component = getComponentAtNodeIndex(context.nodeIndex, context.lView);\n }\n\n return context.component as T;\n}\n\n\n/**\n * If inside an embedded view (e.g. `*ngIf` or `*ngFor`), retrieves the context of the embedded\n * view that the element is part of. Otherwise retrieves the instance of the component whose view\n * owns the element (in this case, the result is the same as calling `getOwningComponent`).\n *\n * @param element Element for which to get the surrounding component instance.\n * @returns Instance of the component that is around the element or null if the element isn't\n * inside any component.\n *\n * @publicApi\n * @globalApi ng\n */\nexport function getContext<T>(element: Element): T|null {\n assertDomElement(element);\n const context = getLContext(element);\n return context === null ? null : context.lView[CONTEXT] as T;\n}\n\n/**\n * Retrieves the component instance whose view contains the DOM element.\n *\n * For example, if `<child-comp>` is used in the template of `<app-comp>`\n * (i.e. a `ViewChild` of `<app-comp>`), calling `getOwningComponent` on `<child-comp>`\n * would return `<app-comp>`.\n *\n * @param elementOrDir DOM element, component or directive instance\n * for which to retrieve the root components.\n * @returns Component instance whose view owns the DOM element or null if the element is not\n * part of a component view.\n *\n * @publicApi\n * @globalApi ng\n */\nexport function getOwningComponent<T>(elementOrDir: Element|{}): T|null {\n const context = getLContext(elementOrDir);\n if (context === null) return null;\n\n let lView = context.lView;\n let parent: LView|null;\n ngDevMode && assertLView(lView);\n while (lView[TVIEW].type === TViewType.Embedded && (parent = getLViewParent(lView)!)) {\n lView = parent;\n }\n return lView[FLAGS] & LViewFlags.IsRoot ? null : lView[CONTEXT] as T;\n}\n\n/**\n * Retrieves all root components associated with a DOM element, directive or component instance.\n * Root components are those which have been bootstrapped by Angular.\n *\n * @param elementOrDir DOM element, component or directive instance\n * for which to retrieve the root components.\n * @returns Root components associated with the target object.\n *\n * @publicApi\n * @globalApi ng\n */\nexport function getRootComponents(elementOrDir: Element|{}): {}[] {\n return [...getRootContext(elementOrDir).components];\n}\n\n/**\n * Retrieves an `Injector` associated with an element, component or directive instance.\n *\n * @param elementOrDir DOM element, component or directive instance for which to\n * retrieve the injector.\n * @returns Injector associated with the element, component or directive instance.\n *\n * @publicApi\n * @globalApi ng\n */\nexport function getInjector(elementOrDir: Element|{}): Injector {\n const context = getLContext(elementOrDir);\n if (context === null) return Injector.NULL;\n\n const tNode = context.lView[TVIEW].data[context.nodeIndex] as TElementNode;\n return new NodeInjector(tNode, context.lView);\n}\n\n/**\n * Retrieve a set of injection tokens at a given DOM node.\n *\n * @param element Element for which the injection tokens should be retrieved.\n */\nexport function getInjectionTokens(element: Element): any[] {\n const context = getLContext(element);\n if (context === null) return [];\n const lView = context.lView;\n const tView = lView[TVIEW];\n const tNode = tView.data[context.nodeIndex] as TNode;\n const providerTokens: any[] = [];\n const startIndex = tNode.providerIndexes & TNodeProviderIndexes.ProvidersStartIndexMask;\n const endIndex = tNode.directiveEnd;\n for (let i = startIndex; i < endIndex; i++) {\n let value = tView.data[i];\n if (isDirectiveDefHack(value)) {\n // The fact that we sometimes store Type and sometimes DirectiveDef in this location is a\n // design flaw. We should always store same type so that we can be monomorphic. The issue\n // is that for Components/Directives we store the def instead the type. The correct behavior\n // is that we should always be storing injectable type in this location.\n value = value.type;\n }\n providerTokens.push(value);\n }\n return providerTokens;\n}\n\n/**\n * Retrieves directive instances associated with a given DOM node. Does not include\n * component instances.\n *\n * @usageNotes\n * Given the following DOM structure:\n *\n * ```html\n * <app-root>\n * <button my-button></button>\n * <my-comp></my-comp>\n * </app-root>\n * ```\n *\n * Calling `getDirectives` on `<button>` will return an array with an instance of the `MyButton`\n * directive that is associated with the DOM node.\n *\n * Calling `getDirectives` on `<my-comp>` will return an empty array.\n *\n * @param node DOM node for which to get the directives.\n * @returns Array of directives associated with the node.\n *\n * @publicApi\n * @globalApi ng\n */\nexport function getDirectives(node: Node): {}[] {\n // Skip text nodes because we can't have directives associated with them.\n if (node instanceof Text) {\n return [];\n }\n\n const context = getLContext(node);\n if (context === null) {\n return [];\n }\n\n const lView = context.lView;\n const tView = lView[TVIEW];\n const nodeIndex = context.nodeIndex;\n if (!tView?.data[nodeIndex]) {\n return [];\n }\n if (context.directives === undefined) {\n context.directives = getDirectivesAtNodeIndex(nodeIndex, lView, false);\n }\n\n // The `directives` in this case are a named array called `LComponentView`. Clone the\n // result so we don't expose an internal data structure in the user's console.\n return context.directives === null ? [] : [...context.directives];\n}\n\n/**\n * Partial metadata for a given directive instance.\n * This information might be useful for debugging purposes or tooling.\n * Currently only `inputs` and `outputs` metadata is available.\n *\n * @publicApi\n */\nexport interface DirectiveDebugMetadata {\n inputs: Record<string, string>;\n outputs: Record<string, string>;\n}\n\n/**\n * Partial metadata for a given component instance.\n * This information might be useful for debugging purposes or tooling.\n * Currently the following fields are available:\n * - inputs\n * - outputs\n * - encapsulation\n * - changeDetection\n *\n * @publicApi\n */\nexport interface ComponentDebugMetadata extends DirectiveDebugMetadata {\n encapsulation: ViewEncapsulation;\n changeDetection: ChangeDetectionStrategy;\n}\n\n/**\n * Returns the debug (partial) metadata for a particular directive or component instance.\n * The function accepts an instance of a directive or component and returns the corresponding\n * metadata.\n *\n * @param directiveOrComponentInstance Instance of a directive or component\n * @returns metadata of the passed directive or component\n *\n * @publicApi\n * @globalApi ng\n */\nexport function getDirectiveMetadata(directiveOrComponentInstance: any): ComponentDebugMetadata|\n DirectiveDebugMetadata|null {\n const {constructor} = directiveOrComponentInstance;\n if (!constructor) {\n throw new Error('Unable to find the instance constructor');\n }\n // In case a component inherits from a directive, we may have component and directive metadata\n // To ensure we don't get the metadata of the directive, we want to call `getComponentDef` first.\n const componentDef = getComponentDef(constructor);\n if (componentDef) {\n return {\n inputs: componentDef.inputs,\n outputs: componentDef.outputs,\n encapsulation: componentDef.encapsulation,\n changeDetection: componentDef.onPush ? ChangeDetectionStrategy.OnPush :\n ChangeDetectionStrategy.Default\n };\n }\n const directiveDef = getDirectiveDef(constructor);\n if (directiveDef) {\n return {inputs: directiveDef.inputs, outputs: directiveDef.outputs};\n }\n return null;\n}\n\n/**\n * Retrieve map of local references.\n *\n * The references are retrieved as a map of local reference name to element or directive instance.\n *\n * @param target DOM element, component or directive instance for which to retrieve\n * the local references.\n */\nexport function getLocalRefs(target: {}): {[key: string]: any} {\n const context = getLContext(target);\n if (context === null) return {};\n\n if (context.localRefs === undefined) {\n context.localRefs = discoverLocalRefs(context.lView, context.nodeIndex);\n }\n\n return context.localRefs || {};\n}\n\n/**\n * Retrieves the host element of a component or directive instance.\n * The host element is the DOM element that matched the selector of the directive.\n *\n * @param componentOrDirective Component or directive instance for which the host\n * element should be retrieved.\n * @returns Host element of the target.\n *\n * @publicApi\n * @globalApi ng\n */\nexport function getHostElement(componentOrDirective: {}): Element {\n return getLContext(componentOrDirective)!.native as unknown as Element;\n}\n\n/**\n * Retrieves the rendered text for a given component.\n *\n * This function retrieves the host element of a component and\n * and then returns the `textContent` for that element. This implies\n * that the text returned will include re-projected content of\n * the component as well.\n *\n * @param component The component to return the content text for.\n */\nexport function getRenderedText(component: any): string {\n const hostElement = getHostElement(component);\n return hostElement.textContent || '';\n}\n\n/**\n * Event listener configuration returned from `getListeners`.\n * @publicApi\n */\nexport interface Listener {\n /** Name of the event listener. */\n name: string;\n /** Element that the listener is bound to. */\n element: Element;\n /** Callback that is invoked when the event is triggered. */\n callback: (value: any) => any;\n /** Whether the listener is using event capturing. */\n useCapture: boolean;\n /**\n * Type of the listener (e.g. a native DOM event or a custom @Output).\n */\n type: 'dom'|'output';\n}\n\n\n/**\n * Retrieves a list of event listeners associated with a DOM element. The list does include host\n * listeners, but it does not include event listeners defined outside of the Angular context\n * (e.g. through `addEventListener`).\n *\n * @usageNotes\n * Given the following DOM structure:\n *\n * ```html\n * <app-root>\n * <div (click)=\"doSomething()\"></div>\n * </app-root>\n * ```\n *\n * Calling `getListeners` on `<div>` will return an object that looks as follows:\n *\n * ```ts\n * {\n * name: 'click',\n * element: <div>,\n * callback: () => doSomething(),\n * useCapture: false\n * }\n * ```\n *\n * @param element Element for which the DOM listeners should be retrieved.\n * @returns Array of event listeners on the DOM element.\n *\n * @publicApi\n * @globalApi ng\n */\nexport function getListeners(element: Element): Listener[] {\n assertDomElement(element);\n const lContext = getLContext(element);\n if (lContext === null) return [];\n\n const lView = lContext.lView;\n const tView = lView[TVIEW];\n const lCleanup = lView[CLEANUP];\n const tCleanup = tView.cleanup;\n const listeners: Listener[] = [];\n if (tCleanup && lCleanup) {\n for (let i = 0; i < tCleanup.length;) {\n const firstParam = tCleanup[i++];\n const secondParam = tCleanup[i++];\n if (typeof firstParam === 'string') {\n const name: string = firstParam;\n const listenerElement = unwrapRNode(lView[secondParam]) as any as Element;\n const callback: (value: any) => any = lCleanup[tCleanup[i++]];\n const useCaptureOrIndx = tCleanup[i++];\n // if useCaptureOrIndx is boolean then report it as is.\n // if useCaptureOrIndx is positive number then it in unsubscribe method\n // if useCaptureOrIndx is negative number then it is a Subscription\n const type =\n (typeof useCaptureOrIndx === 'boolean' || useCaptureOrIndx >= 0) ? 'dom' : 'output';\n const useCapture = typeof useCaptureOrIndx === 'boolean' ? useCaptureOrIndx : false;\n if (element == listenerElement) {\n listeners.push({element, name, callback, useCapture, type});\n }\n }\n }\n }\n listeners.sort(sortListeners);\n return listeners;\n}\n\nfunction sortListeners(a: Listener, b: Listener) {\n if (a.name == b.name) return 0;\n return a.name < b.name ? -1 : 1;\n}\n\n/**\n * This function should not exist because it is megamorphic and only mostly correct.\n *\n * See call site for more info.\n */\nfunction isDirectiveDefHack(obj: any): obj is DirectiveDef<any> {\n return obj.type !== undefined && obj.template !== undefined && obj.declaredInputs !== undefined;\n}\n\n/**\n * Returns the attached `DebugNode` instance for an element in the DOM.\n *\n * @param element DOM element which is owned by an existing component's view.\n */\nexport function getDebugNode(element: Element): DebugNode|null {\n if (ngDevMode && !(element instanceof Node)) {\n throw new Error('Expecting instance of DOM Element');\n }\n\n const lContext = getLContext(element);\n if (lContext === null) {\n return null;\n }\n\n const lView = lContext.lView;\n const nodeIndex = lContext.nodeIndex;\n if (nodeIndex !== -1) {\n const valueInLView = lView[nodeIndex];\n // this means that value in the lView is a component with its own\n // data. In this situation the TNode is not accessed at the same spot.\n const tNode =\n isLView(valueInLView) ? (valueInLView[T_HOST] as TNode) : getTNode(lView[TVIEW], nodeIndex);\n ngDevMode &&\n assertEqual(tNode.index, nodeIndex, 'Expecting that TNode at index is same as index');\n return buildDebugNode(tNode, lView);\n }\n\n return null;\n}\n\n/**\n * Retrieve the component `LView` from component/element.\n *\n * NOTE: `LView` is a private and should not be leaked outside.\n * Don't export this method to `ng.*` on window.\n *\n * @param target DOM element or component instance for which to retrieve the LView.\n */\nexport function getComponentLView(target: any): LView {\n const lContext = getLContext(target)!;\n const nodeIndx = lContext.nodeIndex;\n const lView = lContext.lView;\n const componentLView = lView[nodeIndx];\n ngDevMode && assertLView(componentLView);\n return componentLView;\n}\n\n/** Asserts that a value is a DOM Element. */\nfunction assertDomElement(value: any) {\n if (typeof Element !== 'undefined' && !(value instanceof Element)) {\n throw new Error('Expecting instance of DOM Element');\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 {detectChanges, markDirty} from '../instructions/change_detection';\nimport {getRootComponents} from './discovery_utils';\n\n/**\n * Marks a component for check (in case of OnPush components) and synchronously\n * performs change detection on the application this component belongs to.\n *\n * @param component Component to {@link ChangeDetectorRef#markForCheck mark for check}.\n *\n * @publicApi\n * @globalApi ng\n */\nexport function applyChanges(component: {}): void {\n markDirty(component);\n getRootComponents(component).forEach(rootComponent => detectChanges(rootComponent));\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 */\nimport {assertDefined} from '../../util/assert';\nimport {global} from '../../util/global';\nimport {setProfiler} from '../profiler';\nimport {applyChanges} from './change_detection_utils';\nimport {getComponent, getContext, getDirectiveMetadata, getDirectives, getHostElement, getInjector, getListeners, getOwningComponent, getRootComponents} from './discovery_utils';\n\n\n\n/**\n * This file introduces series of globally accessible debug tools\n * to allow for the Angular debugging story to function.\n *\n * To see this in action run the following command:\n *\n * bazel run --config=ivy\n * //packages/core/test/bundling/todo:devserver\n *\n * Then load `localhost:5432` and start using the console tools.\n */\n\n/**\n * This value reflects the property on the window where the dev\n * tools are patched (window.ng).\n * */\nexport const GLOBAL_PUBLISH_EXPANDO_KEY = 'ng';\n\nlet _published = false;\n/**\n * Publishes a collection of default debug tools onto`window.ng`.\n *\n * These functions are available globally when Angular is in development\n * mode and are automatically stripped away from prod mode is on.\n */\nexport function publishDefaultGlobalUtils() {\n if (!_published) {\n _published = true;\n\n /**\n * Warning: this function is *INTERNAL* and should not be relied upon in application's code.\n * The contract of the function might be changed in any release and/or the function can be\n * removed completely.\n */\n publishGlobalUtil('ɵsetProfiler', setProfiler);\n publishGlobalUtil('getDirectiveMetadata', getDirectiveMetadata);\n publishGlobalUtil('getComponent', getComponent);\n publishGlobalUtil('getContext', getContext);\n publishGlobalUtil('getListeners', getListeners);\n publishGlobalUtil('getOwningComponent', getOwningComponent);\n publishGlobalUtil('getHostElement', getHostElement);\n publishGlobalUtil('getInjector', getInjector);\n publishGlobalUtil('getRootComponents', getRootComponents);\n publishGlobalUtil('getDirectives', getDirectives);\n publishGlobalUtil('applyChanges', applyChanges);\n }\n}\n\nexport declare type GlobalDevModeContainer = {\n [GLOBAL_PUBLISH_EXPANDO_KEY]: {[fnName: string]: Function};\n};\n\n/**\n * Publishes the given function to `window.ng` so that it can be\n * used from the browser console when an application is not in production.\n */\nexport function publishGlobalUtil(name: string, fn: Function): void {\n if (typeof COMPILED === 'undefined' || !COMPILED) {\n // Note: we can't export `ng` when using closure enhanced optimization as:\n // - closure declares globals itself for minified names, which sometimes clobber our `ng` global\n // - we can't declare a closure extern as the namespace `ng` is already used within Google\n // for typings for AngularJS (via `goog.provide('ng....')`).\n const w = global as any as GlobalDevModeContainer;\n ngDevMode && assertDefined(fn, 'function not defined');\n if (w) {\n let container = w[GLOBAL_PUBLISH_EXPANDO_KEY];\n if (!container) {\n container = w[GLOBAL_PUBLISH_EXPANDO_KEY] = {};\n }\n container[name] = fn;\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\n// We are temporarily importing the existing viewEngine from core so we can be sure we are\n// correctly implementing its interfaces for backwards compatibility.\nimport {Injector} from '../di/injector';\nimport {Type} from '../interface/type';\nimport {Sanitizer} from '../sanitization/sanitizer';\nimport {assertDefined, assertIndexInRange} from '../util/assert';\n\nimport {assertComponentType} from './assert';\nimport {readPatchedLView} from './context_discovery';\nimport {getComponentDef} from './definition';\nimport {diPublicInInjector, getOrCreateNodeInjectorForNode} from './di';\nimport {throwProviderNotFoundError} from './errors_di';\nimport {registerPostOrderHooks} from './hooks';\nimport {addToViewTree, CLEAN_PROMISE, createLView, createTView, getOrCreateTComponentView, getOrCreateTNode, initTNodeFlags, instantiateRootComponent, invokeHostBindingsInCreationMode, locateHostElement, markAsComponentHost, refreshView, registerHostBindingOpCodes, renderView} from './instructions/shared';\nimport {ComponentDef, ComponentType, RenderFlags} from './interfaces/definition';\nimport {TElementNode, TNodeType} from './interfaces/node';\nimport {PlayerHandler} from './interfaces/player';\nimport {domRendererFactory3, Renderer3, RendererFactory3} from './interfaces/renderer';\nimport {RElement} from './interfaces/renderer_dom';\nimport {CONTEXT, HEADER_OFFSET, LView, LViewFlags, RootContext, RootContextFlags, TVIEW, TViewType} from './interfaces/view';\nimport {writeDirectClass, writeDirectStyle} from './node_manipulation';\nimport {enterView, getCurrentTNode, leaveView, setSelectedIndex} from './state';\nimport {computeStaticStyling} from './styling/static_styling';\nimport {setUpAttributes} from './util/attrs_utils';\nimport {publishDefaultGlobalUtils} from './util/global_utils';\nimport {defaultScheduler} from './util/misc_utils';\nimport {getRootContext} from './util/view_traversal_utils';\n\n\n\n/** Options that control how the component should be bootstrapped. */\nexport interface CreateComponentOptions {\n /** Which renderer factory to use. */\n rendererFactory?: RendererFactory3;\n\n /** A custom sanitizer instance */\n sanitizer?: Sanitizer;\n\n /** A custom animation player handler */\n playerHandler?: PlayerHandler;\n\n /**\n * Host element on which the component will be bootstrapped. If not specified,\n * the component definition's `tag` is used to query the existing DOM for the\n * element to bootstrap.\n */\n host?: RElement|string;\n\n /** Module injector for the component. If unspecified, the injector will be NULL_INJECTOR. */\n injector?: Injector;\n\n /**\n * List of features to be applied to the created component. Features are simply\n * functions that decorate a component with a certain behavior.\n *\n * Typically, the features in this list are features that cannot be added to the\n * other features list in the component definition because they rely on other factors.\n *\n * Example: `LifecycleHooksFeature` is a function that adds lifecycle hook capabilities\n * to root components in a tree-shakable way. It cannot be added to the component\n * features list because there's no way of knowing when the component will be used as\n * a root component.\n */\n hostFeatures?: HostFeature[];\n\n /**\n * A function which is used to schedule change detection work in the future.\n *\n * When marking components as dirty, it is necessary to schedule the work of\n * change detection in the future. This is done to coalesce multiple\n * {@link markDirty} calls into a single changed detection processing.\n *\n * The default value of the scheduler is the `requestAnimationFrame` function.\n *\n * It is also useful to override this function for testing purposes.\n */\n scheduler?: (work: () => void) => void;\n}\n\n/** See CreateComponentOptions.hostFeatures */\ntype HostFeature = (<T>(component: T, componentDef: ComponentDef<T>) => void);\n\n// TODO: A hack to not pull in the NullInjector from @angular/core.\nexport const NULL_INJECTOR: Injector = {\n get: (token: any, notFoundValue?: any) => {\n throwProviderNotFoundError(token, 'NullInjector');\n }\n};\n\n/**\n * Bootstraps a Component into an existing host element and returns an instance\n * of the component.\n *\n * Use this function to bootstrap a component into the DOM tree. Each invocation\n * of this function will create a separate tree of components, injectors and\n * change detection cycles and lifetimes. To dynamically insert a new component\n * into an existing tree such that it shares the same injection, change detection\n * and object lifetime, use {@link ViewContainer#createComponent}.\n *\n * @param componentType Component to bootstrap\n * @param options Optional parameters which control bootstrapping\n */\nexport function renderComponent<T>(\n componentType: ComponentType<T>|\n Type<T>/* Type as workaround for: Microsoft/TypeScript/issues/4881 */\n ,\n opts: CreateComponentOptions = {}): T {\n ngDevMode && publishDefaultGlobalUtils();\n ngDevMode && assertComponentType(componentType);\n\n const rendererFactory = opts.rendererFactory || domRendererFactory3;\n const sanitizer = opts.sanitizer || null;\n const componentDef = getComponentDef<T>(componentType)!;\n if (componentDef.type != componentType) (componentDef as {type: Type<any>}).type = componentType;\n\n // The first index of the first selector is the tag name.\n const componentTag = componentDef.selectors![0]![0] as string;\n const hostRenderer = rendererFactory.createRenderer(null, null);\n const hostRNode =\n locateHostElement(hostRenderer, opts.host || componentTag, componentDef.encapsulation);\n const rootFlags = componentDef.onPush ? LViewFlags.Dirty | LViewFlags.IsRoot :\n LViewFlags.CheckAlways | LViewFlags.IsRoot;\n const rootContext = createRootContext(opts.scheduler, opts.playerHandler);\n\n const renderer = rendererFactory.createRenderer(hostRNode, componentDef);\n const rootTView = createTView(TViewType.Root, null, null, 1, 0, null, null, null, null, null);\n const rootView: LView = createLView(\n null, rootTView, rootContext, rootFlags, null, null, rendererFactory, renderer, null,\n opts.injector || null);\n\n enterView(rootView);\n let component: T;\n\n try {\n if (rendererFactory.begin) rendererFactory.begin();\n const componentView = createRootComponentView(\n hostRNode, componentDef, rootView, rendererFactory, renderer, sanitizer);\n component = createRootComponent(\n componentView, componentDef, rootView, rootContext, opts.hostFeatures || null);\n\n // create mode pass\n renderView(rootTView, rootView, null);\n // update mode pass\n refreshView(rootTView, rootView, null, null);\n\n } finally {\n leaveView();\n if (rendererFactory.end) rendererFactory.end();\n }\n\n return component;\n}\n\n/**\n * Creates the root component view and the root component node.\n *\n * @param rNode Render host element.\n * @param def ComponentDef\n * @param rootView The parent view where the host node is stored\n * @param rendererFactory Factory to be used for creating child renderers.\n * @param hostRenderer The current renderer\n * @param sanitizer The sanitizer, if provided\n *\n * @returns Component view created\n */\nexport function createRootComponentView(\n rNode: RElement|null, def: ComponentDef<any>, rootView: LView,\n rendererFactory: RendererFactory3, hostRenderer: Renderer3, sanitizer?: Sanitizer|null): LView {\n const tView = rootView[TVIEW];\n const index = HEADER_OFFSET;\n ngDevMode && assertIndexInRange(rootView, index);\n rootView[index] = rNode;\n // '#host' is added here as we don't know the real host DOM name (we don't want to read it) and at\n // the same time we want to communicate the debug `TNode` that this is a special `TNode`\n // representing a host element.\n const tNode: TElementNode = getOrCreateTNode(tView, index, TNodeType.Element, '#host', null);\n const mergedAttrs = tNode.mergedAttrs = def.hostAttrs;\n if (mergedAttrs !== null) {\n computeStaticStyling(tNode, mergedAttrs, true);\n if (rNode !== null) {\n setUpAttributes(hostRenderer, rNode, mergedAttrs);\n if (tNode.classes !== null) {\n writeDirectClass(hostRenderer, rNode, tNode.classes);\n }\n if (tNode.styles !== null) {\n writeDirectStyle(hostRenderer, rNode, tNode.styles);\n }\n }\n }\n\n const viewRenderer = rendererFactory.createRenderer(rNode, def);\n const componentView = createLView(\n rootView, getOrCreateTComponentView(def), null,\n def.onPush ? LViewFlags.Dirty : LViewFlags.CheckAlways, rootView[index], tNode,\n rendererFactory, viewRenderer, sanitizer || null, null);\n\n if (tView.firstCreatePass) {\n diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, rootView), tView, def.type);\n markAsComponentHost(tView, tNode);\n initTNodeFlags(tNode, rootView.length, 1);\n }\n\n addToViewTree(rootView, componentView);\n\n // Store component view at node index, with node as the HOST\n return rootView[index] = componentView;\n}\n\n/**\n * Creates a root component and sets it up with features and host bindings. Shared by\n * renderComponent() and ViewContainerRef.createComponent().\n */\nexport function createRootComponent<T>(\n componentView: LView, componentDef: ComponentDef<T>, rootLView: LView, rootContext: RootContext,\n hostFeatures: HostFeature[]|null): any {\n const tView = rootLView[TVIEW];\n // Create directive instance with factory() and store at next index in viewData\n const component = instantiateRootComponent(tView, rootLView, componentDef);\n\n rootContext.components.push(component);\n componentView[CONTEXT] = component;\n\n hostFeatures && hostFeatures.forEach((feature) => feature(component, componentDef));\n\n // We want to generate an empty QueryList for root content queries for backwards\n // compatibility with ViewEngine.\n if (componentDef.contentQueries) {\n const tNode = getCurrentTNode()!;\n ngDevMode && assertDefined(tNode, 'TNode expected');\n componentDef.contentQueries(RenderFlags.Create, component, tNode.directiveStart);\n }\n\n const rootTNode = getCurrentTNode()!;\n ngDevMode && assertDefined(rootTNode, 'tNode should have been already created');\n if (tView.firstCreatePass &&\n (componentDef.hostBindings !== null || componentDef.hostAttrs !== null)) {\n setSelectedIndex(rootTNode.index);\n\n const rootTView = rootLView[TVIEW];\n registerHostBindingOpCodes(\n rootTView, rootTNode, rootLView, rootTNode.directiveStart, rootTNode.directiveEnd,\n componentDef);\n\n invokeHostBindingsInCreationMode(componentDef, component);\n }\n return component;\n}\n\n\nexport function createRootContext(\n scheduler?: (workFn: () => void) => void, playerHandler?: PlayerHandler|null): RootContext {\n return {\n components: [],\n scheduler: scheduler || defaultScheduler,\n clean: CLEAN_PROMISE,\n playerHandler: playerHandler || null,\n flags: RootContextFlags.Empty\n };\n}\n\n/**\n * Used to enable lifecycle hooks on the root component.\n *\n * Include this feature when calling `renderComponent` if the root component\n * you are rendering has lifecycle hooks defined. Otherwise, the hooks won't\n * be called properly.\n *\n * Example:\n *\n * ```\n * renderComponent(AppComponent, {hostFeatures: [LifecycleHooksFeature]});\n * ```\n */\nexport function LifecycleHooksFeature(component: any, def: ComponentDef<any>): void {\n const lView = readPatchedLView(component)!;\n ngDevMode && assertDefined(lView, 'LView is required');\n const tView = lView[TVIEW];\n const tNode = getCurrentTNode()!;\n ngDevMode && assertDefined(tNode, 'TNode is required');\n registerPostOrderHooks(tView, tNode);\n}\n\n/**\n * Wait on component until it is rendered.\n *\n * This function returns a `Promise` which is resolved when the component's\n * change detection is executed. This is determined by finding the scheduler\n * associated with the `component`'s render tree and waiting until the scheduler\n * flushes. If nothing is scheduled, the function returns a resolved promise.\n *\n * Example:\n * ```\n * await whenRendered(myComponent);\n * ```\n *\n * @param component Component to wait upon\n * @returns Promise which resolves when the component is rendered.\n */\nexport function whenRendered(component: any): Promise<null> {\n return getRootContext(component).clean;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type, Writable} from '../../interface/type';\nimport {EMPTY_ARRAY, EMPTY_OBJ} from '../../util/empty';\nimport {fillProperties} from '../../util/property';\nimport {ComponentDef, ContentQueriesFunction, DirectiveDef, DirectiveDefFeature, HostBindingsFunction, RenderFlags, ViewQueriesFunction} from '../interfaces/definition';\nimport {TAttributes} from '../interfaces/node';\nimport {isComponentDef} from '../interfaces/type_checks';\nimport {mergeHostAttrs} from '../util/attrs_utils';\n\nexport function getSuperType(type: Type<any>): Type<any>&\n {ɵcmp?: ComponentDef<any>, ɵdir?: DirectiveDef<any>} {\n return Object.getPrototypeOf(type.prototype).constructor;\n}\n\ntype WritableDef = Writable<DirectiveDef<any>|ComponentDef<any>>;\n\n/**\n * Merges the definition from a super class to a sub class.\n * @param definition The definition that is a SubClass of another directive of component\n *\n * @codeGenApi\n */\nexport function ɵɵInheritDefinitionFeature(definition: DirectiveDef<any>|ComponentDef<any>): void {\n let superType = getSuperType(definition.type);\n let shouldInheritFields = true;\n const inheritanceChain: WritableDef[] = [definition];\n\n while (superType) {\n let superDef: DirectiveDef<any>|ComponentDef<any>|undefined = undefined;\n if (isComponentDef(definition)) {\n // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n superDef = superType.ɵcmp || superType.ɵdir;\n } else {\n if (superType.ɵcmp) {\n throw new Error('Directives cannot inherit Components');\n }\n // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n superDef = superType.ɵdir;\n }\n\n if (superDef) {\n if (shouldInheritFields) {\n inheritanceChain.push(superDef);\n // Some fields in the definition may be empty, if there were no values to put in them that\n // would've justified object creation. Unwrap them if necessary.\n const writeableDef = definition as WritableDef;\n writeableDef.inputs = maybeUnwrapEmpty(definition.inputs);\n writeableDef.declaredInputs = maybeUnwrapEmpty(definition.declaredInputs);\n writeableDef.outputs = maybeUnwrapEmpty(definition.outputs);\n\n // Merge hostBindings\n const superHostBindings = superDef.hostBindings;\n superHostBindings && inheritHostBindings(definition, superHostBindings);\n\n // Merge queries\n const superViewQuery = superDef.viewQuery;\n const superContentQueries = superDef.contentQueries;\n superViewQuery && inheritViewQuery(definition, superViewQuery);\n superContentQueries && inheritContentQueries(definition, superContentQueries);\n\n // Merge inputs and outputs\n fillProperties(definition.inputs, superDef.inputs);\n fillProperties(definition.declaredInputs, superDef.declaredInputs);\n fillProperties(definition.outputs, superDef.outputs);\n\n // Merge animations metadata.\n // If `superDef` is a Component, the `data` field is present (defaults to an empty object).\n if (isComponentDef(superDef) && superDef.data.animation) {\n // If super def is a Component, the `definition` is also a Component, since Directives can\n // not inherit Components (we throw an error above and cannot reach this code).\n const defData = (definition as ComponentDef<any>).data;\n defData.animation = (defData.animation || []).concat(superDef.data.animation);\n }\n }\n\n // Run parent features\n const features = superDef.features;\n if (features) {\n for (let i = 0; i < features.length; i++) {\n const feature = features[i];\n if (feature && feature.ngInherit) {\n (feature as DirectiveDefFeature)(definition);\n }\n // If `InheritDefinitionFeature` is a part of the current `superDef`, it means that this\n // def already has all the necessary information inherited from its super class(es), so we\n // can stop merging fields from super classes. However we need to iterate through the\n // prototype chain to look for classes that might contain other \"features\" (like\n // NgOnChanges), which we should invoke for the original `definition`. We set the\n // `shouldInheritFields` flag to indicate that, essentially skipping fields inheritance\n // logic and only invoking functions from the \"features\" list.\n if (feature === ɵɵInheritDefinitionFeature) {\n shouldInheritFields = false;\n }\n }\n }\n }\n\n superType = Object.getPrototypeOf(superType);\n }\n mergeHostAttrsAcrossInheritance(inheritanceChain);\n}\n\n/**\n * Merge the `hostAttrs` and `hostVars` from the inherited parent to the base class.\n *\n * @param inheritanceChain A list of `WritableDefs` starting at the top most type and listing\n * sub-types in order. For each type take the `hostAttrs` and `hostVars` and merge it with the child\n * type.\n */\nfunction mergeHostAttrsAcrossInheritance(inheritanceChain: WritableDef[]) {\n let hostVars: number = 0;\n let hostAttrs: TAttributes|null = null;\n // We process the inheritance order from the base to the leaves here.\n for (let i = inheritanceChain.length - 1; i >= 0; i--) {\n const def = inheritanceChain[i];\n // For each `hostVars`, we need to add the superclass amount.\n def.hostVars = (hostVars += def.hostVars);\n // for each `hostAttrs` we need to merge it with superclass.\n def.hostAttrs =\n mergeHostAttrs(def.hostAttrs, hostAttrs = mergeHostAttrs(hostAttrs, def.hostAttrs));\n }\n}\n\nfunction maybeUnwrapEmpty<T>(value: T[]): T[];\nfunction maybeUnwrapEmpty<T>(value: T): T;\nfunction maybeUnwrapEmpty(value: any): any {\n if (value === EMPTY_OBJ) {\n return {};\n } else if (value === EMPTY_ARRAY) {\n return [];\n } else {\n return value;\n }\n}\n\nfunction inheritViewQuery(definition: WritableDef, superViewQuery: ViewQueriesFunction<any>) {\n const prevViewQuery = definition.viewQuery;\n if (prevViewQuery) {\n definition.viewQuery = (rf, ctx) => {\n superViewQuery(rf, ctx);\n prevViewQuery(rf, ctx);\n };\n } else {\n definition.viewQuery = superViewQuery;\n }\n}\n\nfunction inheritContentQueries(\n definition: WritableDef, superContentQueries: ContentQueriesFunction<any>) {\n const prevContentQueries = definition.contentQueries;\n if (prevContentQueries) {\n definition.contentQueries = (rf, ctx, directiveIndex) => {\n superContentQueries(rf, ctx, directiveIndex);\n prevContentQueries(rf, ctx, directiveIndex);\n };\n } else {\n definition.contentQueries = superContentQueries;\n }\n}\n\nfunction inheritHostBindings(\n definition: WritableDef, superHostBindings: HostBindingsFunction<any>) {\n const prevHostBindings = definition.hostBindings;\n if (prevHostBindings) {\n definition.hostBindings = (rf: RenderFlags, ctx: any) => {\n superHostBindings(rf, ctx);\n prevHostBindings(rf, ctx);\n };\n } else {\n definition.hostBindings = superHostBindings;\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 {ComponentDef, DirectiveDef} from '../interfaces/definition';\nimport {isComponentDef} from '../interfaces/type_checks';\n\nimport {getSuperType} from './inherit_definition_feature';\n\n/**\n * Fields which exist on either directive or component definitions, and need to be copied from\n * parent to child classes by the `ɵɵCopyDefinitionFeature`.\n */\nconst COPY_DIRECTIVE_FIELDS: (keyof DirectiveDef<unknown>)[] = [\n // The child class should use the providers of its parent.\n 'providersResolver',\n\n // Not listed here are any fields which are handled by the `ɵɵInheritDefinitionFeature`, such\n // as inputs, outputs, and host binding functions.\n];\n\n/**\n * Fields which exist only on component definitions, and need to be copied from parent to child\n * classes by the `ɵɵCopyDefinitionFeature`.\n *\n * The type here allows any field of `ComponentDef` which is not also a property of `DirectiveDef`,\n * since those should go in `COPY_DIRECTIVE_FIELDS` above.\n */\nconst COPY_COMPONENT_FIELDS: Exclude<keyof ComponentDef<unknown>, keyof DirectiveDef<unknown>>[] = [\n // The child class should use the template function of its parent, including all template\n // semantics.\n 'template',\n 'decls',\n 'consts',\n 'vars',\n 'onPush',\n 'ngContentSelectors',\n\n // The child class should use the CSS styles of its parent, including all styling semantics.\n 'styles',\n 'encapsulation',\n\n // The child class should be checked by the runtime in the same way as its parent.\n 'schemas',\n];\n\n/**\n * Copies the fields not handled by the `ɵɵInheritDefinitionFeature` from the supertype of a\n * definition.\n *\n * This exists primarily to support ngcc migration of an existing View Engine pattern, where an\n * entire decorator is inherited from a parent to a child class. When ngcc detects this case, it\n * generates a skeleton definition on the child class, and applies this feature.\n *\n * The `ɵɵCopyDefinitionFeature` then copies any needed fields from the parent class' definition,\n * including things like the component template function.\n *\n * @param definition The definition of a child class which inherits from a parent class with its\n * own definition.\n *\n * @codeGenApi\n */\nexport function ɵɵCopyDefinitionFeature(definition: DirectiveDef<any>|ComponentDef<any>): void {\n let superType = getSuperType(definition.type)!;\n\n let superDef: DirectiveDef<any>|ComponentDef<any>|undefined = undefined;\n if (isComponentDef(definition)) {\n // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n superDef = superType.ɵcmp!;\n } else {\n // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n superDef = superType.ɵdir!;\n }\n\n // Needed because `definition` fields are readonly.\n const defAny = (definition as any);\n\n // Copy over any fields that apply to either directives or components.\n for (const field of COPY_DIRECTIVE_FIELDS) {\n defAny[field] = superDef[field];\n }\n\n if (isComponentDef(superDef)) {\n // Copy over any component-specific fields.\n for (const field of COPY_COMPONENT_FIELDS) {\n defAny[field] = superDef[field];\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 {global as _global} from './global';\n\n// When Symbol.iterator doesn't exist, retrieves the key used in es6-shim\ndeclare const Symbol: any;\nlet _symbolIterator: any = null;\nexport function getSymbolIterator(): string|symbol {\n if (!_symbolIterator) {\n const Symbol = _global['Symbol'];\n if (Symbol && Symbol.iterator) {\n _symbolIterator = Symbol.iterator;\n } else {\n // es6-shim specific logic\n const keys = Object.getOwnPropertyNames(Map.prototype);\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i];\n if (key !== 'entries' && key !== 'size' &&\n (Map as any).prototype[key] === Map.prototype['entries']) {\n _symbolIterator = key;\n }\n }\n }\n }\n return _symbolIterator;\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 {getSymbolIterator} from '../util/symbol';\n\nexport function devModeEqual(a: any, b: any): boolean {\n const isListLikeIterableA = isListLikeIterable(a);\n const isListLikeIterableB = isListLikeIterable(b);\n if (isListLikeIterableA && isListLikeIterableB) {\n return areIterablesEqual(a, b, devModeEqual);\n } else {\n const isAObject = a && (typeof a === 'object' || typeof a === 'function');\n const isBObject = b && (typeof b === 'object' || typeof b === 'function');\n if (!isListLikeIterableA && isAObject && !isListLikeIterableB && isBObject) {\n return true;\n } else {\n return Object.is(a, b);\n }\n }\n}\n\n/**\n * Indicates that the result of a {@link Pipe} transformation has changed even though the\n * reference has not changed.\n *\n * Wrapped values are unwrapped automatically during the change detection, and the unwrapped value\n * is stored.\n *\n * Example:\n *\n * ```\n * if (this._latestValue === this._latestReturnedValue) {\n * return this._latestReturnedValue;\n * } else {\n * this._latestReturnedValue = this._latestValue;\n * return WrappedValue.wrap(this._latestValue); // this will force update\n * }\n * ```\n *\n * @publicApi\n * @deprecated from v10 stop using. (No replacement, deemed unnecessary.)\n */\nexport class WrappedValue {\n /** @deprecated from 5.3, use `unwrap()` instead - will switch to protected */\n wrapped: any;\n\n constructor(value: any) {\n this.wrapped = value;\n }\n\n /** Creates a wrapped value. */\n static wrap(value: any): WrappedValue {\n return new WrappedValue(value);\n }\n\n /**\n * Returns the underlying value of a wrapped value.\n * Returns the given `value` when it is not wrapped.\n **/\n static unwrap(value: any): any {\n return WrappedValue.isWrapped(value) ? value.wrapped : value;\n }\n\n /** Returns true if `value` is a wrapped value. */\n static isWrapped(value: any): value is WrappedValue {\n return value instanceof WrappedValue;\n }\n}\n\nexport function isListLikeIterable(obj: any): boolean {\n if (!isJsObject(obj)) return false;\n return Array.isArray(obj) ||\n (!(obj instanceof Map) && // JS Map are iterables but return entries as [k, v]\n getSymbolIterator() in obj); // JS Iterable have a Symbol.iterator prop\n}\n\nexport function areIterablesEqual(\n a: any, b: any, comparator: (a: any, b: any) => boolean): boolean {\n const iterator1 = a[getSymbolIterator()]();\n const iterator2 = b[getSymbolIterator()]();\n\n while (true) {\n const item1 = iterator1.next();\n const item2 = iterator2.next();\n if (item1.done && item2.done) return true;\n if (item1.done || item2.done) return false;\n if (!comparator(item1.value, item2.value)) return false;\n }\n}\n\nexport function iterateListLike(obj: any, fn: (p: any) => any) {\n if (Array.isArray(obj)) {\n for (let i = 0; i < obj.length; i++) {\n fn(obj[i]);\n }\n } else {\n const iterator = obj[getSymbolIterator()]();\n let item: any;\n while (!((item = iterator.next()).done)) {\n fn(item.value);\n }\n }\n}\n\nexport function isJsObject(o: any): boolean {\n return o !== null && (typeof o === 'function' || typeof o === 'object');\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 {devModeEqual} from '../change_detection/change_detection_util';\nimport {assertIndexInRange, assertLessThan, assertNotSame} from '../util/assert';\n\nimport {getExpressionChangedErrorDetails, throwErrorIfNoChangesMode} from './errors';\nimport {LView} from './interfaces/view';\nimport {isInCheckNoChangesMode} from './state';\nimport {NO_CHANGE} from './tokens';\n\n\n// TODO(misko): consider inlining\n/** Updates binding and returns the value. */\nexport function updateBinding(lView: LView, bindingIndex: number, value: any): any {\n return lView[bindingIndex] = value;\n}\n\n\n/** Gets the current binding value. */\nexport function getBinding(lView: LView, bindingIndex: number): any {\n ngDevMode && assertIndexInRange(lView, bindingIndex);\n ngDevMode &&\n assertNotSame(lView[bindingIndex], NO_CHANGE, 'Stored value should never be NO_CHANGE.');\n return lView[bindingIndex];\n}\n\n/**\n * Updates binding if changed, then returns whether it was updated.\n *\n * This function also checks the `CheckNoChangesMode` and throws if changes are made.\n * Some changes (Objects/iterables) during `CheckNoChangesMode` are exempt to comply with VE\n * behavior.\n *\n * @param lView current `LView`\n * @param bindingIndex The binding in the `LView` to check\n * @param value New value to check against `lView[bindingIndex]`\n * @returns `true` if the bindings has changed. (Throws if binding has changed during\n * `CheckNoChangesMode`)\n */\nexport function bindingUpdated(lView: LView, bindingIndex: number, value: any): boolean {\n ngDevMode && assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');\n ngDevMode &&\n assertLessThan(bindingIndex, lView.length, `Slot should have been initialized to NO_CHANGE`);\n const oldValue = lView[bindingIndex];\n\n if (Object.is(oldValue, value)) {\n return false;\n } else {\n if (ngDevMode && isInCheckNoChangesMode()) {\n // View engine didn't report undefined values as changed on the first checkNoChanges pass\n // (before the change detection was run).\n const oldValueToCompare = oldValue !== NO_CHANGE ? oldValue : undefined;\n if (!devModeEqual(oldValueToCompare, value)) {\n const details =\n getExpressionChangedErrorDetails(lView, bindingIndex, oldValueToCompare, value);\n throwErrorIfNoChangesMode(\n oldValue === NO_CHANGE, details.oldValue, details.newValue, details.propName);\n }\n // There was a change, but the `devModeEqual` decided that the change is exempt from an error.\n // For this reason we exit as if no change. The early exit is needed to prevent the changed\n // value to be written into `LView` (If we would write the new value that we would not see it\n // as change on next CD.)\n return false;\n }\n lView[bindingIndex] = value;\n return true;\n }\n}\n\n/** Updates 2 bindings if changed, then returns whether either was updated. */\nexport function bindingUpdated2(lView: LView, bindingIndex: number, exp1: any, exp2: any): boolean {\n const different = bindingUpdated(lView, bindingIndex, exp1);\n return bindingUpdated(lView, bindingIndex + 1, exp2) || different;\n}\n\n/** Updates 3 bindings if changed, then returns whether any was updated. */\nexport function bindingUpdated3(\n lView: LView, bindingIndex: number, exp1: any, exp2: any, exp3: any): boolean {\n const different = bindingUpdated2(lView, bindingIndex, exp1, exp2);\n return bindingUpdated(lView, bindingIndex + 2, exp3) || different;\n}\n\n/** Updates 4 bindings if changed, then returns whether any was updated. */\nexport function bindingUpdated4(\n lView: LView, bindingIndex: number, exp1: any, exp2: any, exp3: any, exp4: any): boolean {\n const different = bindingUpdated2(lView, bindingIndex, exp1, exp2);\n return bindingUpdated2(lView, bindingIndex + 2, exp3, exp4) || different;\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 */\nimport {bindingUpdated} from '../bindings';\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {getLView, getSelectedTNode, getTView, nextBindingIndex} from '../state';\nimport {elementAttributeInternal, storePropertyBindingMetadata} from './shared';\n\n\n\n/**\n * Updates the value of or removes a bound attribute on an Element.\n *\n * Used in the case of `[attr.title]=\"value\"`\n *\n * @param name name The name of the attribute.\n * @param value value The attribute is removed when value is `null` or `undefined`.\n * Otherwise the attribute value is set to the stringified value.\n * @param sanitizer An optional function used to sanitize the value.\n * @param namespace Optional namespace to use when setting the attribute.\n *\n * @codeGenApi\n */\nexport function ɵɵattribute(\n name: string, value: any, sanitizer?: SanitizerFn|null,\n namespace?: string): typeof ɵɵattribute {\n const lView = getLView();\n const bindingIndex = nextBindingIndex();\n if (bindingUpdated(lView, bindingIndex, value)) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, name, value, sanitizer, namespace);\n ngDevMode && storePropertyBindingMetadata(tView.data, tNode, 'attr.' + name, bindingIndex);\n }\n return ɵɵattribute;\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 {assertEqual, assertLessThan} from '../../util/assert';\nimport {bindingUpdated, bindingUpdated2, bindingUpdated3, bindingUpdated4} from '../bindings';\nimport {LView} from '../interfaces/view';\nimport {getBindingIndex, incrementBindingIndex, nextBindingIndex, setBindingIndex} from '../state';\nimport {NO_CHANGE} from '../tokens';\nimport {renderStringify} from '../util/stringify_utils';\n\n\n\n/**\n * Create interpolation bindings with a variable number of expressions.\n *\n * If there are 1 to 8 expressions `interpolation1()` to `interpolation8()` should be used instead.\n * Those are faster because there is no need to create an array of expressions and iterate over it.\n *\n * `values`:\n * - has static text at even indexes,\n * - has evaluated expressions at odd indexes.\n *\n * Returns the concatenated string when any of the arguments changes, `NO_CHANGE` otherwise.\n */\nexport function interpolationV(lView: LView, values: any[]): string|NO_CHANGE {\n ngDevMode && assertLessThan(2, values.length, 'should have at least 3 values');\n ngDevMode && assertEqual(values.length % 2, 1, 'should have an odd number of values');\n let isBindingUpdated = false;\n let bindingIndex = getBindingIndex();\n\n for (let i = 1; i < values.length; i += 2) {\n // Check if bindings (odd indexes) have changed\n isBindingUpdated = bindingUpdated(lView, bindingIndex++, values[i]) || isBindingUpdated;\n }\n setBindingIndex(bindingIndex);\n\n if (!isBindingUpdated) {\n return NO_CHANGE;\n }\n\n // Build the updated content\n let content = values[0];\n for (let i = 1; i < values.length; i += 2) {\n content += renderStringify(values[i]) + values[i + 1];\n }\n\n return content;\n}\n\n/**\n * Creates an interpolation binding with 1 expression.\n *\n * @param prefix static value used for concatenation only.\n * @param v0 value checked for change.\n * @param suffix static value used for concatenation only.\n */\nexport function interpolation1(lView: LView, prefix: string, v0: any, suffix: string): string|\n NO_CHANGE {\n const different = bindingUpdated(lView, nextBindingIndex(), v0);\n return different ? prefix + renderStringify(v0) + suffix : NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 2 expressions.\n */\nexport function interpolation2(\n lView: LView, prefix: string, v0: any, i0: string, v1: any, suffix: string): string|NO_CHANGE {\n const bindingIndex = getBindingIndex();\n const different = bindingUpdated2(lView, bindingIndex, v0, v1);\n incrementBindingIndex(2);\n\n return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + suffix : NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 3 expressions.\n */\nexport function interpolation3(\n lView: LView, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any,\n suffix: string): string|NO_CHANGE {\n const bindingIndex = getBindingIndex();\n const different = bindingUpdated3(lView, bindingIndex, v0, v1, v2);\n incrementBindingIndex(3);\n\n return different ?\n prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + suffix :\n NO_CHANGE;\n}\n\n/**\n * Create an interpolation binding with 4 expressions.\n */\nexport function interpolation4(\n lView: LView, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, suffix: string): string|NO_CHANGE {\n const bindingIndex = getBindingIndex();\n const different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n incrementBindingIndex(4);\n\n return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 +\n renderStringify(v2) + i2 + renderStringify(v3) + suffix :\n NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 5 expressions.\n */\nexport function interpolation5(\n lView: LView, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, suffix: string): string|NO_CHANGE {\n const bindingIndex = getBindingIndex();\n let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated(lView, bindingIndex + 4, v4) || different;\n incrementBindingIndex(5);\n\n return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 +\n renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + suffix :\n NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 6 expressions.\n */\nexport function interpolation6(\n lView: LView, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string): string|NO_CHANGE {\n const bindingIndex = getBindingIndex();\n let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated2(lView, bindingIndex + 4, v4, v5) || different;\n incrementBindingIndex(6);\n\n return different ?\n prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 +\n renderStringify(v3) + i3 + renderStringify(v4) + i4 + renderStringify(v5) + suffix :\n NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 7 expressions.\n */\nexport function interpolation7(\n lView: LView, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string): string|\n NO_CHANGE {\n const bindingIndex = getBindingIndex();\n let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated3(lView, bindingIndex + 4, v4, v5, v6) || different;\n incrementBindingIndex(7);\n\n return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 +\n renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + i4 +\n renderStringify(v5) + i5 + renderStringify(v6) + suffix :\n NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 8 expressions.\n */\nexport function interpolation8(\n lView: LView, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any,\n suffix: string): string|NO_CHANGE {\n const bindingIndex = getBindingIndex();\n let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated4(lView, bindingIndex + 4, v4, v5, v6, v7) || different;\n incrementBindingIndex(8);\n\n return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 +\n renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + i4 +\n renderStringify(v5) + i5 + renderStringify(v6) + i6 + renderStringify(v7) + suffix :\n NO_CHANGE;\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 */\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {getBindingIndex, getLView, getSelectedTNode, getTView} from '../state';\nimport {NO_CHANGE} from '../tokens';\nimport {interpolation1, interpolation2, interpolation3, interpolation4, interpolation5, interpolation6, interpolation7, interpolation8, interpolationV} from './interpolation';\nimport {elementAttributeInternal, storePropertyBindingMetadata} from './shared';\n\n\n\n/**\n *\n * Update an interpolated attribute on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate1('title', 'prefix', v0, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolate1(\n attrName: string, prefix: string, v0: any, suffix: string, sanitizer?: SanitizerFn,\n namespace?: string): typeof ɵɵattributeInterpolate1 {\n const lView = getLView();\n const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(\n getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 1, prefix, suffix);\n }\n return ɵɵattributeInterpolate1;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolate2(\n attrName: string, prefix: string, v0: any, i0: string, v1: any, suffix: string,\n sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolate2 {\n const lView = getLView();\n const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(\n getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 2, prefix, i0, suffix);\n }\n return ɵɵattributeInterpolate2;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate3(\n * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolate3(\n attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any,\n suffix: string, sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolate3 {\n const lView = getLView();\n const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(\n getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 3, prefix, i0, i1,\n suffix);\n }\n return ɵɵattributeInterpolate3;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate4(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolate4(\n attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, suffix: string, sanitizer?: SanitizerFn,\n namespace?: string): typeof ɵɵattributeInterpolate4 {\n const lView = getLView();\n const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(\n getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 4, prefix, i0, i1, i2,\n suffix);\n }\n return ɵɵattributeInterpolate4;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate5(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolate5(\n attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, suffix: string, sanitizer?: SanitizerFn,\n namespace?: string): typeof ɵɵattributeInterpolate5 {\n const lView = getLView();\n const interpolatedValue =\n interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(\n getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 5, prefix, i0, i1, i2,\n i3, suffix);\n }\n return ɵɵattributeInterpolate5;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate6(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolate6(\n attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string, sanitizer?: SanitizerFn,\n namespace?: string): typeof ɵɵattributeInterpolate6 {\n const lView = getLView();\n const interpolatedValue =\n interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(\n getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 6, prefix, i0, i1, i2,\n i3, i4, suffix);\n }\n return ɵɵattributeInterpolate6;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate7(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolate7(\n attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string,\n sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolate7 {\n const lView = getLView();\n const interpolatedValue =\n interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(\n getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 7, prefix, i0, i1, i2,\n i3, i4, i5, suffix);\n }\n return ɵɵattributeInterpolate7;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate8(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolate8(\n attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any,\n suffix: string, sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolate8 {\n const lView = getLView();\n const interpolatedValue = interpolation8(\n lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(\n getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 8, prefix, i0, i1, i2,\n i3, i4, i5, i6, suffix);\n }\n return ɵɵattributeInterpolate8;\n}\n\n/**\n * Update an interpolated attribute on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n * title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolateV(\n * 'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n * 'suffix']);\n * ```\n *\n * @param attrName The name of the attribute to update.\n * @param values The collection of values and the strings in-between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵattributeInterpolateV(\n attrName: string, values: any[], sanitizer?: SanitizerFn,\n namespace?: string): typeof ɵɵattributeInterpolateV {\n const lView = getLView();\n const interpolated = interpolationV(lView, values);\n if (interpolated !== NO_CHANGE) {\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolated, sanitizer, namespace);\n if (ngDevMode) {\n const interpolationInBetween = [values[0]]; // prefix\n for (let i = 2; i < values.length; i += 2) {\n interpolationInBetween.push(values[i]);\n }\n storePropertyBindingMetadata(\n getTView().data, tNode, 'attr.' + attrName,\n getBindingIndex() - interpolationInBetween.length + 1, ...interpolationInBetween);\n }\n }\n return ɵɵattributeInterpolateV;\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 */\nimport {assertFirstCreatePass} from '../assert';\nimport {attachPatchData} from '../context_discovery';\nimport {registerPostOrderHooks} from '../hooks';\nimport {ComponentTemplate} from '../interfaces/definition';\nimport {LocalRefExtractor, TAttributes, TContainerNode, TNodeType} from '../interfaces/node';\nimport {isDirectiveHost} from '../interfaces/type_checks';\nimport {HEADER_OFFSET, LView, RENDERER, TView, TViewType} from '../interfaces/view';\nimport {appendChild} from '../node_manipulation';\nimport {getLView, getTView, setCurrentTNode} from '../state';\nimport {getConstant} from '../util/view_utils';\nimport {addToViewTree, createDirectivesInstances, createLContainer, createTView, getOrCreateTNode, resolveDirectives, saveResolvedLocalsInData} from './shared';\n\n\n\nfunction templateFirstCreatePass(\n index: number, tView: TView, lView: LView, templateFn: ComponentTemplate<any>|null,\n decls: number, vars: number, tagName?: string|null, attrsIndex?: number|null,\n localRefsIndex?: number|null): TContainerNode {\n ngDevMode && assertFirstCreatePass(tView);\n ngDevMode && ngDevMode.firstCreatePass++;\n const tViewConsts = tView.consts;\n // TODO(pk): refactor getOrCreateTNode to have the \"create\" only version\n const tNode = getOrCreateTNode(\n tView, index, TNodeType.Container, tagName || null,\n getConstant<TAttributes>(tViewConsts, attrsIndex));\n\n resolveDirectives(tView, lView, tNode, getConstant<string[]>(tViewConsts, localRefsIndex));\n registerPostOrderHooks(tView, tNode);\n\n const embeddedTView = tNode.tViews = createTView(\n TViewType.Embedded, tNode, templateFn, decls, vars, tView.directiveRegistry,\n tView.pipeRegistry, null, tView.schemas, tViewConsts);\n\n if (tView.queries !== null) {\n tView.queries.template(tView, tNode);\n embeddedTView.queries = tView.queries.embeddedTView(tNode);\n }\n\n return tNode;\n}\n\n/**\n * Creates an LContainer for an ng-template (dynamically-inserted view), e.g.\n *\n * <ng-template #foo>\n * <div></div>\n * </ng-template>\n *\n * @param index The index of the container in the data array\n * @param templateFn Inline template\n * @param decls The number of nodes, local refs, and pipes for this template\n * @param vars The number of bindings for this template\n * @param tagName The name of the container element, if applicable\n * @param attrsIndex Index of template attributes in the `consts` array.\n * @param localRefs Index of the local references in the `consts` array.\n * @param localRefExtractor A function which extracts local-refs values from the template.\n * Defaults to the current element associated with the local-ref.\n *\n * @codeGenApi\n */\nexport function ɵɵtemplate(\n index: number, templateFn: ComponentTemplate<any>|null, decls: number, vars: number,\n tagName?: string|null, attrsIndex?: number|null, localRefsIndex?: number|null,\n localRefExtractor?: LocalRefExtractor) {\n const lView = getLView();\n const tView = getTView();\n const adjustedIndex = index + HEADER_OFFSET;\n\n const tNode = tView.firstCreatePass ? templateFirstCreatePass(\n adjustedIndex, tView, lView, templateFn, decls, vars,\n tagName, attrsIndex, localRefsIndex) :\n tView.data[adjustedIndex] as TContainerNode;\n setCurrentTNode(tNode, false);\n\n const comment = lView[RENDERER].createComment(ngDevMode ? 'container' : '');\n appendChild(tView, lView, comment, tNode);\n attachPatchData(comment, lView);\n\n addToViewTree(lView, lView[adjustedIndex] = createLContainer(comment, lView, comment, tNode));\n\n if (isDirectiveHost(tNode)) {\n createDirectivesInstances(tView, lView, tNode);\n }\n\n if (localRefsIndex != null) {\n saveResolvedLocalsInData(lView, tNode, localRefExtractor);\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 */\nimport {HEADER_OFFSET, LView, TView} from '../interfaces/view';\nimport {getContextLView} from '../state';\nimport {load} from '../util/view_utils';\n\n\n/** Store a value in the `data` at a given `index`. */\nexport function store<T>(tView: TView, lView: LView, index: number, value: T): void {\n // We don't store any static data for local variables, so the first time\n // we see the template, we should store as null to avoid a sparse array\n if (index >= tView.data.length) {\n tView.data[index] = null;\n tView.blueprint[index] = null;\n }\n lView[index] = value;\n}\n\n/**\n * Retrieves a local reference from the current contextViewData.\n *\n * If the reference to retrieve is in a parent view, this instruction is used in conjunction\n * with a nextContext() call, which walks up the tree and updates the contextViewData instance.\n *\n * @param index The index of the local ref in contextViewData.\n *\n * @codeGenApi\n */\nexport function ɵɵreference<T>(index: number) {\n const contextLView = getContextLView();\n return load<T>(contextLView, HEADER_OFFSET + index);\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 */\nimport {resolveForwardRef} from '../forward_ref';\nimport {ɵɵinject, ɵɵinvalidFactoryDep} from '../injector_compatibility';\nimport {ɵɵdefineInjectable, ɵɵdefineInjector} from '../interface/defs';\n\n/**\n * A mapping of the @angular/core API surface used in generated expressions to the actual symbols.\n *\n * This should be kept up to date with the public exports of @angular/core.\n */\nexport const angularCoreDiEnv: {[name: string]: Function} = {\n 'ɵɵdefineInjectable': ɵɵdefineInjectable,\n 'ɵɵdefineInjector': ɵɵdefineInjector,\n 'ɵɵinject': ɵɵinject,\n 'ɵɵinvalidFactoryDep': ɵɵinvalidFactoryDep,\n 'resolveForwardRef': resolveForwardRef,\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 {getCompilerFacade, JitCompilerUsage, R3InjectableMetadataFacade} from '../../compiler/compiler_facade';\nimport {Type} from '../../interface/type';\nimport {NG_FACTORY_DEF} from '../../render3/fields';\nimport {getClosureSafeProperty} from '../../util/property';\nimport {resolveForwardRef} from '../forward_ref';\nimport {Injectable} from '../injectable';\nimport {NG_PROV_DEF} from '../interface/defs';\nimport {ClassSansProvider, ExistingSansProvider, FactorySansProvider, ValueProvider, ValueSansProvider} from '../interface/provider';\n\nimport {angularCoreDiEnv} from './environment';\nimport {convertDependencies, reflectDependencies} from './util';\n\n\n\n/**\n * Compile an Angular injectable according to its `Injectable` metadata, and patch the resulting\n * injectable def (`ɵprov`) onto the injectable type.\n */\nexport function compileInjectable(type: Type<any>, meta?: Injectable): void {\n let ngInjectableDef: any = null;\n let ngFactoryDef: any = null;\n\n // if NG_PROV_DEF is already defined on this class then don't overwrite it\n if (!type.hasOwnProperty(NG_PROV_DEF)) {\n Object.defineProperty(type, NG_PROV_DEF, {\n get: () => {\n if (ngInjectableDef === null) {\n const compiler =\n getCompilerFacade({usage: JitCompilerUsage.Decorator, kind: 'injectable', type});\n ngInjectableDef = compiler.compileInjectable(\n angularCoreDiEnv, `ng:///${type.name}/ɵprov.js`, getInjectableMetadata(type, meta));\n }\n return ngInjectableDef;\n },\n });\n }\n\n // if NG_FACTORY_DEF is already defined on this class then don't overwrite it\n if (!type.hasOwnProperty(NG_FACTORY_DEF)) {\n Object.defineProperty(type, NG_FACTORY_DEF, {\n get: () => {\n if (ngFactoryDef === null) {\n const compiler =\n getCompilerFacade({usage: JitCompilerUsage.Decorator, kind: 'injectable', type});\n ngFactoryDef = compiler.compileFactory(angularCoreDiEnv, `ng:///${type.name}/ɵfac.js`, {\n name: type.name,\n type,\n typeArgumentCount: 0, // In JIT mode types are not available nor used.\n deps: reflectDependencies(type),\n target: compiler.FactoryTarget.Injectable\n });\n }\n return ngFactoryDef;\n },\n // Leave this configurable so that the factories from directives or pipes can take precedence.\n configurable: true\n });\n }\n}\n\ntype UseClassProvider = Injectable&ClassSansProvider&{deps?: any[]};\n\nconst USE_VALUE =\n getClosureSafeProperty<ValueProvider>({provide: String, useValue: getClosureSafeProperty});\n\nfunction isUseClassProvider(meta: Injectable): meta is UseClassProvider {\n return (meta as UseClassProvider).useClass !== undefined;\n}\n\nfunction isUseValueProvider(meta: Injectable): meta is Injectable&ValueSansProvider {\n return USE_VALUE in meta;\n}\n\nfunction isUseFactoryProvider(meta: Injectable): meta is Injectable&FactorySansProvider {\n return (meta as FactorySansProvider).useFactory !== undefined;\n}\n\nfunction isUseExistingProvider(meta: Injectable): meta is Injectable&ExistingSansProvider {\n return (meta as ExistingSansProvider).useExisting !== undefined;\n}\n\nfunction getInjectableMetadata(type: Type<any>, srcMeta?: Injectable): R3InjectableMetadataFacade {\n // Allow the compilation of a class with a `@Injectable()` decorator without parameters\n const meta: Injectable = srcMeta || {providedIn: null};\n const compilerMeta: R3InjectableMetadataFacade = {\n name: type.name,\n type: type,\n typeArgumentCount: 0,\n providedIn: meta.providedIn,\n };\n if ((isUseClassProvider(meta) || isUseFactoryProvider(meta)) && meta.deps !== undefined) {\n compilerMeta.deps = convertDependencies(meta.deps);\n }\n // Check to see if the user explicitly provided a `useXxxx` property.\n if (isUseClassProvider(meta)) {\n compilerMeta.useClass = meta.useClass;\n } else if (isUseValueProvider(meta)) {\n compilerMeta.useValue = meta.useValue;\n } else if (isUseFactoryProvider(meta)) {\n compilerMeta.useFactory = meta.useFactory;\n } else if (isUseExistingProvider(meta)) {\n compilerMeta.useExisting = meta.useExisting;\n }\n return compilerMeta;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {ReflectionCapabilities} from '../reflection/reflection_capabilities';\nimport {EMPTY_ARRAY} from '../util/empty';\nimport {getClosureSafeProperty} from '../util/property';\n\nimport {resolveForwardRef} from './forward_ref';\nimport {injectArgs, ɵɵinject} from './injector_compatibility';\nimport {ClassSansProvider, ConstructorSansProvider, ExistingSansProvider, FactorySansProvider, StaticClassSansProvider, ValueProvider, ValueSansProvider} from './interface/provider';\n\nconst USE_VALUE =\n getClosureSafeProperty<ValueProvider>({provide: String, useValue: getClosureSafeProperty});\n\nexport function convertInjectableProviderToFactory(\n type: Type<any>,\n provider?: ValueSansProvider|ExistingSansProvider|StaticClassSansProvider|\n ConstructorSansProvider|FactorySansProvider|ClassSansProvider): () => any {\n if (!provider) {\n const reflectionCapabilities = new ReflectionCapabilities();\n const deps = reflectionCapabilities.parameters(type);\n // TODO - convert to flags.\n return () => new type(...injectArgs(deps as any[]));\n }\n\n if (USE_VALUE in provider) {\n const valueProvider = (provider as ValueSansProvider);\n return () => valueProvider.useValue;\n } else if ((provider as ExistingSansProvider).useExisting) {\n const existingProvider = (provider as ExistingSansProvider);\n return () => ɵɵinject(resolveForwardRef(existingProvider.useExisting));\n } else if ((provider as FactorySansProvider).useFactory) {\n const factoryProvider = (provider as FactorySansProvider);\n return () => factoryProvider.useFactory(...injectArgs(factoryProvider.deps || EMPTY_ARRAY));\n } else if ((provider as StaticClassSansProvider | ClassSansProvider).useClass) {\n const classProvider = (provider as StaticClassSansProvider | ClassSansProvider);\n let deps = (provider as StaticClassSansProvider).deps;\n if (!deps) {\n const reflectionCapabilities = new ReflectionCapabilities();\n deps = reflectionCapabilities.parameters(type);\n }\n return () => new (resolveForwardRef(classProvider.useClass))(...injectArgs(deps));\n } else {\n let deps = (provider as ConstructorSansProvider).deps;\n if (!deps) {\n const reflectionCapabilities = new ReflectionCapabilities();\n deps = reflectionCapabilities.parameters(type);\n }\n return () => new type(...injectArgs(deps!));\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 {Type} from '../interface/type';\nimport {makeDecorator, TypeDecorator} from '../util/decorators';\n\nimport {getInjectableDef, InjectableType, ɵɵdefineInjectable} from './interface/defs';\nimport {ClassSansProvider, ConstructorSansProvider, ExistingSansProvider, FactorySansProvider, StaticClassSansProvider, ValueSansProvider} from './interface/provider';\nimport {compileInjectable as render3CompileInjectable} from './jit/injectable';\nimport {convertInjectableProviderToFactory} from './util';\n\n\n\n/**\n * Injectable providers used in `@Injectable` decorator.\n *\n * @publicApi\n */\nexport type InjectableProvider = ValueSansProvider|ExistingSansProvider|StaticClassSansProvider|\n ConstructorSansProvider|FactorySansProvider|ClassSansProvider;\n\n/**\n * Type of the Injectable decorator / constructor function.\n *\n * @publicApi\n */\nexport interface InjectableDecorator {\n /**\n * Decorator that marks a class as available to be\n * provided and injected as a dependency.\n *\n * @see [Introduction to Services and DI](guide/architecture-services)\n * @see [Dependency Injection Guide](guide/dependency-injection)\n *\n * @usageNotes\n *\n * Marking a class with `@Injectable` ensures that the compiler\n * will generate the necessary metadata to create the class's\n * dependencies when the class is injected.\n *\n * The following example shows how a service class is properly\n * marked so that a supporting service can be injected upon creation.\n *\n * <code-example path=\"core/di/ts/metadata_spec.ts\" region=\"Injectable\"></code-example>\n *\n */\n (): TypeDecorator;\n (options?: {providedIn: Type<any>|'root'|'platform'|'any'|null}&\n InjectableProvider): TypeDecorator;\n new(): Injectable;\n new(options?: {providedIn: Type<any>|'root'|'platform'|'any'|null}&\n InjectableProvider): Injectable;\n}\n\n/**\n * Type of the Injectable metadata.\n *\n * @publicApi\n */\nexport interface Injectable {\n /**\n * Determines which injectors will provide the injectable.\n *\n * - `Type<any>` - associates the injectable with an `@NgModule` or other `InjectorType`,\n * - 'null' : Equivalent to `undefined`. The injectable is not provided in any scope automatically\n * and must be added to a `providers` array of an [@NgModule](api/core/NgModule#providers),\n * [@Component](api/core/Directive#providers) or [@Directive](api/core/Directive#providers).\n *\n * The following options specify that this injectable should be provided in one of the following\n * injectors:\n * - 'root' : The application-level injector in most apps.\n * - 'platform' : A special singleton platform injector shared by all\n * applications on the page.\n * - 'any' : Provides a unique instance in each lazy loaded module while all eagerly loaded\n * modules share one instance.\n *\n */\n providedIn?: Type<any>|'root'|'platform'|'any'|null;\n}\n\n/**\n * Injectable decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Injectable: InjectableDecorator = makeDecorator(\n 'Injectable', undefined, undefined, undefined,\n (type: Type<any>, meta: Injectable) => SWITCH_COMPILE_INJECTABLE(type as any, meta));\n\n\n/**\n * Supports @Injectable() in JIT mode for Render2.\n */\nfunction render2CompileInjectable(\n injectableType: Type<any>,\n options?: {providedIn?: Type<any>|'root'|'platform'|'any'|null}&InjectableProvider): void {\n if (options && options.providedIn !== undefined && !getInjectableDef(injectableType)) {\n (injectableType as InjectableType<any>).ɵprov = ɵɵdefineInjectable({\n token: injectableType,\n providedIn: options.providedIn,\n factory: convertInjectableProviderToFactory(injectableType, options),\n });\n }\n}\n\nexport const SWITCH_COMPILE_INJECTABLE__POST_R3__ = render3CompileInjectable;\nconst SWITCH_COMPILE_INJECTABLE__PRE_R3__ = render2CompileInjectable;\nconst SWITCH_COMPILE_INJECTABLE: typeof render3CompileInjectable =\n SWITCH_COMPILE_INJECTABLE__PRE_R3__;\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {ERROR_ORIGINAL_ERROR, wrappedError} from '../util/errors';\nimport {stringify} from '../util/stringify';\n\nimport {ReflectiveInjector} from './reflective_injector';\nimport {ReflectiveKey} from './reflective_key';\n\nfunction findFirstClosedCycle(keys: any[]): any[] {\n const res: any[] = [];\n for (let i = 0; i < keys.length; ++i) {\n if (res.indexOf(keys[i]) > -1) {\n res.push(keys[i]);\n return res;\n }\n res.push(keys[i]);\n }\n return res;\n}\n\nfunction constructResolvingPath(keys: any[]): string {\n if (keys.length > 1) {\n const reversed = findFirstClosedCycle(keys.slice().reverse());\n const tokenStrs = reversed.map(k => stringify(k.token));\n return ' (' + tokenStrs.join(' -> ') + ')';\n }\n\n return '';\n}\n\nexport interface InjectionError extends Error {\n keys: ReflectiveKey[];\n injectors: ReflectiveInjector[];\n constructResolvingMessage: (keys: ReflectiveKey[]) => string;\n addKey(injector: ReflectiveInjector, key: ReflectiveKey): void;\n}\n\nfunction injectionError(\n injector: ReflectiveInjector, key: ReflectiveKey,\n constructResolvingMessage: (keys: ReflectiveKey[]) => string,\n originalError?: Error): InjectionError {\n const keys = [key];\n const errMsg = constructResolvingMessage(keys);\n const error =\n (originalError ? wrappedError(errMsg, originalError) : Error(errMsg)) as InjectionError;\n error.addKey = addKey;\n error.keys = keys;\n error.injectors = [injector];\n error.constructResolvingMessage = constructResolvingMessage;\n (error as any)[ERROR_ORIGINAL_ERROR] = originalError;\n return error;\n}\n\nfunction addKey(this: InjectionError, injector: ReflectiveInjector, key: ReflectiveKey): void {\n this.injectors.push(injector);\n this.keys.push(key);\n // Note: This updated message won't be reflected in the `.stack` property\n this.message = this.constructResolvingMessage(this.keys);\n}\n\n/**\n * Thrown when trying to retrieve a dependency by key from {@link Injector}, but the\n * {@link Injector} does not have a {@link Provider} for the given key.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {\n * constructor(b:B) {}\n * }\n *\n * expect(() => Injector.resolveAndCreate([A])).toThrowError();\n * ```\n */\nexport function noProviderError(injector: ReflectiveInjector, key: ReflectiveKey): InjectionError {\n return injectionError(injector, key, function(keys: ReflectiveKey[]) {\n const first = stringify(keys[0].token);\n return `No provider for ${first}!${constructResolvingPath(keys)}`;\n });\n}\n\n/**\n * Thrown when dependencies form a cycle.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * var injector = Injector.resolveAndCreate([\n * {provide: \"one\", useFactory: (two) => \"two\", deps: [[new Inject(\"two\")]]},\n * {provide: \"two\", useFactory: (one) => \"one\", deps: [[new Inject(\"one\")]]}\n * ]);\n *\n * expect(() => injector.get(\"one\")).toThrowError();\n * ```\n *\n * Retrieving `A` or `B` throws a `CyclicDependencyError` as the graph above cannot be constructed.\n */\nexport function cyclicDependencyError(\n injector: ReflectiveInjector, key: ReflectiveKey): InjectionError {\n return injectionError(injector, key, function(keys: ReflectiveKey[]) {\n return `Cannot instantiate cyclic dependency!${constructResolvingPath(keys)}`;\n });\n}\n\n/**\n * Thrown when a constructing type returns with an Error.\n *\n * The `InstantiationError` class contains the original error plus the dependency graph which caused\n * this object to be instantiated.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {\n * constructor() {\n * throw new Error('message');\n * }\n * }\n *\n * var injector = Injector.resolveAndCreate([A]);\n\n * try {\n * injector.get(A);\n * } catch (e) {\n * expect(e instanceof InstantiationError).toBe(true);\n * expect(e.originalException.message).toEqual(\"message\");\n * expect(e.originalStack).toBeDefined();\n * }\n * ```\n */\nexport function instantiationError(\n injector: ReflectiveInjector, originalException: any, originalStack: any,\n key: ReflectiveKey): InjectionError {\n return injectionError(injector, key, function(keys: ReflectiveKey[]) {\n const first = stringify(keys[0].token);\n return `${originalException.message}: Error during instantiation of ${first}!${\n constructResolvingPath(keys)}.`;\n }, originalException);\n}\n\n/**\n * Thrown when an object other then {@link Provider} (or `Type`) is passed to {@link Injector}\n * creation.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * expect(() => Injector.resolveAndCreate([\"not a type\"])).toThrowError();\n * ```\n */\nexport function invalidProviderError(provider: any) {\n return Error(\n `Invalid provider - only instances of Provider and Type are allowed, got: ${provider}`);\n}\n\n/**\n * Thrown when the class has no annotation information.\n *\n * Lack of annotation information prevents the {@link Injector} from determining which dependencies\n * need to be injected into the constructor.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {\n * constructor(b) {}\n * }\n *\n * expect(() => Injector.resolveAndCreate([A])).toThrowError();\n * ```\n *\n * This error is also thrown when the class not marked with {@link Injectable} has parameter types.\n *\n * ```typescript\n * class B {}\n *\n * class A {\n * constructor(b:B) {} // no information about the parameter types of A is available at runtime.\n * }\n *\n * expect(() => Injector.resolveAndCreate([A,B])).toThrowError();\n * ```\n *\n */\nexport function noAnnotationError(typeOrFunc: Type<any>|Function, params: any[][]): Error {\n const signature: string[] = [];\n for (let i = 0, ii = params.length; i < ii; i++) {\n const parameter = params[i];\n if (!parameter || parameter.length == 0) {\n signature.push('?');\n } else {\n signature.push(parameter.map(stringify).join(' '));\n }\n }\n return Error(\n 'Cannot resolve all parameters for \\'' + stringify(typeOrFunc) + '\\'(' +\n signature.join(', ') + '). ' +\n 'Make sure that all the parameters are decorated with Inject or have valid type annotations and that \\'' +\n stringify(typeOrFunc) + '\\' is decorated with Injectable.');\n}\n\n/**\n * Thrown when getting an object by index.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {}\n *\n * var injector = Injector.resolveAndCreate([A]);\n *\n * expect(() => injector.getAt(100)).toThrowError();\n * ```\n *\n */\nexport function outOfBoundsError(index: number) {\n return Error(`Index ${index} is out-of-bounds.`);\n}\n\n// TODO: add a working example after alpha38 is released\n/**\n * Thrown when a multi provider and a regular provider are bound to the same token.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * expect(() => Injector.resolveAndCreate([\n * { provide: \"Strings\", useValue: \"string1\", multi: true},\n * { provide: \"Strings\", useValue: \"string2\", multi: false}\n * ])).toThrowError();\n * ```\n */\nexport function mixingMultiProvidersWithRegularProvidersError(\n provider1: any, provider2: any): Error {\n return Error(`Cannot mix multi providers and regular providers, got: ${provider1} ${provider2}`);\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 {stringify} from '../util/stringify';\nimport {resolveForwardRef} from './forward_ref';\n\n\n/**\n * A unique object used for retrieving items from the {@link ReflectiveInjector}.\n *\n * Keys have:\n * - a system-wide unique `id`.\n * - a `token`.\n *\n * `Key` is used internally by {@link ReflectiveInjector} because its system-wide unique `id` allows\n * the\n * injector to store created objects in a more efficient way.\n *\n * `Key` should not be created directly. {@link ReflectiveInjector} creates keys automatically when\n * resolving\n * providers.\n *\n * @deprecated No replacement\n * @publicApi\n */\nexport class ReflectiveKey {\n public readonly displayName: string;\n /**\n * Private\n */\n constructor(public token: Object, public id: number) {\n if (!token) {\n throw new Error('Token must be defined!');\n }\n this.displayName = stringify(this.token);\n }\n\n /**\n * Retrieves a `Key` for a token.\n */\n static get(token: Object): ReflectiveKey {\n return _globalKeyRegistry.get(resolveForwardRef(token));\n }\n\n /**\n * @returns the number of keys registered in the system.\n */\n static get numberOfKeys(): number {\n return _globalKeyRegistry.numberOfKeys;\n }\n}\n\nexport class KeyRegistry {\n private _allKeys = new Map<Object, ReflectiveKey>();\n\n get(token: Object): ReflectiveKey {\n if (token instanceof ReflectiveKey) return token;\n\n if (this._allKeys.has(token)) {\n return this._allKeys.get(token)!;\n }\n\n const newKey = new ReflectiveKey(token, ReflectiveKey.numberOfKeys);\n this._allKeys.set(token, newKey);\n return newKey;\n }\n\n get numberOfKeys(): number {\n return this._allKeys.size;\n }\n}\n\nconst _globalKeyRegistry = new KeyRegistry();\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {PlatformReflectionCapabilities} from './platform_reflection_capabilities';\nimport {GetterFn, MethodFn, SetterFn} from './types';\n\nexport {PlatformReflectionCapabilities};\nexport {GetterFn, MethodFn, SetterFn};\n\n/**\n * Provides access to reflection data about symbols. Used internally by Angular\n * to power dependency injection and compilation.\n */\nexport class Reflector {\n constructor(public reflectionCapabilities: PlatformReflectionCapabilities) {}\n\n updateCapabilities(caps: PlatformReflectionCapabilities) {\n this.reflectionCapabilities = caps;\n }\n\n factory(type: Type<any>): Function {\n return this.reflectionCapabilities.factory(type);\n }\n\n parameters(typeOrFunc: Type<any>): any[][] {\n return this.reflectionCapabilities.parameters(typeOrFunc);\n }\n\n annotations(typeOrFunc: Type<any>): any[] {\n return this.reflectionCapabilities.annotations(typeOrFunc);\n }\n\n propMetadata(typeOrFunc: Type<any>): {[key: string]: any[]} {\n return this.reflectionCapabilities.propMetadata(typeOrFunc);\n }\n\n hasLifecycleHook(type: any, lcProperty: string): boolean {\n return this.reflectionCapabilities.hasLifecycleHook(type, lcProperty);\n }\n\n getter(name: string): GetterFn {\n return this.reflectionCapabilities.getter(name);\n }\n\n setter(name: string): SetterFn {\n return this.reflectionCapabilities.setter(name);\n }\n\n method(name: string): MethodFn {\n return this.reflectionCapabilities.method(name);\n }\n\n importUri(type: any): string {\n return this.reflectionCapabilities.importUri(type);\n }\n\n resourceUri(type: any): string {\n return this.reflectionCapabilities.resourceUri(type);\n }\n\n resolveIdentifier(name: string, moduleUrl: string, members: string[], runtime: any): any {\n return this.reflectionCapabilities.resolveIdentifier(name, moduleUrl, members, runtime);\n }\n\n resolveEnum(identifier: any, name: string): any {\n return this.reflectionCapabilities.resolveEnum(identifier, name);\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 {ReflectionCapabilities} from './reflection_capabilities';\nimport {Reflector} from './reflector';\n\nexport {Reflector} from './reflector';\n\n/**\n * The {@link Reflector} used internally in Angular to access metadata\n * about symbols.\n */\nexport const reflector = new Reflector(new ReflectionCapabilities());\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {reflector} from '../reflection/reflection';\n\nimport {resolveForwardRef} from './forward_ref';\nimport {InjectionToken} from './injection_token';\nimport {ClassProvider, ExistingProvider, FactoryProvider, Provider, TypeProvider, ValueProvider} from './interface/provider';\nimport {Inject, Optional, Self, SkipSelf} from './metadata';\nimport {invalidProviderError, mixingMultiProvidersWithRegularProvidersError, noAnnotationError} from './reflective_errors';\nimport {ReflectiveKey} from './reflective_key';\n\n\ninterface NormalizedProvider extends TypeProvider, ValueProvider, ClassProvider, ExistingProvider,\n FactoryProvider {}\n\n/**\n * `Dependency` is used by the framework to extend DI.\n * This is internal to Angular and should not be used directly.\n */\nexport class ReflectiveDependency {\n constructor(\n public key: ReflectiveKey, public optional: boolean, public visibility: Self|SkipSelf|null) {}\n\n static fromKey(key: ReflectiveKey): ReflectiveDependency {\n return new ReflectiveDependency(key, false, null);\n }\n}\n\nconst _EMPTY_LIST: any[] = [];\n\n/**\n * An internal resolved representation of a `Provider` used by the `Injector`.\n *\n * @usageNotes\n * This is usually created automatically by `Injector.resolveAndCreate`.\n *\n * It can be created manually, as follows:\n *\n * ### Example\n *\n * ```typescript\n * var resolvedProviders = Injector.resolve([{ provide: 'message', useValue: 'Hello' }]);\n * var injector = Injector.fromResolvedProviders(resolvedProviders);\n *\n * expect(injector.get('message')).toEqual('Hello');\n * ```\n *\n * @publicApi\n */\nexport interface ResolvedReflectiveProvider {\n /**\n * A key, usually a `Type<any>`.\n */\n key: ReflectiveKey;\n\n /**\n * Factory function which can return an instance of an object represented by a key.\n */\n resolvedFactories: ResolvedReflectiveFactory[];\n\n /**\n * Indicates if the provider is a multi-provider or a regular provider.\n */\n multiProvider: boolean;\n}\n\nexport class ResolvedReflectiveProvider_ implements ResolvedReflectiveProvider {\n readonly resolvedFactory: ResolvedReflectiveFactory;\n\n constructor(\n public key: ReflectiveKey, public resolvedFactories: ResolvedReflectiveFactory[],\n public multiProvider: boolean) {\n this.resolvedFactory = this.resolvedFactories[0];\n }\n}\n\n/**\n * An internal resolved representation of a factory function created by resolving `Provider`.\n * @publicApi\n */\nexport class ResolvedReflectiveFactory {\n constructor(\n /**\n * Factory function which can return an instance of an object represented by a key.\n */\n public factory: Function,\n\n /**\n * Arguments (dependencies) to the `factory` function.\n */\n public dependencies: ReflectiveDependency[]) {}\n}\n\n\n/**\n * Resolve a single provider.\n */\nfunction resolveReflectiveFactory(provider: NormalizedProvider): ResolvedReflectiveFactory {\n let factoryFn: Function;\n let resolvedDeps: ReflectiveDependency[];\n if (provider.useClass) {\n const useClass = resolveForwardRef(provider.useClass);\n factoryFn = reflector.factory(useClass);\n resolvedDeps = _dependenciesFor(useClass);\n } else if (provider.useExisting) {\n factoryFn = (aliasInstance: any) => aliasInstance;\n resolvedDeps = [ReflectiveDependency.fromKey(ReflectiveKey.get(provider.useExisting))];\n } else if (provider.useFactory) {\n factoryFn = provider.useFactory;\n resolvedDeps = constructDependencies(provider.useFactory, provider.deps);\n } else {\n factoryFn = () => provider.useValue;\n resolvedDeps = _EMPTY_LIST;\n }\n return new ResolvedReflectiveFactory(factoryFn, resolvedDeps);\n}\n\n/**\n * Converts the `Provider` into `ResolvedProvider`.\n *\n * `Injector` internally only uses `ResolvedProvider`, `Provider` contains convenience provider\n * syntax.\n */\nfunction resolveReflectiveProvider(provider: NormalizedProvider): ResolvedReflectiveProvider {\n return new ResolvedReflectiveProvider_(\n ReflectiveKey.get(provider.provide), [resolveReflectiveFactory(provider)],\n provider.multi || false);\n}\n\n/**\n * Resolve a list of Providers.\n */\nexport function resolveReflectiveProviders(providers: Provider[]): ResolvedReflectiveProvider[] {\n const normalized = _normalizeProviders(providers, []);\n const resolved = normalized.map(resolveReflectiveProvider);\n const resolvedProviderMap = mergeResolvedReflectiveProviders(resolved, new Map());\n return Array.from(resolvedProviderMap.values());\n}\n\n/**\n * Merges a list of ResolvedProviders into a list where each key is contained exactly once and\n * multi providers have been merged.\n */\nexport function mergeResolvedReflectiveProviders(\n providers: ResolvedReflectiveProvider[],\n normalizedProvidersMap: Map<number, ResolvedReflectiveProvider>):\n Map<number, ResolvedReflectiveProvider> {\n for (let i = 0; i < providers.length; i++) {\n const provider = providers[i];\n const existing = normalizedProvidersMap.get(provider.key.id);\n if (existing) {\n if (provider.multiProvider !== existing.multiProvider) {\n throw mixingMultiProvidersWithRegularProvidersError(existing, provider);\n }\n if (provider.multiProvider) {\n for (let j = 0; j < provider.resolvedFactories.length; j++) {\n existing.resolvedFactories.push(provider.resolvedFactories[j]);\n }\n } else {\n normalizedProvidersMap.set(provider.key.id, provider);\n }\n } else {\n let resolvedProvider: ResolvedReflectiveProvider;\n if (provider.multiProvider) {\n resolvedProvider = new ResolvedReflectiveProvider_(\n provider.key, provider.resolvedFactories.slice(), provider.multiProvider);\n } else {\n resolvedProvider = provider;\n }\n normalizedProvidersMap.set(provider.key.id, resolvedProvider);\n }\n }\n return normalizedProvidersMap;\n}\n\nfunction _normalizeProviders(\n providers: Provider[], res: NormalizedProvider[]): NormalizedProvider[] {\n providers.forEach(b => {\n if (b instanceof Type) {\n res.push({provide: b, useClass: b} as NormalizedProvider);\n\n } else if (b && typeof b == 'object' && (b as any).provide !== undefined) {\n res.push(b as NormalizedProvider);\n\n } else if (Array.isArray(b)) {\n _normalizeProviders(b, res);\n\n } else {\n throw invalidProviderError(b);\n }\n });\n\n return res;\n}\n\nexport function constructDependencies(\n typeOrFunc: any, dependencies?: any[]): ReflectiveDependency[] {\n if (!dependencies) {\n return _dependenciesFor(typeOrFunc);\n } else {\n const params: any[][] = dependencies.map(t => [t]);\n return dependencies.map(t => _extractToken(typeOrFunc, t, params));\n }\n}\n\nfunction _dependenciesFor(typeOrFunc: any): ReflectiveDependency[] {\n const params = reflector.parameters(typeOrFunc);\n\n if (!params) return [];\n if (params.some(p => p == null)) {\n throw noAnnotationError(typeOrFunc, params);\n }\n return params.map(p => _extractToken(typeOrFunc, p, params));\n}\n\nfunction _extractToken(\n typeOrFunc: any, metadata: any[]|any, params: any[][]): ReflectiveDependency {\n let token: any = null;\n let optional = false;\n\n if (!Array.isArray(metadata)) {\n if (metadata instanceof Inject) {\n return _createDependency(metadata.token, optional, null);\n } else {\n return _createDependency(metadata, optional, null);\n }\n }\n\n let visibility: Self|SkipSelf|null = null;\n\n for (let i = 0; i < metadata.length; ++i) {\n const paramMetadata = metadata[i];\n\n if (paramMetadata instanceof Type) {\n token = paramMetadata;\n\n } else if (paramMetadata instanceof Inject) {\n token = paramMetadata.token;\n\n } else if (paramMetadata instanceof Optional) {\n optional = true;\n\n } else if (paramMetadata instanceof Self || paramMetadata instanceof SkipSelf) {\n visibility = paramMetadata;\n } else if (paramMetadata instanceof InjectionToken) {\n token = paramMetadata;\n }\n }\n\n token = resolveForwardRef(token);\n\n if (token != null) {\n return _createDependency(token, optional, visibility);\n } else {\n throw noAnnotationError(typeOrFunc, params);\n }\n}\n\nfunction _createDependency(\n token: any, optional: boolean, visibility: Self|SkipSelf|null): ReflectiveDependency {\n return new ReflectiveDependency(ReflectiveKey.get(token), optional, visibility);\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 './injector';\nimport {THROW_IF_NOT_FOUND} from './injector_compatibility';\nimport {Provider} from './interface/provider';\nimport {Self, SkipSelf} from './metadata';\nimport {cyclicDependencyError, instantiationError, noProviderError, outOfBoundsError} from './reflective_errors';\nimport {ReflectiveKey} from './reflective_key';\nimport {ReflectiveDependency, ResolvedReflectiveFactory, ResolvedReflectiveProvider, resolveReflectiveProviders} from './reflective_provider';\n\n\n// Threshold for the dynamic version\nconst UNDEFINED = {};\n\n/**\n * A ReflectiveDependency injection container used for instantiating objects and resolving\n * dependencies.\n *\n * An `Injector` is a replacement for a `new` operator, which can automatically resolve the\n * constructor dependencies.\n *\n * In typical use, application code asks for the dependencies in the constructor and they are\n * resolved by the `Injector`.\n *\n * @usageNotes\n * ### Example\n *\n * The following example creates an `Injector` configured to create `Engine` and `Car`.\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);\n * var car = injector.get(Car);\n * expect(car instanceof Car).toBe(true);\n * expect(car.engine instanceof Engine).toBe(true);\n * ```\n *\n * Notice, we don't use the `new` operator because we explicitly want to have the `Injector`\n * resolve all of the object's dependencies automatically.\n *\n * @deprecated from v5 - slow and brings in a lot of code, Use `Injector.create` instead.\n * @publicApi\n */\nexport abstract class ReflectiveInjector implements Injector {\n /**\n * Turns an array of provider definitions into an array of resolved providers.\n *\n * A resolution is a process of flattening multiple nested arrays and converting individual\n * providers into an array of `ResolvedReflectiveProvider`s.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var providers = ReflectiveInjector.resolve([Car, [[Engine]]]);\n *\n * expect(providers.length).toEqual(2);\n *\n * expect(providers[0] instanceof ResolvedReflectiveProvider).toBe(true);\n * expect(providers[0].key.displayName).toBe(\"Car\");\n * expect(providers[0].dependencies.length).toEqual(1);\n * expect(providers[0].factory).toBeDefined();\n *\n * expect(providers[1].key.displayName).toBe(\"Engine\");\n * });\n * ```\n *\n */\n static resolve(providers: Provider[]): ResolvedReflectiveProvider[] {\n return resolveReflectiveProviders(providers);\n }\n\n /**\n * Resolves an array of providers and creates an injector from those providers.\n *\n * The passed-in providers can be an array of `Type`, `Provider`,\n * or a recursive array of more providers.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);\n * expect(injector.get(Car) instanceof Car).toBe(true);\n * ```\n */\n static resolveAndCreate(providers: Provider[], parent?: Injector): ReflectiveInjector {\n const ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers);\n return ReflectiveInjector.fromResolvedProviders(ResolvedReflectiveProviders, parent);\n }\n\n /**\n * Creates an injector from previously resolved providers.\n *\n * This API is the recommended way to construct injectors in performance-sensitive parts.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var providers = ReflectiveInjector.resolve([Car, Engine]);\n * var injector = ReflectiveInjector.fromResolvedProviders(providers);\n * expect(injector.get(Car) instanceof Car).toBe(true);\n * ```\n */\n static fromResolvedProviders(providers: ResolvedReflectiveProvider[], parent?: Injector):\n ReflectiveInjector {\n return new ReflectiveInjector_(providers, parent);\n }\n\n\n /**\n * Parent of this injector.\n *\n * <!-- TODO: Add a link to the section of the user guide talking about hierarchical injection.\n * -->\n */\n abstract get parent(): Injector|null;\n\n /**\n * Resolves an array of providers and creates a child injector from those providers.\n *\n * <!-- TODO: Add a link to the section of the user guide talking about hierarchical injection.\n * -->\n *\n * The passed-in providers can be an array of `Type`, `Provider`,\n * or a recursive array of more providers.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class ParentProvider {}\n * class ChildProvider {}\n *\n * var parent = ReflectiveInjector.resolveAndCreate([ParentProvider]);\n * var child = parent.resolveAndCreateChild([ChildProvider]);\n *\n * expect(child.get(ParentProvider) instanceof ParentProvider).toBe(true);\n * expect(child.get(ChildProvider) instanceof ChildProvider).toBe(true);\n * expect(child.get(ParentProvider)).toBe(parent.get(ParentProvider));\n * ```\n */\n abstract resolveAndCreateChild(providers: Provider[]): ReflectiveInjector;\n\n /**\n * Creates a child injector from previously resolved providers.\n *\n * <!-- TODO: Add a link to the section of the user guide talking about hierarchical injection.\n * -->\n *\n * This API is the recommended way to construct injectors in performance-sensitive parts.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class ParentProvider {}\n * class ChildProvider {}\n *\n * var parentProviders = ReflectiveInjector.resolve([ParentProvider]);\n * var childProviders = ReflectiveInjector.resolve([ChildProvider]);\n *\n * var parent = ReflectiveInjector.fromResolvedProviders(parentProviders);\n * var child = parent.createChildFromResolved(childProviders);\n *\n * expect(child.get(ParentProvider) instanceof ParentProvider).toBe(true);\n * expect(child.get(ChildProvider) instanceof ChildProvider).toBe(true);\n * expect(child.get(ParentProvider)).toBe(parent.get(ParentProvider));\n * ```\n */\n abstract createChildFromResolved(providers: ResolvedReflectiveProvider[]): ReflectiveInjector;\n\n /**\n * Resolves a provider and instantiates an object in the context of the injector.\n *\n * The created object does not get cached by the injector.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var injector = ReflectiveInjector.resolveAndCreate([Engine]);\n *\n * var car = injector.resolveAndInstantiate(Car);\n * expect(car.engine).toBe(injector.get(Engine));\n * expect(car).not.toBe(injector.resolveAndInstantiate(Car));\n * ```\n */\n abstract resolveAndInstantiate(provider: Provider): any;\n\n /**\n * Instantiates an object using a resolved provider in the context of the injector.\n *\n * The created object does not get cached by the injector.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var injector = ReflectiveInjector.resolveAndCreate([Engine]);\n * var carProvider = ReflectiveInjector.resolve([Car])[0];\n * var car = injector.instantiateResolved(carProvider);\n * expect(car.engine).toBe(injector.get(Engine));\n * expect(car).not.toBe(injector.instantiateResolved(carProvider));\n * ```\n */\n abstract instantiateResolved(provider: ResolvedReflectiveProvider): any;\n\n abstract get(token: any, notFoundValue?: any): any;\n}\n\nexport class ReflectiveInjector_ implements ReflectiveInjector {\n private static INJECTOR_KEY = (/* @__PURE__ */ ReflectiveKey.get(Injector));\n /** @internal */\n _constructionCounter: number = 0;\n /** @internal */\n public _providers: ResolvedReflectiveProvider[];\n public readonly parent: Injector|null;\n\n keyIds: number[];\n objs: any[];\n /**\n * Private\n */\n constructor(_providers: ResolvedReflectiveProvider[], _parent?: Injector) {\n this._providers = _providers;\n this.parent = _parent || null;\n\n const len = _providers.length;\n\n this.keyIds = [];\n this.objs = [];\n\n for (let i = 0; i < len; i++) {\n this.keyIds[i] = _providers[i].key.id;\n this.objs[i] = UNDEFINED;\n }\n }\n\n get(token: any, notFoundValue: any = THROW_IF_NOT_FOUND): any {\n return this._getByKey(ReflectiveKey.get(token), null, notFoundValue);\n }\n\n resolveAndCreateChild(providers: Provider[]): ReflectiveInjector {\n const ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers);\n return this.createChildFromResolved(ResolvedReflectiveProviders);\n }\n\n createChildFromResolved(providers: ResolvedReflectiveProvider[]): ReflectiveInjector {\n const inj = new ReflectiveInjector_(providers);\n (inj as {parent: Injector | null}).parent = this;\n return inj;\n }\n\n resolveAndInstantiate(provider: Provider): any {\n return this.instantiateResolved(ReflectiveInjector.resolve([provider])[0]);\n }\n\n instantiateResolved(provider: ResolvedReflectiveProvider): any {\n return this._instantiateProvider(provider);\n }\n\n getProviderAtIndex(index: number): ResolvedReflectiveProvider {\n if (index < 0 || index >= this._providers.length) {\n throw outOfBoundsError(index);\n }\n return this._providers[index];\n }\n\n /** @internal */\n _new(provider: ResolvedReflectiveProvider): any {\n if (this._constructionCounter++ > this._getMaxNumberOfObjects()) {\n throw cyclicDependencyError(this, provider.key);\n }\n return this._instantiateProvider(provider);\n }\n\n private _getMaxNumberOfObjects(): number {\n return this.objs.length;\n }\n\n private _instantiateProvider(provider: ResolvedReflectiveProvider): any {\n if (provider.multiProvider) {\n const res = [];\n for (let i = 0; i < provider.resolvedFactories.length; ++i) {\n res[i] = this._instantiate(provider, provider.resolvedFactories[i]);\n }\n return res;\n } else {\n return this._instantiate(provider, provider.resolvedFactories[0]);\n }\n }\n\n private _instantiate(\n provider: ResolvedReflectiveProvider,\n ResolvedReflectiveFactory: ResolvedReflectiveFactory): any {\n const factory = ResolvedReflectiveFactory.factory;\n\n let deps: any[];\n try {\n deps =\n ResolvedReflectiveFactory.dependencies.map(dep => this._getByReflectiveDependency(dep));\n } catch (e) {\n if (e.addKey) {\n e.addKey(this, provider.key);\n }\n throw e;\n }\n\n let obj: any;\n try {\n obj = factory(...deps);\n } catch (e) {\n throw instantiationError(this, e, e.stack, provider.key);\n }\n\n return obj;\n }\n\n private _getByReflectiveDependency(dep: ReflectiveDependency): any {\n return this._getByKey(dep.key, dep.visibility, dep.optional ? null : THROW_IF_NOT_FOUND);\n }\n\n private _getByKey(key: ReflectiveKey, visibility: Self|SkipSelf|null, notFoundValue: any): any {\n if (key === ReflectiveInjector_.INJECTOR_KEY) {\n return this;\n }\n\n if (visibility instanceof Self) {\n return this._getByKeySelf(key, notFoundValue);\n\n } else {\n return this._getByKeyDefault(key, notFoundValue, visibility);\n }\n }\n\n private _getObjByKeyId(keyId: number): any {\n for (let i = 0; i < this.keyIds.length; i++) {\n if (this.keyIds[i] === keyId) {\n if (this.objs[i] === UNDEFINED) {\n this.objs[i] = this._new(this._providers[i]);\n }\n\n return this.objs[i];\n }\n }\n\n return UNDEFINED;\n }\n\n /** @internal */\n _throwOrNull(key: ReflectiveKey, notFoundValue: any): any {\n if (notFoundValue !== THROW_IF_NOT_FOUND) {\n return notFoundValue;\n } else {\n throw noProviderError(this, key);\n }\n }\n\n /** @internal */\n _getByKeySelf(key: ReflectiveKey, notFoundValue: any): any {\n const obj = this._getObjByKeyId(key.id);\n return (obj !== UNDEFINED) ? obj : this._throwOrNull(key, notFoundValue);\n }\n\n /** @internal */\n _getByKeyDefault(key: ReflectiveKey, notFoundValue: any, visibility: Self|SkipSelf|null): any {\n let inj: Injector|null;\n\n if (visibility instanceof SkipSelf) {\n inj = this.parent;\n } else {\n inj = this;\n }\n\n while (inj instanceof ReflectiveInjector_) {\n const inj_ = <ReflectiveInjector_>inj;\n const obj = inj_._getObjByKeyId(key.id);\n if (obj !== UNDEFINED) return obj;\n inj = inj_.parent;\n }\n if (inj !== null) {\n return inj.get(key.token, notFoundValue);\n } else {\n return this._throwOrNull(key, notFoundValue);\n }\n }\n\n get displayName(): string {\n const providers =\n _mapProviders(this, (b: ResolvedReflectiveProvider) => ' \"' + b.key.displayName + '\" ')\n .join(', ');\n return `ReflectiveInjector(providers: [${providers}])`;\n }\n\n toString(): string {\n return this.displayName;\n }\n}\n\nfunction _mapProviders(injector: ReflectiveInjector_, fn: Function): any[] {\n const res: any[] = [];\n for (let i = 0; i < injector._providers.length; ++i) {\n res[i] = fn(injector.getProviderAtIndex(i));\n }\n return res;\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 * The `di` module provides dependency injection container services.\n */\n\nexport * from './metadata';\nexport {InjectFlags} from './interface/injector';\nexport {ɵɵdefineInjectable, defineInjectable, ɵɵdefineInjector, InjectableType, InjectorType} from './interface/defs';\nexport {forwardRef, resolveForwardRef, ForwardRefFn} from './forward_ref';\nexport {Injectable, InjectableDecorator, InjectableProvider} from './injectable';\nexport {Injector} from './injector';\nexport {ProviderToken} from './provider_token';\nexport {ɵɵinject, inject, ɵɵinvalidFactoryDep} from './injector_compatibility';\nexport {INJECTOR} from './injector_token';\nexport {ReflectiveInjector} from './reflective_injector';\nexport {ClassProvider, ClassSansProvider, ConstructorProvider, ConstructorSansProvider, ExistingProvider, ExistingSansProvider, FactoryProvider, FactorySansProvider, Provider, StaticClassProvider, StaticClassSansProvider, StaticProvider, TypeProvider, ValueProvider, ValueSansProvider} from './interface/provider';\nexport {ResolvedReflectiveFactory, ResolvedReflectiveProvider} from './reflective_provider';\nexport {ReflectiveKey} from './reflective_key';\nexport {InjectionToken} from './injection_token';\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 * This file should not be necessary because node resolution should just default to `./di/index`!\n *\n * However it does not seem to work and it breaks:\n * - //packages/animations/browser/test:test_web_chromium-local\n * - //packages/compiler-cli/test:extract_i18n\n * - //packages/compiler-cli/test:ngc\n * - //packages/compiler-cli/test:perform_watch\n * - //packages/compiler-cli/test/diagnostics:check_types\n * - //packages/compiler-cli/test/transformers:test\n * - //packages/compiler/test:test\n * - //tools/public_api_guard:core_api\n *\n * Remove this file once the above is solved or wait until `ngc` is deleted and then it should be\n * safe to delete this file.\n */\n\nexport * from './di/index';\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 */\nimport {InjectFlags, resolveForwardRef} from '../../di';\nimport {assertInjectImplementationNotEqual} from '../../di/inject_switch';\nimport {ɵɵinject} from '../../di/injector_compatibility';\nimport {ProviderToken} from '../../di/provider_token';\nimport {getOrCreateInjectable} from '../di';\nimport {TDirectiveHostNode} from '../interfaces/node';\nimport {getCurrentTNode, getLView} from '../state';\n\n/**\n * Returns the value associated to the given token from the injectors.\n *\n * `directiveInject` is intended to be used for directive, component and pipe factories.\n * All other injection use `inject` which does not walk the node injector tree.\n *\n * Usage example (in factory function):\n *\n * ```ts\n * class SomeDirective {\n * constructor(directive: DirectiveA) {}\n *\n * static ɵdir = ɵɵdefineDirective({\n * type: SomeDirective,\n * factory: () => new SomeDirective(ɵɵdirectiveInject(DirectiveA))\n * });\n * }\n * ```\n * @param token the type or token to inject\n * @param flags Injection flags\n * @returns the value from the injector or `null` when not found\n *\n * @codeGenApi\n */\nexport function ɵɵdirectiveInject<T>(token: ProviderToken<T>): T;\nexport function ɵɵdirectiveInject<T>(token: ProviderToken<T>, flags: InjectFlags): T;\nexport function ɵɵdirectiveInject<T>(token: ProviderToken<T>, flags = InjectFlags.Default): T|null {\n const lView = getLView();\n // Fall back to inject() if view hasn't been created. This situation can happen in tests\n // if inject utilities are used before bootstrapping.\n if (lView === null) {\n // Verify that we will not get into infinite loop.\n ngDevMode && assertInjectImplementationNotEqual(ɵɵdirectiveInject);\n return ɵɵinject(token, flags);\n }\n const tNode = getCurrentTNode();\n return getOrCreateInjectable<T>(\n tNode as TDirectiveHostNode, lView, resolveForwardRef(token), flags);\n}\n\n/**\n * Throws an error indicating that a factory function could not be generated by the compiler for a\n * particular class.\n *\n * This instruction allows the actual error message to be optimized away when ngDevMode is turned\n * off, saving bytes of generated code while still providing a good experience in dev mode.\n *\n * The name of the class is not mentioned here, but will be in the generated factory function name\n * and thus in the stack trace.\n *\n * @codeGenApi\n */\nexport function ɵɵinvalidFactory(): never {\n const msg =\n ngDevMode ? `This constructor was not compatible with Dependency Injection.` : 'invalid';\n throw new Error(msg);\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 */\nimport {bindingUpdated} from '../bindings';\nimport {TNode} from '../interfaces/node';\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {LView, RENDERER, TView} from '../interfaces/view';\nimport {getLView, getSelectedTNode, getTView, nextBindingIndex} from '../state';\n\nimport {elementPropertyInternal, setInputsForProperty, storePropertyBindingMetadata} from './shared';\n\n\n/**\n * Update a property on a selected element.\n *\n * Operates on the element selected by index via the {@link select} instruction.\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled\n *\n * @param propName Name of property. Because it is going to DOM, this is not subject to\n * renaming as part of minification.\n * @param value New value to write.\n * @param sanitizer An optional function used to sanitize the value.\n * @returns This function returns itself so that it may be chained\n * (e.g. `property('name', ctx.name)('title', ctx.title)`)\n *\n * @codeGenApi\n */\nexport function ɵɵproperty<T>(\n propName: string, value: T, sanitizer?: SanitizerFn|null): typeof ɵɵproperty {\n const lView = getLView();\n const bindingIndex = nextBindingIndex();\n if (bindingUpdated(lView, bindingIndex, value)) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView, tNode, lView, propName, value, lView[RENDERER], sanitizer, false);\n ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);\n }\n return ɵɵproperty;\n}\n\n/**\n * Given `<div style=\"...\" my-dir>` and `MyDir` with `@Input('style')` we need to write to\n * directive input.\n */\nexport function setDirectiveInputsWhichShadowsStyling(\n tView: TView, tNode: TNode, lView: LView, value: any, isClassBased: boolean) {\n const inputs = tNode.inputs!;\n const property = isClassBased ? 'class' : 'style';\n // We support both 'class' and `className` hence the fallback.\n setInputsForProperty(tView, lView, inputs[property], property, value);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertDefined, assertEqual, assertIndexInRange} from '../../util/assert';\nimport {assertFirstCreatePass, assertHasParent} from '../assert';\nimport {attachPatchData} from '../context_discovery';\nimport {formatRuntimeError, RuntimeErrorCode} from '../error_code';\nimport {registerPostOrderHooks} from '../hooks';\nimport {hasClassInput, hasStyleInput, TAttributes, TElementNode, TNode, TNodeFlags, TNodeType} from '../interfaces/node';\nimport {RElement} from '../interfaces/renderer_dom';\nimport {isContentQueryHost, isDirectiveHost} from '../interfaces/type_checks';\nimport {HEADER_OFFSET, LView, RENDERER, TView} from '../interfaces/view';\nimport {assertTNodeType} from '../node_assert';\nimport {appendChild, createElementNode, writeDirectClass, writeDirectStyle} from '../node_manipulation';\nimport {decreaseElementDepthCount, getBindingIndex, getCurrentTNode, getElementDepthCount, getLView, getNamespace, getTView, increaseElementDepthCount, isCurrentTNodeParent, setCurrentTNode, setCurrentTNodeAsNotParent} from '../state';\nimport {computeStaticStyling} from '../styling/static_styling';\nimport {setUpAttributes} from '../util/attrs_utils';\nimport {getConstant} from '../util/view_utils';\nimport {setDirectiveInputsWhichShadowsStyling} from './property';\nimport {createDirectivesInstances, executeContentQueries, getOrCreateTNode, matchingSchemas, resolveDirectives, saveResolvedLocalsInData} from './shared';\n\n\n\nfunction elementStartFirstCreatePass(\n index: number, tView: TView, lView: LView, native: RElement, name: string,\n attrsIndex?: number|null, localRefsIndex?: number): TElementNode {\n ngDevMode && assertFirstCreatePass(tView);\n ngDevMode && ngDevMode.firstCreatePass++;\n\n const tViewConsts = tView.consts;\n const attrs = getConstant<TAttributes>(tViewConsts, attrsIndex);\n const tNode = getOrCreateTNode(tView, index, TNodeType.Element, name, attrs);\n\n const hasDirectives =\n resolveDirectives(tView, lView, tNode, getConstant<string[]>(tViewConsts, localRefsIndex));\n ngDevMode && logUnknownElementError(tView, native, tNode, hasDirectives);\n\n if (tNode.attrs !== null) {\n computeStaticStyling(tNode, tNode.attrs, false);\n }\n\n if (tNode.mergedAttrs !== null) {\n computeStaticStyling(tNode, tNode.mergedAttrs, true);\n }\n\n if (tView.queries !== null) {\n tView.queries.elementStart(tView, tNode);\n }\n\n return tNode;\n}\n\n/**\n * Create DOM element. The instruction must later be followed by `elementEnd()` call.\n *\n * @param index Index of the element in the LView array\n * @param name Name of the DOM Node\n * @param attrsIndex Index of the element's attributes in the `consts` array.\n * @param localRefsIndex Index of the element's local references in the `consts` array.\n *\n * Attributes and localRefs are passed as an array of strings where elements with an even index\n * hold an attribute name and elements with an odd index hold an attribute value, ex.:\n * ['id', 'warning5', 'class', 'alert']\n *\n * @codeGenApi\n */\nexport function ɵɵelementStart(\n index: number, name: string, attrsIndex?: number|null, localRefsIndex?: number): void {\n const lView = getLView();\n const tView = getTView();\n const adjustedIndex = HEADER_OFFSET + index;\n\n ngDevMode &&\n assertEqual(\n getBindingIndex(), tView.bindingStartIndex,\n 'elements should be created before any bindings');\n ngDevMode && assertIndexInRange(lView, adjustedIndex);\n\n const renderer = lView[RENDERER];\n const native = lView[adjustedIndex] = createElementNode(renderer, name, getNamespace());\n const tNode = tView.firstCreatePass ?\n elementStartFirstCreatePass(\n adjustedIndex, tView, lView, native, name, attrsIndex, localRefsIndex) :\n tView.data[adjustedIndex] as TElementNode;\n setCurrentTNode(tNode, true);\n\n const mergedAttrs = tNode.mergedAttrs;\n if (mergedAttrs !== null) {\n setUpAttributes(renderer, native, mergedAttrs);\n }\n const classes = tNode.classes;\n if (classes !== null) {\n writeDirectClass(renderer, native, classes);\n }\n const styles = tNode.styles;\n if (styles !== null) {\n writeDirectStyle(renderer, native, styles);\n }\n\n if ((tNode.flags & TNodeFlags.isDetached) !== TNodeFlags.isDetached) {\n // In the i18n case, the translation may have removed this element, so only add it if it is not\n // detached. See `TNodeType.Placeholder` and `LFrame.inI18n` for more context.\n appendChild(tView, lView, native, tNode);\n }\n\n // any immediate children of a component or template container must be pre-emptively\n // monkey-patched with the component view data so that the element can be inspected\n // later on using any element discovery utility methods (see `element_discovery.ts`)\n if (getElementDepthCount() === 0) {\n attachPatchData(native, lView);\n }\n increaseElementDepthCount();\n\n\n if (isDirectiveHost(tNode)) {\n createDirectivesInstances(tView, lView, tNode);\n executeContentQueries(tView, tNode, lView);\n }\n if (localRefsIndex !== null) {\n saveResolvedLocalsInData(lView, tNode);\n }\n}\n\n/**\n * Mark the end of the element.\n *\n * @codeGenApi\n */\nexport function ɵɵelementEnd(): void {\n let currentTNode = getCurrentTNode()!;\n ngDevMode && assertDefined(currentTNode, 'No parent node to close.');\n if (isCurrentTNodeParent()) {\n setCurrentTNodeAsNotParent();\n } else {\n ngDevMode && assertHasParent(getCurrentTNode());\n currentTNode = currentTNode.parent!;\n setCurrentTNode(currentTNode, false);\n }\n\n const tNode = currentTNode;\n ngDevMode && assertTNodeType(tNode, TNodeType.AnyRNode);\n\n\n decreaseElementDepthCount();\n\n const tView = getTView();\n if (tView.firstCreatePass) {\n registerPostOrderHooks(tView, currentTNode);\n if (isContentQueryHost(currentTNode)) {\n tView.queries!.elementEnd(currentTNode);\n }\n }\n\n if (tNode.classesWithoutHost != null && hasClassInput(tNode)) {\n setDirectiveInputsWhichShadowsStyling(tView, tNode, getLView(), tNode.classesWithoutHost, true);\n }\n\n if (tNode.stylesWithoutHost != null && hasStyleInput(tNode)) {\n setDirectiveInputsWhichShadowsStyling(tView, tNode, getLView(), tNode.stylesWithoutHost, false);\n }\n}\n\n/**\n * Creates an empty element using {@link elementStart} and {@link elementEnd}\n *\n * @param index Index of the element in the data array\n * @param name Name of the DOM Node\n * @param attrsIndex Index of the element's attributes in the `consts` array.\n * @param localRefsIndex Index of the element's local references in the `consts` array.\n *\n * @codeGenApi\n */\nexport function ɵɵelement(\n index: number, name: string, attrsIndex?: number|null, localRefsIndex?: number): void {\n ɵɵelementStart(index, name, attrsIndex, localRefsIndex);\n ɵɵelementEnd();\n}\n\nfunction logUnknownElementError(\n tView: TView, element: RElement, tNode: TNode, hasDirectives: boolean): void {\n const schemas = tView.schemas;\n\n // If `schemas` is set to `null`, that's an indication that this Component was compiled in AOT\n // mode where this check happens at compile time. In JIT mode, `schemas` is always present and\n // defined as an array (as an empty array in case `schemas` field is not defined) and we should\n // execute the check below.\n if (schemas === null) return;\n\n const tagName = tNode.value;\n\n // If the element matches any directive, it's considered as valid.\n if (!hasDirectives && tagName !== null) {\n // The element is unknown if it's an instance of HTMLUnknownElement or it isn't registered\n // as a custom element. Note that unknown elements with a dash in their name won't be instances\n // of HTMLUnknownElement in browsers that support web components.\n const isUnknown =\n // Note that we can't check for `typeof HTMLUnknownElement === 'function'`,\n // because while most browsers return 'function', IE returns 'object'.\n (typeof HTMLUnknownElement !== 'undefined' && HTMLUnknownElement &&\n element instanceof HTMLUnknownElement) ||\n (typeof customElements !== 'undefined' && tagName.indexOf('-') > -1 &&\n !customElements.get(tagName));\n\n if (isUnknown && !matchingSchemas(tView, tagName)) {\n let message = `'${tagName}' is not a known element:\\n`;\n message += `1. If '${\n tagName}' is an Angular component, then verify that it is part of this module.\\n`;\n if (tagName && tagName.indexOf('-') > -1) {\n message += `2. If '${\n tagName}' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.`;\n } else {\n message +=\n `2. To allow any element add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.`;\n }\n console.error(formatRuntimeError(RuntimeErrorCode.UNKNOWN_ELEMENT, message));\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 */\nimport {assertEqual, assertIndexInRange} from '../../util/assert';\nimport {assertHasParent} from '../assert';\nimport {attachPatchData} from '../context_discovery';\nimport {registerPostOrderHooks} from '../hooks';\nimport {TAttributes, TElementContainerNode, TNodeType} from '../interfaces/node';\nimport {isContentQueryHost, isDirectiveHost} from '../interfaces/type_checks';\nimport {HEADER_OFFSET, LView, RENDERER, T_HOST, TView} from '../interfaces/view';\nimport {assertTNodeType} from '../node_assert';\nimport {appendChild} from '../node_manipulation';\nimport {getBindingIndex, getCurrentTNode, getLView, getTView, isCurrentTNodeParent, setCurrentTNode, setCurrentTNodeAsNotParent} from '../state';\nimport {computeStaticStyling} from '../styling/static_styling';\nimport {getConstant} from '../util/view_utils';\n\nimport {createDirectivesInstances, executeContentQueries, getOrCreateTNode, resolveDirectives, saveResolvedLocalsInData} from './shared';\n\nfunction elementContainerStartFirstCreatePass(\n index: number, tView: TView, lView: LView, attrsIndex?: number|null,\n localRefsIndex?: number): TElementContainerNode {\n ngDevMode && ngDevMode.firstCreatePass++;\n\n const tViewConsts = tView.consts;\n const attrs = getConstant<TAttributes>(tViewConsts, attrsIndex);\n const tNode = getOrCreateTNode(tView, index, TNodeType.ElementContainer, 'ng-container', attrs);\n\n // While ng-container doesn't necessarily support styling, we use the style context to identify\n // and execute directives on the ng-container.\n if (attrs !== null) {\n computeStaticStyling(tNode, attrs, true);\n }\n\n const localRefs = getConstant<string[]>(tViewConsts, localRefsIndex);\n resolveDirectives(tView, lView, tNode, localRefs);\n\n if (tView.queries !== null) {\n tView.queries.elementStart(tView, tNode);\n }\n\n return tNode;\n}\n\n/**\n * Creates a logical container for other nodes (<ng-container>) backed by a comment node in the DOM.\n * The instruction must later be followed by `elementContainerEnd()` call.\n *\n * @param index Index of the element in the LView array\n * @param attrsIndex Index of the container attributes in the `consts` array.\n * @param localRefsIndex Index of the container's local references in the `consts` array.\n *\n * Even if this instruction accepts a set of attributes no actual attribute values are propagated to\n * the DOM (as a comment node can't have attributes). Attributes are here only for directive\n * matching purposes and setting initial inputs of directives.\n *\n * @codeGenApi\n */\nexport function ɵɵelementContainerStart(\n index: number, attrsIndex?: number|null, localRefsIndex?: number): void {\n const lView = getLView();\n const tView = getTView();\n const adjustedIndex = index + HEADER_OFFSET;\n\n ngDevMode && assertIndexInRange(lView, adjustedIndex);\n ngDevMode &&\n assertEqual(\n getBindingIndex(), tView.bindingStartIndex,\n 'element containers should be created before any bindings');\n\n const tNode = tView.firstCreatePass ?\n elementContainerStartFirstCreatePass(\n adjustedIndex, tView, lView, attrsIndex, localRefsIndex) :\n tView.data[adjustedIndex] as TElementContainerNode;\n setCurrentTNode(tNode, true);\n\n ngDevMode && ngDevMode.rendererCreateComment++;\n const native = lView[adjustedIndex] =\n lView[RENDERER].createComment(ngDevMode ? 'ng-container' : '');\n appendChild(tView, lView, native, tNode);\n attachPatchData(native, lView);\n\n if (isDirectiveHost(tNode)) {\n createDirectivesInstances(tView, lView, tNode);\n executeContentQueries(tView, tNode, lView);\n }\n\n if (localRefsIndex != null) {\n saveResolvedLocalsInData(lView, tNode);\n }\n}\n\n/**\n * Mark the end of the <ng-container>.\n *\n * @codeGenApi\n */\nexport function ɵɵelementContainerEnd(): void {\n let currentTNode = getCurrentTNode()!;\n const tView = getTView();\n if (isCurrentTNodeParent()) {\n setCurrentTNodeAsNotParent();\n } else {\n ngDevMode && assertHasParent(currentTNode);\n currentTNode = currentTNode.parent!;\n setCurrentTNode(currentTNode, false);\n }\n\n ngDevMode && assertTNodeType(currentTNode, TNodeType.ElementContainer);\n\n if (tView.firstCreatePass) {\n registerPostOrderHooks(tView, currentTNode);\n if (isContentQueryHost(currentTNode)) {\n tView.queries!.elementEnd(currentTNode);\n }\n }\n}\n\n/**\n * Creates an empty logical container using {@link elementContainerStart}\n * and {@link elementContainerEnd}\n *\n * @param index Index of the element in the LView array\n * @param attrsIndex Index of the container attributes in the `consts` array.\n * @param localRefsIndex Index of the container's local references in the `consts` array.\n *\n * @codeGenApi\n */\nexport function ɵɵelementContainer(\n index: number, attrsIndex?: number|null, localRefsIndex?: number): void {\n ɵɵelementContainerStart(index, attrsIndex, localRefsIndex);\n ɵɵelementContainerEnd();\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 */\nimport {OpaqueViewState} from '../interfaces/view';\nimport {getLView} from '../state';\n\n/**\n * Returns the current OpaqueViewState instance.\n *\n * Used in conjunction with the restoreView() instruction to save a snapshot\n * of the current view and restore it when listeners are invoked. This allows\n * walking the declaration view tree in listeners to get vars from parent views.\n *\n * @codeGenApi\n */\nexport function ɵɵgetCurrentView(): OpaqueViewState {\n return getLView() as any as OpaqueViewState;\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 {Observable, Subscribable} from 'rxjs';\n\n/**\n * Determine if the argument is shaped like a Promise\n */\nexport function isPromise<T = any>(obj: any): obj is Promise<T> {\n // allow any Promise/A+ compliant thenable.\n // It's up to the caller to ensure that obj.then conforms to the spec\n return !!obj && typeof obj.then === 'function';\n}\n\n/**\n * Determine if the argument is a Subscribable\n */\nexport function isSubscribable(obj: any|Subscribable<any>): obj is Subscribable<any> {\n return !!obj && typeof obj.subscribe === 'function';\n}\n\n/**\n * Determine if the argument is an Observable\n *\n * Strictly this tests that the `obj` is `Subscribable`, since `Observable`\n * types need additional methods, such as `lift()`. But it is adequate for our\n * needs since within the Angular framework code we only ever need to use the\n * `subscribe()` method, and RxJS has mechanisms to wrap `Subscribable` objects\n * into `Observable` as needed.\n */\nexport const isObservable =\n isSubscribable as ((obj: any|Observable<any>) => obj is Observable<any>);\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\nimport {assertIndexInRange} from '../../util/assert';\nimport {isObservable} from '../../util/lang';\nimport {PropertyAliasValue, TNode, TNodeFlags, TNodeType} from '../interfaces/node';\nimport {GlobalTargetResolver, isProceduralRenderer, Renderer3} from '../interfaces/renderer';\nimport {RElement} from '../interfaces/renderer_dom';\nimport {isDirectiveHost} from '../interfaces/type_checks';\nimport {CLEANUP, CONTEXT, FLAGS, LView, LViewFlags, RENDERER, TView} from '../interfaces/view';\nimport {assertTNodeType} from '../node_assert';\nimport {profiler, ProfilerEvent} from '../profiler';\nimport {getCurrentDirectiveDef, getCurrentTNode, getLView, getTView} from '../state';\nimport {getComponentLViewByIndex, getNativeByTNode, unwrapRNode} from '../util/view_utils';\n\nimport {getOrCreateLViewCleanup, getOrCreateTViewCleanup, handleError, loadComponentRenderer, markViewDirty} from './shared';\n\n\n\n/**\n * Adds an event listener to the current node.\n *\n * If an output exists on one of the node's directives, it also subscribes to the output\n * and saves the subscription for later cleanup.\n *\n * @param eventName Name of the event\n * @param listenerFn The function to be called when event emits\n * @param useCapture Whether or not to use capture in event listener\n * @param eventTargetResolver Function that returns global target information in case this listener\n * should be attached to a global object like window, document or body\n *\n * @codeGenApi\n */\nexport function ɵɵlistener(\n eventName: string, listenerFn: (e?: any) => any, useCapture?: boolean,\n eventTargetResolver?: GlobalTargetResolver): typeof ɵɵlistener {\n const lView = getLView();\n const tView = getTView();\n const tNode = getCurrentTNode()!;\n listenerInternal(\n tView, lView, lView[RENDERER], tNode, eventName, listenerFn, !!useCapture,\n eventTargetResolver);\n return ɵɵlistener;\n}\n\n/**\n * Registers a synthetic host listener (e.g. `(@foo.start)`) on a component or directive.\n *\n * This instruction is for compatibility purposes and is designed to ensure that a\n * synthetic host listener (e.g. `@HostListener('@foo.start')`) properly gets rendered\n * in the component's renderer. Normally all host listeners are evaluated with the\n * parent component's renderer, but, in the case of animation @triggers, they need\n * to be evaluated with the sub component's renderer (because that's where the\n * animation triggers are defined).\n *\n * Do not use this instruction as a replacement for `listener`. This instruction\n * only exists to ensure compatibility with the ViewEngine's host binding behavior.\n *\n * @param eventName Name of the event\n * @param listenerFn The function to be called when event emits\n * @param useCapture Whether or not to use capture in event listener\n * @param eventTargetResolver Function that returns global target information in case this listener\n * should be attached to a global object like window, document or body\n *\n * @codeGenApi\n */\nexport function ɵɵsyntheticHostListener(\n eventName: string, listenerFn: (e?: any) => any): typeof ɵɵsyntheticHostListener {\n const tNode = getCurrentTNode()!;\n const lView = getLView();\n const tView = getTView();\n const currentDef = getCurrentDirectiveDef(tView.data);\n const renderer = loadComponentRenderer(currentDef, tNode, lView);\n listenerInternal(tView, lView, renderer, tNode, eventName, listenerFn, false);\n return ɵɵsyntheticHostListener;\n}\n\n/**\n * A utility function that checks if a given element has already an event handler registered for an\n * event with a specified name. The TView.cleanup data structure is used to find out which events\n * are registered for a given element.\n */\nfunction findExistingListener(\n tView: TView, lView: LView, eventName: string, tNodeIdx: number): ((e?: any) => any)|null {\n const tCleanup = tView.cleanup;\n if (tCleanup != null) {\n for (let i = 0; i < tCleanup.length - 1; i += 2) {\n const cleanupEventName = tCleanup[i];\n if (cleanupEventName === eventName && tCleanup[i + 1] === tNodeIdx) {\n // We have found a matching event name on the same node but it might not have been\n // registered yet, so we must explicitly verify entries in the LView cleanup data\n // structures.\n const lCleanup = lView[CLEANUP]!;\n const listenerIdxInLCleanup = tCleanup[i + 2];\n return lCleanup.length > listenerIdxInLCleanup ? lCleanup[listenerIdxInLCleanup] : null;\n }\n // TView.cleanup can have a mix of 4-elements entries (for event handler cleanups) or\n // 2-element entries (for directive and queries destroy hooks). As such we can encounter\n // blocks of 4 or 2 items in the tView.cleanup and this is why we iterate over 2 elements\n // first and jump another 2 elements if we detect listeners cleanup (4 elements). Also check\n // documentation of TView.cleanup for more details of this data structure layout.\n if (typeof cleanupEventName === 'string') {\n i += 2;\n }\n }\n }\n return null;\n}\n\nfunction listenerInternal(\n tView: TView, lView: LView, renderer: Renderer3, tNode: TNode, eventName: string,\n listenerFn: (e?: any) => any, useCapture: boolean,\n eventTargetResolver?: GlobalTargetResolver): void {\n const isTNodeDirectiveHost = isDirectiveHost(tNode);\n const firstCreatePass = tView.firstCreatePass;\n const tCleanup: false|any[] = firstCreatePass && getOrCreateTViewCleanup(tView);\n const context = lView[CONTEXT];\n\n // When the ɵɵlistener instruction was generated and is executed we know that there is either a\n // native listener or a directive output on this element. As such we we know that we will have to\n // register a listener and store its cleanup function on LView.\n const lCleanup = getOrCreateLViewCleanup(lView);\n\n ngDevMode && assertTNodeType(tNode, TNodeType.AnyRNode | TNodeType.AnyContainer);\n\n let processOutputs = true;\n\n // Adding a native event listener is applicable when:\n // - The corresponding TNode represents a DOM element.\n // - The event target has a resolver (usually resulting in a global object,\n // such as `window` or `document`).\n if ((tNode.type & TNodeType.AnyRNode) || eventTargetResolver) {\n const native = getNativeByTNode(tNode, lView) as RElement;\n const target = eventTargetResolver ? eventTargetResolver(native) : native;\n const lCleanupIndex = lCleanup.length;\n const idxOrTargetGetter = eventTargetResolver ?\n (_lView: LView) => eventTargetResolver(unwrapRNode(_lView[tNode.index])) :\n tNode.index;\n\n // In order to match current behavior, native DOM event listeners must be added for all\n // events (including outputs).\n if (isProceduralRenderer(renderer)) {\n // There might be cases where multiple directives on the same element try to register an event\n // handler function for the same event. In this situation we want to avoid registration of\n // several native listeners as each registration would be intercepted by NgZone and\n // trigger change detection. This would mean that a single user action would result in several\n // change detections being invoked. To avoid this situation we want to have only one call to\n // native handler registration (for the same element and same type of event).\n //\n // In order to have just one native event handler in presence of multiple handler functions,\n // we just register a first handler function as a native event listener and then chain\n // (coalesce) other handler functions on top of the first native handler function.\n let existingListener = null;\n // Please note that the coalescing described here doesn't happen for events specifying an\n // alternative target (ex. (document:click)) - this is to keep backward compatibility with the\n // view engine.\n // Also, we don't have to search for existing listeners is there are no directives\n // matching on a given node as we can't register multiple event handlers for the same event in\n // a template (this would mean having duplicate attributes).\n if (!eventTargetResolver && isTNodeDirectiveHost) {\n existingListener = findExistingListener(tView, lView, eventName, tNode.index);\n }\n if (existingListener !== null) {\n // Attach a new listener to coalesced listeners list, maintaining the order in which\n // listeners are registered. For performance reasons, we keep a reference to the last\n // listener in that list (in `__ngLastListenerFn__` field), so we can avoid going through\n // the entire set each time we need to add a new listener.\n const lastListenerFn = (<any>existingListener).__ngLastListenerFn__ || existingListener;\n lastListenerFn.__ngNextListenerFn__ = listenerFn;\n (<any>existingListener).__ngLastListenerFn__ = listenerFn;\n processOutputs = false;\n } else {\n listenerFn = wrapListener(tNode, lView, context, listenerFn, false /** preventDefault */);\n const cleanupFn = renderer.listen(target as RElement, eventName, listenerFn);\n ngDevMode && ngDevMode.rendererAddEventListener++;\n\n lCleanup.push(listenerFn, cleanupFn);\n tCleanup && tCleanup.push(eventName, idxOrTargetGetter, lCleanupIndex, lCleanupIndex + 1);\n }\n\n } else {\n listenerFn = wrapListener(tNode, lView, context, listenerFn, true /** preventDefault */);\n target.addEventListener(eventName, listenerFn, useCapture);\n ngDevMode && ngDevMode.rendererAddEventListener++;\n\n lCleanup.push(listenerFn);\n tCleanup && tCleanup.push(eventName, idxOrTargetGetter, lCleanupIndex, useCapture);\n }\n } else {\n // Even if there is no native listener to add, we still need to wrap the listener so that OnPush\n // ancestors are marked dirty when an event occurs.\n listenerFn = wrapListener(tNode, lView, context, listenerFn, false /** preventDefault */);\n }\n\n // subscribe to directive outputs\n const outputs = tNode.outputs;\n let props: PropertyAliasValue|undefined;\n if (processOutputs && outputs !== null && (props = outputs[eventName])) {\n const propsLength = props.length;\n if (propsLength) {\n for (let i = 0; i < propsLength; i += 2) {\n const index = props[i] as number;\n ngDevMode && assertIndexInRange(lView, index);\n const minifiedName = props[i + 1];\n const directiveInstance = lView[index];\n const output = directiveInstance[minifiedName];\n\n if (ngDevMode && !isObservable(output)) {\n throw new Error(`@Output ${minifiedName} not initialized in '${\n directiveInstance.constructor.name}'.`);\n }\n\n const subscription = output.subscribe(listenerFn);\n const idx = lCleanup.length;\n lCleanup.push(listenerFn, subscription);\n tCleanup && tCleanup.push(eventName, tNode.index, idx, -(idx + 1));\n }\n }\n }\n}\n\nfunction executeListenerWithErrorHandling(\n lView: LView, context: {}|null, listenerFn: (e?: any) => any, e: any): boolean {\n try {\n profiler(ProfilerEvent.OutputStart, context, listenerFn);\n // Only explicitly returning false from a listener should preventDefault\n return listenerFn(e) !== false;\n } catch (error) {\n handleError(lView, error);\n return false;\n } finally {\n profiler(ProfilerEvent.OutputEnd, context, listenerFn);\n }\n}\n\n/**\n * Wraps an event listener with a function that marks ancestors dirty and prevents default behavior,\n * if applicable.\n *\n * @param tNode The TNode associated with this listener\n * @param lView The LView that contains this listener\n * @param listenerFn The listener function to call\n * @param wrapWithPreventDefault Whether or not to prevent default behavior\n * (the procedural renderer does this already, so in those cases, we should skip)\n */\nfunction wrapListener(\n tNode: TNode, lView: LView, context: {}|null, listenerFn: (e?: any) => any,\n wrapWithPreventDefault: boolean): EventListener {\n // Note: we are performing most of the work in the listener function itself\n // to optimize listener registration.\n return function wrapListenerIn_markDirtyAndPreventDefault(e: any) {\n // Ivy uses `Function` as a special token that allows us to unwrap the function\n // so that it can be invoked programmatically by `DebugNode.triggerEventHandler`.\n if (e === Function) {\n return listenerFn;\n }\n\n // In order to be backwards compatible with View Engine, events on component host nodes\n // must also mark the component view itself dirty (i.e. the view that it owns).\n const startView = tNode.flags & TNodeFlags.isComponentHost ?\n getComponentLViewByIndex(tNode.index, lView) :\n lView;\n\n // See interfaces/view.ts for more on LViewFlags.ManualOnPush\n if ((lView[FLAGS] & LViewFlags.ManualOnPush) === 0) {\n markViewDirty(startView);\n }\n\n let result = executeListenerWithErrorHandling(lView, context, listenerFn, e);\n // A just-invoked listener function might have coalesced listeners so we need to check for\n // their presence and invoke as needed.\n let nextListenerFn = (<any>wrapListenerIn_markDirtyAndPreventDefault).__ngNextListenerFn__;\n while (nextListenerFn) {\n // We should prevent default if any of the listeners explicitly return false\n result = executeListenerWithErrorHandling(lView, context, nextListenerFn, e) && result;\n nextListenerFn = (<any>nextListenerFn).__ngNextListenerFn__;\n }\n\n if (wrapWithPreventDefault && result === false) {\n e.preventDefault();\n // Necessary for legacy browsers that don't support preventDefault (e.g. IE)\n e.returnValue = false;\n }\n\n return result;\n };\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport {ɵɵnamespaceHTML, ɵɵnamespaceMathML, ɵɵnamespaceSVG} from '../state';\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 */\nimport {nextContextImpl} from '../state';\n\n/**\n * Retrieves a context at the level specified and saves it as the global, contextViewData.\n * Will get the next level up if level is not specified.\n *\n * This is used to save contexts of parent views so they can be bound in embedded views, or\n * in conjunction with reference() to bind a ref from a parent view.\n *\n * @param level The relative level of the view from which to grab context compared to contextVewData\n * @returns context\n *\n * @codeGenApi\n */\nexport function ɵɵnextContext<T = any>(level: number = 1): T {\n return nextContextImpl(level);\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 */\nimport {newArray} from '../../util/array_utils';\nimport {TAttributes, TElementNode, TNode, TNodeFlags, TNodeType} from '../interfaces/node';\nimport {ProjectionSlots} from '../interfaces/projection';\nimport {DECLARATION_COMPONENT_VIEW, HEADER_OFFSET, T_HOST} from '../interfaces/view';\nimport {applyProjection} from '../node_manipulation';\nimport {getProjectAsAttrValue, isNodeMatchingSelectorList, isSelectorInSelectorList} from '../node_selector_matcher';\nimport {getLView, getTView, setCurrentTNodeAsNotParent} from '../state';\nimport {getOrCreateTNode} from './shared';\n\n\n\n/**\n * Checks a given node against matching projection slots and returns the\n * determined slot index. Returns \"null\" if no slot matched the given node.\n *\n * This function takes into account the parsed ngProjectAs selector from the\n * node's attributes. If present, it will check whether the ngProjectAs selector\n * matches any of the projection slot selectors.\n */\nexport function matchingProjectionSlotIndex(tNode: TNode, projectionSlots: ProjectionSlots): number|\n null {\n let wildcardNgContentIndex = null;\n const ngProjectAsAttrVal = getProjectAsAttrValue(tNode);\n for (let i = 0; i < projectionSlots.length; i++) {\n const slotValue = projectionSlots[i];\n // The last wildcard projection slot should match all nodes which aren't matching\n // any selector. This is necessary to be backwards compatible with view engine.\n if (slotValue === '*') {\n wildcardNgContentIndex = i;\n continue;\n }\n // If we ran into an `ngProjectAs` attribute, we should match its parsed selector\n // to the list of selectors, otherwise we fall back to matching against the node.\n if (ngProjectAsAttrVal === null ?\n isNodeMatchingSelectorList(tNode, slotValue, /* isProjectionMode */ true) :\n isSelectorInSelectorList(ngProjectAsAttrVal, slotValue)) {\n return i; // first matching selector \"captures\" a given node\n }\n }\n return wildcardNgContentIndex;\n}\n\n/**\n * Instruction to distribute projectable nodes among <ng-content> occurrences in a given template.\n * It takes all the selectors from the entire component's template and decides where\n * each projected node belongs (it re-distributes nodes among \"buckets\" where each \"bucket\" is\n * backed by a selector).\n *\n * This function requires CSS selectors to be provided in 2 forms: parsed (by a compiler) and text,\n * un-parsed form.\n *\n * The parsed form is needed for efficient matching of a node against a given CSS selector.\n * The un-parsed, textual form is needed for support of the ngProjectAs attribute.\n *\n * Having a CSS selector in 2 different formats is not ideal, but alternatives have even more\n * drawbacks:\n * - having only a textual form would require runtime parsing of CSS selectors;\n * - we can't have only a parsed as we can't re-construct textual form from it (as entered by a\n * template author).\n *\n * @param projectionSlots? A collection of projection slots. A projection slot can be based\n * on a parsed CSS selectors or set to the wildcard selector (\"*\") in order to match\n * all nodes which do not match any selector. If not specified, a single wildcard\n * selector projection slot will be defined.\n *\n * @codeGenApi\n */\nexport function ɵɵprojectionDef(projectionSlots?: ProjectionSlots): void {\n const componentNode = getLView()[DECLARATION_COMPONENT_VIEW][T_HOST] as TElementNode;\n\n if (!componentNode.projection) {\n // If no explicit projection slots are defined, fall back to a single\n // projection slot with the wildcard selector.\n const numProjectionSlots = projectionSlots ? projectionSlots.length : 1;\n const projectionHeads: (TNode|null)[] = componentNode.projection =\n newArray(numProjectionSlots, null! as TNode);\n const tails: (TNode|null)[] = projectionHeads.slice();\n\n let componentChild: TNode|null = componentNode.child;\n\n while (componentChild !== null) {\n const slotIndex =\n projectionSlots ? matchingProjectionSlotIndex(componentChild, projectionSlots) : 0;\n\n if (slotIndex !== null) {\n if (tails[slotIndex]) {\n tails[slotIndex]!.projectionNext = componentChild;\n } else {\n projectionHeads[slotIndex] = componentChild;\n }\n tails[slotIndex] = componentChild;\n }\n\n componentChild = componentChild.next;\n }\n }\n}\n\n\n/**\n * Inserts previously re-distributed projected nodes. This instruction must be preceded by a call\n * to the projectionDef instruction.\n *\n * @param nodeIndex\n * @param selectorIndex:\n * - 0 when the selector is `*` (or unspecified as this is the default value),\n * - 1 based index of the selector from the {@link projectionDef}\n *\n * @codeGenApi\n */\nexport function ɵɵprojection(\n nodeIndex: number, selectorIndex: number = 0, attrs?: TAttributes): void {\n const lView = getLView();\n const tView = getTView();\n const tProjectionNode =\n getOrCreateTNode(tView, HEADER_OFFSET + nodeIndex, TNodeType.Projection, null, attrs || null);\n\n // We can't use viewData[HOST_NODE] because projection nodes can be nested in embedded views.\n if (tProjectionNode.projection === null) tProjectionNode.projection = selectorIndex;\n\n // `<ng-content>` has no content\n setCurrentTNodeAsNotParent();\n\n if ((tProjectionNode.flags & TNodeFlags.isDetached) !== TNodeFlags.isDetached) {\n // re-distribution of projectable nodes is stored on a component's view level\n applyProjection(tView, lView, tProjectionNode);\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 */\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {RENDERER} from '../interfaces/view';\nimport {getBindingIndex, getLView, getSelectedTNode, getTView} from '../state';\nimport {NO_CHANGE} from '../tokens';\n\nimport {interpolation1, interpolation2, interpolation3, interpolation4, interpolation5, interpolation6, interpolation7, interpolation8, interpolationV} from './interpolation';\nimport {elementPropertyInternal, storePropertyBindingMetadata} from './shared';\n\n\n/**\n *\n * Update an interpolated property on an element with a lone bound value\n *\n * Used when the value passed to a property has 1 interpolated value in it, an no additional text\n * surrounds that interpolated value:\n *\n * ```html\n * <div title=\"{{v0}}\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate('title', v0);\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate(\n propName: string, v0: any, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate {\n ɵɵpropertyInterpolate1(propName, '', v0, '', sanitizer);\n return ɵɵpropertyInterpolate;\n}\n\n\n/**\n *\n * Update an interpolated property on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate1('title', 'prefix', v0, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate1(\n propName: string, prefix: string, v0: any, suffix: string,\n sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate1 {\n const lView = getLView();\n const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(\n tView.data, tNode, propName, getBindingIndex() - 1, prefix, suffix);\n }\n return ɵɵpropertyInterpolate1;\n}\n\n/**\n *\n * Update an interpolated property on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate2(\n propName: string, prefix: string, v0: any, i0: string, v1: any, suffix: string,\n sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate2 {\n const lView = getLView();\n const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(\n tView.data, tNode, propName, getBindingIndex() - 2, prefix, i0, suffix);\n }\n return ɵɵpropertyInterpolate2;\n}\n\n/**\n *\n * Update an interpolated property on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate3(\n * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate3(\n propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any,\n suffix: string, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate3 {\n const lView = getLView();\n const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(\n tView.data, tNode, propName, getBindingIndex() - 3, prefix, i0, i1, suffix);\n }\n return ɵɵpropertyInterpolate3;\n}\n\n/**\n *\n * Update an interpolated property on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate4(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate4(\n propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, suffix: string, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate4 {\n const lView = getLView();\n const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(\n tView.data, tNode, propName, getBindingIndex() - 4, prefix, i0, i1, i2, suffix);\n }\n return ɵɵpropertyInterpolate4;\n}\n\n/**\n *\n * Update an interpolated property on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate5(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate5(\n propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, suffix: string,\n sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate5 {\n const lView = getLView();\n const interpolatedValue =\n interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(\n tView.data, tNode, propName, getBindingIndex() - 5, prefix, i0, i1, i2, i3, suffix);\n }\n return ɵɵpropertyInterpolate5;\n}\n\n/**\n *\n * Update an interpolated property on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate6(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate6(\n propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string,\n sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate6 {\n const lView = getLView();\n const interpolatedValue =\n interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(\n tView.data, tNode, propName, getBindingIndex() - 6, prefix, i0, i1, i2, i3, i4, suffix);\n }\n return ɵɵpropertyInterpolate6;\n}\n\n/**\n *\n * Update an interpolated property on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate7(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate7(\n propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string,\n sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate7 {\n const lView = getLView();\n const interpolatedValue =\n interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(\n tView.data, tNode, propName, getBindingIndex() - 7, prefix, i0, i1, i2, i3, i4, i5,\n suffix);\n }\n return ɵɵpropertyInterpolate7;\n}\n\n/**\n *\n * Update an interpolated property on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate8(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate8(\n propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any,\n suffix: string, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate8 {\n const lView = getLView();\n const interpolatedValue = interpolation8(\n lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(\n tView.data, tNode, propName, getBindingIndex() - 8, prefix, i0, i1, i2, i3, i4, i5, i6,\n suffix);\n }\n return ɵɵpropertyInterpolate8;\n}\n\n/**\n * Update an interpolated property on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n * title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolateV(\n * 'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n * 'suffix']);\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update.\n * @param values The collection of values and the strings inbetween those values, beginning with a\n * string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolateV(\n propName: string, values: any[], sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolateV {\n const lView = getLView();\n const interpolatedValue = interpolationV(lView, values);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n if (ngDevMode) {\n const interpolationInBetween = [values[0]]; // prefix\n for (let i = 2; i < values.length; i += 2) {\n interpolationInBetween.push(values[i]);\n }\n storePropertyBindingMetadata(\n tView.data, tNode, propName, getBindingIndex() - interpolationInBetween.length + 1,\n ...interpolationInBetween);\n }\n }\n return ɵɵpropertyInterpolateV;\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 {KeyValueArray, keyValueArrayIndexOf} from '../../util/array_utils';\nimport {assertEqual, assertIndexInRange, assertNotEqual} from '../../util/assert';\nimport {assertFirstUpdatePass} from '../assert';\nimport {TNode} from '../interfaces/node';\nimport {getTStylingRangeNext, getTStylingRangePrev, setTStylingRangeNext, setTStylingRangeNextDuplicate, setTStylingRangePrev, setTStylingRangePrevDuplicate, toTStylingRange, TStylingKey, TStylingKeyPrimitive, TStylingRange} from '../interfaces/styling';\nimport {TData} from '../interfaces/view';\nimport {getTView} from '../state';\n\n\n/**\n * NOTE: The word `styling` is used interchangeably as style or class styling.\n *\n * This file contains code to link styling instructions together so that they can be replayed in\n * priority order. The file exists because Ivy styling instruction execution order does not match\n * that of the priority order. The purpose of this code is to create a linked list so that the\n * instructions can be traversed in priority order when computing the styles.\n *\n * Assume we are dealing with the following code:\n * ```\n * @Component({\n * template: `\n * <my-cmp [style]=\" {color: '#001'} \"\n * [style.color]=\" #002 \"\n * dir-style-color-1\n * dir-style-color-2> `\n * })\n * class ExampleComponent {\n * static ngComp = ... {\n * ...\n * // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n * ɵɵstyleMap({color: '#001'});\n * ɵɵstyleProp('color', '#002');\n * ...\n * }\n * }\n *\n * @Directive({\n * selector: `[dir-style-color-1]',\n * })\n * class Style1Directive {\n * @HostBinding('style') style = {color: '#005'};\n * @HostBinding('style.color') color = '#006';\n *\n * static ngDir = ... {\n * ...\n * // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n * ɵɵstyleMap({color: '#005'});\n * ɵɵstyleProp('color', '#006');\n * ...\n * }\n * }\n *\n * @Directive({\n * selector: `[dir-style-color-2]',\n * })\n * class Style2Directive {\n * @HostBinding('style') style = {color: '#007'};\n * @HostBinding('style.color') color = '#008';\n *\n * static ngDir = ... {\n * ...\n * // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n * ɵɵstyleMap({color: '#007'});\n * ɵɵstyleProp('color', '#008');\n * ...\n * }\n * }\n *\n * @Directive({\n * selector: `my-cmp',\n * })\n * class MyComponent {\n * @HostBinding('style') style = {color: '#003'};\n * @HostBinding('style.color') color = '#004';\n *\n * static ngComp = ... {\n * ...\n * // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n * ɵɵstyleMap({color: '#003'});\n * ɵɵstyleProp('color', '#004');\n * ...\n * }\n * }\n * ```\n *\n * The Order of instruction execution is:\n *\n * NOTE: the comment binding location is for illustrative purposes only.\n *\n * ```\n * // Template: (ExampleComponent)\n * ɵɵstyleMap({color: '#001'}); // Binding index: 10\n * ɵɵstyleProp('color', '#002'); // Binding index: 12\n * // MyComponent\n * ɵɵstyleMap({color: '#003'}); // Binding index: 20\n * ɵɵstyleProp('color', '#004'); // Binding index: 22\n * // Style1Directive\n * ɵɵstyleMap({color: '#005'}); // Binding index: 24\n * ɵɵstyleProp('color', '#006'); // Binding index: 26\n * // Style2Directive\n * ɵɵstyleMap({color: '#007'}); // Binding index: 28\n * ɵɵstyleProp('color', '#008'); // Binding index: 30\n * ```\n *\n * The correct priority order of concatenation is:\n *\n * ```\n * // MyComponent\n * ɵɵstyleMap({color: '#003'}); // Binding index: 20\n * ɵɵstyleProp('color', '#004'); // Binding index: 22\n * // Style1Directive\n * ɵɵstyleMap({color: '#005'}); // Binding index: 24\n * ɵɵstyleProp('color', '#006'); // Binding index: 26\n * // Style2Directive\n * ɵɵstyleMap({color: '#007'}); // Binding index: 28\n * ɵɵstyleProp('color', '#008'); // Binding index: 30\n * // Template: (ExampleComponent)\n * ɵɵstyleMap({color: '#001'}); // Binding index: 10\n * ɵɵstyleProp('color', '#002'); // Binding index: 12\n * ```\n *\n * What color should be rendered?\n *\n * Once the items are correctly sorted in the list, the answer is simply the last item in the\n * concatenation list which is `#002`.\n *\n * To do so we keep a linked list of all of the bindings which pertain to this element.\n * Notice that the bindings are inserted in the order of execution, but the `TView.data` allows\n * us to traverse them in the order of priority.\n *\n * |Idx|`TView.data`|`LView` | Notes\n * |---|------------|-----------------|--------------\n * |...| | |\n * |10 |`null` |`{color: '#001'}`| `ɵɵstyleMap('color', {color: '#001'})`\n * |11 |`30 | 12` | ... |\n * |12 |`color` |`'#002'` | `ɵɵstyleProp('color', '#002')`\n * |13 |`10 | 0` | ... |\n * |...| | |\n * |20 |`null` |`{color: '#003'}`| `ɵɵstyleMap('color', {color: '#003'})`\n * |21 |`0 | 22` | ... |\n * |22 |`color` |`'#004'` | `ɵɵstyleProp('color', '#004')`\n * |23 |`20 | 24` | ... |\n * |24 |`null` |`{color: '#005'}`| `ɵɵstyleMap('color', {color: '#005'})`\n * |25 |`22 | 26` | ... |\n * |26 |`color` |`'#006'` | `ɵɵstyleProp('color', '#006')`\n * |27 |`24 | 28` | ... |\n * |28 |`null` |`{color: '#007'}`| `ɵɵstyleMap('color', {color: '#007'})`\n * |29 |`26 | 30` | ... |\n * |30 |`color` |`'#008'` | `ɵɵstyleProp('color', '#008')`\n * |31 |`28 | 10` | ... |\n *\n * The above data structure allows us to re-concatenate the styling no matter which data binding\n * changes.\n *\n * NOTE: in addition to keeping track of next/previous index the `TView.data` also stores prev/next\n * duplicate bit. The duplicate bit if true says there either is a binding with the same name or\n * there is a map (which may contain the name). This information is useful in knowing if other\n * styles with higher priority need to be searched for overwrites.\n *\n * NOTE: See `should support example in 'tnode_linked_list.ts' documentation` in\n * `tnode_linked_list_spec.ts` for working example.\n */\nlet __unused_const_as_closure_does_not_like_standalone_comment_blocks__: undefined;\n\n/**\n * Insert new `tStyleValue` at `TData` and link existing style bindings such that we maintain linked\n * list of styles and compute the duplicate flag.\n *\n * Note: this function is executed during `firstUpdatePass` only to populate the `TView.data`.\n *\n * The function works by keeping track of `tStylingRange` which contains two pointers pointing to\n * the head/tail of the template portion of the styles.\n * - if `isHost === false` (we are template) then insertion is at tail of `TStylingRange`\n * - if `isHost === true` (we are host binding) then insertion is at head of `TStylingRange`\n *\n * @param tData The `TData` to insert into.\n * @param tNode `TNode` associated with the styling element.\n * @param tStylingKey See `TStylingKey`.\n * @param index location of where `tStyleValue` should be stored (and linked into list.)\n * @param isHostBinding `true` if the insertion is for a `hostBinding`. (insertion is in front of\n * template.)\n * @param isClassBinding True if the associated `tStylingKey` as a `class` styling.\n * `tNode.classBindings` should be used (or `tNode.styleBindings` otherwise.)\n */\nexport function insertTStylingBinding(\n tData: TData, tNode: TNode, tStylingKeyWithStatic: TStylingKey, index: number,\n isHostBinding: boolean, isClassBinding: boolean): void {\n ngDevMode && assertFirstUpdatePass(getTView());\n let tBindings = isClassBinding ? tNode.classBindings : tNode.styleBindings;\n let tmplHead = getTStylingRangePrev(tBindings);\n let tmplTail = getTStylingRangeNext(tBindings);\n\n tData[index] = tStylingKeyWithStatic;\n let isKeyDuplicateOfStatic = false;\n let tStylingKey: TStylingKeyPrimitive;\n if (Array.isArray(tStylingKeyWithStatic)) {\n // We are case when the `TStylingKey` contains static fields as well.\n const staticKeyValueArray = tStylingKeyWithStatic as KeyValueArray<any>;\n tStylingKey = staticKeyValueArray[1]; // unwrap.\n // We need to check if our key is present in the static so that we can mark it as duplicate.\n if (tStylingKey === null ||\n keyValueArrayIndexOf(staticKeyValueArray, tStylingKey as string) > 0) {\n // tStylingKey is present in the statics, need to mark it as duplicate.\n isKeyDuplicateOfStatic = true;\n }\n } else {\n tStylingKey = tStylingKeyWithStatic;\n }\n if (isHostBinding) {\n // We are inserting host bindings\n\n // If we don't have template bindings then `tail` is 0.\n const hasTemplateBindings = tmplTail !== 0;\n // This is important to know because that means that the `head` can't point to the first\n // template bindings (there are none.) Instead the head points to the tail of the template.\n if (hasTemplateBindings) {\n // template head's \"prev\" will point to last host binding or to 0 if no host bindings yet\n const previousNode = getTStylingRangePrev(tData[tmplHead + 1] as TStylingRange);\n tData[index + 1] = toTStylingRange(previousNode, tmplHead);\n // if a host binding has already been registered, we need to update the next of that host\n // binding to point to this one\n if (previousNode !== 0) {\n // We need to update the template-tail value to point to us.\n tData[previousNode + 1] =\n setTStylingRangeNext(tData[previousNode + 1] as TStylingRange, index);\n }\n // The \"previous\" of the template binding head should point to this host binding\n tData[tmplHead + 1] = setTStylingRangePrev(tData[tmplHead + 1] as TStylingRange, index);\n } else {\n tData[index + 1] = toTStylingRange(tmplHead, 0);\n // if a host binding has already been registered, we need to update the next of that host\n // binding to point to this one\n if (tmplHead !== 0) {\n // We need to update the template-tail value to point to us.\n tData[tmplHead + 1] = setTStylingRangeNext(tData[tmplHead + 1] as TStylingRange, index);\n }\n // if we don't have template, the head points to template-tail, and needs to be advanced.\n tmplHead = index;\n }\n } else {\n // We are inserting in template section.\n // We need to set this binding's \"previous\" to the current template tail\n tData[index + 1] = toTStylingRange(tmplTail, 0);\n ngDevMode &&\n assertEqual(\n tmplHead !== 0 && tmplTail === 0, false,\n 'Adding template bindings after hostBindings is not allowed.');\n if (tmplHead === 0) {\n tmplHead = index;\n } else {\n // We need to update the previous value \"next\" to point to this binding\n tData[tmplTail + 1] = setTStylingRangeNext(tData[tmplTail + 1] as TStylingRange, index);\n }\n tmplTail = index;\n }\n\n // Now we need to update / compute the duplicates.\n // Starting with our location search towards head (least priority)\n if (isKeyDuplicateOfStatic) {\n tData[index + 1] = setTStylingRangePrevDuplicate(tData[index + 1] as TStylingRange);\n }\n markDuplicates(tData, tStylingKey, index, true, isClassBinding);\n markDuplicates(tData, tStylingKey, index, false, isClassBinding);\n markDuplicateOfResidualStyling(tNode, tStylingKey, tData, index, isClassBinding);\n\n tBindings = toTStylingRange(tmplHead, tmplTail);\n if (isClassBinding) {\n tNode.classBindings = tBindings;\n } else {\n tNode.styleBindings = tBindings;\n }\n}\n\n/**\n * Look into the residual styling to see if the current `tStylingKey` is duplicate of residual.\n *\n * @param tNode `TNode` where the residual is stored.\n * @param tStylingKey `TStylingKey` to store.\n * @param tData `TData` associated with the current `LView`.\n * @param index location of where `tStyleValue` should be stored (and linked into list.)\n * @param isClassBinding True if the associated `tStylingKey` as a `class` styling.\n * `tNode.classBindings` should be used (or `tNode.styleBindings` otherwise.)\n */\nfunction markDuplicateOfResidualStyling(\n tNode: TNode, tStylingKey: TStylingKey, tData: TData, index: number, isClassBinding: boolean) {\n const residual = isClassBinding ? tNode.residualClasses : tNode.residualStyles;\n if (residual != null /* or undefined */ && typeof tStylingKey == 'string' &&\n keyValueArrayIndexOf(residual, tStylingKey) >= 0) {\n // We have duplicate in the residual so mark ourselves as duplicate.\n tData[index + 1] = setTStylingRangeNextDuplicate(tData[index + 1] as TStylingRange);\n }\n}\n\n\n/**\n * Marks `TStyleValue`s as duplicates if another style binding in the list has the same\n * `TStyleValue`.\n *\n * NOTE: this function is intended to be called twice once with `isPrevDir` set to `true` and once\n * with it set to `false` to search both the previous as well as next items in the list.\n *\n * No duplicate case\n * ```\n * [style.color]\n * [style.width.px] <<- index\n * [style.height.px]\n * ```\n *\n * In the above case adding `[style.width.px]` to the existing `[style.color]` produces no\n * duplicates because `width` is not found in any other part of the linked list.\n *\n * Duplicate case\n * ```\n * [style.color]\n * [style.width.em]\n * [style.width.px] <<- index\n * ```\n * In the above case adding `[style.width.px]` will produce a duplicate with `[style.width.em]`\n * because `width` is found in the chain.\n *\n * Map case 1\n * ```\n * [style.width.px]\n * [style.color]\n * [style] <<- index\n * ```\n * In the above case adding `[style]` will produce a duplicate with any other bindings because\n * `[style]` is a Map and as such is fully dynamic and could produce `color` or `width`.\n *\n * Map case 2\n * ```\n * [style]\n * [style.width.px]\n * [style.color] <<- index\n * ```\n * In the above case adding `[style.color]` will produce a duplicate because there is already a\n * `[style]` binding which is a Map and as such is fully dynamic and could produce `color` or\n * `width`.\n *\n * NOTE: Once `[style]` (Map) is added into the system all things are mapped as duplicates.\n * NOTE: We use `style` as example, but same logic is applied to `class`es as well.\n *\n * @param tData `TData` where the linked list is stored.\n * @param tStylingKey `TStylingKeyPrimitive` which contains the value to compare to other keys in\n * the linked list.\n * @param index Starting location in the linked list to search from\n * @param isPrevDir Direction.\n * - `true` for previous (lower priority);\n * - `false` for next (higher priority).\n */\nfunction markDuplicates(\n tData: TData, tStylingKey: TStylingKeyPrimitive, index: number, isPrevDir: boolean,\n isClassBinding: boolean) {\n const tStylingAtIndex = tData[index + 1] as TStylingRange;\n const isMap = tStylingKey === null;\n let cursor =\n isPrevDir ? getTStylingRangePrev(tStylingAtIndex) : getTStylingRangeNext(tStylingAtIndex);\n let foundDuplicate = false;\n // We keep iterating as long as we have a cursor\n // AND either:\n // - we found what we are looking for, OR\n // - we are a map in which case we have to continue searching even after we find what we were\n // looking for since we are a wild card and everything needs to be flipped to duplicate.\n while (cursor !== 0 && (foundDuplicate === false || isMap)) {\n ngDevMode && assertIndexInRange(tData, cursor);\n const tStylingValueAtCursor = tData[cursor] as TStylingKey;\n const tStyleRangeAtCursor = tData[cursor + 1] as TStylingRange;\n if (isStylingMatch(tStylingValueAtCursor, tStylingKey)) {\n foundDuplicate = true;\n tData[cursor + 1] = isPrevDir ? setTStylingRangeNextDuplicate(tStyleRangeAtCursor) :\n setTStylingRangePrevDuplicate(tStyleRangeAtCursor);\n }\n cursor = isPrevDir ? getTStylingRangePrev(tStyleRangeAtCursor) :\n getTStylingRangeNext(tStyleRangeAtCursor);\n }\n if (foundDuplicate) {\n // if we found a duplicate, than mark ourselves.\n tData[index + 1] = isPrevDir ? setTStylingRangePrevDuplicate(tStylingAtIndex) :\n setTStylingRangeNextDuplicate(tStylingAtIndex);\n }\n}\n\n/**\n * Determines if two `TStylingKey`s are a match.\n *\n * When computing whether a binding contains a duplicate, we need to compare if the instruction\n * `TStylingKey` has a match.\n *\n * Here are examples of `TStylingKey`s which match given `tStylingKeyCursor` is:\n * - `color`\n * - `color` // Match another color\n * - `null` // That means that `tStylingKey` is a `classMap`/`styleMap` instruction\n * - `['', 'color', 'other', true]` // wrapped `color` so match\n * - `['', null, 'other', true]` // wrapped `null` so match\n * - `['', 'width', 'color', 'value']` // wrapped static value contains a match on `'color'`\n * - `null` // `tStylingKeyCursor` always match as it is `classMap`/`styleMap` instruction\n *\n * @param tStylingKeyCursor\n * @param tStylingKey\n */\nfunction isStylingMatch(tStylingKeyCursor: TStylingKey, tStylingKey: TStylingKeyPrimitive) {\n ngDevMode &&\n assertNotEqual(\n Array.isArray(tStylingKey), true, 'Expected that \\'tStylingKey\\' has been unwrapped');\n if (\n tStylingKeyCursor === null || // If the cursor is `null` it means that we have map at that\n // location so we must assume that we have a match.\n tStylingKey == null || // If `tStylingKey` is `null` then it is a map therefor assume that it\n // contains a match.\n (Array.isArray(tStylingKeyCursor) ? tStylingKeyCursor[1] : tStylingKeyCursor) ===\n tStylingKey // If the keys match explicitly than we are a match.\n ) {\n return true;\n } else if (Array.isArray(tStylingKeyCursor) && typeof tStylingKey === 'string') {\n // if we did not find a match, but `tStylingKeyCursor` is `KeyValueArray` that means cursor has\n // statics and we need to check those as well.\n return keyValueArrayIndexOf(tStylingKeyCursor, tStylingKey) >=\n 0; // see if we are matching the key\n }\n return 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 {assertEqual, throwError} from '../../util/assert';\nimport {CharCode} from '../../util/char_code';\n\n/**\n * Stores the locations of key/value indexes while parsing styling.\n *\n * In case of `cssText` parsing the indexes are like so:\n * ```\n * \"key1: value1; key2: value2; key3: value3\"\n * ^ ^ ^ ^ ^\n * | | | | +-- textEnd\n * | | | +---------------- valueEnd\n * | | +---------------------- value\n * | +------------------------ keyEnd\n * +---------------------------- key\n * ```\n *\n * In case of `className` parsing the indexes are like so:\n * ```\n * \"key1 key2 key3\"\n * ^ ^ ^\n * | | +-- textEnd\n * | +------------------------ keyEnd\n * +---------------------------- key\n * ```\n * NOTE: `value` and `valueEnd` are used only for styles, not classes.\n */\ninterface ParserState {\n textEnd: number;\n key: number;\n keyEnd: number;\n value: number;\n valueEnd: number;\n}\n// Global state of the parser. (This makes parser non-reentrant, but that is not an issue)\nconst parserState: ParserState = {\n textEnd: 0,\n key: 0,\n keyEnd: 0,\n value: 0,\n valueEnd: 0,\n};\n\n/**\n * Retrieves the last parsed `key` of style.\n * @param text the text to substring the key from.\n */\nexport function getLastParsedKey(text: string): string {\n return text.substring(parserState.key, parserState.keyEnd);\n}\n\n/**\n * Retrieves the last parsed `value` of style.\n * @param text the text to substring the key from.\n */\nexport function getLastParsedValue(text: string): string {\n return text.substring(parserState.value, parserState.valueEnd);\n}\n\n/**\n * Initializes `className` string for parsing and parses the first token.\n *\n * This function is intended to be used in this format:\n * ```\n * for (let i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) {\n * const key = getLastParsedKey();\n * ...\n * }\n * ```\n * @param text `className` to parse\n * @returns index where the next invocation of `parseClassNameNext` should resume.\n */\nexport function parseClassName(text: string): number {\n resetParserState(text);\n return parseClassNameNext(text, consumeWhitespace(text, 0, parserState.textEnd));\n}\n\n/**\n * Parses next `className` token.\n *\n * This function is intended to be used in this format:\n * ```\n * for (let i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) {\n * const key = getLastParsedKey();\n * ...\n * }\n * ```\n *\n * @param text `className` to parse\n * @param index where the parsing should resume.\n * @returns index where the next invocation of `parseClassNameNext` should resume.\n */\nexport function parseClassNameNext(text: string, index: number): number {\n const end = parserState.textEnd;\n if (end === index) {\n return -1;\n }\n index = parserState.keyEnd = consumeClassToken(text, parserState.key = index, end);\n return consumeWhitespace(text, index, end);\n}\n\n/**\n * Initializes `cssText` string for parsing and parses the first key/values.\n *\n * This function is intended to be used in this format:\n * ```\n * for (let i = parseStyle(text); i >= 0; i = parseStyleNext(text, i))) {\n * const key = getLastParsedKey();\n * const value = getLastParsedValue();\n * ...\n * }\n * ```\n * @param text `cssText` to parse\n * @returns index where the next invocation of `parseStyleNext` should resume.\n */\nexport function parseStyle(text: string): number {\n resetParserState(text);\n return parseStyleNext(text, consumeWhitespace(text, 0, parserState.textEnd));\n}\n\n/**\n * Parses the next `cssText` key/values.\n *\n * This function is intended to be used in this format:\n * ```\n * for (let i = parseStyle(text); i >= 0; i = parseStyleNext(text, i))) {\n * const key = getLastParsedKey();\n * const value = getLastParsedValue();\n * ...\n * }\n *\n * @param text `cssText` to parse\n * @param index where the parsing should resume.\n * @returns index where the next invocation of `parseStyleNext` should resume.\n */\nexport function parseStyleNext(text: string, startIndex: number): number {\n const end = parserState.textEnd;\n let index = parserState.key = consumeWhitespace(text, startIndex, end);\n if (end === index) {\n // we reached an end so just quit\n return -1;\n }\n index = parserState.keyEnd = consumeStyleKey(text, index, end);\n index = consumeSeparator(text, index, end, CharCode.COLON);\n index = parserState.value = consumeWhitespace(text, index, end);\n index = parserState.valueEnd = consumeStyleValue(text, index, end);\n return consumeSeparator(text, index, end, CharCode.SEMI_COLON);\n}\n\n/**\n * Reset the global state of the styling parser.\n * @param text The styling text to parse.\n */\nexport function resetParserState(text: string): void {\n parserState.key = 0;\n parserState.keyEnd = 0;\n parserState.value = 0;\n parserState.valueEnd = 0;\n parserState.textEnd = text.length;\n}\n\n/**\n * Returns index of next non-whitespace character.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index of next non-whitespace character (May be the same as `start` if no whitespace at\n * that location.)\n */\nexport function consumeWhitespace(text: string, startIndex: number, endIndex: number): number {\n while (startIndex < endIndex && text.charCodeAt(startIndex) <= CharCode.SPACE) {\n startIndex++;\n }\n return startIndex;\n}\n\n/**\n * Returns index of last char in class token.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after last char in class token.\n */\nexport function consumeClassToken(text: string, startIndex: number, endIndex: number): number {\n while (startIndex < endIndex && text.charCodeAt(startIndex) > CharCode.SPACE) {\n startIndex++;\n }\n return startIndex;\n}\n\n/**\n * Consumes all of the characters belonging to style key and token.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after last style key character.\n */\nexport function consumeStyleKey(text: string, startIndex: number, endIndex: number): number {\n let ch: number;\n while (startIndex < endIndex &&\n ((ch = text.charCodeAt(startIndex)) === CharCode.DASH || ch === CharCode.UNDERSCORE ||\n ((ch & CharCode.UPPER_CASE) >= CharCode.A && (ch & CharCode.UPPER_CASE) <= CharCode.Z) ||\n (ch >= CharCode.ZERO && ch <= CharCode.NINE))) {\n startIndex++;\n }\n return startIndex;\n}\n\n/**\n * Consumes all whitespace and the separator `:` after the style key.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after separator and surrounding whitespace.\n */\nexport function consumeSeparator(\n text: string, startIndex: number, endIndex: number, separator: number): number {\n startIndex = consumeWhitespace(text, startIndex, endIndex);\n if (startIndex < endIndex) {\n if (ngDevMode && text.charCodeAt(startIndex) !== separator) {\n malformedStyleError(text, String.fromCharCode(separator), startIndex);\n }\n startIndex++;\n }\n return startIndex;\n}\n\n\n/**\n * Consumes style value honoring `url()` and `\"\"` text.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after last style value character.\n */\nexport function consumeStyleValue(text: string, startIndex: number, endIndex: number): number {\n let ch1 = -1; // 1st previous character\n let ch2 = -1; // 2nd previous character\n let ch3 = -1; // 3rd previous character\n let i = startIndex;\n let lastChIndex = i;\n while (i < endIndex) {\n const ch: number = text.charCodeAt(i++);\n if (ch === CharCode.SEMI_COLON) {\n return lastChIndex;\n } else if (ch === CharCode.DOUBLE_QUOTE || ch === CharCode.SINGLE_QUOTE) {\n lastChIndex = i = consumeQuotedText(text, ch, i, endIndex);\n } else if (\n startIndex ===\n i - 4 && // We have seen only 4 characters so far \"URL(\" (Ignore \"foo_URL()\")\n ch3 === CharCode.U &&\n ch2 === CharCode.R && ch1 === CharCode.L && ch === CharCode.OPEN_PAREN) {\n lastChIndex = i = consumeQuotedText(text, CharCode.CLOSE_PAREN, i, endIndex);\n } else if (ch > CharCode.SPACE) {\n // if we have a non-whitespace character then capture its location\n lastChIndex = i;\n }\n ch3 = ch2;\n ch2 = ch1;\n ch1 = ch & CharCode.UPPER_CASE;\n }\n return lastChIndex;\n}\n\n/**\n * Consumes all of the quoted characters.\n *\n * @param text Text to scan\n * @param quoteCharCode CharCode of either `\"` or `'` quote or `)` for `url(...)`.\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after quoted characters.\n */\nexport function consumeQuotedText(\n text: string, quoteCharCode: number, startIndex: number, endIndex: number): number {\n let ch1 = -1; // 1st previous character\n let index = startIndex;\n while (index < endIndex) {\n const ch = text.charCodeAt(index++);\n if (ch == quoteCharCode && ch1 !== CharCode.BACK_SLASH) {\n return index;\n }\n if (ch == CharCode.BACK_SLASH && ch1 === CharCode.BACK_SLASH) {\n // two back slashes cancel each other out. For example `\"\\\\\"` should properly end the\n // quotation. (It should not assume that the last `\"` is escaped.)\n ch1 = 0;\n } else {\n ch1 = ch;\n }\n }\n throw ngDevMode ? malformedStyleError(text, String.fromCharCode(quoteCharCode), endIndex) :\n new Error();\n}\n\nfunction malformedStyleError(text: string, expecting: string, index: number): never {\n ngDevMode && assertEqual(typeof text === 'string', true, 'String expected here');\n throw throwError(\n `Malformed style at location ${index} in string '` + text.substring(0, index) + '[>>' +\n text.substring(index, index + 1) + '<<]' + text.substr(index + 1) +\n `'. Expecting '${expecting}'.`);\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 {SafeValue, unwrapSafeValue} from '../../sanitization/bypass';\nimport {KeyValueArray, keyValueArrayGet, keyValueArraySet} from '../../util/array_utils';\nimport {assertDefined, assertEqual, assertLessThan, assertNotEqual, throwError} from '../../util/assert';\nimport {EMPTY_ARRAY} from '../../util/empty';\nimport {concatStringsWithSpace, stringify} from '../../util/stringify';\nimport {assertFirstUpdatePass} from '../assert';\nimport {bindingUpdated} from '../bindings';\nimport {DirectiveDef} from '../interfaces/definition';\nimport {AttributeMarker, TAttributes, TNode, TNodeFlags, TNodeType} from '../interfaces/node';\nimport {Renderer3} from '../interfaces/renderer';\nimport {RElement} from '../interfaces/renderer_dom';\nimport {getTStylingRangeNext, getTStylingRangeNextDuplicate, getTStylingRangePrev, getTStylingRangePrevDuplicate, TStylingKey, TStylingRange} from '../interfaces/styling';\nimport {LView, RENDERER, TData, TView} from '../interfaces/view';\nimport {applyStyling} from '../node_manipulation';\nimport {getCurrentDirectiveDef, getLView, getSelectedIndex, getTView, incrementBindingIndex} from '../state';\nimport {insertTStylingBinding} from '../styling/style_binding_list';\nimport {getLastParsedKey, getLastParsedValue, parseClassName, parseClassNameNext, parseStyle, parseStyleNext} from '../styling/styling_parser';\nimport {NO_CHANGE} from '../tokens';\nimport {getNativeByIndex} from '../util/view_utils';\nimport {setDirectiveInputsWhichShadowsStyling} from './property';\n\n\n/**\n * Update a style binding on an element with the provided value.\n *\n * If the style value is falsy then it will be removed from the element\n * (or assigned a different value depending if there are any styles placed\n * on the element with `styleMap` or any static styles that are\n * present from when the element was created with `styling`).\n *\n * Note that the styling element is updated as part of `stylingApply`.\n *\n * @param prop A valid CSS property.\n * @param value New value to write (`null` or an empty string to remove).\n * @param suffix Optional suffix. Used with scalar values to add unit such as `px`.\n *\n * Note that this will apply the provided style value to the host element if this function is called\n * within a host binding function.\n *\n * @codeGenApi\n */\nexport function ɵɵstyleProp(\n prop: string, value: string|number|SafeValue|undefined|null,\n suffix?: string|null): typeof ɵɵstyleProp {\n checkStylingProperty(prop, value, suffix, false);\n return ɵɵstyleProp;\n}\n\n/**\n * Update a class binding on an element with the provided value.\n *\n * This instruction is meant to handle the `[class.foo]=\"exp\"` case and,\n * therefore, the class binding itself must already be allocated using\n * `styling` within the creation block.\n *\n * @param prop A valid CSS class (only one).\n * @param value A true/false value which will turn the class on or off.\n *\n * Note that this will apply the provided class value to the host element if this function\n * is called within a host binding function.\n *\n * @codeGenApi\n */\nexport function ɵɵclassProp(className: string, value: boolean|undefined|null): typeof ɵɵclassProp {\n checkStylingProperty(className, value, null, true);\n return ɵɵclassProp;\n}\n\n\n/**\n * Update style bindings using an object literal on an element.\n *\n * This instruction is meant to apply styling via the `[style]=\"exp\"` template bindings.\n * When styles are applied to the element they will then be updated with respect to\n * any styles/classes set via `styleProp`. If any styles are set to falsy\n * then they will be removed from the element.\n *\n * Note that the styling instruction will not be applied until `stylingApply` is called.\n *\n * @param styles A key/value style map of the styles that will be applied to the given element.\n * Any missing styles (that have already been applied to the element beforehand) will be\n * removed (unset) from the element's styling.\n *\n * Note that this will apply the provided styleMap value to the host element if this function\n * is called within a host binding.\n *\n * @codeGenApi\n */\nexport function ɵɵstyleMap(styles: {[styleName: string]: any}|string|undefined|null): void {\n checkStylingMap(styleKeyValueArraySet, styleStringParser, styles, false);\n}\n\n\n/**\n * Parse text as style and add values to KeyValueArray.\n *\n * This code is pulled out to a separate function so that it can be tree shaken away if it is not\n * needed. It is only referenced from `ɵɵstyleMap`.\n *\n * @param keyValueArray KeyValueArray to add parsed values to.\n * @param text text to parse.\n */\nexport function styleStringParser(keyValueArray: KeyValueArray<any>, text: string): void {\n for (let i = parseStyle(text); i >= 0; i = parseStyleNext(text, i)) {\n styleKeyValueArraySet(keyValueArray, getLastParsedKey(text), getLastParsedValue(text));\n }\n}\n\n\n/**\n * Update class bindings using an object literal or class-string on an element.\n *\n * This instruction is meant to apply styling via the `[class]=\"exp\"` template bindings.\n * When classes are applied to the element they will then be updated with\n * respect to any styles/classes set via `classProp`. If any\n * classes are set to falsy then they will be removed from the element.\n *\n * Note that the styling instruction will not be applied until `stylingApply` is called.\n * Note that this will the provided classMap value to the host element if this function is called\n * within a host binding.\n *\n * @param classes A key/value map or string of CSS classes that will be added to the\n * given element. Any missing classes (that have already been applied to the element\n * beforehand) will be removed (unset) from the element's list of CSS classes.\n *\n * @codeGenApi\n */\nexport function ɵɵclassMap(classes: {[className: string]: boolean|undefined|null}|string|undefined|\n null): void {\n checkStylingMap(keyValueArraySet, classStringParser, classes, true);\n}\n\n/**\n * Parse text as class and add values to KeyValueArray.\n *\n * This code is pulled out to a separate function so that it can be tree shaken away if it is not\n * needed. It is only referenced from `ɵɵclassMap`.\n *\n * @param keyValueArray KeyValueArray to add parsed values to.\n * @param text text to parse.\n */\nexport function classStringParser(keyValueArray: KeyValueArray<any>, text: string): void {\n for (let i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) {\n keyValueArraySet(keyValueArray, getLastParsedKey(text), true);\n }\n}\n\n/**\n * Common code between `ɵɵclassProp` and `ɵɵstyleProp`.\n *\n * @param prop property name.\n * @param value binding value.\n * @param suffix suffix for the property (e.g. `em` or `px`)\n * @param isClassBased `true` if `class` change (`false` if `style`)\n */\nexport function checkStylingProperty(\n prop: string, value: any|NO_CHANGE, suffix: string|undefined|null,\n isClassBased: boolean): void {\n const lView = getLView();\n const tView = getTView();\n // Styling instructions use 2 slots per binding.\n // 1. one for the value / TStylingKey\n // 2. one for the intermittent-value / TStylingRange\n const bindingIndex = incrementBindingIndex(2);\n if (tView.firstUpdatePass) {\n stylingFirstUpdatePass(tView, prop, bindingIndex, isClassBased);\n }\n if (value !== NO_CHANGE && bindingUpdated(lView, bindingIndex, value)) {\n const tNode = tView.data[getSelectedIndex()] as TNode;\n updateStyling(\n tView, tNode, lView, lView[RENDERER], prop,\n lView[bindingIndex + 1] = normalizeSuffix(value, suffix), isClassBased, bindingIndex);\n }\n}\n\n/**\n * Common code between `ɵɵclassMap` and `ɵɵstyleMap`.\n *\n * @param keyValueArraySet (See `keyValueArraySet` in \"util/array_utils\") Gets passed in as a\n * function so that `style` can be processed. This is done for tree shaking purposes.\n * @param stringParser Parser used to parse `value` if `string`. (Passed in as `style` and `class`\n * have different parsers.)\n * @param value bound value from application\n * @param isClassBased `true` if `class` change (`false` if `style`)\n */\nexport function checkStylingMap(\n keyValueArraySet: (keyValueArray: KeyValueArray<any>, key: string, value: any) => void,\n stringParser: (styleKeyValueArray: KeyValueArray<any>, text: string) => void,\n value: any|NO_CHANGE, isClassBased: boolean): void {\n const tView = getTView();\n const bindingIndex = incrementBindingIndex(2);\n if (tView.firstUpdatePass) {\n stylingFirstUpdatePass(tView, null, bindingIndex, isClassBased);\n }\n const lView = getLView();\n if (value !== NO_CHANGE && bindingUpdated(lView, bindingIndex, value)) {\n // `getSelectedIndex()` should be here (rather than in instruction) so that it is guarded by the\n // if so as not to read unnecessarily.\n const tNode = tView.data[getSelectedIndex()] as TNode;\n if (hasStylingInputShadow(tNode, isClassBased) && !isInHostBindings(tView, bindingIndex)) {\n if (ngDevMode) {\n // verify that if we are shadowing then `TData` is appropriately marked so that we skip\n // processing this binding in styling resolution.\n const tStylingKey = tView.data[bindingIndex];\n assertEqual(\n Array.isArray(tStylingKey) ? tStylingKey[1] : tStylingKey, false,\n 'Styling linked list shadow input should be marked as \\'false\\'');\n }\n // VE does not concatenate the static portion like we are doing here.\n // Instead VE just ignores the static completely if dynamic binding is present.\n // Because of locality we have already set the static portion because we don't know if there\n // is a dynamic portion until later. If we would ignore the static portion it would look like\n // the binding has removed it. This would confuse `[ngStyle]`/`[ngClass]` to do the wrong\n // thing as it would think that the static portion was removed. For this reason we\n // concatenate it so that `[ngStyle]`/`[ngClass]` can continue to work on changed.\n let staticPrefix = isClassBased ? tNode.classesWithoutHost : tNode.stylesWithoutHost;\n ngDevMode && isClassBased === false && staticPrefix !== null &&\n assertEqual(\n staticPrefix.endsWith(';'), true, 'Expecting static portion to end with \\';\\'');\n if (staticPrefix !== null) {\n // We want to make sure that falsy values of `value` become empty strings.\n value = concatStringsWithSpace(staticPrefix, value ? value : '');\n }\n // Given `<div [style] my-dir>` such that `my-dir` has `@Input('style')`.\n // This takes over the `[style]` binding. (Same for `[class]`)\n setDirectiveInputsWhichShadowsStyling(tView, tNode, lView, value, isClassBased);\n } else {\n updateStylingMap(\n tView, tNode, lView, lView[RENDERER], lView[bindingIndex + 1],\n lView[bindingIndex + 1] = toStylingKeyValueArray(keyValueArraySet, stringParser, value),\n isClassBased, bindingIndex);\n }\n }\n}\n\n/**\n * Determines when the binding is in `hostBindings` section\n *\n * @param tView Current `TView`\n * @param bindingIndex index of binding which we would like if it is in `hostBindings`\n */\nfunction isInHostBindings(tView: TView, bindingIndex: number): boolean {\n // All host bindings are placed after the expando section.\n return bindingIndex >= tView.expandoStartIndex;\n}\n\n/**\n * Collects the necessary information to insert the binding into a linked list of style bindings\n * using `insertTStylingBinding`.\n *\n * @param tView `TView` where the binding linked list will be stored.\n * @param tStylingKey Property/key of the binding.\n * @param bindingIndex Index of binding associated with the `prop`\n * @param isClassBased `true` if `class` change (`false` if `style`)\n */\nfunction stylingFirstUpdatePass(\n tView: TView, tStylingKey: TStylingKey, bindingIndex: number, isClassBased: boolean): void {\n ngDevMode && assertFirstUpdatePass(tView);\n const tData = tView.data;\n if (tData[bindingIndex + 1] === null) {\n // The above check is necessary because we don't clear first update pass until first successful\n // (no exception) template execution. This prevents the styling instruction from double adding\n // itself to the list.\n // `getSelectedIndex()` should be here (rather than in instruction) so that it is guarded by the\n // if so as not to read unnecessarily.\n const tNode = tData[getSelectedIndex()] as TNode;\n ngDevMode && assertDefined(tNode, 'TNode expected');\n const isHostBindings = isInHostBindings(tView, bindingIndex);\n if (hasStylingInputShadow(tNode, isClassBased) && tStylingKey === null && !isHostBindings) {\n // `tStylingKey === null` implies that we are either `[style]` or `[class]` binding.\n // If there is a directive which uses `@Input('style')` or `@Input('class')` than\n // we need to neutralize this binding since that directive is shadowing it.\n // We turn this into a noop by setting the key to `false`\n tStylingKey = false;\n }\n tStylingKey = wrapInStaticStylingKey(tData, tNode, tStylingKey, isClassBased);\n insertTStylingBinding(tData, tNode, tStylingKey, bindingIndex, isHostBindings, isClassBased);\n }\n}\n\n/**\n * Adds static styling information to the binding if applicable.\n *\n * The linked list of styles not only stores the list and keys, but also stores static styling\n * information on some of the keys. This function determines if the key should contain the styling\n * information and computes it.\n *\n * See `TStylingStatic` for more details.\n *\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param stylingKey `TStylingKeyPrimitive` which may need to be wrapped into `TStylingKey`\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nexport function wrapInStaticStylingKey(\n tData: TData, tNode: TNode, stylingKey: TStylingKey, isClassBased: boolean): TStylingKey {\n const hostDirectiveDef = getCurrentDirectiveDef(tData);\n let residual = isClassBased ? tNode.residualClasses : tNode.residualStyles;\n if (hostDirectiveDef === null) {\n // We are in template node.\n // If template node already had styling instruction then it has already collected the static\n // styling and there is no need to collect them again. We know that we are the first styling\n // instruction because the `TNode.*Bindings` points to 0 (nothing has been inserted yet).\n const isFirstStylingInstructionInTemplate =\n (isClassBased ? tNode.classBindings : tNode.styleBindings) as any as number === 0;\n if (isFirstStylingInstructionInTemplate) {\n // It would be nice to be able to get the statics from `mergeAttrs`, however, at this point\n // they are already merged and it would not be possible to figure which property belongs where\n // in the priority.\n stylingKey = collectStylingFromDirectives(null, tData, tNode, stylingKey, isClassBased);\n stylingKey = collectStylingFromTAttrs(stylingKey, tNode.attrs, isClassBased);\n // We know that if we have styling binding in template we can't have residual.\n residual = null;\n }\n } else {\n // We are in host binding node and there was no binding instruction in template node.\n // This means that we need to compute the residual.\n const directiveStylingLast = tNode.directiveStylingLast;\n const isFirstStylingInstructionInHostBinding =\n directiveStylingLast === -1 || tData[directiveStylingLast] !== hostDirectiveDef;\n if (isFirstStylingInstructionInHostBinding) {\n stylingKey =\n collectStylingFromDirectives(hostDirectiveDef, tData, tNode, stylingKey, isClassBased);\n if (residual === null) {\n // - If `null` than either:\n // - Template styling instruction already ran and it has consumed the static\n // styling into its `TStylingKey` and so there is no need to update residual. Instead\n // we need to update the `TStylingKey` associated with the first template node\n // instruction. OR\n // - Some other styling instruction ran and determined that there are no residuals\n let templateStylingKey = getTemplateHeadTStylingKey(tData, tNode, isClassBased);\n if (templateStylingKey !== undefined && Array.isArray(templateStylingKey)) {\n // Only recompute if `templateStylingKey` had static values. (If no static value found\n // then there is nothing to do since this operation can only produce less static keys, not\n // more.)\n templateStylingKey = collectStylingFromDirectives(\n null, tData, tNode, templateStylingKey[1] /* unwrap previous statics */,\n isClassBased);\n templateStylingKey =\n collectStylingFromTAttrs(templateStylingKey, tNode.attrs, isClassBased);\n setTemplateHeadTStylingKey(tData, tNode, isClassBased, templateStylingKey);\n }\n } else {\n // We only need to recompute residual if it is not `null`.\n // - If existing residual (implies there was no template styling). This means that some of\n // the statics may have moved from the residual to the `stylingKey` and so we have to\n // recompute.\n // - If `undefined` this is the first time we are running.\n residual = collectResidual(tData, tNode, isClassBased);\n }\n }\n }\n if (residual !== undefined) {\n isClassBased ? (tNode.residualClasses = residual) : (tNode.residualStyles = residual);\n }\n return stylingKey;\n}\n\n/**\n * Retrieve the `TStylingKey` for the template styling instruction.\n *\n * This is needed since `hostBinding` styling instructions are inserted after the template\n * instruction. While the template instruction needs to update the residual in `TNode` the\n * `hostBinding` instructions need to update the `TStylingKey` of the template instruction because\n * the template instruction is downstream from the `hostBindings` instructions.\n *\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @return `TStylingKey` if found or `undefined` if not found.\n */\nfunction getTemplateHeadTStylingKey(tData: TData, tNode: TNode, isClassBased: boolean): TStylingKey|\n undefined {\n const bindings = isClassBased ? tNode.classBindings : tNode.styleBindings;\n if (getTStylingRangeNext(bindings) === 0) {\n // There does not seem to be a styling instruction in the `template`.\n return undefined;\n }\n return tData[getTStylingRangePrev(bindings)] as TStylingKey;\n}\n\n/**\n * Update the `TStylingKey` of the first template instruction in `TNode`.\n *\n * Logically `hostBindings` styling instructions are of lower priority than that of the template.\n * However, they execute after the template styling instructions. This means that they get inserted\n * in front of the template styling instructions.\n *\n * If we have a template styling instruction and a new `hostBindings` styling instruction is\n * executed it means that it may need to steal static fields from the template instruction. This\n * method allows us to update the first template instruction `TStylingKey` with a new value.\n *\n * Assume:\n * ```\n * <div my-dir style=\"color: red\" [style.color]=\"tmplExp\"></div>\n *\n * @Directive({\n * host: {\n * 'style': 'width: 100px',\n * '[style.color]': 'dirExp',\n * }\n * })\n * class MyDir {}\n * ```\n *\n * when `[style.color]=\"tmplExp\"` executes it creates this data structure.\n * ```\n * ['', 'color', 'color', 'red', 'width', '100px'],\n * ```\n *\n * The reason for this is that the template instruction does not know if there are styling\n * instructions and must assume that there are none and must collect all of the static styling.\n * (both\n * `color' and 'width`)\n *\n * When `'[style.color]': 'dirExp',` executes we need to insert a new data into the linked list.\n * ```\n * ['', 'color', 'width', '100px'], // newly inserted\n * ['', 'color', 'color', 'red', 'width', '100px'], // this is wrong\n * ```\n *\n * Notice that the template statics is now wrong as it incorrectly contains `width` so we need to\n * update it like so:\n * ```\n * ['', 'color', 'width', '100px'],\n * ['', 'color', 'color', 'red'], // UPDATE\n * ```\n *\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @param tStylingKey New `TStylingKey` which is replacing the old one.\n */\nfunction setTemplateHeadTStylingKey(\n tData: TData, tNode: TNode, isClassBased: boolean, tStylingKey: TStylingKey): void {\n const bindings = isClassBased ? tNode.classBindings : tNode.styleBindings;\n ngDevMode &&\n assertNotEqual(\n getTStylingRangeNext(bindings), 0,\n 'Expecting to have at least one template styling binding.');\n tData[getTStylingRangePrev(bindings)] = tStylingKey;\n}\n\n/**\n * Collect all static values after the current `TNode.directiveStylingLast` index.\n *\n * Collect the remaining styling information which has not yet been collected by an existing\n * styling instruction.\n *\n * @param tData `TData` where the `DirectiveDefs` are stored.\n * @param tNode `TNode` which contains the directive range.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction collectResidual(tData: TData, tNode: TNode, isClassBased: boolean): KeyValueArray<any>|\n null {\n let residual: KeyValueArray<any>|null|undefined = undefined;\n const directiveEnd = tNode.directiveEnd;\n ngDevMode &&\n assertNotEqual(\n tNode.directiveStylingLast, -1,\n 'By the time this function gets called at least one hostBindings-node styling instruction must have executed.');\n // We add `1 + tNode.directiveStart` because we need to skip the current directive (as we are\n // collecting things after the last `hostBindings` directive which had a styling instruction.)\n for (let i = 1 + tNode.directiveStylingLast; i < directiveEnd; i++) {\n const attrs = (tData[i] as DirectiveDef<any>).hostAttrs;\n residual = collectStylingFromTAttrs(residual, attrs, isClassBased) as KeyValueArray<any>| null;\n }\n return collectStylingFromTAttrs(residual, tNode.attrs, isClassBased) as KeyValueArray<any>| null;\n}\n\n/**\n * Collect the static styling information with lower priority than `hostDirectiveDef`.\n *\n * (This is opposite of residual styling.)\n *\n * @param hostDirectiveDef `DirectiveDef` for which we want to collect lower priority static\n * styling. (Or `null` if template styling)\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param stylingKey Existing `TStylingKey` to update or wrap.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction collectStylingFromDirectives(\n hostDirectiveDef: DirectiveDef<any>|null, tData: TData, tNode: TNode, stylingKey: TStylingKey,\n isClassBased: boolean): TStylingKey {\n // We need to loop because there can be directives which have `hostAttrs` but don't have\n // `hostBindings` so this loop catches up to the current directive..\n let currentDirective: DirectiveDef<any>|null = null;\n const directiveEnd = tNode.directiveEnd;\n let directiveStylingLast = tNode.directiveStylingLast;\n if (directiveStylingLast === -1) {\n directiveStylingLast = tNode.directiveStart;\n } else {\n directiveStylingLast++;\n }\n while (directiveStylingLast < directiveEnd) {\n currentDirective = tData[directiveStylingLast] as DirectiveDef<any>;\n ngDevMode && assertDefined(currentDirective, 'expected to be defined');\n stylingKey = collectStylingFromTAttrs(stylingKey, currentDirective.hostAttrs, isClassBased);\n if (currentDirective === hostDirectiveDef) break;\n directiveStylingLast++;\n }\n if (hostDirectiveDef !== null) {\n // we only advance the styling cursor if we are collecting data from host bindings.\n // Template executes before host bindings and so if we would update the index,\n // host bindings would not get their statics.\n tNode.directiveStylingLast = directiveStylingLast;\n }\n return stylingKey;\n}\n\n/**\n * Convert `TAttrs` into `TStylingStatic`.\n *\n * @param stylingKey existing `TStylingKey` to update or wrap.\n * @param attrs `TAttributes` to process.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction collectStylingFromTAttrs(\n stylingKey: TStylingKey|undefined, attrs: TAttributes|null,\n isClassBased: boolean): TStylingKey {\n const desiredMarker = isClassBased ? AttributeMarker.Classes : AttributeMarker.Styles;\n let currentMarker = AttributeMarker.ImplicitAttributes;\n if (attrs !== null) {\n for (let i = 0; i < attrs.length; i++) {\n const item = attrs[i] as number | string;\n if (typeof item === 'number') {\n currentMarker = item;\n } else {\n if (currentMarker === desiredMarker) {\n if (!Array.isArray(stylingKey)) {\n stylingKey = stylingKey === undefined ? [] : ['', stylingKey] as any;\n }\n keyValueArraySet(\n stylingKey as KeyValueArray<any>, item, isClassBased ? true : attrs[++i]);\n }\n }\n }\n }\n return stylingKey === undefined ? null : stylingKey;\n}\n\n/**\n * Convert user input to `KeyValueArray`.\n *\n * This function takes user input which could be `string`, Object literal, or iterable and converts\n * it into a consistent representation. The output of this is `KeyValueArray` (which is an array\n * where\n * even indexes contain keys and odd indexes contain values for those keys).\n *\n * The advantage of converting to `KeyValueArray` is that we can perform diff in an input\n * independent\n * way.\n * (ie we can compare `foo bar` to `['bar', 'baz'] and determine a set of changes which need to be\n * applied)\n *\n * The fact that `KeyValueArray` is sorted is very important because it allows us to compute the\n * difference in linear fashion without the need to allocate any additional data.\n *\n * For example if we kept this as a `Map` we would have to iterate over previous `Map` to determine\n * which values need to be deleted, over the new `Map` to determine additions, and we would have to\n * keep additional `Map` to keep track of duplicates or items which have not yet been visited.\n *\n * @param keyValueArraySet (See `keyValueArraySet` in \"util/array_utils\") Gets passed in as a\n * function so that `style` can be processed. This is done\n * for tree shaking purposes.\n * @param stringParser The parser is passed in so that it will be tree shakable. See\n * `styleStringParser` and `classStringParser`\n * @param value The value to parse/convert to `KeyValueArray`\n */\nexport function toStylingKeyValueArray(\n keyValueArraySet: (keyValueArray: KeyValueArray<any>, key: string, value: any) => void,\n stringParser: (styleKeyValueArray: KeyValueArray<any>, text: string) => void,\n value: string|string[]|{[key: string]: any}|SafeValue|null|undefined): KeyValueArray<any> {\n if (value == null /*|| value === undefined */ || value === '') return EMPTY_ARRAY as any;\n const styleKeyValueArray: KeyValueArray<any> = [] as any;\n const unwrappedValue = unwrapSafeValue(value) as string | string[] | {[key: string]: any};\n if (Array.isArray(unwrappedValue)) {\n for (let i = 0; i < unwrappedValue.length; i++) {\n keyValueArraySet(styleKeyValueArray, unwrappedValue[i], true);\n }\n } else if (typeof unwrappedValue === 'object') {\n for (const key in unwrappedValue) {\n if (unwrappedValue.hasOwnProperty(key)) {\n keyValueArraySet(styleKeyValueArray, key, unwrappedValue[key]);\n }\n }\n } else if (typeof unwrappedValue === 'string') {\n stringParser(styleKeyValueArray, unwrappedValue);\n } else {\n ngDevMode &&\n throwError('Unsupported styling type ' + typeof unwrappedValue + ': ' + unwrappedValue);\n }\n return styleKeyValueArray;\n}\n\n/**\n * Set a `value` for a `key`.\n *\n * See: `keyValueArraySet` for details\n *\n * @param keyValueArray KeyValueArray to add to.\n * @param key Style key to add.\n * @param value The value to set.\n */\nexport function styleKeyValueArraySet(keyValueArray: KeyValueArray<any>, key: string, value: any) {\n keyValueArraySet(keyValueArray, key, unwrapSafeValue(value));\n}\n\n/**\n * Update map based styling.\n *\n * Map based styling could be anything which contains more than one binding. For example `string`,\n * or object literal. Dealing with all of these types would complicate the logic so\n * instead this function expects that the complex input is first converted into normalized\n * `KeyValueArray`. The advantage of normalization is that we get the values sorted, which makes it\n * very cheap to compute deltas between the previous and current value.\n *\n * @param tView Associated `TView.data` contains the linked list of binding priorities.\n * @param tNode `TNode` where the binding is located.\n * @param lView `LView` contains the values associated with other styling binding at this `TNode`.\n * @param renderer Renderer to use if any updates.\n * @param oldKeyValueArray Previous value represented as `KeyValueArray`\n * @param newKeyValueArray Current value represented as `KeyValueArray`\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @param bindingIndex Binding index of the binding.\n */\nfunction updateStylingMap(\n tView: TView, tNode: TNode, lView: LView, renderer: Renderer3,\n oldKeyValueArray: KeyValueArray<any>, newKeyValueArray: KeyValueArray<any>,\n isClassBased: boolean, bindingIndex: number) {\n if (oldKeyValueArray as KeyValueArray<any>| NO_CHANGE === NO_CHANGE) {\n // On first execution the oldKeyValueArray is NO_CHANGE => treat it as empty KeyValueArray.\n oldKeyValueArray = EMPTY_ARRAY as any;\n }\n let oldIndex = 0;\n let newIndex = 0;\n let oldKey: string|null = 0 < oldKeyValueArray.length ? oldKeyValueArray[0] : null;\n let newKey: string|null = 0 < newKeyValueArray.length ? newKeyValueArray[0] : null;\n while (oldKey !== null || newKey !== null) {\n ngDevMode && assertLessThan(oldIndex, 999, 'Are we stuck in infinite loop?');\n ngDevMode && assertLessThan(newIndex, 999, 'Are we stuck in infinite loop?');\n const oldValue =\n oldIndex < oldKeyValueArray.length ? oldKeyValueArray[oldIndex + 1] : undefined;\n const newValue =\n newIndex < newKeyValueArray.length ? newKeyValueArray[newIndex + 1] : undefined;\n let setKey: string|null = null;\n let setValue: any = undefined;\n if (oldKey === newKey) {\n // UPDATE: Keys are equal => new value is overwriting old value.\n oldIndex += 2;\n newIndex += 2;\n if (oldValue !== newValue) {\n setKey = newKey;\n setValue = newValue;\n }\n } else if (newKey === null || oldKey !== null && oldKey < newKey!) {\n // DELETE: oldKey key is missing or we did not find the oldKey in the newValue\n // (because the keyValueArray is sorted and `newKey` is found later alphabetically).\n // `\"background\" < \"color\"` so we need to delete `\"background\"` because it is not found in the\n // new array.\n oldIndex += 2;\n setKey = oldKey;\n } else {\n // CREATE: newKey's is earlier alphabetically than oldKey's (or no oldKey) => we have new key.\n // `\"color\" > \"background\"` so we need to add `color` because it is in new array but not in\n // old array.\n ngDevMode && assertDefined(newKey, 'Expecting to have a valid key');\n newIndex += 2;\n setKey = newKey;\n setValue = newValue;\n }\n if (setKey !== null) {\n updateStyling(tView, tNode, lView, renderer, setKey, setValue, isClassBased, bindingIndex);\n }\n oldKey = oldIndex < oldKeyValueArray.length ? oldKeyValueArray[oldIndex] : null;\n newKey = newIndex < newKeyValueArray.length ? newKeyValueArray[newIndex] : null;\n }\n}\n\n/**\n * Update a simple (property name) styling.\n *\n * This function takes `prop` and updates the DOM to that value. The function takes the binding\n * value as well as binding priority into consideration to determine which value should be written\n * to DOM. (For example it may be determined that there is a higher priority overwrite which blocks\n * the DOM write, or if the value goes to `undefined` a lower priority overwrite may be consulted.)\n *\n * @param tView Associated `TView.data` contains the linked list of binding priorities.\n * @param tNode `TNode` where the binding is located.\n * @param lView `LView` contains the values associated with other styling binding at this `TNode`.\n * @param renderer Renderer to use if any updates.\n * @param prop Either style property name or a class name.\n * @param value Either style value for `prop` or `true`/`false` if `prop` is class.\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @param bindingIndex Binding index of the binding.\n */\nfunction updateStyling(\n tView: TView, tNode: TNode, lView: LView, renderer: Renderer3, prop: string,\n value: string|undefined|null|boolean, isClassBased: boolean, bindingIndex: number) {\n if (!(tNode.type & TNodeType.AnyRNode)) {\n // It is possible to have styling on non-elements (such as ng-container).\n // This is rare, but it does happen. In such a case, just ignore the binding.\n return;\n }\n const tData = tView.data;\n const tRange = tData[bindingIndex + 1] as TStylingRange;\n const higherPriorityValue = getTStylingRangeNextDuplicate(tRange) ?\n findStylingValue(tData, tNode, lView, prop, getTStylingRangeNext(tRange), isClassBased) :\n undefined;\n if (!isStylingValuePresent(higherPriorityValue)) {\n // We don't have a next duplicate, or we did not find a duplicate value.\n if (!isStylingValuePresent(value)) {\n // We should delete current value or restore to lower priority value.\n if (getTStylingRangePrevDuplicate(tRange)) {\n // We have a possible prev duplicate, let's retrieve it.\n value = findStylingValue(tData, null, lView, prop, bindingIndex, isClassBased);\n }\n }\n const rNode = getNativeByIndex(getSelectedIndex(), lView) as RElement;\n applyStyling(renderer, isClassBased, rNode, prop, value);\n }\n}\n\n/**\n * Search for styling value with higher priority which is overwriting current value, or a\n * value of lower priority to which we should fall back if the value is `undefined`.\n *\n * When value is being applied at a location, related values need to be consulted.\n * - If there is a higher priority binding, we should be using that one instead.\n * For example `<div [style]=\"{color:exp1}\" [style.color]=\"exp2\">` change to `exp1`\n * requires that we check `exp2` to see if it is set to value other than `undefined`.\n * - If there is a lower priority binding and we are changing to `undefined`\n * For example `<div [style]=\"{color:exp1}\" [style.color]=\"exp2\">` change to `exp2` to\n * `undefined` requires that we check `exp1` (and static values) and use that as new value.\n *\n * NOTE: The styling stores two values.\n * 1. The raw value which came from the application is stored at `index + 0` location. (This value\n * is used for dirty checking).\n * 2. The normalized value is stored at `index + 1`.\n *\n * @param tData `TData` used for traversing the priority.\n * @param tNode `TNode` to use for resolving static styling. Also controls search direction.\n * - `TNode` search next and quit as soon as `isStylingValuePresent(value)` is true.\n * If no value found consult `tNode.residualStyle`/`tNode.residualClass` for default value.\n * - `null` search prev and go all the way to end. Return last value where\n * `isStylingValuePresent(value)` is true.\n * @param lView `LView` used for retrieving the actual values.\n * @param prop Property which we are interested in.\n * @param index Starting index in the linked list of styling bindings where the search should start.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction findStylingValue(\n tData: TData, tNode: TNode|null, lView: LView, prop: string, index: number,\n isClassBased: boolean): any {\n // `TNode` to use for resolving static styling. Also controls search direction.\n // - `TNode` search next and quit as soon as `isStylingValuePresent(value)` is true.\n // If no value found consult `tNode.residualStyle`/`tNode.residualClass` for default value.\n // - `null` search prev and go all the way to end. Return last value where\n // `isStylingValuePresent(value)` is true.\n const isPrevDirection = tNode === null;\n let value: any = undefined;\n while (index > 0) {\n const rawKey = tData[index] as TStylingKey;\n const containsStatics = Array.isArray(rawKey);\n // Unwrap the key if we contain static values.\n const key = containsStatics ? (rawKey as string[])[1] : rawKey;\n const isStylingMap = key === null;\n let valueAtLViewIndex = lView[index + 1];\n if (valueAtLViewIndex === NO_CHANGE) {\n // In firstUpdatePass the styling instructions create a linked list of styling.\n // On subsequent passes it is possible for a styling instruction to try to read a binding\n // which\n // has not yet executed. In that case we will find `NO_CHANGE` and we should assume that\n // we have `undefined` (or empty array in case of styling-map instruction) instead. This\n // allows the resolution to apply the value (which may later be overwritten when the\n // binding actually executes.)\n valueAtLViewIndex = isStylingMap ? EMPTY_ARRAY : undefined;\n }\n let currentValue = isStylingMap ? keyValueArrayGet(valueAtLViewIndex, prop) :\n key === prop ? valueAtLViewIndex : undefined;\n if (containsStatics && !isStylingValuePresent(currentValue)) {\n currentValue = keyValueArrayGet(rawKey as KeyValueArray<any>, prop);\n }\n if (isStylingValuePresent(currentValue)) {\n value = currentValue;\n if (isPrevDirection) {\n return value;\n }\n }\n const tRange = tData[index + 1] as TStylingRange;\n index = isPrevDirection ? getTStylingRangePrev(tRange) : getTStylingRangeNext(tRange);\n }\n if (tNode !== null) {\n // in case where we are going in next direction AND we did not find anything, we need to\n // consult residual styling\n let residual = isClassBased ? tNode.residualClasses : tNode.residualStyles;\n if (residual != null /** OR residual !=== undefined */) {\n value = keyValueArrayGet(residual!, prop);\n }\n }\n return value;\n}\n\n/**\n * Determines if the binding value should be used (or if the value is 'undefined' and hence priority\n * resolution should be used.)\n *\n * @param value Binding style value.\n */\nfunction isStylingValuePresent(value: any): boolean {\n // Currently only `undefined` value is considered non-binding. That is `undefined` says I don't\n // have an opinion as to what this binding should be and you should consult other bindings by\n // priority to determine the valid value.\n // This is extracted into a single function so that we have a single place to control this.\n return value !== undefined;\n}\n\n/**\n * Normalizes and/or adds a suffix to the value.\n *\n * If value is `null`/`undefined` no suffix is added\n * @param value\n * @param suffix\n */\nfunction normalizeSuffix(value: any, suffix: string|undefined|null): string|null|undefined|boolean {\n if (value == null /** || value === undefined */) {\n // do nothing\n } else if (typeof suffix === 'string') {\n value = value + suffix;\n } else if (typeof value === 'object') {\n value = stringify(unwrapSafeValue(value));\n }\n return value;\n}\n\n\n/**\n * Tests if the `TNode` has input shadow.\n *\n * An input shadow is when a directive steals (shadows) the input by using `@Input('style')` or\n * `@Input('class')` as input.\n *\n * @param tNode `TNode` which we would like to see if it has shadow.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nexport function hasStylingInputShadow(tNode: TNode, isClassBased: boolean) {\n return (tNode.flags & (isClassBased ? TNodeFlags.hasClassInput : TNodeFlags.hasStyleInput)) !== 0;\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 */\nimport {assertEqual, assertIndexInRange} from '../../util/assert';\nimport {TElementNode, TNodeType} from '../interfaces/node';\nimport {HEADER_OFFSET, RENDERER, T_HOST} from '../interfaces/view';\nimport {appendChild, createTextNode} from '../node_manipulation';\nimport {getBindingIndex, getLView, getTView, setCurrentTNode} from '../state';\n\nimport {getOrCreateTNode} from './shared';\n\n\n\n/**\n * Create static text node\n *\n * @param index Index of the node in the data array\n * @param value Static string value to write.\n *\n * @codeGenApi\n */\nexport function ɵɵtext(index: number, value: string = ''): void {\n const lView = getLView();\n const tView = getTView();\n const adjustedIndex = index + HEADER_OFFSET;\n\n ngDevMode &&\n assertEqual(\n getBindingIndex(), tView.bindingStartIndex,\n 'text nodes should be created before any bindings');\n ngDevMode && assertIndexInRange(lView, adjustedIndex);\n\n const tNode = tView.firstCreatePass ?\n getOrCreateTNode(tView, adjustedIndex, TNodeType.Text, value, null) :\n tView.data[adjustedIndex] as TElementNode;\n\n const textNative = lView[adjustedIndex] = createTextNode(lView[RENDERER], value);\n appendChild(tView, lView, textNative, tNode);\n\n // Text nodes are self closing.\n setCurrentTNode(tNode, 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 */\nimport {getLView, getSelectedIndex} from '../state';\nimport {NO_CHANGE} from '../tokens';\n\nimport {interpolation1, interpolation2, interpolation3, interpolation4, interpolation5, interpolation6, interpolation7, interpolation8, interpolationV} from './interpolation';\nimport {textBindingInternal} from './shared';\n\n\n/**\n *\n * Update text content with a lone bound value\n *\n * Used when a text node has 1 interpolated value in it, an no additional text\n * surrounds that interpolated value:\n *\n * ```html\n * <div>{{v0}}</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate(v0);\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate(v0: any): typeof ɵɵtextInterpolate {\n ɵɵtextInterpolate1('', v0, '');\n return ɵɵtextInterpolate;\n}\n\n\n/**\n *\n * Update text content with single bound value surrounded by other text.\n *\n * Used when a text node has 1 interpolated value in it:\n *\n * ```html\n * <div>prefix{{v0}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate1('prefix', v0, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate1(\n prefix: string, v0: any, suffix: string): typeof ɵɵtextInterpolate1 {\n const lView = getLView();\n const interpolated = interpolation1(lView, prefix, v0, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated as string);\n }\n return ɵɵtextInterpolate1;\n}\n\n/**\n *\n * Update text content with 2 bound values surrounded by other text.\n *\n * Used when a text node has 2 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate2('prefix', v0, '-', v1, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate2(\n prefix: string, v0: any, i0: string, v1: any, suffix: string): typeof ɵɵtextInterpolate2 {\n const lView = getLView();\n const interpolated = interpolation2(lView, prefix, v0, i0, v1, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated as string);\n }\n return ɵɵtextInterpolate2;\n}\n\n/**\n *\n * Update text content with 3 bound values surrounded by other text.\n *\n * Used when a text node has 3 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate3(\n * 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate3(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any,\n suffix: string): typeof ɵɵtextInterpolate3 {\n const lView = getLView();\n const interpolated = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated as string);\n }\n return ɵɵtextInterpolate3;\n}\n\n/**\n *\n * Update text content with 4 bound values surrounded by other text.\n *\n * Used when a text node has 4 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate4(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see ɵɵtextInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate4(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n suffix: string): typeof ɵɵtextInterpolate4 {\n const lView = getLView();\n const interpolated = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated as string);\n }\n return ɵɵtextInterpolate4;\n}\n\n/**\n *\n * Update text content with 5 bound values surrounded by other text.\n *\n * Used when a text node has 5 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate5(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate5(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, suffix: string): typeof ɵɵtextInterpolate5 {\n const lView = getLView();\n const interpolated = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated as string);\n }\n return ɵɵtextInterpolate5;\n}\n\n/**\n *\n * Update text content with 6 bound values surrounded by other text.\n *\n * Used when a text node has 6 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate6(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change. @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate6(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, i4: string, v5: any, suffix: string): typeof ɵɵtextInterpolate6 {\n const lView = getLView();\n const interpolated =\n interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated as string);\n }\n return ɵɵtextInterpolate6;\n}\n\n/**\n *\n * Update text content with 7 bound values surrounded by other text.\n *\n * Used when a text node has 7 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate7(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate7(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, i4: string, v5: any, i5: string, v6: any,\n suffix: string): typeof ɵɵtextInterpolate7 {\n const lView = getLView();\n const interpolated =\n interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated as string);\n }\n return ɵɵtextInterpolate7;\n}\n\n/**\n *\n * Update text content with 8 bound values surrounded by other text.\n *\n * Used when a text node has 8 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate8(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate8(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any,\n suffix: string): typeof ɵɵtextInterpolate8 {\n const lView = getLView();\n const interpolated = interpolation8(\n lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated as string);\n }\n return ɵɵtextInterpolate8;\n}\n\n/**\n * Update text content with 9 or more bound values other surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolateV(\n * ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n * 'suffix']);\n * ```\n *.\n * @param values The collection of values and the strings in between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n *\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵtextInterpolateV(values: any[]): typeof ɵɵtextInterpolateV {\n const lView = getLView();\n const interpolated = interpolationV(lView, values);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated as string);\n }\n return ɵɵtextInterpolateV;\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 {keyValueArraySet} from '../../util/array_utils';\nimport {getLView} from '../state';\nimport {interpolation1, interpolation2, interpolation3, interpolation4, interpolation5, interpolation6, interpolation7, interpolation8, interpolationV} from './interpolation';\nimport {checkStylingMap, classStringParser} from './styling';\n\n\n\n/**\n *\n * Update an interpolated class on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate1('prefix', v0, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵclassMapInterpolate1(prefix: string, v0: any, suffix: string): void {\n const lView = getLView();\n const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n *\n * Update an interpolated class on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate2('prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵclassMapInterpolate2(\n prefix: string, v0: any, i0: string, v1: any, suffix: string): void {\n const lView = getLView();\n const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n *\n * Update an interpolated class on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate3(\n * 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵclassMapInterpolate3(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string): void {\n const lView = getLView();\n const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n *\n * Update an interpolated class on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate4(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵclassMapInterpolate4(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n suffix: string): void {\n const lView = getLView();\n const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n *\n * Update an interpolated class on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate5(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵclassMapInterpolate5(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, suffix: string): void {\n const lView = getLView();\n const interpolatedValue =\n interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n *\n * Update an interpolated class on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate6(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵclassMapInterpolate6(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, i4: string, v5: any, suffix: string): void {\n const lView = getLView();\n const interpolatedValue =\n interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n *\n * Update an interpolated class on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate7(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵclassMapInterpolate7(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string): void {\n const lView = getLView();\n const interpolatedValue =\n interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n *\n * Update an interpolated class on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate8(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵclassMapInterpolate8(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any,\n suffix: string): void {\n const lView = getLView();\n const interpolatedValue = interpolation8(\n lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n * Update an interpolated class on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n * class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolateV(\n * ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n * 'suffix']);\n * ```\n *.\n * @param values The collection of values and the strings in-between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @codeGenApi\n */\nexport function ɵɵclassMapInterpolateV(values: any[]): void {\n const lView = getLView();\n const interpolatedValue = interpolationV(lView, values);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\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 {getLView} from '../state';\nimport {interpolation1, interpolation2, interpolation3, interpolation4, interpolation5, interpolation6, interpolation7, interpolation8, interpolationV} from './interpolation';\nimport {ɵɵstyleMap} from './styling';\n\n\n/**\n *\n * Update an interpolated style on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div style=\"key: {{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate1('key: ', v0, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵstyleMapInterpolate1(prefix: string, v0: any, suffix: string): void {\n const lView = getLView();\n const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n\n/**\n *\n * Update an interpolated style on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate2('key: ', v0, '; key1: ', v1, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵstyleMapInterpolate2(\n prefix: string, v0: any, i0: string, v1: any, suffix: string): void {\n const lView = getLView();\n const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n\n/**\n *\n * Update an interpolated style on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key2: {{v1}}; key2: {{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate3(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵstyleMapInterpolate3(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string): void {\n const lView = getLView();\n const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n\n/**\n *\n * Update an interpolated style on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate4(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵstyleMapInterpolate4(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n suffix: string): void {\n const lView = getLView();\n const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n\n/**\n *\n * Update an interpolated style on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate5(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵstyleMapInterpolate5(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, suffix: string): void {\n const lView = getLView();\n const interpolatedValue =\n interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n\n/**\n *\n * Update an interpolated style on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}};\n * key5: {{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate6(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,\n * 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵstyleMapInterpolate6(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, i4: string, v5: any, suffix: string): void {\n const lView = getLView();\n const interpolatedValue =\n interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n\n/**\n *\n * Update an interpolated style on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};\n * key6: {{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate7(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,\n * '; key6: ', v6, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵstyleMapInterpolate7(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string): void {\n const lView = getLView();\n const interpolatedValue =\n interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n\n/**\n *\n * Update an interpolated style on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};\n * key6: {{v6}}; key7: {{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate8(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,\n * '; key6: ', v6, '; key7: ', v7, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵstyleMapInterpolate8(\n prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any,\n i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any,\n suffix: string): void {\n const lView = getLView();\n const interpolatedValue = interpolation8(\n lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n\n/**\n * Update an interpolated style on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n * class=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};\n * key6: {{v6}}; key7: {{v7}}; key8: {{v8}}; key9: {{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolateV(\n * ['key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,\n * '; key6: ', v6, '; key7: ', v7, '; key8: ', v8, '; key9: ', v9, 'suffix']);\n * ```\n *.\n * @param values The collection of values and the strings in-between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '; key2: ', value1, '; key2: ', value2, ..., value99, 'suffix']`)\n * @codeGenApi\n */\nexport function ɵɵstyleMapInterpolateV(values: any[]): void {\n const lView = getLView();\n const interpolatedValue = interpolationV(lView, values);\n ɵɵstyleMap(interpolatedValue);\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 {getLView,} from '../state';\nimport {interpolation1, interpolation2, interpolation3, interpolation4, interpolation5, interpolation6, interpolation7, interpolation8, interpolationV} from './interpolation';\nimport {checkStylingProperty} from './styling';\n\n\n/**\n *\n * Update an interpolated style property on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate1(0, 'prefix', v0, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵstylePropInterpolate1(\n prop: string, prefix: string, v0: any, suffix: string,\n valueSuffix?: string|null): typeof ɵɵstylePropInterpolate1 {\n const lView = getLView();\n const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate1;\n}\n\n/**\n *\n * Update an interpolated style property on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate2(0, 'prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵstylePropInterpolate2(\n prop: string, prefix: string, v0: any, i0: string, v1: any, suffix: string,\n valueSuffix?: string|null): typeof ɵɵstylePropInterpolate2 {\n const lView = getLView();\n const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate2;\n}\n\n/**\n *\n * Update an interpolated style property on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate3(0, 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵstylePropInterpolate3(\n prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string,\n valueSuffix?: string|null): typeof ɵɵstylePropInterpolate3 {\n const lView = getLView();\n const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate3;\n}\n\n/**\n *\n * Update an interpolated style property on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate4(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵstylePropInterpolate4(\n prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, suffix: string, valueSuffix?: string|null): typeof ɵɵstylePropInterpolate4 {\n const lView = getLView();\n const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate4;\n}\n\n/**\n *\n * Update an interpolated style property on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate5(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵstylePropInterpolate5(\n prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, suffix: string,\n valueSuffix?: string|null): typeof ɵɵstylePropInterpolate5 {\n const lView = getLView();\n const interpolatedValue =\n interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate5;\n}\n\n/**\n *\n * Update an interpolated style property on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate6(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵstylePropInterpolate6(\n prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string,\n valueSuffix?: string|null): typeof ɵɵstylePropInterpolate6 {\n const lView = getLView();\n const interpolatedValue =\n interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate6;\n}\n\n/**\n *\n * Update an interpolated style property on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate7(\n * 0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵstylePropInterpolate7(\n prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string,\n valueSuffix?: string|null): typeof ɵɵstylePropInterpolate7 {\n const lView = getLView();\n const interpolatedValue =\n interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate7;\n}\n\n/**\n *\n * Update an interpolated style property on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate8(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6,\n * '-', v7, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵstylePropInterpolate8(\n prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string,\n v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any,\n suffix: string, valueSuffix?: string|null): typeof ɵɵstylePropInterpolate8 {\n const lView = getLView();\n const interpolatedValue = interpolation8(\n lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate8;\n}\n\n/**\n * Update an interpolated style property on an element with 9 or more bound values surrounded by\n * text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n * style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\">\n * </div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolateV(\n * 0, ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n * 'suffix']);\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`..\n * @param values The collection of values and the strings in-between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵstylePropInterpolateV(\n prop: string, values: any[], valueSuffix?: string|null): typeof ɵɵstylePropInterpolateV {\n const lView = getLView();\n const interpolatedValue = interpolationV(lView, values);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolateV;\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 */\nimport {bindingUpdated} from '../bindings';\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {RENDERER} from '../interfaces/view';\nimport {getCurrentDirectiveDef, getLView, getSelectedTNode, getTView, nextBindingIndex} from '../state';\nimport {NO_CHANGE} from '../tokens';\n\nimport {elementPropertyInternal, loadComponentRenderer, storePropertyBindingMetadata} from './shared';\n\n/**\n * Update a property on a host element. Only applies to native node properties, not inputs.\n *\n * Operates on the element selected by index via the {@link select} instruction.\n *\n * @param propName Name of property. Because it is going to DOM, this is not subject to\n * renaming as part of minification.\n * @param value New value to write.\n * @param sanitizer An optional function used to sanitize the value.\n * @returns This function returns itself so that it may be chained\n * (e.g. `property('name', ctx.name)('title', ctx.title)`)\n *\n * @codeGenApi\n */\nexport function ɵɵhostProperty<T>(\n propName: string, value: T, sanitizer?: SanitizerFn|null): typeof ɵɵhostProperty {\n const lView = getLView();\n const bindingIndex = nextBindingIndex();\n if (bindingUpdated(lView, bindingIndex, value)) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(tView, tNode, lView, propName, value, lView[RENDERER], sanitizer, true);\n ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);\n }\n return ɵɵhostProperty;\n}\n\n\n/**\n * Updates a synthetic host binding (e.g. `[@foo]`) on a component or directive.\n *\n * This instruction is for compatibility purposes and is designed to ensure that a\n * synthetic host binding (e.g. `@HostBinding('@foo')`) properly gets rendered in\n * the component's renderer. Normally all host bindings are evaluated with the parent\n * component's renderer, but, in the case of animation @triggers, they need to be\n * evaluated with the sub component's renderer (because that's where the animation\n * triggers are defined).\n *\n * Do not use this instruction as a replacement for `elementProperty`. This instruction\n * only exists to ensure compatibility with the ViewEngine's host binding behavior.\n *\n * @param index The index of the element to update in the data array\n * @param propName Name of property. Because it is going to DOM, this is not subject to\n * renaming as part of minification.\n * @param value New value to write.\n * @param sanitizer An optional function used to sanitize the value.\n *\n * @codeGenApi\n */\nexport function ɵɵsyntheticHostProperty<T>(\n propName: string, value: T|NO_CHANGE,\n sanitizer?: SanitizerFn|null): typeof ɵɵsyntheticHostProperty {\n const lView = getLView();\n const bindingIndex = nextBindingIndex();\n if (bindingUpdated(lView, bindingIndex, value)) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n const currentDef = getCurrentDirectiveDef(tView.data);\n const renderer = loadComponentRenderer(currentDef, tNode, lView);\n elementPropertyInternal(tView, tNode, lView, propName, value, renderer, sanitizer, true);\n ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);\n }\n return ɵɵsyntheticHostProperty;\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 {global} from './global';\n\ndeclare global {\n const ngI18nClosureMode: boolean;\n}\n\n/**\n * NOTE: changes to the `ngI18nClosureMode` name must be synced with `compiler-cli/src/tooling.ts`.\n */\nif (typeof ngI18nClosureMode === 'undefined') {\n // These property accesses can be ignored because ngI18nClosureMode will be set to false\n // when optimizing code and the whole if statement will be dropped.\n // Make sure to refer to ngI18nClosureMode as ['ngI18nClosureMode'] for closure.\n // NOTE: we need to have it in IIFE so that the tree-shaker is happy.\n (function() {\n // tslint:disable-next-line:no-toplevel-property-access\n global['ngI18nClosureMode'] =\n // TODO(FW-1250): validate that this actually, you know, works.\n // tslint:disable-next-line:no-toplevel-property-access\n typeof goog !== 'undefined' && typeof goog.getMsg === 'function';\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// THIS CODE IS GENERATED - DO NOT MODIFY.\nconst u = undefined;\n\nfunction plural(n: number): number {\nconst i = Math.floor(Math.abs(n)), v = n.toString().replace(/^[^.]*\\.?/, '').length;\n\nif (i === 1 && v === 0)\n return 1;\nreturn 5;\n}\n\nexport default [\"en\",[[\"a\",\"p\"],[\"AM\",\"PM\"],u],[[\"AM\",\"PM\"],u,u],[[\"S\",\"M\",\"T\",\"W\",\"T\",\"F\",\"S\"],[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"]],u,[[\"J\",\"F\",\"M\",\"A\",\"M\",\"J\",\"J\",\"A\",\"S\",\"O\",\"N\",\"D\"],[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"]],u,[[\"B\",\"A\"],[\"BC\",\"AD\"],[\"Before Christ\",\"Anno Domini\"]],0,[6,0],[\"M/d/yy\",\"MMM d, y\",\"MMMM d, y\",\"EEEE, MMMM d, y\"],[\"h:mm a\",\"h:mm:ss a\",\"h:mm:ss a z\",\"h:mm:ss a zzzz\"],[\"{1}, {0}\",u,\"{1} 'at' {0}\",u],[\".\",\",\",\";\",\"%\",\"+\",\"-\",\"E\",\"×\",\"‰\",\"∞\",\"NaN\",\":\"],[\"#,##0.###\",\"#,##0%\",\"¤#,##0.00\",\"#E0\"],\"USD\",\"$\",\"US Dollar\",{},\"ltr\", plural];\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 */\nimport {global} from '../util/global';\n\nimport localeEn from './locale_en';\n\n/**\n * This const is used to store the locale data registered with `registerLocaleData`\n */\nlet LOCALE_DATA: {[localeId: string]: any} = {};\n\n/**\n * Register locale data to be used internally by Angular. See the\n * [\"I18n guide\"](guide/i18n-common-format-data-locale) to know how to import additional locale\n * data.\n *\n * The signature `registerLocaleData(data: any, extraData?: any)` is deprecated since v5.1\n */\nexport function registerLocaleData(data: any, localeId?: string|any, extraData?: any): void {\n if (typeof localeId !== 'string') {\n extraData = localeId;\n localeId = data[LocaleDataIndex.LocaleId];\n }\n\n localeId = localeId.toLowerCase().replace(/_/g, '-');\n\n LOCALE_DATA[localeId] = data;\n\n if (extraData) {\n LOCALE_DATA[localeId][LocaleDataIndex.ExtraData] = extraData;\n }\n}\n\n/**\n * Finds the locale data for a given locale.\n *\n * @param locale The locale code.\n * @returns The locale data.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n */\nexport function findLocaleData(locale: string): any {\n const normalizedLocale = normalizeLocale(locale);\n\n let match = getLocaleData(normalizedLocale);\n if (match) {\n return match;\n }\n\n // let's try to find a parent locale\n const parentLocale = normalizedLocale.split('-')[0];\n match = getLocaleData(parentLocale);\n if (match) {\n return match;\n }\n\n if (parentLocale === 'en') {\n return localeEn;\n }\n\n throw new Error(`Missing locale data for the locale \"${locale}\".`);\n}\n\n/**\n * Retrieves the default currency code for the given locale.\n *\n * The default is defined as the first currency which is still in use.\n *\n * @param locale The code of the locale whose currency code we want.\n * @returns The code of the default currency for the given locale.\n *\n */\nexport function getLocaleCurrencyCode(locale: string): string|null {\n const data = findLocaleData(locale);\n return data[LocaleDataIndex.CurrencyCode] || null;\n}\n\n/**\n * Retrieves the plural function used by ICU expressions to determine the plural case to use\n * for a given locale.\n * @param locale A locale code for the locale format rules to use.\n * @returns The plural function for the locale.\n * @see `NgPlural`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\n */\nexport function getLocalePluralCase(locale: string): (value: number) => number {\n const data = findLocaleData(locale);\n return data[LocaleDataIndex.PluralCase];\n}\n\n\n\n/**\n * Helper function to get the given `normalizedLocale` from `LOCALE_DATA`\n * or from the global `ng.common.locale`.\n */\nexport function getLocaleData(normalizedLocale: string): any {\n if (!(normalizedLocale in LOCALE_DATA)) {\n LOCALE_DATA[normalizedLocale] = global.ng && global.ng.common && global.ng.common.locales &&\n global.ng.common.locales[normalizedLocale];\n }\n return LOCALE_DATA[normalizedLocale];\n}\n\n/**\n * Helper function to remove all the locale data from `LOCALE_DATA`.\n */\nexport function unregisterAllLocaleData() {\n LOCALE_DATA = {};\n}\n\n/**\n * Index of each type of locale data from the locale data array\n */\nexport enum LocaleDataIndex {\n LocaleId = 0,\n DayPeriodsFormat,\n DayPeriodsStandalone,\n DaysFormat,\n DaysStandalone,\n MonthsFormat,\n MonthsStandalone,\n Eras,\n FirstDayOfWeek,\n WeekendRange,\n DateFormat,\n TimeFormat,\n DateTimeFormat,\n NumberSymbols,\n NumberFormats,\n CurrencyCode,\n CurrencySymbol,\n CurrencyName,\n Currencies,\n Directionality,\n PluralCase,\n ExtraData\n}\n\n/**\n * Index of each type of locale data from the extra locale data array\n */\nexport const enum ExtraLocaleDataIndex {\n ExtraDayPeriodFormats = 0,\n ExtraDayPeriodStandalone,\n ExtraDayPeriodsRules\n}\n\n/**\n * Index of each value in currency data (used to describe CURRENCIES_EN in currencies.ts)\n */\nexport const enum CurrencyIndex {\n Symbol = 0,\n SymbolNarrow,\n NbOfDigits\n}\n\n/**\n * Returns the canonical form of a locale name - lowercase with `_` replaced with `-`.\n */\nfunction normalizeLocale(locale: string): string {\n return locale.toLowerCase().replace(/_/g, '-');\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 {getLocalePluralCase} from './locale_data_api';\n\nconst pluralMapping = ['zero', 'one', 'two', 'few', 'many'];\n\n/**\n * Returns the plural case based on the locale\n */\nexport function getPluralCase(value: string, locale: string): string {\n const plural = getLocalePluralCase(locale)(parseInt(value, 10));\n const result = pluralMapping[plural];\n return (result !== undefined) ? result : 'other';\n}\n\n/**\n * The locale id that the application is using by default (for translations and ICU expressions).\n */\nexport const DEFAULT_LOCALE_ID = 'en-US';\n\n/**\n * USD currency code that the application uses by default for CurrencyPipe when no\n * DEFAULT_CURRENCY_CODE is provided.\n */\nexport const USD_CURRENCY_CODE = 'USD';\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 {SanitizerFn} from './sanitization';\n\n\n/**\n * Stores a list of nodes which need to be removed.\n *\n * Numbers are indexes into the `LView`\n * - index > 0: `removeRNode(lView[0])`\n * - index < 0: `removeICU(~lView[0])`\n */\nexport interface I18nRemoveOpCodes extends Array<number> {\n __brand__: 'I18nRemoveOpCodes';\n}\n\n/**\n * `I18nMutateOpCode` defines OpCodes for `I18nMutateOpCodes` array.\n *\n * OpCodes are efficient operations which can be applied to the DOM to update it. (For example to\n * update to a new ICU case requires that we clean up previous elements and create new ones.)\n *\n * OpCodes contain three parts:\n * 1) Parent node index offset. (p)\n * 2) Reference node index offset. (r)\n * 3) The instruction to execute. (i)\n *\n * pppp pppp pppp pppp rrrr rrrr rrrr riii\n * 3322 2222 2222 1111 1111 1110 0000 0000\n * 1098 7654 3210 9876 5432 1098 7654 3210\n *\n * ```\n * var parent = lView[opCode >>> SHIFT_PARENT];\n * var refNode = lView[((opCode & MASK_REF) >>> SHIFT_REF)];\n * var instruction = opCode & MASK_OPCODE;\n * ```\n *\n * See: `I18nCreateOpCodes` for example of usage.\n */\nexport const enum IcuCreateOpCode {\n /**\n * Stores shift amount for bits 17-3 that contain reference index.\n */\n SHIFT_REF = 1,\n /**\n * Stores shift amount for bits 31-17 that contain parent index.\n */\n SHIFT_PARENT = 17,\n /**\n * Mask for OpCode\n */\n MASK_INSTRUCTION = 0b1,\n\n /**\n * Mask for the Reference node (bits 16-3)\n */\n MASK_REF = 0b11111111111111110,\n // 11111110000000000\n // 65432109876543210\n\n /**\n * Instruction to append the current node to `PARENT`.\n */\n AppendChild = 0b0,\n\n /**\n * Instruction to set the attribute of a node.\n */\n Attr = 0b1,\n}\n\n\n/**\n * Array storing OpCode for dynamically creating `i18n` blocks.\n *\n * Example:\n * ```ts\n * <I18nCreateOpCode>[\n * // For adding text nodes\n * // ---------------------\n * // Equivalent to:\n * // lView[1].appendChild(lView[0] = document.createTextNode('xyz'));\n * 'xyz', 0, 1 << SHIFT_PARENT | 0 << SHIFT_REF | AppendChild,\n *\n * // For adding element nodes\n * // ---------------------\n * // Equivalent to:\n * // lView[1].appendChild(lView[0] = document.createElement('div'));\n * ELEMENT_MARKER, 'div', 0, 1 << SHIFT_PARENT | 0 << SHIFT_REF | AppendChild,\n *\n * // For adding comment nodes\n * // ---------------------\n * // Equivalent to:\n * // lView[1].appendChild(lView[0] = document.createComment(''));\n * ICU_MARKER, '', 0, 1 << SHIFT_PARENT | 0 << SHIFT_REF | AppendChild,\n *\n * // For moving existing nodes to a different location\n * // --------------------------------------------------\n * // Equivalent to:\n * // const node = lView[1];\n * // lView[2].appendChild(node);\n * 1 << SHIFT_REF | Select, 2 << SHIFT_PARENT | 0 << SHIFT_REF | AppendChild,\n *\n * // For removing existing nodes\n * // --------------------------------------------------\n * // const node = lView[1];\n * // removeChild(tView.data(1), node, lView);\n * 1 << SHIFT_REF | Remove,\n *\n * // For writing attributes\n * // --------------------------------------------------\n * // const node = lView[1];\n * // node.setAttribute('attr', 'value');\n * 1 << SHIFT_REF | Attr, 'attr', 'value'\n * ];\n * ```\n */\nexport interface IcuCreateOpCodes extends Array<number|string|ELEMENT_MARKER|ICU_MARKER|null>,\n I18nDebug {\n __brand__: 'I18nCreateOpCodes';\n}\n\nexport const enum I18nUpdateOpCode {\n /**\n * Stores shift amount for bits 17-2 that contain reference index.\n */\n SHIFT_REF = 2,\n /**\n * Mask for OpCode\n */\n MASK_OPCODE = 0b11,\n\n /**\n * Instruction to update a text node.\n */\n Text = 0b00,\n /**\n * Instruction to update a attribute of a node.\n */\n Attr = 0b01,\n /**\n * Instruction to switch the current ICU case.\n */\n IcuSwitch = 0b10,\n /**\n * Instruction to update the current ICU case.\n */\n IcuUpdate = 0b11,\n}\n\n/**\n * Marks that the next string is an element name.\n *\n * See `I18nMutateOpCodes` documentation.\n */\nexport const ELEMENT_MARKER: ELEMENT_MARKER = {\n marker: 'element'\n};\nexport interface ELEMENT_MARKER {\n marker: 'element';\n}\n\n/**\n * Marks that the next string is comment text need for ICU.\n *\n * See `I18nMutateOpCodes` documentation.\n */\nexport const ICU_MARKER: ICU_MARKER = {\n marker: 'ICU'\n};\n\nexport interface ICU_MARKER {\n marker: 'ICU';\n}\n\nexport interface I18nDebug {\n /**\n * Human readable representation of the OpCode arrays.\n *\n * NOTE: This property only exists if `ngDevMode` is set to `true` and it is not present in\n * production. Its presence is purely to help debug issue in development, and should not be relied\n * on in production application.\n */\n debug?: string[];\n}\n\n/**\n * Array storing OpCode for dynamically creating `i18n` translation DOM elements.\n *\n * This array creates a sequence of `Text` and `Comment` (as ICU anchor) DOM elements. It consists\n * of a pair of `number` and `string` pairs which encode the operations for the creation of the\n * translated block.\n *\n * The number is shifted and encoded according to `I18nCreateOpCode`\n *\n * Pseudocode:\n * ```\n * const i18nCreateOpCodes = [\n * 10 << I18nCreateOpCode.SHIFT, \"Text Node add to DOM\",\n * 11 << I18nCreateOpCode.SHIFT | I18nCreateOpCode.COMMENT, \"Comment Node add to DOM\",\n * 12 << I18nCreateOpCode.SHIFT | I18nCreateOpCode.APPEND_LATER, \"Text Node added later\"\n * ];\n *\n * for(var i=0; i<i18nCreateOpCodes.length; i++) {\n * const opcode = i18NCreateOpCodes[i++];\n * const index = opcode >> I18nCreateOpCode.SHIFT;\n * const text = i18NCreateOpCodes[i];\n * let node: Text|Comment;\n * if (opcode & I18nCreateOpCode.COMMENT === I18nCreateOpCode.COMMENT) {\n * node = lView[~index] = document.createComment(text);\n * } else {\n * node = lView[index] = document.createText(text);\n * }\n * if (opcode & I18nCreateOpCode.APPEND_EAGERLY !== I18nCreateOpCode.APPEND_EAGERLY) {\n * parentNode.appendChild(node);\n * }\n * }\n * ```\n */\nexport interface I18nCreateOpCodes extends Array<number|string>, I18nDebug {\n __brand__: 'I18nCreateOpCodes';\n}\n\n/**\n * See `I18nCreateOpCodes`\n */\nexport enum I18nCreateOpCode {\n /**\n * Number of bits to shift index so that it can be combined with the `APPEND_EAGERLY` and\n * `COMMENT`.\n */\n SHIFT = 2,\n\n /**\n * Should the node be appended to parent imedditatly after creation.\n */\n APPEND_EAGERLY = 0b01,\n\n /**\n * If set the node should be comment (rather than a text) node.\n */\n COMMENT = 0b10,\n}\n\n\n/**\n * Stores DOM operations which need to be applied to update DOM render tree due to changes in\n * expressions.\n *\n * The basic idea is that `i18nExp` OpCodes capture expression changes and update a change\n * mask bit. (Bit 1 for expression 1, bit 2 for expression 2 etc..., bit 32 for expression 32 and\n * higher.) The OpCodes then compare its own change mask against the expression change mask to\n * determine if the OpCodes should execute.\n *\n * NOTE: 32nd bit is special as it says 32nd or higher. This way if we have more than 32 bindings\n * the code still works, but with lower efficiency. (it is unlikely that a translation would have\n * more than 32 bindings.)\n *\n * These OpCodes can be used by both the i18n block as well as ICU sub-block.\n *\n * ## Example\n *\n * Assume\n * ```ts\n * if (rf & RenderFlags.Update) {\n * i18nExp(ctx.exp1); // If changed set mask bit 1\n * i18nExp(ctx.exp2); // If changed set mask bit 2\n * i18nExp(ctx.exp3); // If changed set mask bit 3\n * i18nExp(ctx.exp4); // If changed set mask bit 4\n * i18nApply(0); // Apply all changes by executing the OpCodes.\n * }\n * ```\n * We can assume that each call to `i18nExp` sets an internal `changeMask` bit depending on the\n * index of `i18nExp`.\n *\n * ### OpCodes\n * ```ts\n * <I18nUpdateOpCodes>[\n * // The following OpCodes represent: `<div i18n-title=\"pre{{exp1}}in{{exp2}}post\">`\n * // If `changeMask & 0b11`\n * // has changed then execute update OpCodes.\n * // has NOT changed then skip `8` values and start processing next OpCodes.\n * 0b11, 8,\n * // Concatenate `newValue = 'pre'+lView[bindIndex-4]+'in'+lView[bindIndex-3]+'post';`.\n * 'pre', -4, 'in', -3, 'post',\n * // Update attribute: `elementAttribute(1, 'title', sanitizerFn(newValue));`\n * 1 << SHIFT_REF | Attr, 'title', sanitizerFn,\n *\n * // The following OpCodes represent: `<div i18n>Hello {{exp3}}!\">`\n * // If `changeMask & 0b100`\n * // has changed then execute update OpCodes.\n * // has NOT changed then skip `4` values and start processing next OpCodes.\n * 0b100, 4,\n * // Concatenate `newValue = 'Hello ' + lView[bindIndex -2] + '!';`.\n * 'Hello ', -2, '!',\n * // Update text: `lView[1].textContent = newValue;`\n * 1 << SHIFT_REF | Text,\n *\n * // The following OpCodes represent: `<div i18n>{exp4, plural, ... }\">`\n * // If `changeMask & 0b1000`\n * // has changed then execute update OpCodes.\n * // has NOT changed then skip `2` values and start processing next OpCodes.\n * 0b1000, 2,\n * // Concatenate `newValue = lView[bindIndex -1];`.\n * -1,\n * // Switch ICU: `icuSwitchCase(lView[1], 0, newValue);`\n * 0 << SHIFT_ICU | 1 << SHIFT_REF | IcuSwitch,\n *\n * // Note `changeMask & -1` is always true, so the IcuUpdate will always execute.\n * -1, 1,\n * // Update ICU: `icuUpdateCase(lView[1], 0);`\n * 0 << SHIFT_ICU | 1 << SHIFT_REF | IcuUpdate,\n *\n * ];\n * ```\n *\n */\nexport interface I18nUpdateOpCodes extends Array<string|number|SanitizerFn|null>, I18nDebug {\n __brand__: 'I18nUpdateOpCodes';\n}\n\n/**\n * Store information for the i18n translation block.\n */\nexport interface TI18n {\n /**\n * A set of OpCodes which will create the Text Nodes and ICU anchors for the translation blocks.\n *\n * NOTE: The ICU anchors are filled in with ICU Update OpCode.\n */\n create: I18nCreateOpCodes;\n\n /**\n * A set of OpCodes which will be executed on each change detection to determine if any changes to\n * DOM are required.\n */\n update: I18nUpdateOpCodes;\n}\n\n/**\n * Defines the ICU type of `select` or `plural`\n */\nexport const enum IcuType {\n select = 0,\n plural = 1,\n}\n\nexport interface TIcu {\n /**\n * Defines the ICU type of `select` or `plural`\n */\n type: IcuType;\n\n /**\n * Index in `LView` where the anchor node is stored. `<!-- ICU 0:0 -->`\n */\n anchorIdx: number;\n\n /**\n * Currently selected ICU case pointer.\n *\n * `lView[currentCaseLViewIndex]` stores the currently selected case. This is needed to know how\n * to clean up the current case when transitioning no the new case.\n *\n * If the value stored is:\n * `null`: No current case selected.\n * `<0`: A flag which means that the ICU just switched and that `icuUpdate` must be executed\n * regardless of the `mask`. (After the execution the flag is cleared)\n * `>=0` A currently selected case index.\n */\n currentCaseLViewIndex: number;\n\n /**\n * A list of case values which the current ICU will try to match.\n *\n * The last value is `other`\n */\n cases: any[];\n\n /**\n * A set of OpCodes to apply in order to build up the DOM render tree for the ICU\n */\n create: IcuCreateOpCodes[];\n\n /**\n * A set of OpCodes to apply in order to destroy the DOM render tree for the ICU.\n */\n remove: I18nRemoveOpCodes[];\n\n /**\n * A set of OpCodes to apply in order to update the DOM render tree for the ICU bindings.\n */\n update: I18nUpdateOpCodes[];\n}\n\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nexport const unusedValueExportToPlacateAjd = 1;\n\n/**\n * Parsed ICU expression\n */\nexport interface IcuExpression {\n type: IcuType;\n mainBinding: number;\n cases: string[];\n values: (string|IcuExpression)[][];\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 {DEFAULT_LOCALE_ID} from '../../i18n/localization';\nimport {assertDefined} from '../../util/assert';\n\n\n/**\n * The locale id that the application is currently using (for translations and ICU expressions).\n * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine\n * but is now defined as a global value.\n */\nlet LOCALE_ID = DEFAULT_LOCALE_ID;\n\n/**\n * Sets the locale id that will be used for translations and ICU expressions.\n * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine\n * but is now defined as a global value.\n *\n * @param localeId\n */\nexport function setLocaleId(localeId: string) {\n assertDefined(localeId, `Expected localeId to be defined`);\n if (typeof localeId === 'string') {\n LOCALE_ID = localeId.toLowerCase().replace(/_/g, '-');\n }\n}\n\n/**\n * Gets the locale id that will be used for translations and ICU expressions.\n * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine\n * but is now defined as a global value.\n */\nexport function getLocaleId(): string {\n return LOCALE_ID;\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 {assertDomNode, assertIndexInRange} from '../util/assert';\n\nimport {TNode, TNodeFlags, TNodeType} from './interfaces/node';\nimport {Renderer3} from './interfaces/renderer';\nimport {RElement, RNode} from './interfaces/renderer_dom';\nimport {LView} from './interfaces/view';\nimport {getInsertInFrontOfRNodeWithNoI18n, nativeInsertBefore} from './node_manipulation';\nimport {unwrapRNode} from './util/view_utils';\n\n\n/**\n * Find a node in front of which `currentTNode` should be inserted (takes i18n into account).\n *\n * This method determines the `RNode` in front of which we should insert the `currentRNode`. This\n * takes `TNode.insertBeforeIndex` into account.\n *\n * @param parentTNode parent `TNode`\n * @param currentTNode current `TNode` (The node which we would like to insert into the DOM)\n * @param lView current `LView`\n */\nexport function getInsertInFrontOfRNodeWithI18n(\n parentTNode: TNode, currentTNode: TNode, lView: LView): RNode|null {\n const tNodeInsertBeforeIndex = currentTNode.insertBeforeIndex;\n const insertBeforeIndex =\n Array.isArray(tNodeInsertBeforeIndex) ? tNodeInsertBeforeIndex[0] : tNodeInsertBeforeIndex;\n if (insertBeforeIndex === null) {\n return getInsertInFrontOfRNodeWithNoI18n(parentTNode, currentTNode, lView);\n } else {\n ngDevMode && assertIndexInRange(lView, insertBeforeIndex);\n return unwrapRNode(lView[insertBeforeIndex]);\n }\n}\n\n\n/**\n * Process `TNode.insertBeforeIndex` by adding i18n text nodes.\n *\n * See `TNode.insertBeforeIndex`\n */\nexport function processI18nInsertBefore(\n renderer: Renderer3, childTNode: TNode, lView: LView, childRNode: RNode|RNode[],\n parentRElement: RElement|null): void {\n const tNodeInsertBeforeIndex = childTNode.insertBeforeIndex;\n if (Array.isArray(tNodeInsertBeforeIndex)) {\n // An array indicates that there are i18n nodes that need to be added as children of this\n // `childRNode`. These i18n nodes were created before this `childRNode` was available and so\n // only now can be added. The first element of the array is the normal index where we should\n // insert the `childRNode`. Additional elements are the extra nodes to be added as children of\n // `childRNode`.\n ngDevMode && assertDomNode(childRNode);\n let i18nParent: RElement|null = childRNode as RElement;\n let anchorRNode: RNode|null = null;\n if (!(childTNode.type & TNodeType.AnyRNode)) {\n anchorRNode = i18nParent;\n i18nParent = parentRElement;\n }\n if (i18nParent !== null && (childTNode.flags & TNodeFlags.isComponentHost) === 0) {\n for (let i = 1; i < tNodeInsertBeforeIndex.length; i++) {\n // No need to `unwrapRNode` because all of the indexes point to i18n text nodes.\n // see `assertDomNode` below.\n const i18nChild = lView[tNodeInsertBeforeIndex[i]];\n nativeInsertBefore(renderer, i18nParent, i18nChild, anchorRNode, false);\n }\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {assertEqual} from '../../util/assert';\nimport {TNode, TNodeType} from '../interfaces/node';\nimport {setI18nHandling} from '../node_manipulation';\nimport {getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore} from '../node_manipulation_i18n';\n\n/**\n * Add `tNode` to `previousTNodes` list and update relevant `TNode`s in `previousTNodes` list\n * `tNode.insertBeforeIndex`.\n *\n * Things to keep in mind:\n * 1. All i18n text nodes are encoded as `TNodeType.Element` and are created eagerly by the\n * `ɵɵi18nStart` instruction.\n * 2. All `TNodeType.Placeholder` `TNodes` are elements which will be created later by\n * `ɵɵelementStart` instruction.\n * 3. `ɵɵelementStart` instruction will create `TNode`s in the ascending `TNode.index` order. (So a\n * smaller index `TNode` is guaranteed to be created before a larger one)\n *\n * We use the above three invariants to determine `TNode.insertBeforeIndex`.\n *\n * In an ideal world `TNode.insertBeforeIndex` would always be `TNode.next.index`. However,\n * this will not work because `TNode.next.index` may be larger than `TNode.index` which means that\n * the next node is not yet created and therefore we can't insert in front of it.\n *\n * Rule1: `TNode.insertBeforeIndex = null` if `TNode.next === null` (Initial condition, as we don't\n * know if there will be further `TNode`s inserted after.)\n * Rule2: If `previousTNode` is created after the `tNode` being inserted, then\n * `previousTNode.insertBeforeNode = tNode.index` (So when a new `tNode` is added we check\n * previous to see if we can update its `insertBeforeTNode`)\n *\n * See `TNode.insertBeforeIndex` for more context.\n *\n * @param previousTNodes A list of previous TNodes so that we can easily traverse `TNode`s in\n * reverse order. (If `TNode` would have `previous` this would not be necessary.)\n * @param newTNode A TNode to add to the `previousTNodes` list.\n */\nexport function addTNodeAndUpdateInsertBeforeIndex(previousTNodes: TNode[], newTNode: TNode) {\n // Start with Rule1\n ngDevMode &&\n assertEqual(newTNode.insertBeforeIndex, null, 'We expect that insertBeforeIndex is not set');\n\n previousTNodes.push(newTNode);\n if (previousTNodes.length > 1) {\n for (let i = previousTNodes.length - 2; i >= 0; i--) {\n const existingTNode = previousTNodes[i];\n // Text nodes are created eagerly and so they don't need their `indexBeforeIndex` updated.\n // It is safe to ignore them.\n if (!isI18nText(existingTNode)) {\n if (isNewTNodeCreatedBefore(existingTNode, newTNode) &&\n getInsertBeforeIndex(existingTNode) === null) {\n // If it was created before us in time, (and it does not yet have `insertBeforeIndex`)\n // then add the `insertBeforeIndex`.\n setInsertBeforeIndex(existingTNode, newTNode.index);\n }\n }\n }\n }\n}\n\nfunction isI18nText(tNode: TNode): boolean {\n return !(tNode.type & TNodeType.Placeholder);\n}\n\nfunction isNewTNodeCreatedBefore(existingTNode: TNode, newTNode: TNode): boolean {\n return isI18nText(newTNode) || existingTNode.index > newTNode.index;\n}\n\nfunction getInsertBeforeIndex(tNode: TNode): number|null {\n const index = tNode.insertBeforeIndex;\n return Array.isArray(index) ? index[0] : index;\n}\n\nfunction setInsertBeforeIndex(tNode: TNode, value: number): void {\n const index = tNode.insertBeforeIndex;\n if (Array.isArray(index)) {\n // Array is stored if we have to insert child nodes. See `TNode.insertBeforeIndex`\n index[0] = value;\n } else {\n setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore);\n tNode.insertBeforeIndex = 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 {assertEqual, assertGreaterThan, assertGreaterThanOrEqual, throwError} from '../../util/assert';\nimport {assertTIcu, assertTNode} from '../assert';\nimport {createTNodeAtIndex} from '../instructions/shared';\nimport {IcuCreateOpCode, TIcu} from '../interfaces/i18n';\nimport {TIcuContainerNode, TNode, TNodeType} from '../interfaces/node';\nimport {LView, TView} from '../interfaces/view';\nimport {assertTNodeType} from '../node_assert';\nimport {setI18nHandling} from '../node_manipulation';\nimport {getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore} from '../node_manipulation_i18n';\nimport {addTNodeAndUpdateInsertBeforeIndex} from './i18n_insert_before_index';\n\n\n/**\n * Retrieve `TIcu` at a given `index`.\n *\n * The `TIcu` can be stored either directly (if it is nested ICU) OR\n * it is stored inside tho `TIcuContainer` if it is top level ICU.\n *\n * The reason for this is that the top level ICU need a `TNode` so that they are part of the render\n * tree, but nested ICU's have no TNode, because we don't know ahead of time if the nested ICU is\n * expressed (parent ICU may have selected a case which does not contain it.)\n *\n * @param tView Current `TView`.\n * @param index Index where the value should be read from.\n */\nexport function getTIcu(tView: TView, index: number): TIcu|null {\n const value = tView.data[index] as null | TIcu | TIcuContainerNode | string;\n if (value === null || typeof value === 'string') return null;\n if (ngDevMode &&\n !(value.hasOwnProperty('tViews') || value.hasOwnProperty('currentCaseLViewIndex'))) {\n throwError('We expect to get \\'null\\'|\\'TIcu\\'|\\'TIcuContainer\\', but got: ' + value);\n }\n // Here the `value.hasOwnProperty('currentCaseLViewIndex')` is a polymorphic read as it can be\n // either TIcu or TIcuContainerNode. This is not ideal, but we still think it is OK because it\n // will be just two cases which fits into the browser inline cache (inline cache can take up to\n // 4)\n const tIcu = value.hasOwnProperty('currentCaseLViewIndex') ? value as TIcu :\n (value as TIcuContainerNode).value;\n ngDevMode && assertTIcu(tIcu);\n return tIcu;\n}\n\n/**\n * Store `TIcu` at a give `index`.\n *\n * The `TIcu` can be stored either directly (if it is nested ICU) OR\n * it is stored inside tho `TIcuContainer` if it is top level ICU.\n *\n * The reason for this is that the top level ICU need a `TNode` so that they are part of the render\n * tree, but nested ICU's have no TNode, because we don't know ahead of time if the nested ICU is\n * expressed (parent ICU may have selected a case which does not contain it.)\n *\n * @param tView Current `TView`.\n * @param index Index where the value should be stored at in `Tview.data`\n * @param tIcu The TIcu to store.\n */\nexport function setTIcu(tView: TView, index: number, tIcu: TIcu): void {\n const tNode = tView.data[index] as null | TIcuContainerNode;\n ngDevMode &&\n assertEqual(\n tNode === null || tNode.hasOwnProperty('tViews'), true,\n 'We expect to get \\'null\\'|\\'TIcuContainer\\'');\n if (tNode === null) {\n tView.data[index] = tIcu;\n } else {\n ngDevMode && assertTNodeType(tNode, TNodeType.Icu);\n tNode.value = tIcu;\n }\n}\n\n/**\n * Set `TNode.insertBeforeIndex` taking the `Array` into account.\n *\n * See `TNode.insertBeforeIndex`\n */\nexport function setTNodeInsertBeforeIndex(tNode: TNode, index: number) {\n ngDevMode && assertTNode(tNode);\n let insertBeforeIndex = tNode.insertBeforeIndex;\n if (insertBeforeIndex === null) {\n setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore);\n insertBeforeIndex = tNode.insertBeforeIndex =\n [null!/* may be updated to number later */, index];\n } else {\n assertEqual(Array.isArray(insertBeforeIndex), true, 'Expecting array here');\n (insertBeforeIndex as number[]).push(index);\n }\n}\n\n/**\n * Create `TNode.type=TNodeType.Placeholder` node.\n *\n * See `TNodeType.Placeholder` for more information.\n */\nexport function createTNodePlaceholder(\n tView: TView, previousTNodes: TNode[], index: number): TNode {\n const tNode = createTNodeAtIndex(tView, index, TNodeType.Placeholder, null, null);\n addTNodeAndUpdateInsertBeforeIndex(previousTNodes, tNode);\n return tNode;\n}\n\n\n/**\n * Returns current ICU case.\n *\n * ICU cases are stored as index into the `TIcu.cases`.\n * At times it is necessary to communicate that the ICU case just switched and that next ICU update\n * should update all bindings regardless of the mask. In such a case the we store negative numbers\n * for cases which have just been switched. This function removes the negative flag.\n */\nexport function getCurrentICUCaseIndex(tIcu: TIcu, lView: LView) {\n const currentCase: number|null = lView[tIcu.currentCaseLViewIndex];\n return currentCase === null ? currentCase : (currentCase < 0 ? ~currentCase : currentCase);\n}\n\nexport function getParentFromIcuCreateOpCode(mergedCode: number): number {\n return mergedCode >>> IcuCreateOpCode.SHIFT_PARENT;\n}\n\nexport function getRefFromIcuCreateOpCode(mergedCode: number): number {\n return (mergedCode & IcuCreateOpCode.MASK_REF) >>> IcuCreateOpCode.SHIFT_REF;\n}\n\nexport function getInstructionFromIcuCreateOpCode(mergedCode: number): number {\n return mergedCode & IcuCreateOpCode.MASK_INSTRUCTION;\n}\n\nexport function icuCreateOpCode(opCode: IcuCreateOpCode, parentIdx: number, refIdx: number) {\n ngDevMode && assertGreaterThanOrEqual(parentIdx, 0, 'Missing parent index');\n ngDevMode && assertGreaterThan(refIdx, 0, 'Missing ref index');\n return opCode | parentIdx << IcuCreateOpCode.SHIFT_PARENT | refIdx << IcuCreateOpCode.SHIFT_REF;\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 {getPluralCase} from '../../i18n/localization';\nimport {assertDefined, assertDomNode, assertEqual, assertGreaterThan, assertIndexInRange, throwError} from '../../util/assert';\nimport {assertIndexInExpandoRange, assertTIcu} from '../assert';\nimport {attachPatchData} from '../context_discovery';\nimport {elementPropertyInternal, setElementAttribute} from '../instructions/shared';\nimport {ELEMENT_MARKER, I18nCreateOpCode, I18nCreateOpCodes, I18nUpdateOpCode, I18nUpdateOpCodes, ICU_MARKER, IcuCreateOpCode, IcuCreateOpCodes, IcuType, TI18n, TIcu} from '../interfaces/i18n';\nimport {TNode} from '../interfaces/node';\nimport {RElement, RNode, RText} from '../interfaces/renderer_dom';\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {HEADER_OFFSET, LView, RENDERER, TView} from '../interfaces/view';\nimport {createCommentNode, createElementNode, createTextNode, nativeInsertBefore, nativeParentNode, nativeRemoveNode, updateTextNode} from '../node_manipulation';\nimport {getBindingIndex} from '../state';\nimport {renderStringify} from '../util/stringify_utils';\nimport {getNativeByIndex, unwrapRNode} from '../util/view_utils';\nimport {getLocaleId} from './i18n_locale_id';\nimport {getCurrentICUCaseIndex, getParentFromIcuCreateOpCode, getRefFromIcuCreateOpCode, getTIcu} from './i18n_util';\n\n\n\n/**\n * Keep track of which input bindings in `ɵɵi18nExp` have changed.\n *\n * This is used to efficiently update expressions in i18n only when the corresponding input has\n * changed.\n *\n * 1) Each bit represents which of the `ɵɵi18nExp` has changed.\n * 2) There are 32 bits allowed in JS.\n * 3) Bit 32 is special as it is shared for all changes past 32. (In other words if you have more\n * than 32 `ɵɵi18nExp` then all changes past 32nd `ɵɵi18nExp` will be mapped to same bit. This means\n * that we may end up changing more than we need to. But i18n expressions with 32 bindings is rare\n * so in practice it should not be an issue.)\n */\nlet changeMask = 0b0;\n\n/**\n * Keeps track of which bit needs to be updated in `changeMask`\n *\n * This value gets incremented on every call to `ɵɵi18nExp`\n */\nlet changeMaskCounter = 0;\n\n/**\n * Keep track of which input bindings in `ɵɵi18nExp` have changed.\n *\n * `setMaskBit` gets invoked by each call to `ɵɵi18nExp`.\n *\n * @param hasChange did `ɵɵi18nExp` detect a change.\n */\nexport function setMaskBit(hasChange: boolean) {\n if (hasChange) {\n changeMask = changeMask | (1 << Math.min(changeMaskCounter, 31));\n }\n changeMaskCounter++;\n}\n\nexport function applyI18n(tView: TView, lView: LView, index: number) {\n if (changeMaskCounter > 0) {\n ngDevMode && assertDefined(tView, `tView should be defined`);\n const tI18n = tView.data[index] as TI18n | I18nUpdateOpCodes;\n // When `index` points to an `ɵɵi18nAttributes` then we have an array otherwise `TI18n`\n const updateOpCodes: I18nUpdateOpCodes =\n Array.isArray(tI18n) ? tI18n as I18nUpdateOpCodes : (tI18n as TI18n).update;\n const bindingsStartIndex = getBindingIndex() - changeMaskCounter - 1;\n applyUpdateOpCodes(tView, lView, updateOpCodes, bindingsStartIndex, changeMask);\n }\n // Reset changeMask & maskBit to default for the next update cycle\n changeMask = 0b0;\n changeMaskCounter = 0;\n}\n\n\n/**\n * Apply `I18nCreateOpCodes` op-codes as stored in `TI18n.create`.\n *\n * Creates text (and comment) nodes which are internationalized.\n *\n * @param lView Current lView\n * @param createOpCodes Set of op-codes to apply\n * @param parentRNode Parent node (so that direct children can be added eagerly) or `null` if it is\n * a root node.\n * @param insertInFrontOf DOM node that should be used as an anchor.\n */\nexport function applyCreateOpCodes(\n lView: LView, createOpCodes: I18nCreateOpCodes, parentRNode: RElement|null,\n insertInFrontOf: RElement|null): void {\n const renderer = lView[RENDERER];\n for (let i = 0; i < createOpCodes.length; i++) {\n const opCode = createOpCodes[i++] as any;\n const text = createOpCodes[i] as string;\n const isComment = (opCode & I18nCreateOpCode.COMMENT) === I18nCreateOpCode.COMMENT;\n const appendNow =\n (opCode & I18nCreateOpCode.APPEND_EAGERLY) === I18nCreateOpCode.APPEND_EAGERLY;\n const index = opCode >>> I18nCreateOpCode.SHIFT;\n let rNode = lView[index];\n if (rNode === null) {\n // We only create new DOM nodes if they don't already exist: If ICU switches case back to a\n // case which was already instantiated, no need to create new DOM nodes.\n rNode = lView[index] =\n isComment ? renderer.createComment(text) : createTextNode(renderer, text);\n }\n if (appendNow && parentRNode !== null) {\n nativeInsertBefore(renderer, parentRNode, rNode, insertInFrontOf, false);\n }\n }\n}\n\n/**\n * Apply `I18nMutateOpCodes` OpCodes.\n *\n * @param tView Current `TView`\n * @param mutableOpCodes Mutable OpCodes to process\n * @param lView Current `LView`\n * @param anchorRNode place where the i18n node should be inserted.\n */\nexport function applyMutableOpCodes(\n tView: TView, mutableOpCodes: IcuCreateOpCodes, lView: LView, anchorRNode: RNode): void {\n ngDevMode && assertDomNode(anchorRNode);\n const renderer = lView[RENDERER];\n // `rootIdx` represents the node into which all inserts happen.\n let rootIdx: number|null = null;\n // `rootRNode` represents the real node into which we insert. This can be different from\n // `lView[rootIdx]` if we have projection.\n // - null we don't have a parent (as can be the case in when we are inserting into a root of\n // LView which has no parent.)\n // - `RElement` The element representing the root after taking projection into account.\n let rootRNode!: RElement|null;\n for (let i = 0; i < mutableOpCodes.length; i++) {\n const opCode = mutableOpCodes[i];\n if (typeof opCode == 'string') {\n const textNodeIndex = mutableOpCodes[++i] as number;\n if (lView[textNodeIndex] === null) {\n ngDevMode && ngDevMode.rendererCreateTextNode++;\n ngDevMode && assertIndexInRange(lView, textNodeIndex);\n lView[textNodeIndex] = createTextNode(renderer, opCode);\n }\n } else if (typeof opCode == 'number') {\n switch (opCode & IcuCreateOpCode.MASK_INSTRUCTION) {\n case IcuCreateOpCode.AppendChild:\n const parentIdx = getParentFromIcuCreateOpCode(opCode);\n if (rootIdx === null) {\n // The first operation should save the `rootIdx` because the first operation\n // must insert into the root. (Only subsequent operations can insert into a dynamic\n // parent)\n rootIdx = parentIdx;\n rootRNode = nativeParentNode(renderer, anchorRNode);\n }\n let insertInFrontOf: RNode|null;\n let parentRNode: RElement|null;\n if (parentIdx === rootIdx) {\n insertInFrontOf = anchorRNode;\n parentRNode = rootRNode;\n } else {\n insertInFrontOf = null;\n parentRNode = unwrapRNode(lView[parentIdx]) as RElement;\n }\n // FIXME(misko): Refactor with `processI18nText`\n if (parentRNode !== null) {\n // This can happen if the `LView` we are adding to is not attached to a parent `LView`.\n // In such a case there is no \"root\" we can attach to. This is fine, as we still need to\n // create the elements. When the `LView` gets later added to a parent these \"root\" nodes\n // get picked up and added.\n ngDevMode && assertDomNode(parentRNode);\n const refIdx = getRefFromIcuCreateOpCode(opCode);\n ngDevMode && assertGreaterThan(refIdx, HEADER_OFFSET, 'Missing ref');\n // `unwrapRNode` is not needed here as all of these point to RNodes as part of the i18n\n // which can't have components.\n const child = lView[refIdx] as RElement;\n ngDevMode && assertDomNode(child);\n nativeInsertBefore(renderer, parentRNode, child, insertInFrontOf, false);\n const tIcu = getTIcu(tView, refIdx);\n if (tIcu !== null && typeof tIcu === 'object') {\n // If we just added a comment node which has ICU then that ICU may have already been\n // rendered and therefore we need to re-add it here.\n ngDevMode && assertTIcu(tIcu);\n const caseIndex = getCurrentICUCaseIndex(tIcu, lView);\n if (caseIndex !== null) {\n applyMutableOpCodes(tView, tIcu.create[caseIndex], lView, lView[tIcu.anchorIdx]);\n }\n }\n }\n break;\n case IcuCreateOpCode.Attr:\n const elementNodeIndex = opCode >>> IcuCreateOpCode.SHIFT_REF;\n const attrName = mutableOpCodes[++i] as string;\n const attrValue = mutableOpCodes[++i] as string;\n // This code is used for ICU expressions only, since we don't support\n // directives/components in ICUs, we don't need to worry about inputs here\n setElementAttribute(\n renderer, getNativeByIndex(elementNodeIndex, lView) as RElement, null, null, attrName,\n attrValue, null);\n break;\n default:\n throw new Error(`Unable to determine the type of mutate operation for \"${opCode}\"`);\n }\n } else {\n switch (opCode) {\n case ICU_MARKER:\n const commentValue = mutableOpCodes[++i] as string;\n const commentNodeIndex = mutableOpCodes[++i] as number;\n if (lView[commentNodeIndex] === null) {\n ngDevMode &&\n assertEqual(\n typeof commentValue, 'string',\n `Expected \"${commentValue}\" to be a comment node value`);\n ngDevMode && ngDevMode.rendererCreateComment++;\n ngDevMode && assertIndexInExpandoRange(lView, commentNodeIndex);\n const commentRNode = lView[commentNodeIndex] =\n createCommentNode(renderer, commentValue);\n // FIXME(misko): Attaching patch data is only needed for the root (Also add tests)\n attachPatchData(commentRNode, lView);\n }\n break;\n case ELEMENT_MARKER:\n const tagName = mutableOpCodes[++i] as string;\n const elementNodeIndex = mutableOpCodes[++i] as number;\n if (lView[elementNodeIndex] === null) {\n ngDevMode &&\n assertEqual(\n typeof tagName, 'string',\n `Expected \"${tagName}\" to be an element node tag name`);\n\n ngDevMode && ngDevMode.rendererCreateElement++;\n ngDevMode && assertIndexInExpandoRange(lView, elementNodeIndex);\n const elementRNode = lView[elementNodeIndex] =\n createElementNode(renderer, tagName, null);\n // FIXME(misko): Attaching patch data is only needed for the root (Also add tests)\n attachPatchData(elementRNode, lView);\n }\n break;\n default:\n ngDevMode &&\n throwError(`Unable to determine the type of mutate operation for \"${opCode}\"`);\n }\n }\n }\n}\n\n\n/**\n * Apply `I18nUpdateOpCodes` OpCodes\n *\n * @param tView Current `TView`\n * @param lView Current `LView`\n * @param updateOpCodes OpCodes to process\n * @param bindingsStartIndex Location of the first `ɵɵi18nApply`\n * @param changeMask Each bit corresponds to a `ɵɵi18nExp` (Counting backwards from\n * `bindingsStartIndex`)\n */\nexport function applyUpdateOpCodes(\n tView: TView, lView: LView, updateOpCodes: I18nUpdateOpCodes, bindingsStartIndex: number,\n changeMask: number) {\n for (let i = 0; i < updateOpCodes.length; i++) {\n // bit code to check if we should apply the next update\n const checkBit = updateOpCodes[i] as number;\n // Number of opCodes to skip until next set of update codes\n const skipCodes = updateOpCodes[++i] as number;\n if (checkBit & changeMask) {\n // The value has been updated since last checked\n let value = '';\n for (let j = i + 1; j <= (i + skipCodes); j++) {\n const opCode = updateOpCodes[j];\n if (typeof opCode == 'string') {\n value += opCode;\n } else if (typeof opCode == 'number') {\n if (opCode < 0) {\n // Negative opCode represent `i18nExp` values offset.\n value += renderStringify(lView[bindingsStartIndex - opCode]);\n } else {\n const nodeIndex = (opCode >>> I18nUpdateOpCode.SHIFT_REF);\n switch (opCode & I18nUpdateOpCode.MASK_OPCODE) {\n case I18nUpdateOpCode.Attr:\n const propName = updateOpCodes[++j] as string;\n const sanitizeFn = updateOpCodes[++j] as SanitizerFn | null;\n const tNodeOrTagName = tView.data[nodeIndex] as TNode | string;\n ngDevMode && assertDefined(tNodeOrTagName, 'Experting TNode or string');\n if (typeof tNodeOrTagName === 'string') {\n // IF we don't have a `TNode`, then we are an element in ICU (as ICU content does\n // not have TNode), in which case we know that there are no directives, and hence\n // we use attribute setting.\n setElementAttribute(\n lView[RENDERER], lView[nodeIndex], null, tNodeOrTagName, propName, value,\n sanitizeFn);\n } else {\n elementPropertyInternal(\n tView, tNodeOrTagName, lView, propName, value, lView[RENDERER], sanitizeFn,\n false);\n }\n break;\n case I18nUpdateOpCode.Text:\n const rText = lView[nodeIndex] as RText | null;\n rText !== null && updateTextNode(lView[RENDERER], rText, value);\n break;\n case I18nUpdateOpCode.IcuSwitch:\n applyIcuSwitchCase(tView, getTIcu(tView, nodeIndex)!, lView, value);\n break;\n case I18nUpdateOpCode.IcuUpdate:\n applyIcuUpdateCase(tView, getTIcu(tView, nodeIndex)!, bindingsStartIndex, lView);\n break;\n }\n }\n }\n }\n } else {\n const opCode = updateOpCodes[i + 1] as number;\n if (opCode > 0 && (opCode & I18nUpdateOpCode.MASK_OPCODE) === I18nUpdateOpCode.IcuUpdate) {\n // Special case for the `icuUpdateCase`. It could be that the mask did not match, but\n // we still need to execute `icuUpdateCase` because the case has changed recently due to\n // previous `icuSwitchCase` instruction. (`icuSwitchCase` and `icuUpdateCase` always come in\n // pairs.)\n const nodeIndex = (opCode >>> I18nUpdateOpCode.SHIFT_REF);\n const tIcu = getTIcu(tView, nodeIndex)!;\n const currentIndex = lView[tIcu.currentCaseLViewIndex];\n if (currentIndex < 0) {\n applyIcuUpdateCase(tView, tIcu, bindingsStartIndex, lView);\n }\n }\n }\n i += skipCodes;\n }\n}\n\n/**\n * Apply OpCodes associated with updating an existing ICU.\n *\n * @param tView Current `TView`\n * @param tIcu Current `TIcu`\n * @param bindingsStartIndex Location of the first `ɵɵi18nApply`\n * @param lView Current `LView`\n */\nfunction applyIcuUpdateCase(tView: TView, tIcu: TIcu, bindingsStartIndex: number, lView: LView) {\n ngDevMode && assertIndexInRange(lView, tIcu.currentCaseLViewIndex);\n let activeCaseIndex = lView[tIcu.currentCaseLViewIndex];\n if (activeCaseIndex !== null) {\n let mask = changeMask;\n if (activeCaseIndex < 0) {\n // Clear the flag.\n // Negative number means that the ICU was freshly created and we need to force the update.\n activeCaseIndex = lView[tIcu.currentCaseLViewIndex] = ~activeCaseIndex;\n // -1 is same as all bits on, which simulates creation since it marks all bits dirty\n mask = -1;\n }\n applyUpdateOpCodes(tView, lView, tIcu.update[activeCaseIndex], bindingsStartIndex, mask);\n }\n}\n\n/**\n * Apply OpCodes associated with switching a case on ICU.\n *\n * This involves tearing down existing case and than building up a new case.\n *\n * @param tView Current `TView`\n * @param tIcu Current `TIcu`\n * @param lView Current `LView`\n * @param value Value of the case to update to.\n */\nfunction applyIcuSwitchCase(tView: TView, tIcu: TIcu, lView: LView, value: string) {\n // Rebuild a new case for this ICU\n const caseIndex = getCaseIndex(tIcu, value);\n let activeCaseIndex = getCurrentICUCaseIndex(tIcu, lView);\n if (activeCaseIndex !== caseIndex) {\n applyIcuSwitchCaseRemove(tView, tIcu, lView);\n lView[tIcu.currentCaseLViewIndex] = caseIndex === null ? null : ~caseIndex;\n if (caseIndex !== null) {\n // Add the nodes for the new case\n const anchorRNode = lView[tIcu.anchorIdx];\n if (anchorRNode) {\n ngDevMode && assertDomNode(anchorRNode);\n applyMutableOpCodes(tView, tIcu.create[caseIndex], lView, anchorRNode);\n }\n }\n }\n}\n\n/**\n * Apply OpCodes associated with tearing ICU case.\n *\n * This involves tearing down existing case and than building up a new case.\n *\n * @param tView Current `TView`\n * @param tIcu Current `TIcu`\n * @param lView Current `LView`\n */\nfunction applyIcuSwitchCaseRemove(tView: TView, tIcu: TIcu, lView: LView) {\n let activeCaseIndex = getCurrentICUCaseIndex(tIcu, lView);\n if (activeCaseIndex !== null) {\n const removeCodes = tIcu.remove[activeCaseIndex];\n for (let i = 0; i < removeCodes.length; i++) {\n const nodeOrIcuIndex = removeCodes[i] as number;\n if (nodeOrIcuIndex > 0) {\n // Positive numbers are `RNode`s.\n const rNode = getNativeByIndex(nodeOrIcuIndex, lView);\n rNode !== null && nativeRemoveNode(lView[RENDERER], rNode);\n } else {\n // Negative numbers are ICUs\n applyIcuSwitchCaseRemove(tView, getTIcu(tView, ~nodeOrIcuIndex)!, lView);\n }\n }\n }\n}\n\n\n/**\n * Returns the index of the current case of an ICU expression depending on the main binding value\n *\n * @param icuExpression\n * @param bindingValue The value of the main binding used by this ICU expression\n */\nfunction getCaseIndex(icuExpression: TIcu, bindingValue: string): number|null {\n let index = icuExpression.cases.indexOf(bindingValue);\n if (index === -1) {\n switch (icuExpression.type) {\n case IcuType.plural: {\n const resolvedCase = getPluralCase(bindingValue, getLocaleId());\n index = icuExpression.cases.indexOf(resolvedCase);\n if (index === -1 && resolvedCase !== 'other') {\n index = icuExpression.cases.indexOf('other');\n }\n break;\n }\n case IcuType.select: {\n index = icuExpression.cases.indexOf('other');\n break;\n }\n }\n }\n return index === -1 ? null : index;\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 {assertDomNode, assertNumber, assertNumberInRange} from '../../util/assert';\nimport {EMPTY_ARRAY} from '../../util/empty';\nimport {assertTIcu, assertTNodeForLView} from '../assert';\nimport {getCurrentICUCaseIndex} from '../i18n/i18n_util';\nimport {I18nRemoveOpCodes, TIcu} from '../interfaces/i18n';\nimport {TIcuContainerNode} from '../interfaces/node';\nimport {RNode} from '../interfaces/renderer_dom';\nimport {LView, TVIEW} from '../interfaces/view';\n\nexport function loadIcuContainerVisitor() {\n const _stack: any[] = [];\n let _index: number = -1;\n let _lView: LView;\n let _removes: I18nRemoveOpCodes;\n\n /**\n * Retrieves a set of root nodes from `TIcu.remove`. Used by `TNodeType.ICUContainer`\n * to determine which root belong to the ICU.\n *\n * Example of usage.\n * ```\n * const nextRNode = icuContainerIteratorStart(tIcuContainerNode, lView);\n * let rNode: RNode|null;\n * while(rNode = nextRNode()) {\n * console.log(rNode);\n * }\n * ```\n *\n * @param tIcuContainerNode Current `TIcuContainerNode`\n * @param lView `LView` where the `RNode`s should be looked up.\n */\n function icuContainerIteratorStart(tIcuContainerNode: TIcuContainerNode, lView: LView): () =>\n RNode | null {\n _lView = lView;\n while (_stack.length) _stack.pop();\n ngDevMode && assertTNodeForLView(tIcuContainerNode, lView);\n enterIcu(tIcuContainerNode.value, lView);\n return icuContainerIteratorNext;\n }\n\n function enterIcu(tIcu: TIcu, lView: LView) {\n _index = 0;\n const currentCase = getCurrentICUCaseIndex(tIcu, lView);\n if (currentCase !== null) {\n ngDevMode && assertNumberInRange(currentCase, 0, tIcu.cases.length - 1);\n _removes = tIcu.remove[currentCase];\n } else {\n _removes = EMPTY_ARRAY as any;\n }\n }\n\n\n function icuContainerIteratorNext(): RNode|null {\n if (_index < _removes.length) {\n const removeOpCode = _removes[_index++] as number;\n ngDevMode && assertNumber(removeOpCode, 'Expecting OpCode number');\n if (removeOpCode > 0) {\n const rNode = _lView[removeOpCode];\n ngDevMode && assertDomNode(rNode);\n return rNode;\n } else {\n _stack.push(_index, _removes);\n // ICUs are represented by negative indices\n const tIcuIndex = ~removeOpCode;\n const tIcu = _lView[TVIEW].data[tIcuIndex] as TIcu;\n ngDevMode && assertTIcu(tIcu);\n enterIcu(tIcu, _lView);\n return icuContainerIteratorNext();\n }\n } else {\n if (_stack.length === 0) {\n return null;\n } else {\n _removes = _stack.pop();\n _index = _stack.pop();\n return icuContainerIteratorNext();\n }\n }\n }\n\n return icuContainerIteratorStart;\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 {assertNumber, assertString} from '../../util/assert';\nimport {ELEMENT_MARKER, I18nCreateOpCode, I18nCreateOpCodes, I18nRemoveOpCodes, I18nUpdateOpCode, I18nUpdateOpCodes, ICU_MARKER, IcuCreateOpCode, IcuCreateOpCodes} from '../interfaces/i18n';\n\nimport {getInstructionFromIcuCreateOpCode, getParentFromIcuCreateOpCode, getRefFromIcuCreateOpCode} from './i18n_util';\n\n\n/**\n * Converts `I18nCreateOpCodes` array into a human readable format.\n *\n * This function is attached to the `I18nCreateOpCodes.debug` property if `ngDevMode` is enabled.\n * This function provides a human readable view of the opcodes. This is useful when debugging the\n * application as well as writing more readable tests.\n *\n * @param this `I18nCreateOpCodes` if attached as a method.\n * @param opcodes `I18nCreateOpCodes` if invoked as a function.\n */\nexport function i18nCreateOpCodesToString(\n this: I18nCreateOpCodes|void, opcodes?: I18nCreateOpCodes): string[] {\n const createOpCodes: I18nCreateOpCodes = opcodes || (Array.isArray(this) ? this : [] as any);\n let lines: string[] = [];\n for (let i = 0; i < createOpCodes.length; i++) {\n const opCode = createOpCodes[i++] as any;\n const text = createOpCodes[i] as string;\n const isComment = (opCode & I18nCreateOpCode.COMMENT) === I18nCreateOpCode.COMMENT;\n const appendNow =\n (opCode & I18nCreateOpCode.APPEND_EAGERLY) === I18nCreateOpCode.APPEND_EAGERLY;\n const index = opCode >>> I18nCreateOpCode.SHIFT;\n lines.push(`lView[${index}] = document.${isComment ? 'createComment' : 'createText'}(${\n JSON.stringify(text)});`);\n if (appendNow) {\n lines.push(`parent.appendChild(lView[${index}]);`);\n }\n }\n return lines;\n}\n\n/**\n * Converts `I18nUpdateOpCodes` array into a human readable format.\n *\n * This function is attached to the `I18nUpdateOpCodes.debug` property if `ngDevMode` is enabled.\n * This function provides a human readable view of the opcodes. This is useful when debugging the\n * application as well as writing more readable tests.\n *\n * @param this `I18nUpdateOpCodes` if attached as a method.\n * @param opcodes `I18nUpdateOpCodes` if invoked as a function.\n */\nexport function i18nUpdateOpCodesToString(\n this: I18nUpdateOpCodes|void, opcodes?: I18nUpdateOpCodes): string[] {\n const parser = new OpCodeParser(opcodes || (Array.isArray(this) ? this : []));\n let lines: string[] = [];\n\n function consumeOpCode(value: number): string {\n const ref = value >>> I18nUpdateOpCode.SHIFT_REF;\n const opCode = value & I18nUpdateOpCode.MASK_OPCODE;\n switch (opCode) {\n case I18nUpdateOpCode.Text:\n return `(lView[${ref}] as Text).textContent = $$$`;\n case I18nUpdateOpCode.Attr:\n const attrName = parser.consumeString();\n const sanitizationFn = parser.consumeFunction();\n const value = sanitizationFn ? `(${sanitizationFn})($$$)` : '$$$';\n return `(lView[${ref}] as Element).setAttribute('${attrName}', ${value})`;\n case I18nUpdateOpCode.IcuSwitch:\n return `icuSwitchCase(${ref}, $$$)`;\n case I18nUpdateOpCode.IcuUpdate:\n return `icuUpdateCase(${ref})`;\n }\n throw new Error('unexpected OpCode');\n }\n\n\n while (parser.hasMore()) {\n let mask = parser.consumeNumber();\n let size = parser.consumeNumber();\n const end = parser.i + size;\n const statements: string[] = [];\n let statement = '';\n while (parser.i < end) {\n let value = parser.consumeNumberOrString();\n if (typeof value === 'string') {\n statement += value;\n } else if (value < 0) {\n // Negative numbers are ref indexes\n // Here `i` refers to current binding index. It is to signify that the value is relative,\n // rather than absolute.\n statement += '${lView[i' + value + ']}';\n } else {\n // Positive numbers are operations.\n const opCodeText = consumeOpCode(value);\n statements.push(opCodeText.replace('$$$', '`' + statement + '`') + ';');\n statement = '';\n }\n }\n lines.push(`if (mask & 0b${mask.toString(2)}) { ${statements.join(' ')} }`);\n }\n return lines;\n}\n\n/**\n * Converts `I18nCreateOpCodes` array into a human readable format.\n *\n * This function is attached to the `I18nCreateOpCodes.debug` if `ngDevMode` is enabled. This\n * function provides a human readable view of the opcodes. This is useful when debugging the\n * application as well as writing more readable tests.\n *\n * @param this `I18nCreateOpCodes` if attached as a method.\n * @param opcodes `I18nCreateOpCodes` if invoked as a function.\n */\nexport function icuCreateOpCodesToString(\n this: IcuCreateOpCodes|void, opcodes?: IcuCreateOpCodes): string[] {\n const parser = new OpCodeParser(opcodes || (Array.isArray(this) ? this : []));\n let lines: string[] = [];\n\n function consumeOpCode(opCode: number): string {\n const parent = getParentFromIcuCreateOpCode(opCode);\n const ref = getRefFromIcuCreateOpCode(opCode);\n switch (getInstructionFromIcuCreateOpCode(opCode)) {\n case IcuCreateOpCode.AppendChild:\n return `(lView[${parent}] as Element).appendChild(lView[${lastRef}])`;\n case IcuCreateOpCode.Attr:\n return `(lView[${ref}] as Element).setAttribute(\"${parser.consumeString()}\", \"${\n parser.consumeString()}\")`;\n }\n throw new Error('Unexpected OpCode: ' + getInstructionFromIcuCreateOpCode(opCode));\n }\n\n let lastRef = -1;\n while (parser.hasMore()) {\n let value = parser.consumeNumberStringOrMarker();\n if (value === ICU_MARKER) {\n const text = parser.consumeString();\n lastRef = parser.consumeNumber();\n lines.push(`lView[${lastRef}] = document.createComment(\"${text}\")`);\n } else if (value === ELEMENT_MARKER) {\n const text = parser.consumeString();\n lastRef = parser.consumeNumber();\n lines.push(`lView[${lastRef}] = document.createElement(\"${text}\")`);\n } else if (typeof value === 'string') {\n lastRef = parser.consumeNumber();\n lines.push(`lView[${lastRef}] = document.createTextNode(\"${value}\")`);\n } else if (typeof value === 'number') {\n const line = consumeOpCode(value);\n line && lines.push(line);\n } else {\n throw new Error('Unexpected value');\n }\n }\n\n return lines;\n}\n\n/**\n * Converts `I18nRemoveOpCodes` array into a human readable format.\n *\n * This function is attached to the `I18nRemoveOpCodes.debug` if `ngDevMode` is enabled. This\n * function provides a human readable view of the opcodes. This is useful when debugging the\n * application as well as writing more readable tests.\n *\n * @param this `I18nRemoveOpCodes` if attached as a method.\n * @param opcodes `I18nRemoveOpCodes` if invoked as a function.\n */\nexport function i18nRemoveOpCodesToString(\n this: I18nRemoveOpCodes|void, opcodes?: I18nRemoveOpCodes): string[] {\n const removeCodes = opcodes || (Array.isArray(this) ? this : []);\n let lines: string[] = [];\n\n for (let i = 0; i < removeCodes.length; i++) {\n const nodeOrIcuIndex = removeCodes[i] as number;\n if (nodeOrIcuIndex > 0) {\n // Positive numbers are `RNode`s.\n lines.push(`remove(lView[${nodeOrIcuIndex}])`);\n } else {\n // Negative numbers are ICUs\n lines.push(`removeNestedICU(${~nodeOrIcuIndex})`);\n }\n }\n\n return lines;\n}\n\n\nclass OpCodeParser {\n i: number = 0;\n codes: any[];\n\n constructor(codes: any[]) {\n this.codes = codes;\n }\n\n hasMore() {\n return this.i < this.codes.length;\n }\n\n consumeNumber(): number {\n let value = this.codes[this.i++];\n assertNumber(value, 'expecting number in OpCode');\n return value;\n }\n\n consumeString(): string {\n let value = this.codes[this.i++];\n assertString(value, 'expecting string in OpCode');\n return value;\n }\n\n consumeFunction(): Function|null {\n let value = this.codes[this.i++];\n if (value === null || typeof value === 'function') {\n return value;\n }\n throw new Error('expecting function in OpCode');\n }\n\n consumeNumberOrString(): number|string {\n let value = this.codes[this.i++];\n if (typeof value === 'string') {\n return value;\n }\n assertNumber(value, 'expecting number or string in OpCode');\n return value;\n }\n\n consumeNumberStringOrMarker(): number|string|ICU_MARKER|ELEMENT_MARKER {\n let value = this.codes[this.i++];\n if (typeof value === 'string' || typeof value === 'number' || value == ICU_MARKER ||\n value == ELEMENT_MARKER) {\n return value;\n }\n assertNumber(value, 'expecting number, string, ICU_MARKER or ELEMENT_MARKER in OpCode');\n return 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 */\nimport '../../util/ng_dev_mode';\nimport '../../util/ng_i18n_closure_mode';\n\nimport {getTemplateContent, SRCSET_ATTRS, URI_ATTRS, VALID_ATTRS, VALID_ELEMENTS} from '../../sanitization/html_sanitizer';\nimport {getInertBodyHelper} from '../../sanitization/inert_body';\nimport {_sanitizeUrl, sanitizeSrcset} from '../../sanitization/url_sanitizer';\nimport {assertDefined, assertEqual, assertGreaterThanOrEqual, assertOneOf, assertString} from '../../util/assert';\nimport {CharCode} from '../../util/char_code';\nimport {loadIcuContainerVisitor} from '../instructions/i18n_icu_container_visitor';\nimport {allocExpando, createTNodeAtIndex} from '../instructions/shared';\nimport {getDocument} from '../interfaces/document';\nimport {ELEMENT_MARKER, I18nCreateOpCode, I18nCreateOpCodes, I18nRemoveOpCodes, I18nUpdateOpCode, I18nUpdateOpCodes, ICU_MARKER, IcuCreateOpCode, IcuCreateOpCodes, IcuExpression, IcuType, TI18n, TIcu} from '../interfaces/i18n';\nimport {TNode, TNodeType} from '../interfaces/node';\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {HEADER_OFFSET, LView, TView} from '../interfaces/view';\nimport {getCurrentParentTNode, getCurrentTNode, setCurrentTNode} from '../state';\nimport {attachDebugGetter} from '../util/debug_utils';\n\nimport {i18nCreateOpCodesToString, i18nRemoveOpCodesToString, i18nUpdateOpCodesToString, icuCreateOpCodesToString} from './i18n_debug';\nimport {addTNodeAndUpdateInsertBeforeIndex} from './i18n_insert_before_index';\nimport {ensureIcuContainerVisitorLoaded} from './i18n_tree_shaking';\nimport {createTNodePlaceholder, icuCreateOpCode, setTIcu, setTNodeInsertBeforeIndex} from './i18n_util';\n\n\n\nconst BINDING_REGEXP = /�(\\d+):?\\d*�/gi;\nconst ICU_REGEXP = /({\\s*�\\d+:?\\d*�\\s*,\\s*\\S{6}\\s*,[\\s\\S]*})/gi;\nconst NESTED_ICU = /�(\\d+)�/;\nconst ICU_BLOCK_REGEXP = /^\\s*(�\\d+:?\\d*�)\\s*,\\s*(select|plural)\\s*,/;\n\nconst MARKER = `�`;\nconst SUBTEMPLATE_REGEXP = /�\\/?\\*(\\d+:\\d+)�/gi;\nconst PH_REGEXP = /�(\\/?[#*]\\d+):?\\d*�/gi;\n\n/**\n * Angular Dart introduced &ngsp; as a placeholder for non-removable space, see:\n * https://github.com/dart-lang/angular/blob/0bb611387d29d65b5af7f9d2515ab571fd3fbee4/_tests/test/compiler/preserve_whitespace_test.dart#L25-L32\n * In Angular Dart &ngsp; is converted to the 0xE500 PUA (Private Use Areas) unicode character\n * and later on replaced by a space. We are re-implementing the same idea here, since translations\n * might contain this special character.\n */\nconst NGSP_UNICODE_REGEXP = /\\uE500/g;\nfunction replaceNgsp(value: string): string {\n return value.replace(NGSP_UNICODE_REGEXP, ' ');\n}\n\n/**\n * Create dynamic nodes from i18n translation block.\n *\n * - Text nodes are created synchronously\n * - TNodes are linked into tree lazily\n *\n * @param tView Current `TView`\n * @parentTNodeIndex index to the parent TNode of this i18n block\n * @param lView Current `LView`\n * @param index Index of `ɵɵi18nStart` instruction.\n * @param message Message to translate.\n * @param subTemplateIndex Index into the sub template of message translation. (ie in case of\n * `ngIf`) (-1 otherwise)\n */\nexport function i18nStartFirstCreatePass(\n tView: TView, parentTNodeIndex: number, lView: LView, index: number, message: string,\n subTemplateIndex: number) {\n const rootTNode = getCurrentParentTNode();\n const createOpCodes: I18nCreateOpCodes = [] as any;\n const updateOpCodes: I18nUpdateOpCodes = [] as any;\n const existingTNodeStack: TNode[][] = [[]];\n if (ngDevMode) {\n attachDebugGetter(createOpCodes, i18nCreateOpCodesToString);\n attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString);\n }\n\n message = getTranslationForTemplate(message, subTemplateIndex);\n const msgParts = replaceNgsp(message).split(PH_REGEXP);\n for (let i = 0; i < msgParts.length; i++) {\n let value = msgParts[i];\n if ((i & 1) === 0) {\n // Even indexes are text (including bindings & ICU expressions)\n const parts = i18nParseTextIntoPartsAndICU(value);\n for (let j = 0; j < parts.length; j++) {\n let part = parts[j];\n if ((j & 1) === 0) {\n // `j` is odd therefore `part` is string\n const text = part as string;\n ngDevMode && assertString(text, 'Parsed ICU part should be string');\n if (text !== '') {\n i18nStartFirstCreatePassProcessTextNode(\n tView, rootTNode, existingTNodeStack[0], createOpCodes, updateOpCodes, lView, text);\n }\n } else {\n // `j` is Even therefor `part` is an `ICUExpression`\n const icuExpression: IcuExpression = part as IcuExpression;\n // Verify that ICU expression has the right shape. Translations might contain invalid\n // constructions (while original messages were correct), so ICU parsing at runtime may\n // not succeed (thus `icuExpression` remains a string).\n // Note: we intentionally retain the error here by not using `ngDevMode`, because\n // the value can change based on the locale and users aren't guaranteed to hit\n // an invalid string while they're developing.\n if (typeof icuExpression !== 'object') {\n throw new Error(`Unable to parse ICU expression in \"${message}\" message.`);\n }\n const icuContainerTNode = createTNodeAndAddOpCode(\n tView, rootTNode, existingTNodeStack[0], lView, createOpCodes,\n ngDevMode ? `ICU ${index}:${icuExpression.mainBinding}` : '', true);\n const icuNodeIndex = icuContainerTNode.index;\n ngDevMode &&\n assertGreaterThanOrEqual(\n icuNodeIndex, HEADER_OFFSET, 'Index must be in absolute LView offset');\n icuStart(tView, lView, updateOpCodes, parentTNodeIndex, icuExpression, icuNodeIndex);\n }\n }\n } else {\n // Odd indexes are placeholders (elements and sub-templates)\n // At this point value is something like: '/#1:2' (originally coming from '�/#1:2�')\n const isClosing = value.charCodeAt(0) === CharCode.SLASH;\n const type = value.charCodeAt(isClosing ? 1 : 0);\n ngDevMode && assertOneOf(type, CharCode.STAR, CharCode.HASH);\n const index = HEADER_OFFSET + Number.parseInt(value.substring((isClosing ? 2 : 1)));\n if (isClosing) {\n existingTNodeStack.shift();\n setCurrentTNode(getCurrentParentTNode()!, false);\n } else {\n const tNode = createTNodePlaceholder(tView, existingTNodeStack[0], index);\n existingTNodeStack.unshift([]);\n setCurrentTNode(tNode, true);\n }\n }\n }\n\n tView.data[index] = <TI18n>{\n create: createOpCodes,\n update: updateOpCodes,\n };\n}\n\n/**\n * Allocate space in i18n Range add create OpCode instruction to crete a text or comment node.\n *\n * @param tView Current `TView` needed to allocate space in i18n range.\n * @param rootTNode Root `TNode` of the i18n block. This node determines if the new TNode will be\n * added as part of the `i18nStart` instruction or as part of the `TNode.insertBeforeIndex`.\n * @param existingTNodes internal state for `addTNodeAndUpdateInsertBeforeIndex`.\n * @param lView Current `LView` needed to allocate space in i18n range.\n * @param createOpCodes Array storing `I18nCreateOpCodes` where new opCodes will be added.\n * @param text Text to be added when the `Text` or `Comment` node will be created.\n * @param isICU true if a `Comment` node for ICU (instead of `Text`) node should be created.\n */\nfunction createTNodeAndAddOpCode(\n tView: TView, rootTNode: TNode|null, existingTNodes: TNode[], lView: LView,\n createOpCodes: I18nCreateOpCodes, text: string|null, isICU: boolean): TNode {\n const i18nNodeIdx = allocExpando(tView, lView, 1, null);\n let opCode = i18nNodeIdx << I18nCreateOpCode.SHIFT;\n let parentTNode = getCurrentParentTNode();\n\n if (rootTNode === parentTNode) {\n // FIXME(misko): A null `parentTNode` should represent when we fall of the `LView` boundary.\n // (there is no parent), but in some circumstances (because we are inconsistent about how we set\n // `previousOrParentTNode`) it could point to `rootTNode` So this is a work around.\n parentTNode = null;\n }\n if (parentTNode === null) {\n // If we don't have a parent that means that we can eagerly add nodes.\n // If we have a parent than these nodes can't be added now (as the parent has not been created\n // yet) and instead the `parentTNode` is responsible for adding it. See\n // `TNode.insertBeforeIndex`\n opCode |= I18nCreateOpCode.APPEND_EAGERLY;\n }\n if (isICU) {\n opCode |= I18nCreateOpCode.COMMENT;\n ensureIcuContainerVisitorLoaded(loadIcuContainerVisitor);\n }\n createOpCodes.push(opCode, text === null ? '' : text);\n // We store `{{?}}` so that when looking at debug `TNodeType.template` we can see where the\n // bindings are.\n const tNode = createTNodeAtIndex(\n tView, i18nNodeIdx, isICU ? TNodeType.Icu : TNodeType.Text,\n text === null ? (ngDevMode ? '{{?}}' : '') : text, null);\n addTNodeAndUpdateInsertBeforeIndex(existingTNodes, tNode);\n const tNodeIdx = tNode.index;\n setCurrentTNode(tNode, false /* Text nodes are self closing */);\n if (parentTNode !== null && rootTNode !== parentTNode) {\n // We are a child of deeper node (rather than a direct child of `i18nStart` instruction.)\n // We have to make sure to add ourselves to the parent.\n setTNodeInsertBeforeIndex(parentTNode, tNodeIdx);\n }\n return tNode;\n}\n\n/**\n * Processes text node in i18n block.\n *\n * Text nodes can have:\n * - Create instruction in `createOpCodes` for creating the text node.\n * - Allocate spec for text node in i18n range of `LView`\n * - If contains binding:\n * - bindings => allocate space in i18n range of `LView` to store the binding value.\n * - populate `updateOpCodes` with update instructions.\n *\n * @param tView Current `TView`\n * @param rootTNode Root `TNode` of the i18n block. This node determines if the new TNode will\n * be added as part of the `i18nStart` instruction or as part of the\n * `TNode.insertBeforeIndex`.\n * @param existingTNodes internal state for `addTNodeAndUpdateInsertBeforeIndex`.\n * @param createOpCodes Location where the creation OpCodes will be stored.\n * @param lView Current `LView`\n * @param text The translated text (which may contain binding)\n */\nfunction i18nStartFirstCreatePassProcessTextNode(\n tView: TView, rootTNode: TNode|null, existingTNodes: TNode[], createOpCodes: I18nCreateOpCodes,\n updateOpCodes: I18nUpdateOpCodes, lView: LView, text: string): void {\n const hasBinding = text.match(BINDING_REGEXP);\n const tNode = createTNodeAndAddOpCode(\n tView, rootTNode, existingTNodes, lView, createOpCodes, hasBinding ? null : text, false);\n if (hasBinding) {\n generateBindingUpdateOpCodes(updateOpCodes, text, tNode.index, null, 0, null);\n }\n}\n\n/**\n * See `i18nAttributes` above.\n */\nexport function i18nAttributesFirstPass(tView: TView, index: number, values: string[]) {\n const previousElement = getCurrentTNode()!;\n const previousElementIndex = previousElement.index;\n const updateOpCodes: I18nUpdateOpCodes = [] as any;\n if (ngDevMode) {\n attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString);\n }\n if (tView.firstCreatePass && tView.data[index] === null) {\n for (let i = 0; i < values.length; i += 2) {\n const attrName = values[i];\n const message = values[i + 1];\n\n if (message !== '') {\n // Check if attribute value contains an ICU and throw an error if that's the case.\n // ICUs in element attributes are not supported.\n // Note: we intentionally retain the error here by not using `ngDevMode`, because\n // the `value` can change based on the locale and users aren't guaranteed to hit\n // an invalid string while they're developing.\n if (ICU_REGEXP.test(message)) {\n throw new Error(\n `ICU expressions are not supported in attributes. Message: \"${message}\".`);\n }\n\n // i18n attributes that hit this code path are guaranteed to have bindings, because\n // the compiler treats static i18n attributes as regular attribute bindings.\n // Since this may not be the first i18n attribute on this element we need to pass in how\n // many previous bindings there have already been.\n generateBindingUpdateOpCodes(\n updateOpCodes, message, previousElementIndex, attrName, countBindings(updateOpCodes),\n null);\n }\n }\n tView.data[index] = updateOpCodes;\n }\n}\n\n\n/**\n * Generate the OpCodes to update the bindings of a string.\n *\n * @param updateOpCodes Place where the update opcodes will be stored.\n * @param str The string containing the bindings.\n * @param destinationNode Index of the destination node which will receive the binding.\n * @param attrName Name of the attribute, if the string belongs to an attribute.\n * @param sanitizeFn Sanitization function used to sanitize the string after update, if necessary.\n * @param bindingStart The lView index of the next expression that can be bound via an opCode.\n * @returns The mask value for these bindings\n */\nfunction generateBindingUpdateOpCodes(\n updateOpCodes: I18nUpdateOpCodes, str: string, destinationNode: number, attrName: string|null,\n bindingStart: number, sanitizeFn: SanitizerFn|null): number {\n ngDevMode &&\n assertGreaterThanOrEqual(\n destinationNode, HEADER_OFFSET, 'Index must be in absolute LView offset');\n const maskIndex = updateOpCodes.length; // Location of mask\n const sizeIndex = maskIndex + 1; // location of size for skipping\n updateOpCodes.push(null, null); // Alloc space for mask and size\n const startIndex = maskIndex + 2; // location of first allocation.\n if (ngDevMode) {\n attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString);\n }\n const textParts = str.split(BINDING_REGEXP);\n let mask = 0;\n\n for (let j = 0; j < textParts.length; j++) {\n const textValue = textParts[j];\n\n if (j & 1) {\n // Odd indexes are bindings\n const bindingIndex = bindingStart + parseInt(textValue, 10);\n updateOpCodes.push(-1 - bindingIndex);\n mask = mask | toMaskBit(bindingIndex);\n } else if (textValue !== '') {\n // Even indexes are text\n updateOpCodes.push(textValue);\n }\n }\n\n updateOpCodes.push(\n destinationNode << I18nUpdateOpCode.SHIFT_REF |\n (attrName ? I18nUpdateOpCode.Attr : I18nUpdateOpCode.Text));\n if (attrName) {\n updateOpCodes.push(attrName, sanitizeFn);\n }\n updateOpCodes[maskIndex] = mask;\n updateOpCodes[sizeIndex] = updateOpCodes.length - startIndex;\n return mask;\n}\n\n/**\n * Count the number of bindings in the given `opCodes`.\n *\n * It could be possible to speed this up, by passing the number of bindings found back from\n * `generateBindingUpdateOpCodes()` to `i18nAttributesFirstPass()` but this would then require more\n * complexity in the code and/or transient objects to be created.\n *\n * Since this function is only called once when the template is instantiated, is trivial in the\n * first instance (since `opCodes` will be an empty array), and it is not common for elements to\n * contain multiple i18n bound attributes, it seems like this is a reasonable compromise.\n */\nfunction countBindings(opCodes: I18nUpdateOpCodes): number {\n let count = 0;\n for (let i = 0; i < opCodes.length; i++) {\n const opCode = opCodes[i];\n // Bindings are negative numbers.\n if (typeof opCode === 'number' && opCode < 0) {\n count++;\n }\n }\n return count;\n}\n\n/**\n * Convert binding index to mask bit.\n *\n * Each index represents a single bit on the bit-mask. Because bit-mask only has 32 bits, we make\n * the 32nd bit share all masks for all bindings higher than 32. Since it is extremely rare to\n * have more than 32 bindings this will be hit very rarely. The downside of hitting this corner\n * case is that we will execute binding code more often than necessary. (penalty of performance)\n */\nfunction toMaskBit(bindingIndex: number): number {\n return 1 << Math.min(bindingIndex, 31);\n}\n\nexport function isRootTemplateMessage(subTemplateIndex: number): subTemplateIndex is - 1 {\n return subTemplateIndex === -1;\n}\n\n\n/**\n * Removes everything inside the sub-templates of a message.\n */\nfunction removeInnerTemplateTranslation(message: string): string {\n let match;\n let res = '';\n let index = 0;\n let inTemplate = false;\n let tagMatched;\n\n while ((match = SUBTEMPLATE_REGEXP.exec(message)) !== null) {\n if (!inTemplate) {\n res += message.substring(index, match.index + match[0].length);\n tagMatched = match[1];\n inTemplate = true;\n } else {\n if (match[0] === `${MARKER}/*${tagMatched}${MARKER}`) {\n index = match.index;\n inTemplate = false;\n }\n }\n }\n\n ngDevMode &&\n assertEqual(\n inTemplate, false,\n `Tag mismatch: unable to find the end of the sub-template in the translation \"${\n message}\"`);\n\n res += message.substr(index);\n return res;\n}\n\n\n/**\n * Extracts a part of a message and removes the rest.\n *\n * This method is used for extracting a part of the message associated with a template. A\n * translated message can span multiple templates.\n *\n * Example:\n * ```\n * <div i18n>Translate <span *ngIf>me</span>!</div>\n * ```\n *\n * @param message The message to crop\n * @param subTemplateIndex Index of the sub-template to extract. If undefined it returns the\n * external template and removes all sub-templates.\n */\nexport function getTranslationForTemplate(message: string, subTemplateIndex: number) {\n if (isRootTemplateMessage(subTemplateIndex)) {\n // We want the root template message, ignore all sub-templates\n return removeInnerTemplateTranslation(message);\n } else {\n // We want a specific sub-template\n const start =\n message.indexOf(`:${subTemplateIndex}${MARKER}`) + 2 + subTemplateIndex.toString().length;\n const end = message.search(new RegExp(`${MARKER}\\\\/\\\\*\\\\d+:${subTemplateIndex}${MARKER}`));\n return removeInnerTemplateTranslation(message.substring(start, end));\n }\n}\n\n/**\n * Generate the OpCodes for ICU expressions.\n *\n * @param icuExpression\n * @param index Index where the anchor is stored and an optional `TIcuContainerNode`\n * - `lView[anchorIdx]` points to a `Comment` node representing the anchor for the ICU.\n * - `tView.data[anchorIdx]` points to the `TIcuContainerNode` if ICU is root (`null` otherwise)\n */\nexport function icuStart(\n tView: TView, lView: LView, updateOpCodes: I18nUpdateOpCodes, parentIdx: number,\n icuExpression: IcuExpression, anchorIdx: number) {\n ngDevMode && assertDefined(icuExpression, 'ICU expression must be defined');\n let bindingMask = 0;\n const tIcu: TIcu = {\n type: icuExpression.type,\n currentCaseLViewIndex: allocExpando(tView, lView, 1, null),\n anchorIdx,\n cases: [],\n create: [],\n remove: [],\n update: []\n };\n addUpdateIcuSwitch(updateOpCodes, icuExpression, anchorIdx);\n setTIcu(tView, anchorIdx, tIcu);\n const values = icuExpression.values;\n for (let i = 0; i < values.length; i++) {\n // Each value is an array of strings & other ICU expressions\n const valueArr = values[i];\n const nestedIcus: IcuExpression[] = [];\n for (let j = 0; j < valueArr.length; j++) {\n const value = valueArr[j];\n if (typeof value !== 'string') {\n // It is an nested ICU expression\n const icuIndex = nestedIcus.push(value as IcuExpression) - 1;\n // Replace nested ICU expression by a comment node\n valueArr[j] = `<!--�${icuIndex}�-->`;\n }\n }\n bindingMask = parseIcuCase(\n tView, tIcu, lView, updateOpCodes, parentIdx, icuExpression.cases[i],\n valueArr.join(''), nestedIcus) |\n bindingMask;\n }\n if (bindingMask) {\n addUpdateIcuUpdate(updateOpCodes, bindingMask, anchorIdx);\n }\n}\n\n/**\n * Parses text containing an ICU expression and produces a JSON object for it.\n * Original code from closure library, modified for Angular.\n *\n * @param pattern Text containing an ICU expression that needs to be parsed.\n *\n */\nexport function parseICUBlock(pattern: string): IcuExpression {\n const cases = [];\n const values: (string|IcuExpression)[][] = [];\n let icuType = IcuType.plural;\n let mainBinding = 0;\n pattern = pattern.replace(ICU_BLOCK_REGEXP, function(str: string, binding: string, type: string) {\n if (type === 'select') {\n icuType = IcuType.select;\n } else {\n icuType = IcuType.plural;\n }\n mainBinding = parseInt(binding.substr(1), 10);\n return '';\n });\n\n const parts = i18nParseTextIntoPartsAndICU(pattern) as string[];\n // Looking for (key block)+ sequence. One of the keys has to be \"other\".\n for (let pos = 0; pos < parts.length;) {\n let key = parts[pos++].trim();\n if (icuType === IcuType.plural) {\n // Key can be \"=x\", we just want \"x\"\n key = key.replace(/\\s*(?:=)?(\\w+)\\s*/, '$1');\n }\n if (key.length) {\n cases.push(key);\n }\n\n const blocks = i18nParseTextIntoPartsAndICU(parts[pos++]) as string[];\n if (cases.length > values.length) {\n values.push(blocks);\n }\n }\n\n // TODO(ocombe): support ICU expressions in attributes, see #21615\n return {type: icuType, mainBinding: mainBinding, cases, values};\n}\n\n\n/**\n * Breaks pattern into strings and top level {...} blocks.\n * Can be used to break a message into text and ICU expressions, or to break an ICU expression\n * into keys and cases. Original code from closure library, modified for Angular.\n *\n * @param pattern (sub)Pattern to be broken.\n * @returns An `Array<string|IcuExpression>` where:\n * - odd positions: `string` => text between ICU expressions\n * - even positions: `ICUExpression` => ICU expression parsed into `ICUExpression` record.\n */\nexport function i18nParseTextIntoPartsAndICU(pattern: string): (string|IcuExpression)[] {\n if (!pattern) {\n return [];\n }\n\n let prevPos = 0;\n const braceStack = [];\n const results: (string|IcuExpression)[] = [];\n const braces = /[{}]/g;\n // lastIndex doesn't get set to 0 so we have to.\n braces.lastIndex = 0;\n\n let match;\n while (match = braces.exec(pattern)) {\n const pos = match.index;\n if (match[0] == '}') {\n braceStack.pop();\n\n if (braceStack.length == 0) {\n // End of the block.\n const block = pattern.substring(prevPos, pos);\n if (ICU_BLOCK_REGEXP.test(block)) {\n results.push(parseICUBlock(block));\n } else {\n results.push(block);\n }\n\n prevPos = pos + 1;\n }\n } else {\n if (braceStack.length == 0) {\n const substring = pattern.substring(prevPos, pos);\n results.push(substring);\n prevPos = pos + 1;\n }\n braceStack.push('{');\n }\n }\n\n const substring = pattern.substring(prevPos);\n results.push(substring);\n return results;\n}\n\n\n/**\n * Parses a node, its children and its siblings, and generates the mutate & update OpCodes.\n *\n */\nexport function parseIcuCase(\n tView: TView, tIcu: TIcu, lView: LView, updateOpCodes: I18nUpdateOpCodes, parentIdx: number,\n caseName: string, unsafeCaseHtml: string, nestedIcus: IcuExpression[]): number {\n const create: IcuCreateOpCodes = [] as any;\n const remove: I18nRemoveOpCodes = [] as any;\n const update: I18nUpdateOpCodes = [] as any;\n if (ngDevMode) {\n attachDebugGetter(create, icuCreateOpCodesToString);\n attachDebugGetter(remove, i18nRemoveOpCodesToString);\n attachDebugGetter(update, i18nUpdateOpCodesToString);\n }\n tIcu.cases.push(caseName);\n tIcu.create.push(create);\n tIcu.remove.push(remove);\n tIcu.update.push(update);\n\n const inertBodyHelper = getInertBodyHelper(getDocument());\n const inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeCaseHtml);\n ngDevMode && assertDefined(inertBodyElement, 'Unable to generate inert body element');\n const inertRootNode = getTemplateContent(inertBodyElement!) as Element || inertBodyElement;\n if (inertRootNode) {\n return walkIcuTree(\n tView, tIcu, lView, updateOpCodes, create, remove, update, inertRootNode, parentIdx,\n nestedIcus, 0);\n } else {\n return 0;\n }\n}\n\nfunction walkIcuTree(\n tView: TView, tIcu: TIcu, lView: LView, sharedUpdateOpCodes: I18nUpdateOpCodes,\n create: IcuCreateOpCodes, remove: I18nRemoveOpCodes, update: I18nUpdateOpCodes,\n parentNode: Element, parentIdx: number, nestedIcus: IcuExpression[], depth: number): number {\n let bindingMask = 0;\n let currentNode = parentNode.firstChild;\n while (currentNode) {\n const newIndex = allocExpando(tView, lView, 1, null);\n switch (currentNode.nodeType) {\n case Node.ELEMENT_NODE:\n const element = currentNode as Element;\n const tagName = element.tagName.toLowerCase();\n if (VALID_ELEMENTS.hasOwnProperty(tagName)) {\n addCreateNodeAndAppend(create, ELEMENT_MARKER, tagName, parentIdx, newIndex);\n tView.data[newIndex] = tagName;\n const elAttrs = element.attributes;\n for (let i = 0; i < elAttrs.length; i++) {\n const attr = elAttrs.item(i)!;\n const lowerAttrName = attr.name.toLowerCase();\n const hasBinding = !!attr.value.match(BINDING_REGEXP);\n // we assume the input string is safe, unless it's using a binding\n if (hasBinding) {\n if (VALID_ATTRS.hasOwnProperty(lowerAttrName)) {\n if (URI_ATTRS[lowerAttrName]) {\n generateBindingUpdateOpCodes(\n update, attr.value, newIndex, attr.name, 0, _sanitizeUrl);\n } else if (SRCSET_ATTRS[lowerAttrName]) {\n generateBindingUpdateOpCodes(\n update, attr.value, newIndex, attr.name, 0, sanitizeSrcset);\n } else {\n generateBindingUpdateOpCodes(update, attr.value, newIndex, attr.name, 0, null);\n }\n } else {\n ngDevMode &&\n console.warn(\n `WARNING: ignoring unsafe attribute value ` +\n `${lowerAttrName} on element ${tagName} ` +\n `(see https://g.co/ng/security#xss)`);\n }\n } else {\n addCreateAttribute(create, newIndex, attr);\n }\n }\n // Parse the children of this node (if any)\n bindingMask = walkIcuTree(\n tView, tIcu, lView, sharedUpdateOpCodes, create, remove, update,\n currentNode as Element, newIndex, nestedIcus, depth + 1) |\n bindingMask;\n addRemoveNode(remove, newIndex, depth);\n }\n break;\n case Node.TEXT_NODE:\n const value = currentNode.textContent || '';\n const hasBinding = value.match(BINDING_REGEXP);\n addCreateNodeAndAppend(create, null, hasBinding ? '' : value, parentIdx, newIndex);\n addRemoveNode(remove, newIndex, depth);\n if (hasBinding) {\n bindingMask =\n generateBindingUpdateOpCodes(update, value, newIndex, null, 0, null) | bindingMask;\n }\n break;\n case Node.COMMENT_NODE:\n // Check if the comment node is a placeholder for a nested ICU\n const isNestedIcu = NESTED_ICU.exec(currentNode.textContent || '');\n if (isNestedIcu) {\n const nestedIcuIndex = parseInt(isNestedIcu[1], 10);\n const icuExpression: IcuExpression = nestedIcus[nestedIcuIndex];\n // Create the comment node that will anchor the ICU expression\n addCreateNodeAndAppend(\n create, ICU_MARKER, ngDevMode ? `nested ICU ${nestedIcuIndex}` : '', parentIdx,\n newIndex);\n icuStart(tView, lView, sharedUpdateOpCodes, parentIdx, icuExpression, newIndex);\n addRemoveNestedIcu(remove, newIndex, depth);\n }\n break;\n }\n currentNode = currentNode.nextSibling;\n }\n return bindingMask;\n}\n\nfunction addRemoveNode(remove: I18nRemoveOpCodes, index: number, depth: number) {\n if (depth === 0) {\n remove.push(index);\n }\n}\n\nfunction addRemoveNestedIcu(remove: I18nRemoveOpCodes, index: number, depth: number) {\n if (depth === 0) {\n remove.push(~index); // remove ICU at `index`\n remove.push(index); // remove ICU comment at `index`\n }\n}\n\nfunction addUpdateIcuSwitch(\n update: I18nUpdateOpCodes, icuExpression: IcuExpression, index: number) {\n update.push(\n toMaskBit(icuExpression.mainBinding), 2, -1 - icuExpression.mainBinding,\n index << I18nUpdateOpCode.SHIFT_REF | I18nUpdateOpCode.IcuSwitch);\n}\n\nfunction addUpdateIcuUpdate(update: I18nUpdateOpCodes, bindingMask: number, index: number) {\n update.push(bindingMask, 1, index << I18nUpdateOpCode.SHIFT_REF | I18nUpdateOpCode.IcuUpdate);\n}\n\nfunction addCreateNodeAndAppend(\n create: IcuCreateOpCodes, marker: null|ICU_MARKER|ELEMENT_MARKER, text: string,\n appendToParentIdx: number, createAtIdx: number) {\n if (marker !== null) {\n create.push(marker);\n }\n create.push(\n text, createAtIdx,\n icuCreateOpCode(IcuCreateOpCode.AppendChild, appendToParentIdx, createAtIdx));\n}\n\nfunction addCreateAttribute(create: IcuCreateOpCodes, newIndex: number, attr: Attr) {\n create.push(newIndex << IcuCreateOpCode.SHIFT_REF | IcuCreateOpCode.Attr, attr.name, attr.value);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// i18nPostprocess consts\nconst ROOT_TEMPLATE_ID = 0;\nconst PP_MULTI_VALUE_PLACEHOLDERS_REGEXP = /\\[(�.+?�?)\\]/;\nconst PP_PLACEHOLDERS_REGEXP = /\\[(�.+?�?)\\]|(�\\/?\\*\\d+:\\d+�)/g;\nconst PP_ICU_VARS_REGEXP = /({\\s*)(VAR_(PLURAL|SELECT)(_\\d+)?)(\\s*,)/g;\nconst PP_ICU_PLACEHOLDERS_REGEXP = /{([A-Z0-9_]+)}/g;\nconst PP_ICUS_REGEXP = /�I18N_EXP_(ICU(_\\d+)?)�/g;\nconst PP_CLOSE_TEMPLATE_REGEXP = /\\/\\*/;\nconst PP_TEMPLATE_ID_REGEXP = /\\d+\\:(\\d+)/;\n\n// Parsed placeholder structure used in postprocessing (within `i18nPostprocess` function)\n// Contains the following fields: [templateId, isCloseTemplateTag, placeholder]\ntype PostprocessPlaceholder = [number, boolean, string];\n\n\n/**\n * Handles message string post-processing for internationalization.\n *\n * Handles message string post-processing by transforming it from intermediate\n * format (that might contain some markers that we need to replace) to the final\n * form, consumable by i18nStart instruction. Post processing steps include:\n *\n * 1. Resolve all multi-value cases (like [�*1:1��#2:1�|�#4:1�|�5�])\n * 2. Replace all ICU vars (like \"VAR_PLURAL\")\n * 3. Replace all placeholders used inside ICUs in a form of {PLACEHOLDER}\n * 4. Replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�)\n * in case multiple ICUs have the same placeholder name\n *\n * @param message Raw translation string for post processing\n * @param replacements Set of replacements that should be applied\n *\n * @returns Transformed string that can be consumed by i18nStart instruction\n *\n * @codeGenApi\n */\nexport function i18nPostprocess(\n message: string, replacements: {[key: string]: (string|string[])} = {}): string {\n /**\n * Step 1: resolve all multi-value placeholders like [�#5�|�*1:1��#2:1�|�#4:1�]\n *\n * Note: due to the way we process nested templates (BFS), multi-value placeholders are typically\n * grouped by templates, for example: [�#5�|�#6�|�#1:1�|�#3:2�] where �#5� and �#6� belong to root\n * template, �#1:1� belong to nested template with index 1 and �#1:2� - nested template with index\n * 3. However in real templates the order might be different: i.e. �#1:1� and/or �#3:2� may go in\n * front of �#6�. The post processing step restores the right order by keeping track of the\n * template id stack and looks for placeholders that belong to the currently active template.\n */\n let result: string = message;\n if (PP_MULTI_VALUE_PLACEHOLDERS_REGEXP.test(message)) {\n const matches: {[key: string]: PostprocessPlaceholder[]} = {};\n const templateIdsStack: number[] = [ROOT_TEMPLATE_ID];\n result = result.replace(PP_PLACEHOLDERS_REGEXP, (m: any, phs: string, tmpl: string): string => {\n const content = phs || tmpl;\n const placeholders: PostprocessPlaceholder[] = matches[content] || [];\n if (!placeholders.length) {\n content.split('|').forEach((placeholder: string) => {\n const match = placeholder.match(PP_TEMPLATE_ID_REGEXP);\n const templateId = match ? parseInt(match[1], 10) : ROOT_TEMPLATE_ID;\n const isCloseTemplateTag = PP_CLOSE_TEMPLATE_REGEXP.test(placeholder);\n placeholders.push([templateId, isCloseTemplateTag, placeholder]);\n });\n matches[content] = placeholders;\n }\n\n if (!placeholders.length) {\n throw new Error(`i18n postprocess: unmatched placeholder - ${content}`);\n }\n\n const currentTemplateId = templateIdsStack[templateIdsStack.length - 1];\n let idx = 0;\n // find placeholder index that matches current template id\n for (let i = 0; i < placeholders.length; i++) {\n if (placeholders[i][0] === currentTemplateId) {\n idx = i;\n break;\n }\n }\n // update template id stack based on the current tag extracted\n const [templateId, isCloseTemplateTag, placeholder] = placeholders[idx];\n if (isCloseTemplateTag) {\n templateIdsStack.pop();\n } else if (currentTemplateId !== templateId) {\n templateIdsStack.push(templateId);\n }\n // remove processed tag from the list\n placeholders.splice(idx, 1);\n return placeholder;\n });\n }\n\n // return current result if no replacements specified\n if (!Object.keys(replacements).length) {\n return result;\n }\n\n /**\n * Step 2: replace all ICU vars (like \"VAR_PLURAL\")\n */\n result = result.replace(PP_ICU_VARS_REGEXP, (match, start, key, _type, _idx, end): string => {\n return replacements.hasOwnProperty(key) ? `${start}${replacements[key]}${end}` : match;\n });\n\n /**\n * Step 3: replace all placeholders used inside ICUs in a form of {PLACEHOLDER}\n */\n result = result.replace(PP_ICU_PLACEHOLDERS_REGEXP, (match, key): string => {\n return replacements.hasOwnProperty(key) ? replacements[key] as string : match;\n });\n\n /**\n * Step 4: replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�) in case\n * multiple ICUs have the same placeholder name\n */\n result = result.replace(PP_ICUS_REGEXP, (match, key): string => {\n if (replacements.hasOwnProperty(key)) {\n const list = replacements[key] as string[];\n if (!list.length) {\n throw new Error(`i18n postprocess: unmatched ICU - ${match} with key: ${key}`);\n }\n return list.shift()!;\n }\n return match;\n });\n\n return result;\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 */\nimport '../../util/ng_dev_mode';\nimport '../../util/ng_i18n_closure_mode';\n\nimport {assertDefined} from '../../util/assert';\nimport {bindingUpdated} from '../bindings';\nimport {applyCreateOpCodes, applyI18n, setMaskBit} from '../i18n/i18n_apply';\nimport {i18nAttributesFirstPass, i18nStartFirstCreatePass} from '../i18n/i18n_parse';\nimport {i18nPostprocess} from '../i18n/i18n_postprocess';\nimport {TI18n} from '../interfaces/i18n';\nimport {TElementNode, TNodeType} from '../interfaces/node';\nimport {HEADER_OFFSET, T_HOST} from '../interfaces/view';\nimport {getClosestRElement} from '../node_manipulation';\nimport {getCurrentParentTNode, getLView, getTView, nextBindingIndex, setInI18nBlock} from '../state';\nimport {getConstant} from '../util/view_utils';\n\n/**\n * Marks a block of text as translatable.\n *\n * The instructions `i18nStart` and `i18nEnd` mark the translation block in the template.\n * The translation `message` is the value which is locale specific. The translation string may\n * contain placeholders which associate inner elements and sub-templates within the translation.\n *\n * The translation `message` placeholders are:\n * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be\n * interpolated into. The placeholder `index` points to the expression binding index. An optional\n * `block` that matches the sub-template in which it was declared.\n * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*: Marks the beginning\n * and end of DOM element that were embedded in the original translation block. The placeholder\n * `index` points to the element index in the template instructions set. An optional `block` that\n * matches the sub-template in which it was declared.\n * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be\n * split up and translated separately in each angular template function. The `index` points to the\n * `template` instruction index. A `block` that matches the sub-template in which it was declared.\n *\n * @param index A unique index of the translation in the static block.\n * @param messageIndex An index of the translation message from the `def.consts` array.\n * @param subTemplateIndex Optional sub-template index in the `message`.\n *\n * @codeGenApi\n */\nexport function ɵɵi18nStart(\n index: number, messageIndex: number, subTemplateIndex: number = -1): void {\n const tView = getTView();\n const lView = getLView();\n const adjustedIndex = HEADER_OFFSET + index;\n ngDevMode && assertDefined(tView, `tView should be defined`);\n const message = getConstant<string>(tView.consts, messageIndex)!;\n const parentTNode = getCurrentParentTNode() as TElementNode | null;\n if (tView.firstCreatePass) {\n i18nStartFirstCreatePass(\n tView, parentTNode === null ? 0 : parentTNode.index, lView, adjustedIndex, message,\n subTemplateIndex);\n }\n const tI18n = tView.data[adjustedIndex] as TI18n;\n const sameViewParentTNode = parentTNode === lView[T_HOST] ? null : parentTNode;\n const parentRNode = getClosestRElement(tView, sameViewParentTNode, lView);\n // If `parentTNode` is an `ElementContainer` than it has `<!--ng-container--->`.\n // When we do inserts we have to make sure to insert in front of `<!--ng-container--->`.\n const insertInFrontOf = parentTNode && (parentTNode.type & TNodeType.ElementContainer) ?\n lView[parentTNode.index] :\n null;\n applyCreateOpCodes(lView, tI18n.create, parentRNode, insertInFrontOf);\n setInI18nBlock(true);\n}\n\n\n\n/**\n * Translates a translation block marked by `i18nStart` and `i18nEnd`. It inserts the text/ICU nodes\n * into the render tree, moves the placeholder nodes and removes the deleted nodes.\n *\n * @codeGenApi\n */\nexport function ɵɵi18nEnd(): void {\n setInI18nBlock(false);\n}\n\n/**\n *\n * Use this instruction to create a translation block that doesn't contain any placeholder.\n * It calls both {@link i18nStart} and {@link i18nEnd} in one instruction.\n *\n * The translation `message` is the value which is locale specific. The translation string may\n * contain placeholders which associate inner elements and sub-templates within the translation.\n *\n * The translation `message` placeholders are:\n * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be\n * interpolated into. The placeholder `index` points to the expression binding index. An optional\n * `block` that matches the sub-template in which it was declared.\n * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*: Marks the beginning\n * and end of DOM element that were embedded in the original translation block. The placeholder\n * `index` points to the element index in the template instructions set. An optional `block` that\n * matches the sub-template in which it was declared.\n * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be\n * split up and translated separately in each angular template function. The `index` points to the\n * `template` instruction index. A `block` that matches the sub-template in which it was declared.\n *\n * @param index A unique index of the translation in the static block.\n * @param messageIndex An index of the translation message from the `def.consts` array.\n * @param subTemplateIndex Optional sub-template index in the `message`.\n *\n * @codeGenApi\n */\nexport function ɵɵi18n(index: number, messageIndex: number, subTemplateIndex?: number): void {\n ɵɵi18nStart(index, messageIndex, subTemplateIndex);\n ɵɵi18nEnd();\n}\n\n/**\n * Marks a list of attributes as translatable.\n *\n * @param index A unique index in the static block\n * @param values\n *\n * @codeGenApi\n */\nexport function ɵɵi18nAttributes(index: number, attrsIndex: number): void {\n const tView = getTView();\n ngDevMode && assertDefined(tView, `tView should be defined`);\n const attrs = getConstant<string[]>(tView.consts, attrsIndex)!;\n i18nAttributesFirstPass(tView, index + HEADER_OFFSET, attrs);\n}\n\n\n/**\n * Stores the values of the bindings during each update cycle in order to determine if we need to\n * update the translated nodes.\n *\n * @param value The binding's value\n * @returns This function returns itself so that it may be chained\n * (e.g. `i18nExp(ctx.name)(ctx.title)`)\n *\n * @codeGenApi\n */\nexport function ɵɵi18nExp<T>(value: T): typeof ɵɵi18nExp {\n const lView = getLView();\n setMaskBit(bindingUpdated(lView, nextBindingIndex(), value));\n return ɵɵi18nExp;\n}\n\n/**\n * Updates a translation block or an i18n attribute when the bindings have changed.\n *\n * @param index Index of either {@link i18nStart} (translation block) or {@link i18nAttributes}\n * (i18n attribute) on which it should update the content.\n *\n * @codeGenApi\n */\nexport function ɵɵi18nApply(index: number) {\n applyI18n(getTView(), getLView(), index + HEADER_OFFSET);\n}\n\n/**\n * Handles message string post-processing for internationalization.\n *\n * Handles message string post-processing by transforming it from intermediate\n * format (that might contain some markers that we need to replace) to the final\n * form, consumable by i18nStart instruction. Post processing steps include:\n *\n * 1. Resolve all multi-value cases (like [�*1:1��#2:1�|�#4:1�|�5�])\n * 2. Replace all ICU vars (like \"VAR_PLURAL\")\n * 3. Replace all placeholders used inside ICUs in a form of {PLACEHOLDER}\n * 4. Replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�)\n * in case multiple ICUs have the same placeholder name\n *\n * @param message Raw translation string for post processing\n * @param replacements Set of replacements that should be applied\n *\n * @returns Transformed string that can be consumed by i18nStart instruction\n *\n * @codeGenApi\n */\nexport function ɵɵi18nPostprocess(\n message: string, replacements: {[key: string]: (string|string[])} = {}): string {\n return i18nPostprocess(message, replacements);\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 * This file re-exports all symbols contained in this directory.\n *\n * Why is this file not `index.ts`?\n *\n * There seems to be an inconsistent path resolution of an `index.ts` file\n * when only the parent directory is referenced. This could be due to the\n * node module resolution configuration differing from rollup and/or typescript.\n *\n * With commit\n * https://github.com/angular/angular/commit/d5e3f2c64bd13ce83e7c70788b7fc514ca4a9918\n * the `instructions.ts` file was moved to `instructions/instructions.ts` and an\n * `index.ts` file was used to re-export everything. Having had file names that were\n * importing from `instructions' directly (not the from the sub file or the `index.ts`\n * file) caused strange CI issues. `index.ts` had to be renamed to `all.ts` for this\n * to work.\n *\n * Jira Issue = FW-1184\n */\nexport * from './attribute';\nexport * from './attribute_interpolation';\nexport * from './change_detection';\nexport * from './template';\nexport * from './storage';\nexport * from './di';\nexport * from './di_attr';\nexport * from './element';\nexport * from './element_container';\nexport * from './get_current_view';\nexport * from './listener';\nexport * from './namespace';\nexport * from './next_context';\nexport * from './projection';\nexport * from './property';\nexport * from './property_interpolation';\nexport * from './advance';\nexport * from './styling';\nexport * from './text';\nexport * from './text_interpolation';\nexport * from './class_map_interpolation';\nexport * from './style_map_interpolation';\nexport * from './style_prop_interpolation';\nexport * from './host_property';\nexport * from './i18n';\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\nimport {resolveForwardRef} from '../di/forward_ref';\nimport {ClassProvider, Provider} from '../di/interface/provider';\nimport {isClassProvider, isTypeProvider, providerToFactory} from '../di/r3_injector';\nimport {assertDefined} from '../util/assert';\n\nimport {diPublicInInjector, getNodeInjectable, getOrCreateNodeInjectorForNode} from './di';\nimport {ɵɵdirectiveInject} from './instructions/all';\nimport {DirectiveDef} from './interfaces/definition';\nimport {NodeInjectorFactory} from './interfaces/injector';\nimport {TContainerNode, TDirectiveHostNode, TElementContainerNode, TElementNode, TNodeProviderIndexes} from './interfaces/node';\nimport {isComponentDef} from './interfaces/type_checks';\nimport {DestroyHookData, LView, TData, TVIEW, TView} from './interfaces/view';\nimport {getCurrentTNode, getLView, getTView} from './state';\n\n\n\n/**\n * Resolves the providers which are defined in the DirectiveDef.\n *\n * When inserting the tokens and the factories in their respective arrays, we can assume that\n * this method is called first for the component (if any), and then for other directives on the same\n * node.\n * As a consequence,the providers are always processed in that order:\n * 1) The view providers of the component\n * 2) The providers of the component\n * 3) The providers of the other directives\n * This matches the structure of the injectables arrays of a view (for each node).\n * So the tokens and the factories can be pushed at the end of the arrays, except\n * in one case for multi providers.\n *\n * @param def the directive definition\n * @param providers: Array of `providers`.\n * @param viewProviders: Array of `viewProviders`.\n */\nexport function providersResolver<T>(\n def: DirectiveDef<T>, providers: Provider[], viewProviders: Provider[]): void {\n const tView = getTView();\n if (tView.firstCreatePass) {\n const isComponent = isComponentDef(def);\n\n // The list of view providers is processed first, and the flags are updated\n resolveProvider(viewProviders, tView.data, tView.blueprint, isComponent, true);\n\n // Then, the list of providers is processed, and the flags are updated\n resolveProvider(providers, tView.data, tView.blueprint, isComponent, false);\n }\n}\n\n/**\n * Resolves a provider and publishes it to the DI system.\n */\nfunction resolveProvider(\n provider: Provider, tInjectables: TData, lInjectablesBlueprint: NodeInjectorFactory[],\n isComponent: boolean, isViewProvider: boolean): void {\n provider = resolveForwardRef(provider);\n if (Array.isArray(provider)) {\n // Recursively call `resolveProvider`\n // Recursion is OK in this case because this code will not be in hot-path once we implement\n // cloning of the initial state.\n for (let i = 0; i < provider.length; i++) {\n resolveProvider(\n provider[i], tInjectables, lInjectablesBlueprint, isComponent, isViewProvider);\n }\n } else {\n const tView = getTView();\n const lView = getLView();\n let token: any = isTypeProvider(provider) ? provider : resolveForwardRef(provider.provide);\n let providerFactory: () => any = providerToFactory(provider);\n\n const tNode = getCurrentTNode()!;\n const beginIndex = tNode.providerIndexes & TNodeProviderIndexes.ProvidersStartIndexMask;\n const endIndex = tNode.directiveStart;\n const cptViewProvidersCount =\n tNode.providerIndexes >> TNodeProviderIndexes.CptViewProvidersCountShift;\n\n if (isTypeProvider(provider) || !provider.multi) {\n // Single provider case: the factory is created and pushed immediately\n const factory = new NodeInjectorFactory(providerFactory, isViewProvider, ɵɵdirectiveInject);\n const existingFactoryIndex = indexOf(\n token, tInjectables, isViewProvider ? beginIndex : beginIndex + cptViewProvidersCount,\n endIndex);\n if (existingFactoryIndex === -1) {\n diPublicInInjector(\n getOrCreateNodeInjectorForNode(\n tNode as TElementNode | TContainerNode | TElementContainerNode, lView),\n tView, token);\n registerDestroyHooksIfSupported(tView, provider, tInjectables.length);\n tInjectables.push(token);\n tNode.directiveStart++;\n tNode.directiveEnd++;\n if (isViewProvider) {\n tNode.providerIndexes += TNodeProviderIndexes.CptViewProvidersCountShifter;\n }\n lInjectablesBlueprint.push(factory);\n lView.push(factory);\n } else {\n lInjectablesBlueprint[existingFactoryIndex] = factory;\n lView[existingFactoryIndex] = factory;\n }\n } else {\n // Multi provider case:\n // We create a multi factory which is going to aggregate all the values.\n // Since the output of such a factory depends on content or view injection,\n // we create two of them, which are linked together.\n //\n // The first one (for view providers) is always in the first block of the injectables array,\n // and the second one (for providers) is always in the second block.\n // This is important because view providers have higher priority. When a multi token\n // is being looked up, the view providers should be found first.\n // Note that it is not possible to have a multi factory in the third block (directive block).\n //\n // The algorithm to process multi providers is as follows:\n // 1) If the multi provider comes from the `viewProviders` of the component:\n // a) If the special view providers factory doesn't exist, it is created and pushed.\n // b) Else, the multi provider is added to the existing multi factory.\n // 2) If the multi provider comes from the `providers` of the component or of another\n // directive:\n // a) If the multi factory doesn't exist, it is created and provider pushed into it.\n // It is also linked to the multi factory for view providers, if it exists.\n // b) Else, the multi provider is added to the existing multi factory.\n\n const existingProvidersFactoryIndex =\n indexOf(token, tInjectables, beginIndex + cptViewProvidersCount, endIndex);\n const existingViewProvidersFactoryIndex =\n indexOf(token, tInjectables, beginIndex, beginIndex + cptViewProvidersCount);\n const doesProvidersFactoryExist = existingProvidersFactoryIndex >= 0 &&\n lInjectablesBlueprint[existingProvidersFactoryIndex];\n const doesViewProvidersFactoryExist = existingViewProvidersFactoryIndex >= 0 &&\n lInjectablesBlueprint[existingViewProvidersFactoryIndex];\n\n if (isViewProvider && !doesViewProvidersFactoryExist ||\n !isViewProvider && !doesProvidersFactoryExist) {\n // Cases 1.a and 2.a\n diPublicInInjector(\n getOrCreateNodeInjectorForNode(\n tNode as TElementNode | TContainerNode | TElementContainerNode, lView),\n tView, token);\n const factory = multiFactory(\n isViewProvider ? multiViewProvidersFactoryResolver : multiProvidersFactoryResolver,\n lInjectablesBlueprint.length, isViewProvider, isComponent, providerFactory);\n if (!isViewProvider && doesViewProvidersFactoryExist) {\n lInjectablesBlueprint[existingViewProvidersFactoryIndex].providerFactory = factory;\n }\n registerDestroyHooksIfSupported(tView, provider, tInjectables.length, 0);\n tInjectables.push(token);\n tNode.directiveStart++;\n tNode.directiveEnd++;\n if (isViewProvider) {\n tNode.providerIndexes += TNodeProviderIndexes.CptViewProvidersCountShifter;\n }\n lInjectablesBlueprint.push(factory);\n lView.push(factory);\n } else {\n // Cases 1.b and 2.b\n const indexInFactory = multiFactoryAdd(\n lInjectablesBlueprint!\n [isViewProvider ? existingViewProvidersFactoryIndex :\n existingProvidersFactoryIndex],\n providerFactory, !isViewProvider && isComponent);\n registerDestroyHooksIfSupported(\n tView, provider,\n existingProvidersFactoryIndex > -1 ? existingProvidersFactoryIndex :\n existingViewProvidersFactoryIndex,\n indexInFactory);\n }\n if (!isViewProvider && isComponent && doesViewProvidersFactoryExist) {\n lInjectablesBlueprint[existingViewProvidersFactoryIndex].componentProviders!++;\n }\n }\n }\n}\n\n/**\n * Registers the `ngOnDestroy` hook of a provider, if the provider supports destroy hooks.\n * @param tView `TView` in which to register the hook.\n * @param provider Provider whose hook should be registered.\n * @param contextIndex Index under which to find the context for the hook when it's being invoked.\n * @param indexInFactory Only required for `multi` providers. Index of the provider in the multi\n * provider factory.\n */\nfunction registerDestroyHooksIfSupported(\n tView: TView, provider: Exclude<Provider, any[]>, contextIndex: number,\n indexInFactory?: number) {\n const providerIsTypeProvider = isTypeProvider(provider);\n if (providerIsTypeProvider || isClassProvider(provider)) {\n const prototype = ((provider as ClassProvider).useClass || provider).prototype;\n const ngOnDestroy = prototype.ngOnDestroy;\n if (ngOnDestroy) {\n const hooks = tView.destroyHooks || (tView.destroyHooks = []);\n\n if (!providerIsTypeProvider && ((provider as ClassProvider)).multi) {\n ngDevMode &&\n assertDefined(\n indexInFactory, 'indexInFactory when registering multi factory destroy hook');\n const existingCallbacksIndex = hooks.indexOf(contextIndex);\n\n if (existingCallbacksIndex === -1) {\n hooks.push(contextIndex, [indexInFactory, ngOnDestroy]);\n } else {\n (hooks[existingCallbacksIndex + 1] as DestroyHookData).push(indexInFactory!, ngOnDestroy);\n }\n } else {\n hooks.push(contextIndex, ngOnDestroy);\n }\n }\n }\n}\n\n/**\n * Add a factory in a multi factory.\n * @returns Index at which the factory was inserted.\n */\nfunction multiFactoryAdd(\n multiFactory: NodeInjectorFactory, factory: () => any, isComponentProvider: boolean): number {\n if (isComponentProvider) {\n multiFactory.componentProviders!++;\n }\n return multiFactory.multi!.push(factory) - 1;\n}\n\n/**\n * Returns the index of item in the array, but only in the begin to end range.\n */\nfunction indexOf(item: any, arr: any[], begin: number, end: number) {\n for (let i = begin; i < end; i++) {\n if (arr[i] === item) return i;\n }\n return -1;\n}\n\n/**\n * Use this with `multi` `providers`.\n */\nfunction multiProvidersFactoryResolver(\n this: NodeInjectorFactory, _: undefined, tData: TData, lData: LView,\n tNode: TDirectiveHostNode): any[] {\n return multiResolve(this.multi!, []);\n}\n\n/**\n * Use this with `multi` `viewProviders`.\n *\n * This factory knows how to concatenate itself with the existing `multi` `providers`.\n */\nfunction multiViewProvidersFactoryResolver(\n this: NodeInjectorFactory, _: undefined, tData: TData, lView: LView,\n tNode: TDirectiveHostNode): any[] {\n const factories = this.multi!;\n let result: any[];\n if (this.providerFactory) {\n const componentCount = this.providerFactory.componentProviders!;\n const multiProviders =\n getNodeInjectable(lView, lView[TVIEW], this.providerFactory!.index!, tNode);\n // Copy the section of the array which contains `multi` `providers` from the component\n result = multiProviders.slice(0, componentCount);\n // Insert the `viewProvider` instances.\n multiResolve(factories, result);\n // Copy the section of the array which contains `multi` `providers` from other directives\n for (let i = componentCount; i < multiProviders.length; i++) {\n result.push(multiProviders[i]);\n }\n } else {\n result = [];\n // Insert the `viewProvider` instances.\n multiResolve(factories, result);\n }\n return result;\n}\n\n/**\n * Maps an array of factories into an array of values.\n */\nfunction multiResolve(factories: Array<() => any>, result: any[]): any[] {\n for (let i = 0; i < factories.length; i++) {\n const factory = factories[i]! as () => null;\n result.push(factory());\n }\n return result;\n}\n\n/**\n * Creates a multi factory.\n */\nfunction multiFactory(\n factoryFn: (\n this: NodeInjectorFactory, _: undefined, tData: TData, lData: LView,\n tNode: TDirectiveHostNode) => any,\n index: number, isViewProvider: boolean, isComponent: boolean,\n f: () => any): NodeInjectorFactory {\n const factory = new NodeInjectorFactory(factoryFn, isViewProvider, ɵɵdirectiveInject);\n factory.multi = [];\n factory.index = index;\n factory.componentProviders = 0;\n multiFactoryAdd(factory, f, isComponent && !isViewProvider);\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 */\nimport {ProcessProvidersFunction, Provider} from '../../di/interface/provider';\nimport {providersResolver} from '../di_setup';\nimport {DirectiveDef} from '../interfaces/definition';\n\n/**\n * This feature resolves the providers of a directive (or component),\n * and publish them into the DI system, making it visible to others for injection.\n *\n * For example:\n * ```ts\n * class ComponentWithProviders {\n * constructor(private greeter: GreeterDE) {}\n *\n * static ɵcmp = defineComponent({\n * type: ComponentWithProviders,\n * selectors: [['component-with-providers']],\n * factory: () => new ComponentWithProviders(directiveInject(GreeterDE as any)),\n * decls: 1,\n * vars: 1,\n * template: function(fs: RenderFlags, ctx: ComponentWithProviders) {\n * if (fs & RenderFlags.Create) {\n * ɵɵtext(0);\n * }\n * if (fs & RenderFlags.Update) {\n * ɵɵtextInterpolate(ctx.greeter.greet());\n * }\n * },\n * features: [ɵɵProvidersFeature([GreeterDE])]\n * });\n * }\n * ```\n *\n * @param definition\n *\n * @codeGenApi\n */\nexport function ɵɵProvidersFeature<T>(providers: Provider[], viewProviders: Provider[] = []) {\n return (definition: DirectiveDef<T>) => {\n definition.providersResolver =\n (def: DirectiveDef<T>, processProvidersFn?: ProcessProvidersFunction) => {\n return providersResolver(\n def, //\n processProvidersFn ? processProvidersFn(providers) : providers, //\n viewProviders);\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 {ChangeDetectorRef} from '../change_detection/change_detection';\nimport {Injector} from '../di/injector';\nimport {Type} from '../interface/type';\n\nimport {ElementRef} from './element_ref';\nimport {NgModuleRef} from './ng_module_factory';\nimport {ViewRef} from './view_ref';\n\n/**\n * Represents a component created by a `ComponentFactory`.\n * Provides access to the component instance and related objects,\n * and provides the means of destroying the instance.\n *\n * @publicApi\n */\nexport abstract class ComponentRef<C> {\n /**\n * The host or anchor [element](guide/glossary#element) for this component instance.\n */\n abstract get location(): ElementRef;\n\n /**\n * The [dependency injector](guide/glossary#injector) for this component instance.\n */\n abstract get injector(): Injector;\n\n /**\n * This component instance.\n */\n abstract get instance(): C;\n\n /**\n * The [host view](guide/glossary#view-tree) defined by the template\n * for this component instance.\n */\n abstract get hostView(): ViewRef;\n\n /**\n * The change detector for this component instance.\n */\n abstract get changeDetectorRef(): ChangeDetectorRef;\n\n /**\n * The type of this component (as created by a `ComponentFactory` class).\n */\n abstract get componentType(): Type<any>;\n\n /**\n * Destroys the component instance and all of the data structures associated with it.\n */\n abstract destroy(): void;\n\n /**\n * A lifecycle hook that provides additional developer-defined cleanup\n * functionality for the component.\n * @param callback A handler function that cleans up developer-defined data\n * associated with this component. Called when the `destroy()` method is invoked.\n */\n abstract onDestroy(callback: Function): void;\n}\n\n/**\n * Base class for a factory that can create a component dynamically.\n * Instantiate a factory for a given type of component with `resolveComponentFactory()`.\n * Use the resulting `ComponentFactory.create()` method to create a component of that type.\n *\n * @see [Dynamic Components](guide/dynamic-component-loader)\n *\n * @publicApi\n */\nexport abstract class ComponentFactory<C> {\n /**\n * The component's HTML selector.\n */\n abstract get selector(): string;\n /**\n * The type of component the factory will create.\n */\n abstract get componentType(): Type<any>;\n /**\n * Selector for all <ng-content> elements in the component.\n */\n abstract get ngContentSelectors(): string[];\n /**\n * The inputs of the component.\n */\n abstract get inputs(): {propName: string, templateName: string}[];\n /**\n * The outputs of the component.\n */\n abstract get outputs(): {propName: string, templateName: string}[];\n /**\n * Creates a new component.\n */\n abstract create(\n injector: Injector, projectableNodes?: any[][], rootSelectorOrNode?: string|any,\n ngModule?: NgModuleRef<any>): ComponentRef<C>;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '../di/injector';\nimport {Type} from '../interface/type';\nimport {stringify} from '../util/stringify';\n\nimport {ComponentFactory, ComponentRef} from './component_factory';\nimport {NgModuleRef} from './ng_module_factory';\n\nexport function noComponentFactoryError(component: Function) {\n const error = Error(`No component factory found for ${\n stringify(component)}. Did you add it to @NgModule.entryComponents?`);\n (error as any)[ERROR_COMPONENT] = component;\n return error;\n}\n\nconst ERROR_COMPONENT = 'ngComponent';\n\nexport function getComponent(error: Error): Type<any> {\n return (error as any)[ERROR_COMPONENT];\n}\n\n\nclass _NullComponentFactoryResolver implements ComponentFactoryResolver {\n resolveComponentFactory<T>(component: {new(...args: any[]): T}): ComponentFactory<T> {\n throw noComponentFactoryError(component);\n }\n}\n\n/**\n * A simple registry that maps `Components` to generated `ComponentFactory` classes\n * that can be used to create instances of components.\n * Use to obtain the factory for a given component type,\n * then use the factory's `create()` method to create a component of that type.\n *\n * @see [Dynamic Components](guide/dynamic-component-loader)\n * @see [Usage Example](guide/dynamic-component-loader#resolving-components)\n * @see <live-example name=\"dynamic-component-loader\" noDownload></live-example>\nof the code in this cookbook\n * @publicApi\n */\nexport abstract class ComponentFactoryResolver {\n static NULL: ComponentFactoryResolver = (/* @__PURE__ */ new _NullComponentFactoryResolver());\n /**\n * Retrieves the factory object that creates a component of the given type.\n * @param component The component type.\n */\n abstract resolveComponentFactory<T>(component: Type<T>): ComponentFactory<T>;\n}\n\nexport class CodegenComponentFactoryResolver implements ComponentFactoryResolver {\n private _factories = new Map<any, ComponentFactory<any>>();\n\n constructor(\n factories: ComponentFactory<any>[], private _parent: ComponentFactoryResolver,\n private _ngModule: NgModuleRef<any>) {\n for (let i = 0; i < factories.length; i++) {\n const factory = factories[i];\n this._factories.set(factory.componentType, factory);\n }\n }\n\n resolveComponentFactory<T>(component: {new(...args: any[]): T}): ComponentFactory<T> {\n let factory = this._factories.get(component);\n if (!factory && this._parent) {\n factory = this._parent.resolveComponentFactory(component);\n }\n if (!factory) {\n throw noComponentFactoryError(component);\n }\n return new ComponentFactoryBoundToModule(factory, this._ngModule);\n }\n}\n\nexport class ComponentFactoryBoundToModule<C> extends ComponentFactory<C> {\n override readonly selector: string;\n override readonly componentType: Type<any>;\n override readonly ngContentSelectors: string[];\n override readonly inputs: {propName: string, templateName: string}[];\n override readonly outputs: {propName: string, templateName: string}[];\n\n constructor(private factory: ComponentFactory<C>, private ngModule: NgModuleRef<any>) {\n super();\n this.selector = factory.selector;\n this.componentType = factory.componentType;\n this.ngContentSelectors = factory.ngContentSelectors;\n this.inputs = factory.inputs;\n this.outputs = factory.outputs;\n }\n\n override create(\n injector: Injector, projectableNodes?: any[][], rootSelectorOrNode?: string|any,\n ngModule?: NgModuleRef<any>): ComponentRef<C> {\n return this.factory.create(\n injector, projectableNodes, rootSelectorOrNode, ngModule || this.ngModule);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport function noop(...args: any[]): any {\n // Do nothing.\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 {TNode} from '../render3/interfaces/node';\nimport {RElement} from '../render3/interfaces/renderer_dom';\nimport {LView} from '../render3/interfaces/view';\nimport {getCurrentTNode, getLView} from '../render3/state';\nimport {getNativeByTNode} from '../render3/util/view_utils';\nimport {noop} from '../util/noop';\n\n/**\n * Creates an ElementRef from the most recent node.\n *\n * @returns The ElementRef instance to use\n */\nexport function injectElementRef(): ElementRef {\n return createElementRef(getCurrentTNode()!, getLView());\n}\n\n/**\n * Creates an ElementRef given a node.\n *\n * @param tNode The node for which you'd like an ElementRef\n * @param lView The view to which the node belongs\n * @returns The ElementRef instance to use\n */\nexport function createElementRef(tNode: TNode, lView: LView): ElementRef {\n return new ElementRef(getNativeByTNode(tNode, lView) as RElement);\n}\n\nexport const SWITCH_ELEMENT_REF_FACTORY__POST_R3__ = injectElementRef;\nconst SWITCH_ELEMENT_REF_FACTORY__PRE_R3__ = noop;\nconst SWITCH_ELEMENT_REF_FACTORY: typeof injectElementRef = SWITCH_ELEMENT_REF_FACTORY__PRE_R3__;\n\n/**\n * A wrapper around a native element inside of a View.\n *\n * An `ElementRef` is backed by a render-specific element. In the browser, this is usually a DOM\n * element.\n *\n * @security Permitting direct access to the DOM can make your application more vulnerable to\n * XSS attacks. Carefully review any use of `ElementRef` in your code. For more detail, see the\n * [Security Guide](https://g.co/ng/security).\n *\n * @publicApi\n */\n// Note: We don't expose things like `Injector`, `ViewContainer`, ... here,\n// i.e. users have to ask for what they need. With that, we can build better analysis tools\n// and could do better codegen in the future.\nexport class ElementRef<T = any> {\n /**\n * The underlying native element or `null` if direct access to native elements is not supported\n * (e.g. when the application runs in a web worker).\n *\n * <div class=\"callout is-critical\">\n * <header>Use with caution</header>\n * <p>\n * Use this API as the last resort when direct access to DOM is needed. Use templating and\n * data-binding provided by Angular instead. Alternatively you can take a look at {@link\n * Renderer2}\n * which provides API that can safely be used even when direct access to native elements is not\n * supported.\n * </p>\n * <p>\n * Relying on direct DOM access creates tight coupling between your application and rendering\n * layers which will make it impossible to separate the two and deploy your application into a\n * web worker.\n * </p>\n * </div>\n *\n */\n public nativeElement: T;\n\n constructor(nativeElement: T) {\n this.nativeElement = nativeElement;\n }\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__: () => ElementRef = SWITCH_ELEMENT_REF_FACTORY;\n}\n\n/**\n * Unwraps `ElementRef` and return the `nativeElement`.\n *\n * @param value value to unwrap\n * @returns `nativeElement` if `ElementRef` otherwise returns value as is.\n */\nexport function unwrapElementRef<T, R>(value: T|ElementRef<R>): T|R {\n return value instanceof ElementRef ? value.nativeElement : value;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectionToken} from '../di/injection_token';\nimport {isProceduralRenderer} from '../render3/interfaces/renderer';\nimport {isLView} from '../render3/interfaces/type_checks';\nimport {LView, RENDERER} from '../render3/interfaces/view';\nimport {getCurrentTNode, getLView} from '../render3/state';\nimport {getComponentLViewByIndex} from '../render3/util/view_utils';\nimport {noop} from '../util/noop';\nimport {RendererStyleFlags2, RendererType2} from './api_flags';\n\n\nexport const Renderer2Interceptor = new InjectionToken<Renderer2[]>('Renderer2Interceptor');\n\n\n/**\n * Creates and initializes a custom renderer that implements the `Renderer2` base class.\n *\n * @publicApi\n */\nexport abstract class RendererFactory2 {\n /**\n * Creates and initializes a custom renderer for a host DOM element.\n * @param hostElement The element to render.\n * @param type The base class to implement.\n * @returns The new custom renderer instance.\n */\n abstract createRenderer(hostElement: any, type: RendererType2|null): Renderer2;\n /**\n * A callback invoked when rendering has begun.\n */\n abstract begin?(): void;\n /**\n * A callback invoked when rendering has completed.\n */\n abstract end?(): void;\n /**\n * Use with animations test-only mode. Notifies the test when rendering has completed.\n * @returns The asynchronous result of the developer-defined function.\n */\n abstract whenRenderingDone?(): Promise<any>;\n}\n\n\n/**\n * Extend this base class to implement custom rendering. By default, Angular\n * renders a template into DOM. You can use custom rendering to intercept\n * rendering calls, or to render to something other than DOM.\n *\n * Create your custom renderer using `RendererFactory2`.\n *\n * Use a custom renderer to bypass Angular's templating and\n * make custom UI changes that can't be expressed declaratively.\n * For example if you need to set a property or an attribute whose name is\n * not statically known, use the `setProperty()` or\n * `setAttribute()` method.\n *\n * @publicApi\n */\nexport abstract class Renderer2 {\n /**\n * Use to store arbitrary developer-defined data on a renderer instance,\n * as an object containing key-value pairs.\n * This is useful for renderers that delegate to other renderers.\n */\n abstract get data(): {[key: string]: any};\n\n /**\n * Implement this callback to destroy the renderer or the host element.\n */\n abstract destroy(): void;\n /**\n * Implement this callback to create an instance of the host element.\n * @param name An identifying name for the new element, unique within the namespace.\n * @param namespace The namespace for the new element.\n * @returns The new element.\n */\n abstract createElement(name: string, namespace?: string|null): any;\n /**\n * Implement this callback to add a comment to the DOM of the host element.\n * @param value The comment text.\n * @returns The modified element.\n */\n abstract createComment(value: string): any;\n\n /**\n * Implement this callback to add text to the DOM of the host element.\n * @param value The text string.\n * @returns The modified element.\n */\n abstract createText(value: string): any;\n /**\n * If null or undefined, the view engine won't call it.\n * This is used as a performance optimization for production mode.\n */\n // TODO(issue/24571): remove '!'.\n destroyNode!: ((node: any) => void)|null;\n /**\n * Appends a child to a given parent node in the host element DOM.\n * @param parent The parent node.\n * @param newChild The new child node.\n */\n abstract appendChild(parent: any, newChild: any): void;\n /**\n * Implement this callback to insert a child node at a given position in a parent node\n * in the host element DOM.\n * @param parent The parent node.\n * @param newChild The new child nodes.\n * @param refChild The existing child node before which `newChild` is inserted.\n * @param isMove Optional argument which signifies if the current `insertBefore` is a result of a\n * move. Animation uses this information to trigger move animations. In the past the Animation\n * would always assume that any `insertBefore` is a move. This is not strictly true because\n * with runtime i18n it is possible to invoke `insertBefore` as a result of i18n and it should\n * not trigger an animation move.\n */\n abstract insertBefore(parent: any, newChild: any, refChild: any, isMove?: boolean): void;\n /**\n * Implement this callback to remove a child node from the host element's DOM.\n * @param parent The parent node.\n * @param oldChild The child node to remove.\n * @param isHostElement Optionally signal to the renderer whether this element is a host element\n * or not\n */\n abstract removeChild(parent: any, oldChild: any, isHostElement?: boolean): void;\n /**\n * Implement this callback to prepare an element to be bootstrapped\n * as a root element, and return the element instance.\n * @param selectorOrNode The DOM element.\n * @param preserveContent Whether the contents of the root element\n * should be preserved, or cleared upon bootstrap (default behavior).\n * Use with `ViewEncapsulation.ShadowDom` to allow simple native\n * content projection via `<slot>` elements.\n * @returns The root element.\n */\n abstract selectRootElement(selectorOrNode: string|any, preserveContent?: boolean): any;\n /**\n * Implement this callback to get the parent of a given node\n * in the host element's DOM.\n * @param node The child node to query.\n * @returns The parent node, or null if there is no parent.\n * For WebWorkers, always returns true.\n * This is because the check is synchronous,\n * and the caller can't rely on checking for null.\n */\n abstract parentNode(node: any): any;\n /**\n * Implement this callback to get the next sibling node of a given node\n * in the host element's DOM.\n * @returns The sibling node, or null if there is no sibling.\n * For WebWorkers, always returns a value.\n * This is because the check is synchronous,\n * and the caller can't rely on checking for null.\n */\n abstract nextSibling(node: any): any;\n /**\n * Implement this callback to set an attribute value for an element in the DOM.\n * @param el The element.\n * @param name The attribute name.\n * @param value The new value.\n * @param namespace The namespace.\n */\n abstract setAttribute(el: any, name: string, value: string, namespace?: string|null): void;\n\n /**\n * Implement this callback to remove an attribute from an element in the DOM.\n * @param el The element.\n * @param name The attribute name.\n * @param namespace The namespace.\n */\n abstract removeAttribute(el: any, name: string, namespace?: string|null): void;\n /**\n * Implement this callback to add a class to an element in the DOM.\n * @param el The element.\n * @param name The class name.\n */\n abstract addClass(el: any, name: string): void;\n\n /**\n * Implement this callback to remove a class from an element in the DOM.\n * @param el The element.\n * @param name The class name.\n */\n abstract removeClass(el: any, name: string): void;\n\n /**\n * Implement this callback to set a CSS style for an element in the DOM.\n * @param el The element.\n * @param style The name of the style.\n * @param value The new value.\n * @param flags Flags for style variations. No flags are set by default.\n */\n abstract setStyle(el: any, style: string, value: any, flags?: RendererStyleFlags2): void;\n\n /**\n * Implement this callback to remove the value from a CSS style for an element in the DOM.\n * @param el The element.\n * @param style The name of the style.\n * @param flags Flags for style variations to remove, if set. ???\n */\n abstract removeStyle(el: any, style: string, flags?: RendererStyleFlags2): void;\n\n /**\n * Implement this callback to set the value of a property of an element in the DOM.\n * @param el The element.\n * @param name The property name.\n * @param value The new value.\n */\n abstract setProperty(el: any, name: string, value: any): void;\n\n /**\n * Implement this callback to set the value of a node in the host element.\n * @param node The node.\n * @param value The new value.\n */\n abstract setValue(node: any, value: string): void;\n\n /**\n * Implement this callback to start an event listener.\n * @param target The context in which to listen for events. Can be\n * the entire window or document, the body of the document, or a specific\n * DOM element.\n * @param eventName The event to listen for.\n * @param callback A handler function to invoke when the event occurs.\n * @returns An \"unlisten\" function for disposing of this handler.\n */\n abstract listen(\n target: 'window'|'document'|'body'|any, eventName: string,\n callback: (event: any) => boolean | void): () => void;\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__: () => Renderer2 = () => SWITCH_RENDERER2_FACTORY();\n}\n\n\nexport const SWITCH_RENDERER2_FACTORY__POST_R3__ = injectRenderer2;\nconst SWITCH_RENDERER2_FACTORY__PRE_R3__ = noop;\nconst SWITCH_RENDERER2_FACTORY: typeof injectRenderer2 = SWITCH_RENDERER2_FACTORY__PRE_R3__;\n\n/** Returns a Renderer2 (or throws when application was bootstrapped with Renderer3) */\nfunction getOrCreateRenderer2(lView: LView): Renderer2 {\n const renderer = lView[RENDERER];\n if (ngDevMode && !isProceduralRenderer(renderer)) {\n throw new Error('Cannot inject Renderer2 when the application uses Renderer3!');\n }\n return renderer as Renderer2;\n}\n\n/** Injects a Renderer2 for the current component. */\nexport function injectRenderer2(): Renderer2 {\n // We need the Renderer to be based on the component that it's being injected into, however since\n // DI happens before we've entered its view, `getLView` will return the parent view instead.\n const lView = getLView();\n const tNode = getCurrentTNode()!;\n const nodeAtIndex = getComponentLViewByIndex(tNode.index, lView);\n return getOrCreateRenderer2(isLView(nodeAtIndex) ? nodeAtIndex : lView);\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 {ɵɵdefineInjectable} from '../di/interface/defs';\nimport {SecurityContext} from './security';\n\n/**\n * Sanitizer is used by the views to sanitize potentially dangerous values.\n *\n * @publicApi\n */\nexport abstract class Sanitizer {\n abstract sanitize(context: SecurityContext, value: {}|string|null): string|null;\n /** @nocollapse */\n static ɵprov = /** @pureOrBreakMyCode */ ɵɵdefineInjectable({\n token: Sanitizer,\n providedIn: 'root',\n factory: () => null,\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @description Represents the version of Angular\n *\n * @publicApi\n */\nexport class Version {\n public readonly major: string;\n public readonly minor: string;\n public readonly patch: string;\n\n constructor(public full: string) {\n this.major = full.split('.')[0];\n this.minor = full.split('.')[1];\n this.patch = full.split('.').slice(2).join('.');\n }\n}\n\n/**\n * @publicApi\n */\nexport const VERSION = new Version('12.2.13');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {stringify} from '../../util/stringify';\nimport {isListLikeIterable, iterateListLike} from '../change_detection_util';\n\nimport {IterableChangeRecord, IterableChanges, IterableDiffer, IterableDifferFactory, NgIterable, TrackByFunction} from './iterable_differs';\n\n\nexport class DefaultIterableDifferFactory implements IterableDifferFactory {\n constructor() {}\n supports(obj: Object|null|undefined): boolean {\n return isListLikeIterable(obj);\n }\n\n create<V>(trackByFn?: TrackByFunction<V>): DefaultIterableDiffer<V> {\n return new DefaultIterableDiffer<V>(trackByFn);\n }\n}\n\nconst trackByIdentity = (index: number, item: any) => item;\n\n/**\n * @deprecated v4.0.0 - Should not be part of public API.\n * @publicApi\n */\nexport class DefaultIterableDiffer<V> implements IterableDiffer<V>, IterableChanges<V> {\n public readonly length: number = 0;\n // TODO(issue/24571): remove '!'.\n public readonly collection!: V[]|Iterable<V>|null;\n // Keeps track of the used records at any point in time (during & across `_check()` calls)\n private _linkedRecords: _DuplicateMap<V>|null = null;\n // Keeps track of the removed records at any point in time during `_check()` calls.\n private _unlinkedRecords: _DuplicateMap<V>|null = null;\n private _previousItHead: IterableChangeRecord_<V>|null = null;\n private _itHead: IterableChangeRecord_<V>|null = null;\n private _itTail: IterableChangeRecord_<V>|null = null;\n private _additionsHead: IterableChangeRecord_<V>|null = null;\n private _additionsTail: IterableChangeRecord_<V>|null = null;\n private _movesHead: IterableChangeRecord_<V>|null = null;\n private _movesTail: IterableChangeRecord_<V>|null = null;\n private _removalsHead: IterableChangeRecord_<V>|null = null;\n private _removalsTail: IterableChangeRecord_<V>|null = null;\n // Keeps track of records where custom track by is the same, but item identity has changed\n private _identityChangesHead: IterableChangeRecord_<V>|null = null;\n private _identityChangesTail: IterableChangeRecord_<V>|null = null;\n private _trackByFn: TrackByFunction<V>;\n\n constructor(trackByFn?: TrackByFunction<V>) {\n this._trackByFn = trackByFn || trackByIdentity;\n }\n\n forEachItem(fn: (record: IterableChangeRecord_<V>) => void) {\n let record: IterableChangeRecord_<V>|null;\n for (record = this._itHead; record !== null; record = record._next) {\n fn(record);\n }\n }\n\n forEachOperation(\n fn: (item: IterableChangeRecord<V>, previousIndex: number|null, currentIndex: number|null) =>\n void) {\n let nextIt = this._itHead;\n let nextRemove = this._removalsHead;\n let addRemoveOffset = 0;\n let moveOffsets: number[]|null = null;\n while (nextIt || nextRemove) {\n // Figure out which is the next record to process\n // Order: remove, add, move\n const record: IterableChangeRecord<V> = !nextRemove ||\n nextIt &&\n nextIt.currentIndex! <\n getPreviousIndex(nextRemove, addRemoveOffset, moveOffsets) ?\n nextIt! :\n nextRemove;\n const adjPreviousIndex = getPreviousIndex(record, addRemoveOffset, moveOffsets);\n const currentIndex = record.currentIndex;\n\n // consume the item, and adjust the addRemoveOffset and update moveDistance if necessary\n if (record === nextRemove) {\n addRemoveOffset--;\n nextRemove = nextRemove._nextRemoved;\n } else {\n nextIt = nextIt!._next;\n if (record.previousIndex == null) {\n addRemoveOffset++;\n } else {\n // INVARIANT: currentIndex < previousIndex\n if (!moveOffsets) moveOffsets = [];\n const localMovePreviousIndex = adjPreviousIndex - addRemoveOffset;\n const localCurrentIndex = currentIndex! - addRemoveOffset;\n if (localMovePreviousIndex != localCurrentIndex) {\n for (let i = 0; i < localMovePreviousIndex; i++) {\n const offset = i < moveOffsets.length ? moveOffsets[i] : (moveOffsets[i] = 0);\n const index = offset + i;\n if (localCurrentIndex <= index && index < localMovePreviousIndex) {\n moveOffsets[i] = offset + 1;\n }\n }\n const previousIndex = record.previousIndex;\n moveOffsets[previousIndex] = localCurrentIndex - localMovePreviousIndex;\n }\n }\n }\n\n if (adjPreviousIndex !== currentIndex) {\n fn(record, adjPreviousIndex, currentIndex);\n }\n }\n }\n\n forEachPreviousItem(fn: (record: IterableChangeRecord_<V>) => void) {\n let record: IterableChangeRecord_<V>|null;\n for (record = this._previousItHead; record !== null; record = record._nextPrevious) {\n fn(record);\n }\n }\n\n forEachAddedItem(fn: (record: IterableChangeRecord_<V>) => void) {\n let record: IterableChangeRecord_<V>|null;\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n fn(record);\n }\n }\n\n forEachMovedItem(fn: (record: IterableChangeRecord_<V>) => void) {\n let record: IterableChangeRecord_<V>|null;\n for (record = this._movesHead; record !== null; record = record._nextMoved) {\n fn(record);\n }\n }\n\n forEachRemovedItem(fn: (record: IterableChangeRecord_<V>) => void) {\n let record: IterableChangeRecord_<V>|null;\n for (record = this._removalsHead; record !== null; record = record._nextRemoved) {\n fn(record);\n }\n }\n\n forEachIdentityChange(fn: (record: IterableChangeRecord_<V>) => void) {\n let record: IterableChangeRecord_<V>|null;\n for (record = this._identityChangesHead; record !== null; record = record._nextIdentityChange) {\n fn(record);\n }\n }\n\n diff(collection: NgIterable<V>|null|undefined): DefaultIterableDiffer<V>|null {\n if (collection == null) collection = [];\n if (!isListLikeIterable(collection)) {\n throw new Error(\n `Error trying to diff '${stringify(collection)}'. Only arrays and iterables are allowed`);\n }\n\n if (this.check(collection)) {\n return this;\n } else {\n return null;\n }\n }\n\n onDestroy() {}\n\n check(collection: NgIterable<V>): boolean {\n this._reset();\n\n let record: IterableChangeRecord_<V>|null = this._itHead;\n let mayBeDirty: boolean = false;\n let index: number;\n let item: V;\n let itemTrackBy: any;\n if (Array.isArray(collection)) {\n (this as {length: number}).length = collection.length;\n\n for (let index = 0; index < this.length; index++) {\n item = collection[index];\n itemTrackBy = this._trackByFn(index, item);\n if (record === null || !Object.is(record.trackById, itemTrackBy)) {\n record = this._mismatch(record, item, itemTrackBy, index);\n mayBeDirty = true;\n } else {\n if (mayBeDirty) {\n // TODO(misko): can we limit this to duplicates only?\n record = this._verifyReinsertion(record, item, itemTrackBy, index);\n }\n if (!Object.is(record.item, item)) this._addIdentityChange(record, item);\n }\n\n record = record._next;\n }\n } else {\n index = 0;\n iterateListLike(collection, (item: V) => {\n itemTrackBy = this._trackByFn(index, item);\n if (record === null || !Object.is(record.trackById, itemTrackBy)) {\n record = this._mismatch(record, item, itemTrackBy, index);\n mayBeDirty = true;\n } else {\n if (mayBeDirty) {\n // TODO(misko): can we limit this to duplicates only?\n record = this._verifyReinsertion(record, item, itemTrackBy, index);\n }\n if (!Object.is(record.item, item)) this._addIdentityChange(record, item);\n }\n record = record._next;\n index++;\n });\n (this as {length: number}).length = index;\n }\n\n this._truncate(record);\n (this as {collection: V[] | Iterable<V>}).collection = collection;\n return this.isDirty;\n }\n\n /* CollectionChanges is considered dirty if it has any additions, moves, removals, or identity\n * changes.\n */\n get isDirty(): boolean {\n return this._additionsHead !== null || this._movesHead !== null ||\n this._removalsHead !== null || this._identityChangesHead !== null;\n }\n\n /**\n * Reset the state of the change objects to show no changes. This means set previousKey to\n * currentKey, and clear all of the queues (additions, moves, removals).\n * Set the previousIndexes of moved and added items to their currentIndexes\n * Reset the list of additions, moves and removals\n *\n * @internal\n */\n _reset() {\n if (this.isDirty) {\n let record: IterableChangeRecord_<V>|null;\n\n for (record = this._previousItHead = this._itHead; record !== null; record = record._next) {\n record._nextPrevious = record._next;\n }\n\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n record.previousIndex = record.currentIndex;\n }\n this._additionsHead = this._additionsTail = null;\n\n for (record = this._movesHead; record !== null; record = record._nextMoved) {\n record.previousIndex = record.currentIndex;\n }\n this._movesHead = this._movesTail = null;\n this._removalsHead = this._removalsTail = null;\n this._identityChangesHead = this._identityChangesTail = null;\n\n // TODO(vicb): when assert gets supported\n // assert(!this.isDirty);\n }\n }\n\n /**\n * This is the core function which handles differences between collections.\n *\n * - `record` is the record which we saw at this position last time. If null then it is a new\n * item.\n * - `item` is the current item in the collection\n * - `index` is the position of the item in the collection\n *\n * @internal\n */\n _mismatch(record: IterableChangeRecord_<V>|null, item: V, itemTrackBy: any, index: number):\n IterableChangeRecord_<V> {\n // The previous record after which we will append the current one.\n let previousRecord: IterableChangeRecord_<V>|null;\n\n if (record === null) {\n previousRecord = this._itTail;\n } else {\n previousRecord = record._prev;\n // Remove the record from the collection since we know it does not match the item.\n this._remove(record);\n }\n\n // See if we have evicted the item, which used to be at some anterior position of _itHead list.\n record = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);\n if (record !== null) {\n // It is an item which we have evicted earlier: reinsert it back into the list.\n // But first we need to check if identity changed, so we can update in view if necessary.\n if (!Object.is(record.item, item)) this._addIdentityChange(record, item);\n\n this._reinsertAfter(record, previousRecord, index);\n } else {\n // Attempt to see if the item is at some posterior position of _itHead list.\n record = this._linkedRecords === null ? null : this._linkedRecords.get(itemTrackBy, index);\n if (record !== null) {\n // We have the item in _itHead at/after `index` position. We need to move it forward in the\n // collection.\n // But first we need to check if identity changed, so we can update in view if necessary.\n if (!Object.is(record.item, item)) this._addIdentityChange(record, item);\n\n this._moveAfter(record, previousRecord, index);\n } else {\n // It is a new item: add it.\n record =\n this._addAfter(new IterableChangeRecord_<V>(item, itemTrackBy), previousRecord, index);\n }\n }\n return record;\n }\n\n /**\n * This check is only needed if an array contains duplicates. (Short circuit of nothing dirty)\n *\n * Use case: `[a, a]` => `[b, a, a]`\n *\n * If we did not have this check then the insertion of `b` would:\n * 1) evict first `a`\n * 2) insert `b` at `0` index.\n * 3) leave `a` at index `1` as is. <-- this is wrong!\n * 3) reinsert `a` at index 2. <-- this is wrong!\n *\n * The correct behavior is:\n * 1) evict first `a`\n * 2) insert `b` at `0` index.\n * 3) reinsert `a` at index 1.\n * 3) move `a` at from `1` to `2`.\n *\n *\n * Double check that we have not evicted a duplicate item. We need to check if the item type may\n * have already been removed:\n * The insertion of b will evict the first 'a'. If we don't reinsert it now it will be reinserted\n * at the end. Which will show up as the two 'a's switching position. This is incorrect, since a\n * better way to think of it is as insert of 'b' rather then switch 'a' with 'b' and then add 'a'\n * at the end.\n *\n * @internal\n */\n _verifyReinsertion(record: IterableChangeRecord_<V>, item: V, itemTrackBy: any, index: number):\n IterableChangeRecord_<V> {\n let reinsertRecord: IterableChangeRecord_<V>|null =\n this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);\n if (reinsertRecord !== null) {\n record = this._reinsertAfter(reinsertRecord, record._prev!, index);\n } else if (record.currentIndex != index) {\n record.currentIndex = index;\n this._addToMoves(record, index);\n }\n return record;\n }\n\n /**\n * Get rid of any excess {@link IterableChangeRecord_}s from the previous collection\n *\n * - `record` The first excess {@link IterableChangeRecord_}.\n *\n * @internal\n */\n _truncate(record: IterableChangeRecord_<V>|null) {\n // Anything after that needs to be removed;\n while (record !== null) {\n const nextRecord: IterableChangeRecord_<V>|null = record._next;\n this._addToRemovals(this._unlink(record));\n record = nextRecord;\n }\n if (this._unlinkedRecords !== null) {\n this._unlinkedRecords.clear();\n }\n\n if (this._additionsTail !== null) {\n this._additionsTail._nextAdded = null;\n }\n if (this._movesTail !== null) {\n this._movesTail._nextMoved = null;\n }\n if (this._itTail !== null) {\n this._itTail._next = null;\n }\n if (this._removalsTail !== null) {\n this._removalsTail._nextRemoved = null;\n }\n if (this._identityChangesTail !== null) {\n this._identityChangesTail._nextIdentityChange = null;\n }\n }\n\n /** @internal */\n _reinsertAfter(\n record: IterableChangeRecord_<V>, prevRecord: IterableChangeRecord_<V>|null,\n index: number): IterableChangeRecord_<V> {\n if (this._unlinkedRecords !== null) {\n this._unlinkedRecords.remove(record);\n }\n const prev = record._prevRemoved;\n const next = record._nextRemoved;\n\n if (prev === null) {\n this._removalsHead = next;\n } else {\n prev._nextRemoved = next;\n }\n if (next === null) {\n this._removalsTail = prev;\n } else {\n next._prevRemoved = prev;\n }\n\n this._insertAfter(record, prevRecord, index);\n this._addToMoves(record, index);\n return record;\n }\n\n /** @internal */\n _moveAfter(\n record: IterableChangeRecord_<V>, prevRecord: IterableChangeRecord_<V>|null,\n index: number): IterableChangeRecord_<V> {\n this._unlink(record);\n this._insertAfter(record, prevRecord, index);\n this._addToMoves(record, index);\n return record;\n }\n\n /** @internal */\n _addAfter(\n record: IterableChangeRecord_<V>, prevRecord: IterableChangeRecord_<V>|null,\n index: number): IterableChangeRecord_<V> {\n this._insertAfter(record, prevRecord, index);\n\n if (this._additionsTail === null) {\n // TODO(vicb):\n // assert(this._additionsHead === null);\n this._additionsTail = this._additionsHead = record;\n } else {\n // TODO(vicb):\n // assert(_additionsTail._nextAdded === null);\n // assert(record._nextAdded === null);\n this._additionsTail = this._additionsTail._nextAdded = record;\n }\n return record;\n }\n\n /** @internal */\n _insertAfter(\n record: IterableChangeRecord_<V>, prevRecord: IterableChangeRecord_<V>|null,\n index: number): IterableChangeRecord_<V> {\n // TODO(vicb):\n // assert(record != prevRecord);\n // assert(record._next === null);\n // assert(record._prev === null);\n\n const next: IterableChangeRecord_<V>|null =\n prevRecord === null ? this._itHead : prevRecord._next;\n // TODO(vicb):\n // assert(next != record);\n // assert(prevRecord != record);\n record._next = next;\n record._prev = prevRecord;\n if (next === null) {\n this._itTail = record;\n } else {\n next._prev = record;\n }\n if (prevRecord === null) {\n this._itHead = record;\n } else {\n prevRecord._next = record;\n }\n\n if (this._linkedRecords === null) {\n this._linkedRecords = new _DuplicateMap<V>();\n }\n this._linkedRecords.put(record);\n\n record.currentIndex = index;\n return record;\n }\n\n /** @internal */\n _remove(record: IterableChangeRecord_<V>): IterableChangeRecord_<V> {\n return this._addToRemovals(this._unlink(record));\n }\n\n /** @internal */\n _unlink(record: IterableChangeRecord_<V>): IterableChangeRecord_<V> {\n if (this._linkedRecords !== null) {\n this._linkedRecords.remove(record);\n }\n\n const prev = record._prev;\n const next = record._next;\n\n // TODO(vicb):\n // assert((record._prev = null) === null);\n // assert((record._next = null) === null);\n\n if (prev === null) {\n this._itHead = next;\n } else {\n prev._next = next;\n }\n if (next === null) {\n this._itTail = prev;\n } else {\n next._prev = prev;\n }\n\n return record;\n }\n\n /** @internal */\n _addToMoves(record: IterableChangeRecord_<V>, toIndex: number): IterableChangeRecord_<V> {\n // TODO(vicb):\n // assert(record._nextMoved === null);\n\n if (record.previousIndex === toIndex) {\n return record;\n }\n\n if (this._movesTail === null) {\n // TODO(vicb):\n // assert(_movesHead === null);\n this._movesTail = this._movesHead = record;\n } else {\n // TODO(vicb):\n // assert(_movesTail._nextMoved === null);\n this._movesTail = this._movesTail._nextMoved = record;\n }\n\n return record;\n }\n\n private _addToRemovals(record: IterableChangeRecord_<V>): IterableChangeRecord_<V> {\n if (this._unlinkedRecords === null) {\n this._unlinkedRecords = new _DuplicateMap<V>();\n }\n this._unlinkedRecords.put(record);\n record.currentIndex = null;\n record._nextRemoved = null;\n\n if (this._removalsTail === null) {\n // TODO(vicb):\n // assert(_removalsHead === null);\n this._removalsTail = this._removalsHead = record;\n record._prevRemoved = null;\n } else {\n // TODO(vicb):\n // assert(_removalsTail._nextRemoved === null);\n // assert(record._nextRemoved === null);\n record._prevRemoved = this._removalsTail;\n this._removalsTail = this._removalsTail._nextRemoved = record;\n }\n return record;\n }\n\n /** @internal */\n _addIdentityChange(record: IterableChangeRecord_<V>, item: V) {\n record.item = item;\n if (this._identityChangesTail === null) {\n this._identityChangesTail = this._identityChangesHead = record;\n } else {\n this._identityChangesTail = this._identityChangesTail._nextIdentityChange = record;\n }\n return record;\n }\n}\n\nexport class IterableChangeRecord_<V> implements IterableChangeRecord<V> {\n currentIndex: number|null = null;\n previousIndex: number|null = null;\n\n /** @internal */\n _nextPrevious: IterableChangeRecord_<V>|null = null;\n /** @internal */\n _prev: IterableChangeRecord_<V>|null = null;\n /** @internal */\n _next: IterableChangeRecord_<V>|null = null;\n /** @internal */\n _prevDup: IterableChangeRecord_<V>|null = null;\n /** @internal */\n _nextDup: IterableChangeRecord_<V>|null = null;\n /** @internal */\n _prevRemoved: IterableChangeRecord_<V>|null = null;\n /** @internal */\n _nextRemoved: IterableChangeRecord_<V>|null = null;\n /** @internal */\n _nextAdded: IterableChangeRecord_<V>|null = null;\n /** @internal */\n _nextMoved: IterableChangeRecord_<V>|null = null;\n /** @internal */\n _nextIdentityChange: IterableChangeRecord_<V>|null = null;\n\n\n constructor(public item: V, public trackById: any) {}\n}\n\n// A linked list of IterableChangeRecords with the same IterableChangeRecord_.item\nclass _DuplicateItemRecordList<V> {\n /** @internal */\n _head: IterableChangeRecord_<V>|null = null;\n /** @internal */\n _tail: IterableChangeRecord_<V>|null = null;\n\n /**\n * Append the record to the list of duplicates.\n *\n * Note: by design all records in the list of duplicates hold the same value in record.item.\n */\n add(record: IterableChangeRecord_<V>): void {\n if (this._head === null) {\n this._head = this._tail = record;\n record._nextDup = null;\n record._prevDup = null;\n } else {\n // TODO(vicb):\n // assert(record.item == _head.item ||\n // record.item is num && record.item.isNaN && _head.item is num && _head.item.isNaN);\n this._tail!._nextDup = record;\n record._prevDup = this._tail;\n record._nextDup = null;\n this._tail = record;\n }\n }\n\n // Returns a IterableChangeRecord_ having IterableChangeRecord_.trackById == trackById and\n // IterableChangeRecord_.currentIndex >= atOrAfterIndex\n get(trackById: any, atOrAfterIndex: number|null): IterableChangeRecord_<V>|null {\n let record: IterableChangeRecord_<V>|null;\n for (record = this._head; record !== null; record = record._nextDup) {\n if ((atOrAfterIndex === null || atOrAfterIndex <= record.currentIndex!) &&\n Object.is(record.trackById, trackById)) {\n return record;\n }\n }\n return null;\n }\n\n /**\n * Remove one {@link IterableChangeRecord_} from the list of duplicates.\n *\n * Returns whether the list of duplicates is empty.\n */\n remove(record: IterableChangeRecord_<V>): boolean {\n // TODO(vicb):\n // assert(() {\n // // verify that the record being removed is in the list.\n // for (IterableChangeRecord_ cursor = _head; cursor != null; cursor = cursor._nextDup) {\n // if (identical(cursor, record)) return true;\n // }\n // return false;\n //});\n\n const prev: IterableChangeRecord_<V>|null = record._prevDup;\n const next: IterableChangeRecord_<V>|null = record._nextDup;\n if (prev === null) {\n this._head = next;\n } else {\n prev._nextDup = next;\n }\n if (next === null) {\n this._tail = prev;\n } else {\n next._prevDup = prev;\n }\n return this._head === null;\n }\n}\n\nclass _DuplicateMap<V> {\n map = new Map<any, _DuplicateItemRecordList<V>>();\n\n put(record: IterableChangeRecord_<V>) {\n const key = record.trackById;\n\n let duplicates = this.map.get(key);\n if (!duplicates) {\n duplicates = new _DuplicateItemRecordList<V>();\n this.map.set(key, duplicates);\n }\n duplicates.add(record);\n }\n\n /**\n * Retrieve the `value` using key. Because the IterableChangeRecord_ value may be one which we\n * have already iterated over, we use the `atOrAfterIndex` to pretend it is not there.\n *\n * Use case: `[a, b, c, a, a]` if we are at index `3` which is the second `a` then asking if we\n * have any more `a`s needs to return the second `a`.\n */\n get(trackById: any, atOrAfterIndex: number|null): IterableChangeRecord_<V>|null {\n const key = trackById;\n const recordList = this.map.get(key);\n return recordList ? recordList.get(trackById, atOrAfterIndex) : null;\n }\n\n /**\n * Removes a {@link IterableChangeRecord_} from the list of duplicates.\n *\n * The list of duplicates also is removed from the map if it gets empty.\n */\n remove(record: IterableChangeRecord_<V>): IterableChangeRecord_<V> {\n const key = record.trackById;\n const recordList: _DuplicateItemRecordList<V> = this.map.get(key)!;\n // Remove the list of duplicates when it gets empty\n if (recordList.remove(record)) {\n this.map.delete(key);\n }\n return record;\n }\n\n get isEmpty(): boolean {\n return this.map.size === 0;\n }\n\n clear() {\n this.map.clear();\n }\n}\n\nfunction getPreviousIndex(item: any, addRemoveOffset: number, moveOffsets: number[]|null): number {\n const previousIndex = item.previousIndex;\n if (previousIndex === null) return previousIndex;\n let moveOffset = 0;\n if (moveOffsets && previousIndex < moveOffsets.length) {\n moveOffset = moveOffsets[previousIndex];\n }\n return previousIndex + addRemoveOffset + moveOffset;\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 {stringify} from '../../util/stringify';\nimport {isJsObject} from '../change_detection_util';\nimport {KeyValueChangeRecord, KeyValueChanges, KeyValueDiffer, KeyValueDifferFactory} from './keyvalue_differs';\n\n\nexport class DefaultKeyValueDifferFactory<K, V> implements KeyValueDifferFactory {\n constructor() {}\n supports(obj: any): boolean {\n return obj instanceof Map || isJsObject(obj);\n }\n\n create<K, V>(): KeyValueDiffer<K, V> {\n return new DefaultKeyValueDiffer<K, V>();\n }\n}\n\nexport class DefaultKeyValueDiffer<K, V> implements KeyValueDiffer<K, V>, KeyValueChanges<K, V> {\n private _records = new Map<K, KeyValueChangeRecord_<K, V>>();\n private _mapHead: KeyValueChangeRecord_<K, V>|null = null;\n // _appendAfter is used in the check loop\n private _appendAfter: KeyValueChangeRecord_<K, V>|null = null;\n private _previousMapHead: KeyValueChangeRecord_<K, V>|null = null;\n private _changesHead: KeyValueChangeRecord_<K, V>|null = null;\n private _changesTail: KeyValueChangeRecord_<K, V>|null = null;\n private _additionsHead: KeyValueChangeRecord_<K, V>|null = null;\n private _additionsTail: KeyValueChangeRecord_<K, V>|null = null;\n private _removalsHead: KeyValueChangeRecord_<K, V>|null = null;\n private _removalsTail: KeyValueChangeRecord_<K, V>|null = null;\n\n get isDirty(): boolean {\n return this._additionsHead !== null || this._changesHead !== null ||\n this._removalsHead !== null;\n }\n\n forEachItem(fn: (r: KeyValueChangeRecord<K, V>) => void) {\n let record: KeyValueChangeRecord_<K, V>|null;\n for (record = this._mapHead; record !== null; record = record._next) {\n fn(record);\n }\n }\n\n forEachPreviousItem(fn: (r: KeyValueChangeRecord<K, V>) => void) {\n let record: KeyValueChangeRecord_<K, V>|null;\n for (record = this._previousMapHead; record !== null; record = record._nextPrevious) {\n fn(record);\n }\n }\n\n forEachChangedItem(fn: (r: KeyValueChangeRecord<K, V>) => void) {\n let record: KeyValueChangeRecord_<K, V>|null;\n for (record = this._changesHead; record !== null; record = record._nextChanged) {\n fn(record);\n }\n }\n\n forEachAddedItem(fn: (r: KeyValueChangeRecord<K, V>) => void) {\n let record: KeyValueChangeRecord_<K, V>|null;\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n fn(record);\n }\n }\n\n forEachRemovedItem(fn: (r: KeyValueChangeRecord<K, V>) => void) {\n let record: KeyValueChangeRecord_<K, V>|null;\n for (record = this._removalsHead; record !== null; record = record._nextRemoved) {\n fn(record);\n }\n }\n\n diff(map?: Map<any, any>|{[k: string]: any}|null): any {\n if (!map) {\n map = new Map();\n } else if (!(map instanceof Map || isJsObject(map))) {\n throw new Error(\n `Error trying to diff '${stringify(map)}'. Only maps and objects are allowed`);\n }\n\n return this.check(map) ? this : null;\n }\n\n onDestroy() {}\n\n /**\n * Check the current state of the map vs the previous.\n * The algorithm is optimised for when the keys do no change.\n */\n check(map: Map<any, any>|{[k: string]: any}): boolean {\n this._reset();\n\n let insertBefore = this._mapHead;\n this._appendAfter = null;\n\n this._forEach(map, (value: any, key: any) => {\n if (insertBefore && insertBefore.key === key) {\n this._maybeAddToChanges(insertBefore, value);\n this._appendAfter = insertBefore;\n insertBefore = insertBefore._next;\n } else {\n const record = this._getOrCreateRecordForKey(key, value);\n insertBefore = this._insertBeforeOrAppend(insertBefore, record);\n }\n });\n\n // Items remaining at the end of the list have been deleted\n if (insertBefore) {\n if (insertBefore._prev) {\n insertBefore._prev._next = null;\n }\n\n this._removalsHead = insertBefore;\n\n for (let record: KeyValueChangeRecord_<K, V>|null = insertBefore; record !== null;\n record = record._nextRemoved) {\n if (record === this._mapHead) {\n this._mapHead = null;\n }\n this._records.delete(record.key);\n record._nextRemoved = record._next;\n record.previousValue = record.currentValue;\n record.currentValue = null;\n record._prev = null;\n record._next = null;\n }\n }\n\n // Make sure tails have no next records from previous runs\n if (this._changesTail) this._changesTail._nextChanged = null;\n if (this._additionsTail) this._additionsTail._nextAdded = null;\n\n return this.isDirty;\n }\n\n /**\n * Inserts a record before `before` or append at the end of the list when `before` is null.\n *\n * Notes:\n * - This method appends at `this._appendAfter`,\n * - This method updates `this._appendAfter`,\n * - The return value is the new value for the insertion pointer.\n */\n private _insertBeforeOrAppend(\n before: KeyValueChangeRecord_<K, V>|null,\n record: KeyValueChangeRecord_<K, V>): KeyValueChangeRecord_<K, V>|null {\n if (before) {\n const prev = before._prev;\n record._next = before;\n record._prev = prev;\n before._prev = record;\n if (prev) {\n prev._next = record;\n }\n if (before === this._mapHead) {\n this._mapHead = record;\n }\n\n this._appendAfter = before;\n return before;\n }\n\n if (this._appendAfter) {\n this._appendAfter._next = record;\n record._prev = this._appendAfter;\n } else {\n this._mapHead = record;\n }\n\n this._appendAfter = record;\n return null;\n }\n\n private _getOrCreateRecordForKey(key: K, value: V): KeyValueChangeRecord_<K, V> {\n if (this._records.has(key)) {\n const record = this._records.get(key)!;\n this._maybeAddToChanges(record, value);\n const prev = record._prev;\n const next = record._next;\n if (prev) {\n prev._next = next;\n }\n if (next) {\n next._prev = prev;\n }\n record._next = null;\n record._prev = null;\n\n return record;\n }\n\n const record = new KeyValueChangeRecord_<K, V>(key);\n this._records.set(key, record);\n record.currentValue = value;\n this._addToAdditions(record);\n return record;\n }\n\n /** @internal */\n _reset() {\n if (this.isDirty) {\n let record: KeyValueChangeRecord_<K, V>|null;\n // let `_previousMapHead` contain the state of the map before the changes\n this._previousMapHead = this._mapHead;\n for (record = this._previousMapHead; record !== null; record = record._next) {\n record._nextPrevious = record._next;\n }\n\n // Update `record.previousValue` with the value of the item before the changes\n // We need to update all changed items (that's those which have been added and changed)\n for (record = this._changesHead; record !== null; record = record._nextChanged) {\n record.previousValue = record.currentValue;\n }\n for (record = this._additionsHead; record != null; record = record._nextAdded) {\n record.previousValue = record.currentValue;\n }\n\n this._changesHead = this._changesTail = null;\n this._additionsHead = this._additionsTail = null;\n this._removalsHead = null;\n }\n }\n\n // Add the record or a given key to the list of changes only when the value has actually changed\n private _maybeAddToChanges(record: KeyValueChangeRecord_<K, V>, newValue: any): void {\n if (!Object.is(newValue, record.currentValue)) {\n record.previousValue = record.currentValue;\n record.currentValue = newValue;\n this._addToChanges(record);\n }\n }\n\n private _addToAdditions(record: KeyValueChangeRecord_<K, V>) {\n if (this._additionsHead === null) {\n this._additionsHead = this._additionsTail = record;\n } else {\n this._additionsTail!._nextAdded = record;\n this._additionsTail = record;\n }\n }\n\n private _addToChanges(record: KeyValueChangeRecord_<K, V>) {\n if (this._changesHead === null) {\n this._changesHead = this._changesTail = record;\n } else {\n this._changesTail!._nextChanged = record;\n this._changesTail = record;\n }\n }\n\n /** @internal */\n private _forEach<K, V>(obj: Map<K, V>|{[k: string]: V}, fn: (v: V, k: any) => void) {\n if (obj instanceof Map) {\n obj.forEach(fn);\n } else {\n Object.keys(obj).forEach(k => fn(obj[k], k));\n }\n }\n}\n\nclass KeyValueChangeRecord_<K, V> implements KeyValueChangeRecord<K, V> {\n previousValue: V|null = null;\n currentValue: V|null = null;\n\n /** @internal */\n _nextPrevious: KeyValueChangeRecord_<K, V>|null = null;\n /** @internal */\n _next: KeyValueChangeRecord_<K, V>|null = null;\n /** @internal */\n _prev: KeyValueChangeRecord_<K, V>|null = null;\n /** @internal */\n _nextAdded: KeyValueChangeRecord_<K, V>|null = null;\n /** @internal */\n _nextRemoved: KeyValueChangeRecord_<K, V>|null = null;\n /** @internal */\n _nextChanged: KeyValueChangeRecord_<K, V>|null = null;\n\n constructor(public key: K) {}\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 {ɵɵdefineInjectable} from '../../di/interface/defs';\nimport {StaticProvider} from '../../di/interface/provider';\nimport {Optional, SkipSelf} from '../../di/metadata';\nimport {DefaultIterableDifferFactory} from '../differs/default_iterable_differ';\n\n\n\n/**\n * A type describing supported iterable types.\n *\n * @publicApi\n */\nexport type NgIterable<T> = Array<T>|Iterable<T>;\n\n/**\n * A strategy for tracking changes over time to an iterable. Used by {@link NgForOf} to\n * respond to changes in an iterable by effecting equivalent changes in the DOM.\n *\n * @publicApi\n */\nexport interface IterableDiffer<V> {\n /**\n * Compute a difference between the previous state and the new `object` state.\n *\n * @param object containing the new value.\n * @returns an object describing the difference. The return value is only valid until the next\n * `diff()` invocation.\n */\n diff(object: NgIterable<V>|undefined|null): IterableChanges<V>|null;\n}\n\n/**\n * An object describing the changes in the `Iterable` collection since last time\n * `IterableDiffer#diff()` was invoked.\n *\n * @publicApi\n */\nexport interface IterableChanges<V> {\n /**\n * Iterate over all changes. `IterableChangeRecord` will contain information about changes\n * to each item.\n */\n forEachItem(fn: (record: IterableChangeRecord<V>) => void): void;\n\n /**\n * Iterate over a set of operations which when applied to the original `Iterable` will produce the\n * new `Iterable`.\n *\n * NOTE: These are not necessarily the actual operations which were applied to the original\n * `Iterable`, rather these are a set of computed operations which may not be the same as the\n * ones applied.\n *\n * @param record A change which needs to be applied\n * @param previousIndex The `IterableChangeRecord#previousIndex` of the `record` refers to the\n * original `Iterable` location, where as `previousIndex` refers to the transient location\n * of the item, after applying the operations up to this point.\n * @param currentIndex The `IterableChangeRecord#currentIndex` of the `record` refers to the\n * original `Iterable` location, where as `currentIndex` refers to the transient location\n * of the item, after applying the operations up to this point.\n */\n forEachOperation(\n fn:\n (record: IterableChangeRecord<V>, previousIndex: number|null,\n currentIndex: number|null) => void): void;\n\n /**\n * Iterate over changes in the order of original `Iterable` showing where the original items\n * have moved.\n */\n forEachPreviousItem(fn: (record: IterableChangeRecord<V>) => void): void;\n\n /** Iterate over all added items. */\n forEachAddedItem(fn: (record: IterableChangeRecord<V>) => void): void;\n\n /** Iterate over all moved items. */\n forEachMovedItem(fn: (record: IterableChangeRecord<V>) => void): void;\n\n /** Iterate over all removed items. */\n forEachRemovedItem(fn: (record: IterableChangeRecord<V>) => void): void;\n\n /**\n * Iterate over all items which had their identity (as computed by the `TrackByFunction`)\n * changed.\n */\n forEachIdentityChange(fn: (record: IterableChangeRecord<V>) => void): void;\n}\n\n/**\n * Record representing the item change information.\n *\n * @publicApi\n */\nexport interface IterableChangeRecord<V> {\n /** Current index of the item in `Iterable` or null if removed. */\n readonly currentIndex: number|null;\n\n /** Previous index of the item in `Iterable` or null if added. */\n readonly previousIndex: number|null;\n\n /** The item. */\n readonly item: V;\n\n /** Track by identity as computed by the `TrackByFunction`. */\n readonly trackById: any;\n}\n\n/**\n * A function optionally passed into the `NgForOf` directive to customize how `NgForOf` uniquely\n * identifies items in an iterable.\n *\n * `NgForOf` needs to uniquely identify items in the iterable to correctly perform DOM updates\n * when items in the iterable are reordered, new items are added, or existing items are removed.\n *\n *\n * In all of these scenarios it is usually desirable to only update the DOM elements associated\n * with the items affected by the change. This behavior is important to:\n *\n * - preserve any DOM-specific UI state (like cursor position, focus, text selection) when the\n * iterable is modified\n * - enable animation of item addition, removal, and iterable reordering\n * - preserve the value of the `<select>` element when nested `<option>` elements are dynamically\n * populated using `NgForOf` and the bound iterable is updated\n *\n * A common use for custom `trackBy` functions is when the model that `NgForOf` iterates over\n * contains a property with a unique identifier. For example, given a model:\n *\n * ```ts\n * class User {\n * id: number;\n * name: string;\n * ...\n * }\n * ```\n * a custom `trackBy` function could look like the following:\n * ```ts\n * function userTrackBy(index, user) {\n * return user.id;\n * }\n * ```\n *\n * A custom `trackBy` function must have several properties:\n *\n * - be [idempotent](https://en.wikipedia.org/wiki/Idempotence) (be without side effects, and always\n * return the same value for a given input)\n * - return unique value for all unique inputs\n * - be fast\n *\n * @see [`NgForOf#ngForTrackBy`](api/common/NgForOf#ngForTrackBy)\n * @publicApi\n */\nexport interface TrackByFunction<T> {\n // Note: the type parameter `U` enables more accurate template type checking in case a trackBy\n // function is declared using a base type of the iterated type. The `U` type gives TypeScript\n // additional freedom to infer a narrower type for the `item` parameter type, instead of imposing\n // the trackBy's declared item type as the inferred type for `T`.\n // See https://github.com/angular/angular/issues/40125\n\n /**\n * @param index The index of the item within the iterable.\n * @param item The item in the iterable.\n */\n <U extends T>(index: number, item: T&U): any;\n}\n\n/**\n * Provides a factory for {@link IterableDiffer}.\n *\n * @publicApi\n */\nexport interface IterableDifferFactory {\n supports(objects: any): boolean;\n create<V>(trackByFn?: TrackByFunction<V>): IterableDiffer<V>;\n}\n\nexport function defaultIterableDiffersFactory() {\n return new IterableDiffers([new DefaultIterableDifferFactory()]);\n}\n\n/**\n * A repository of different iterable diffing strategies used by NgFor, NgClass, and others.\n *\n * @publicApi\n */\nexport class IterableDiffers {\n /** @nocollapse */\n static ɵprov = /** @pureOrBreakMyCode */ ɵɵdefineInjectable(\n {token: IterableDiffers, providedIn: 'root', factory: defaultIterableDiffersFactory});\n\n /**\n * @deprecated v4.0.0 - Should be private\n */\n factories: IterableDifferFactory[];\n constructor(factories: IterableDifferFactory[]) {\n this.factories = factories;\n }\n\n static create(factories: IterableDifferFactory[], parent?: IterableDiffers): IterableDiffers {\n if (parent != null) {\n const copied = parent.factories.slice();\n factories = factories.concat(copied);\n }\n\n return new IterableDiffers(factories);\n }\n\n /**\n * Takes an array of {@link IterableDifferFactory} and returns a provider used to extend the\n * inherited {@link IterableDiffers} instance with the provided factories and return a new\n * {@link IterableDiffers} instance.\n *\n * @usageNotes\n * ### Example\n *\n * The following example shows how to extend an existing list of factories,\n * which will only be applied to the injector for this component and its children.\n * This step is all that's required to make a new {@link IterableDiffer} available.\n *\n * ```\n * @Component({\n * viewProviders: [\n * IterableDiffers.extend([new ImmutableListDiffer()])\n * ]\n * })\n * ```\n */\n static extend(factories: IterableDifferFactory[]): StaticProvider {\n return {\n provide: IterableDiffers,\n useFactory: (parent: IterableDiffers|null) => {\n // if parent is null, it means that we are in the root injector and we have just overridden\n // the default injection mechanism for IterableDiffers, in such a case just assume\n // `defaultIterableDiffersFactory`.\n return IterableDiffers.create(factories, parent || defaultIterableDiffersFactory());\n },\n // Dependency technically isn't optional, but we can provide a better error message this way.\n deps: [[IterableDiffers, new SkipSelf(), new Optional()]]\n };\n }\n\n find(iterable: any): IterableDifferFactory {\n const factory = this.factories.find(f => f.supports(iterable));\n if (factory != null) {\n return factory;\n } else {\n throw new Error(`Cannot find a differ supporting object '${iterable}' of type '${\n getTypeNameForDebugging(iterable)}'`);\n }\n }\n}\n\nexport function getTypeNameForDebugging(type: any): string {\n return type['name'] || typeof type;\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 {Optional, SkipSelf, StaticProvider, ɵɵdefineInjectable} from '../../di';\nimport {DefaultKeyValueDifferFactory} from './default_keyvalue_differ';\n\n\n/**\n * A differ that tracks changes made to an object over time.\n *\n * @publicApi\n */\nexport interface KeyValueDiffer<K, V> {\n /**\n * Compute a difference between the previous state and the new `object` state.\n *\n * @param object containing the new value.\n * @returns an object describing the difference. The return value is only valid until the next\n * `diff()` invocation.\n */\n diff(object: Map<K, V>): KeyValueChanges<K, V>|null;\n\n /**\n * Compute a difference between the previous state and the new `object` state.\n *\n * @param object containing the new value.\n * @returns an object describing the difference. The return value is only valid until the next\n * `diff()` invocation.\n */\n diff(object: {[key: string]: V}): KeyValueChanges<string, V>|null;\n // TODO(TS2.1): diff<KP extends string>(this: KeyValueDiffer<KP, V>, object: Record<KP, V>):\n // KeyValueDiffer<KP, V>;\n}\n\n/**\n * An object describing the changes in the `Map` or `{[k:string]: string}` since last time\n * `KeyValueDiffer#diff()` was invoked.\n *\n * @publicApi\n */\nexport interface KeyValueChanges<K, V> {\n /**\n * Iterate over all changes. `KeyValueChangeRecord` will contain information about changes\n * to each item.\n */\n forEachItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;\n\n /**\n * Iterate over changes in the order of original Map showing where the original items\n * have moved.\n */\n forEachPreviousItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;\n\n /**\n * Iterate over all keys for which values have changed.\n */\n forEachChangedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;\n\n /**\n * Iterate over all added items.\n */\n forEachAddedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;\n\n /**\n * Iterate over all removed items.\n */\n forEachRemovedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;\n}\n\n/**\n * Record representing the item change information.\n *\n * @publicApi\n */\nexport interface KeyValueChangeRecord<K, V> {\n /**\n * Current key in the Map.\n */\n readonly key: K;\n\n /**\n * Current value for the key or `null` if removed.\n */\n readonly currentValue: V|null;\n\n /**\n * Previous value for the key or `null` if added.\n */\n readonly previousValue: V|null;\n}\n\n/**\n * Provides a factory for {@link KeyValueDiffer}.\n *\n * @publicApi\n */\nexport interface KeyValueDifferFactory {\n /**\n * Test to see if the differ knows how to diff this kind of object.\n */\n supports(objects: any): boolean;\n\n /**\n * Create a `KeyValueDiffer`.\n */\n create<K, V>(): KeyValueDiffer<K, V>;\n}\n\nexport function defaultKeyValueDiffersFactory() {\n return new KeyValueDiffers([new DefaultKeyValueDifferFactory()]);\n}\n\n/**\n * A repository of different Map diffing strategies used by NgClass, NgStyle, and others.\n *\n * @publicApi\n */\nexport class KeyValueDiffers {\n /** @nocollapse */\n static ɵprov = /** @pureOrBreakMyCode */ ɵɵdefineInjectable(\n {token: KeyValueDiffers, providedIn: 'root', factory: defaultKeyValueDiffersFactory});\n\n /**\n * @deprecated v4.0.0 - Should be private.\n */\n factories: KeyValueDifferFactory[];\n\n constructor(factories: KeyValueDifferFactory[]) {\n this.factories = factories;\n }\n\n static create<S>(factories: KeyValueDifferFactory[], parent?: KeyValueDiffers): KeyValueDiffers {\n if (parent) {\n const copied = parent.factories.slice();\n factories = factories.concat(copied);\n }\n return new KeyValueDiffers(factories);\n }\n\n /**\n * Takes an array of {@link KeyValueDifferFactory} and returns a provider used to extend the\n * inherited {@link KeyValueDiffers} instance with the provided factories and return a new\n * {@link KeyValueDiffers} instance.\n *\n * @usageNotes\n * ### Example\n *\n * The following example shows how to extend an existing list of factories,\n * which will only be applied to the injector for this component and its children.\n * This step is all that's required to make a new {@link KeyValueDiffer} available.\n *\n * ```\n * @Component({\n * viewProviders: [\n * KeyValueDiffers.extend([new ImmutableMapDiffer()])\n * ]\n * })\n * ```\n */\n static extend<S>(factories: KeyValueDifferFactory[]): StaticProvider {\n return {\n provide: KeyValueDiffers,\n useFactory: (parent: KeyValueDiffers) => {\n // if parent is null, it means that we are in the root injector and we have just overridden\n // the default injection mechanism for KeyValueDiffers, in such a case just assume\n // `defaultKeyValueDiffersFactory`.\n return KeyValueDiffers.create(factories, parent || defaultKeyValueDiffersFactory());\n },\n // Dependency technically isn't optional, but we can provide a better error message this way.\n deps: [[KeyValueDiffers, new SkipSelf(), new Optional()]]\n };\n }\n\n find(kv: any): KeyValueDifferFactory {\n const factory = this.factories.find(f => f.supports(kv));\n if (factory) {\n return factory;\n }\n throw new Error(`Cannot find a differ supporting object '${kv}'`);\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 {assertParentView} from './assert';\nimport {icuContainerIterate} from './i18n/i18n_tree_shaking';\nimport {CONTAINER_HEADER_OFFSET} from './interfaces/container';\nimport {TIcuContainerNode, TNode, TNodeType} from './interfaces/node';\nimport {RNode} from './interfaces/renderer_dom';\nimport {isLContainer} from './interfaces/type_checks';\nimport {DECLARATION_COMPONENT_VIEW, LView, T_HOST, TVIEW, TView} from './interfaces/view';\nimport {assertTNodeType} from './node_assert';\nimport {getProjectionNodes} from './node_manipulation';\nimport {getLViewParent} from './util/view_traversal_utils';\nimport {unwrapRNode} from './util/view_utils';\n\n\n\nexport function collectNativeNodes(\n tView: TView, lView: LView, tNode: TNode|null, result: any[],\n isProjection: boolean = false): any[] {\n while (tNode !== null) {\n ngDevMode &&\n assertTNodeType(\n tNode,\n TNodeType.AnyRNode | TNodeType.AnyContainer | TNodeType.Projection | TNodeType.Icu);\n\n const lNode = lView[tNode.index];\n if (lNode !== null) {\n result.push(unwrapRNode(lNode));\n }\n\n // A given lNode can represent either a native node or a LContainer (when it is a host of a\n // ViewContainerRef). When we find a LContainer we need to descend into it to collect root nodes\n // from the views in this container.\n if (isLContainer(lNode)) {\n for (let i = CONTAINER_HEADER_OFFSET; i < lNode.length; i++) {\n const lViewInAContainer = lNode[i];\n const lViewFirstChildTNode = lViewInAContainer[TVIEW].firstChild;\n if (lViewFirstChildTNode !== null) {\n collectNativeNodes(\n lViewInAContainer[TVIEW], lViewInAContainer, lViewFirstChildTNode, result);\n }\n }\n }\n\n const tNodeType = tNode.type;\n if (tNodeType & TNodeType.ElementContainer) {\n collectNativeNodes(tView, lView, tNode.child, result);\n } else if (tNodeType & TNodeType.Icu) {\n const nextRNode = icuContainerIterate(tNode as TIcuContainerNode, lView);\n let rNode: RNode|null;\n while (rNode = nextRNode()) {\n result.push(rNode);\n }\n } else if (tNodeType & TNodeType.Projection) {\n const nodesInSlot = getProjectionNodes(lView, tNode);\n if (Array.isArray(nodesInSlot)) {\n result.push(...nodesInSlot);\n } else {\n const parentView = getLViewParent(lView[DECLARATION_COMPONENT_VIEW])!;\n ngDevMode && assertParentView(parentView);\n collectNativeNodes(parentView[TVIEW], parentView, nodesInSlot, result, true);\n }\n }\n tNode = isProjection ? tNode.projectionNext : tNode.next;\n }\n\n return result;\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 {ChangeDetectorRef as viewEngine_ChangeDetectorRef} from '../change_detection/change_detector_ref';\nimport {EmbeddedViewRef as viewEngine_EmbeddedViewRef, InternalViewRef as viewEngine_InternalViewRef, ViewRefTracker} from '../linker/view_ref';\nimport {removeFromArray} from '../util/array_utils';\nimport {assertEqual} from '../util/assert';\nimport {collectNativeNodes} from './collect_native_nodes';\nimport {checkNoChangesInRootView, checkNoChangesInternal, detectChangesInRootView, detectChangesInternal, markViewDirty, storeCleanupWithContext} from './instructions/shared';\nimport {CONTAINER_HEADER_OFFSET, VIEW_REFS} from './interfaces/container';\nimport {isLContainer} from './interfaces/type_checks';\nimport {CONTEXT, FLAGS, LView, LViewFlags, PARENT, TVIEW} from './interfaces/view';\nimport {destroyLView, detachView, renderDetachView} from './node_manipulation';\n\n\n\n// Needed due to tsickle downleveling where multiple `implements` with classes creates\n// multiple @extends in Closure annotations, which is illegal. This workaround fixes\n// the multiple @extends by making the annotation @implements instead\nexport interface viewEngine_ChangeDetectorRef_interface extends viewEngine_ChangeDetectorRef {}\n\nexport class ViewRef<T> implements viewEngine_EmbeddedViewRef<T>, viewEngine_InternalViewRef,\n viewEngine_ChangeDetectorRef_interface {\n private _appRef: ViewRefTracker|null = null;\n private _attachedToViewContainer = false;\n\n get rootNodes(): any[] {\n const lView = this._lView;\n const tView = lView[TVIEW];\n return collectNativeNodes(tView, lView, tView.firstChild, []);\n }\n\n constructor(\n /**\n * This represents `LView` associated with the component when ViewRef is a ChangeDetectorRef.\n *\n * When ViewRef is created for a dynamic component, this also represents the `LView` for the\n * component.\n *\n * For a \"regular\" ViewRef created for an embedded view, this is the `LView` for the embedded\n * view.\n *\n * @internal\n */\n public _lView: LView,\n\n /**\n * This represents the `LView` associated with the point where `ChangeDetectorRef` was\n * requested.\n *\n * This may be different from `_lView` if the `_cdRefInjectingView` is an embedded view.\n */\n private _cdRefInjectingView?: LView) {}\n\n get context(): T {\n return this._lView[CONTEXT] as T;\n }\n\n set context(value: T) {\n this._lView[CONTEXT] = value;\n }\n\n get destroyed(): boolean {\n return (this._lView[FLAGS] & LViewFlags.Destroyed) === LViewFlags.Destroyed;\n }\n\n destroy(): void {\n if (this._appRef) {\n this._appRef.detachView(this);\n } else if (this._attachedToViewContainer) {\n const parent = this._lView[PARENT];\n if (isLContainer(parent)) {\n const viewRefs = parent[VIEW_REFS] as ViewRef<unknown>[] | null;\n const index = viewRefs ? viewRefs.indexOf(this) : -1;\n if (index > -1) {\n ngDevMode &&\n assertEqual(\n index, parent.indexOf(this._lView) - CONTAINER_HEADER_OFFSET,\n 'An attached view should be in the same position within its container as its ViewRef in the VIEW_REFS array.');\n detachView(parent, index);\n removeFromArray(viewRefs!, index);\n }\n }\n this._attachedToViewContainer = false;\n }\n destroyLView(this._lView[TVIEW], this._lView);\n }\n\n onDestroy(callback: Function) {\n storeCleanupWithContext(this._lView[TVIEW], this._lView, null, callback);\n }\n\n /**\n * Marks a view and all of its ancestors dirty.\n *\n * This can be used to ensure an {@link ChangeDetectionStrategy#OnPush OnPush} component is\n * checked when it needs to be re-rendered but the two normal triggers haven't marked it\n * dirty (i.e. inputs haven't changed and events haven't fired in the view).\n *\n * <!-- TODO: Add a link to a chapter on OnPush components -->\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Component({\n * selector: 'app-root',\n * template: `Number of ticks: {{numberOfTicks}}`\n * changeDetection: ChangeDetectionStrategy.OnPush,\n * })\n * class AppComponent {\n * numberOfTicks = 0;\n *\n * constructor(private ref: ChangeDetectorRef) {\n * setInterval(() => {\n * this.numberOfTicks++;\n * // the following is required, otherwise the view will not be updated\n * this.ref.markForCheck();\n * }, 1000);\n * }\n * }\n * ```\n */\n markForCheck(): void {\n markViewDirty(this._cdRefInjectingView || this._lView);\n }\n\n /**\n * Detaches the view from the change detection tree.\n *\n * Detached views will not be checked during change detection runs until they are\n * re-attached, even if they are dirty. `detach` can be used in combination with\n * {@link ChangeDetectorRef#detectChanges detectChanges} to implement local change\n * detection checks.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n *\n * @usageNotes\n * ### Example\n *\n * The following example defines a component with a large list of readonly data.\n * Imagine the data changes constantly, many times per second. For performance reasons,\n * we want to check and update the list every five seconds. We can do that by detaching\n * the component's change detector and doing a local check every five seconds.\n *\n * ```typescript\n * class DataProvider {\n * // in a real application the returned data will be different every time\n * get data() {\n * return [1,2,3,4,5];\n * }\n * }\n *\n * @Component({\n * selector: 'giant-list',\n * template: `\n * <li *ngFor=\"let d of dataProvider.data\">Data {{d}}</li>\n * `,\n * })\n * class GiantList {\n * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {\n * ref.detach();\n * setInterval(() => {\n * this.ref.detectChanges();\n * }, 5000);\n * }\n * }\n *\n * @Component({\n * selector: 'app',\n * providers: [DataProvider],\n * template: `\n * <giant-list><giant-list>\n * `,\n * })\n * class App {\n * }\n * ```\n */\n detach(): void {\n this._lView[FLAGS] &= ~LViewFlags.Attached;\n }\n\n /**\n * Re-attaches a view to the change detection tree.\n *\n * This can be used to re-attach views that were previously detached from the tree\n * using {@link ChangeDetectorRef#detach detach}. Views are attached to the tree by default.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n *\n * @usageNotes\n * ### Example\n *\n * The following example creates a component displaying `live` data. The component will detach\n * its change detector from the main change detector tree when the component's live property\n * is set to false.\n *\n * ```typescript\n * class DataProvider {\n * data = 1;\n *\n * constructor() {\n * setInterval(() => {\n * this.data = this.data * 2;\n * }, 500);\n * }\n * }\n *\n * @Component({\n * selector: 'live-data',\n * inputs: ['live'],\n * template: 'Data: {{dataProvider.data}}'\n * })\n * class LiveData {\n * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {}\n *\n * set live(value) {\n * if (value) {\n * this.ref.reattach();\n * } else {\n * this.ref.detach();\n * }\n * }\n * }\n *\n * @Component({\n * selector: 'app-root',\n * providers: [DataProvider],\n * template: `\n * Live Update: <input type=\"checkbox\" [(ngModel)]=\"live\">\n * <live-data [live]=\"live\"><live-data>\n * `,\n * })\n * class AppComponent {\n * live = true;\n * }\n * ```\n */\n reattach(): void {\n this._lView[FLAGS] |= LViewFlags.Attached;\n }\n\n /**\n * Checks the view and its children.\n *\n * This can also be used in combination with {@link ChangeDetectorRef#detach detach} to implement\n * local change detection checks.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n *\n * @usageNotes\n * ### Example\n *\n * The following example defines a component with a large list of readonly data.\n * Imagine, the data changes constantly, many times per second. For performance reasons,\n * we want to check and update the list every five seconds.\n *\n * We can do that by detaching the component's change detector and doing a local change detection\n * check every five seconds.\n *\n * See {@link ChangeDetectorRef#detach detach} for more information.\n */\n detectChanges(): void {\n detectChangesInternal(this._lView[TVIEW], this._lView, this.context);\n }\n\n /**\n * Checks the change detector and its children, and throws if any changes are detected.\n *\n * This is used in development mode to verify that running change detection doesn't\n * introduce other changes.\n */\n checkNoChanges(): void {\n checkNoChangesInternal(this._lView[TVIEW], this._lView, this.context);\n }\n\n attachToViewContainerRef() {\n if (this._appRef) {\n throw new Error('This view is already attached directly to the ApplicationRef!');\n }\n this._attachedToViewContainer = true;\n }\n\n detachFromAppRef() {\n this._appRef = null;\n renderDetachView(this._lView[TVIEW], this._lView);\n }\n\n attachToAppRef(appRef: ViewRefTracker) {\n if (this._attachedToViewContainer) {\n throw new Error('This view is already attached to a ViewContainer!');\n }\n this._appRef = appRef;\n }\n}\n\n/** @internal */\nexport class RootViewRef<T> extends ViewRef<T> {\n constructor(public _view: LView) {\n super(_view);\n }\n\n override detectChanges(): void {\n detectChangesInRootView(this._view);\n }\n\n override checkNoChanges(): void {\n checkNoChangesInRootView(this._view);\n }\n\n override get context(): T {\n return null!;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectFlags} from '../di';\nimport {InternalInjectFlags} from '../di/interface/injector';\nimport {TNode, TNodeType} from '../render3/interfaces/node';\nimport {isComponentHost} from '../render3/interfaces/type_checks';\nimport {DECLARATION_COMPONENT_VIEW, LView} from '../render3/interfaces/view';\nimport {getCurrentTNode, getLView} from '../render3/state';\nimport {getComponentLViewByIndex} from '../render3/util/view_utils';\nimport {ViewRef as R3_ViewRef} from '../render3/view_ref';\nimport {noop} from '../util/noop';\n\nexport const SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__ = injectChangeDetectorRef;\nconst SWITCH_CHANGE_DETECTOR_REF_FACTORY__PRE_R3__ = noop;\nconst SWITCH_CHANGE_DETECTOR_REF_FACTORY: typeof injectChangeDetectorRef =\n SWITCH_CHANGE_DETECTOR_REF_FACTORY__PRE_R3__;\n\n/**\n * Base class that provides change detection functionality.\n * A change-detection tree collects all views that are to be checked for changes.\n * Use the methods to add and remove views from the tree, initiate change-detection,\n * and explicitly mark views as _dirty_, meaning that they have changed and need to be re-rendered.\n *\n * @see [Using change detection hooks](guide/lifecycle-hooks#using-change-detection-hooks)\n * @see [Defining custom change detection](guide/lifecycle-hooks#defining-custom-change-detection)\n *\n * @usageNotes\n *\n * The following examples demonstrate how to modify default change-detection behavior\n * to perform explicit detection when needed.\n *\n * ### Use `markForCheck()` with `CheckOnce` strategy\n *\n * The following example sets the `OnPush` change-detection strategy for a component\n * (`CheckOnce`, rather than the default `CheckAlways`), then forces a second check\n * after an interval. See [live demo](https://plnkr.co/edit/GC512b?p=preview).\n *\n * <code-example path=\"core/ts/change_detect/change-detection.ts\"\n * region=\"mark-for-check\"></code-example>\n *\n * ### Detach change detector to limit how often check occurs\n *\n * The following example defines a component with a large list of read-only data\n * that is expected to change constantly, many times per second.\n * To improve performance, we want to check and update the list\n * less often than the changes actually occur. To do that, we detach\n * the component's change detector and perform an explicit local check every five seconds.\n *\n * <code-example path=\"core/ts/change_detect/change-detection.ts\" region=\"detach\"></code-example>\n *\n *\n * ### Reattaching a detached component\n *\n * The following example creates a component displaying live data.\n * The component detaches its change detector from the main change detector tree\n * when the `live` property is set to false, and reattaches it when the property\n * becomes true.\n *\n * <code-example path=\"core/ts/change_detect/change-detection.ts\" region=\"reattach\"></code-example>\n *\n * @publicApi\n */\nexport abstract class ChangeDetectorRef {\n /**\n * When a view uses the {@link ChangeDetectionStrategy#OnPush OnPush} (checkOnce)\n * change detection strategy, explicitly marks the view as changed so that\n * it can be checked again.\n *\n * Components are normally marked as dirty (in need of rerendering) when inputs\n * have changed or events have fired in the view. Call this method to ensure that\n * a component is checked even if these triggers have not occured.\n *\n * <!-- TODO: Add a link to a chapter on OnPush components -->\n *\n */\n abstract markForCheck(): void;\n\n /**\n * Detaches this view from the change-detection tree.\n * A detached view is not checked until it is reattached.\n * Use in combination with `detectChanges()` to implement local change detection checks.\n *\n * Detached views are not checked during change detection runs until they are\n * re-attached, even if they are marked as dirty.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n *\n */\n abstract detach(): void;\n\n /**\n * Checks this view and its children. Use in combination with {@link ChangeDetectorRef#detach\n * detach}\n * to implement local change detection checks.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n *\n */\n abstract detectChanges(): void;\n\n /**\n * Checks the change detector and its children, and throws if any changes are detected.\n *\n * Use in development mode to verify that running change detection doesn't introduce\n * other changes.\n */\n abstract checkNoChanges(): void;\n\n /**\n * Re-attaches the previously detached view to the change detection tree.\n * Views are attached to the tree by default.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n *\n */\n abstract reattach(): void;\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__:\n (flags: InjectFlags) => ChangeDetectorRef = SWITCH_CHANGE_DETECTOR_REF_FACTORY;\n}\n\n\n\n/** Returns a ChangeDetectorRef (a.k.a. a ViewRef) */\nexport function injectChangeDetectorRef(flags: InjectFlags): ChangeDetectorRef {\n return createViewRef(\n getCurrentTNode()!, getLView(),\n (flags & InternalInjectFlags.ForPipe) === InternalInjectFlags.ForPipe);\n}\n\n/**\n * Creates a ViewRef and stores it on the injector as ChangeDetectorRef (public alias).\n *\n * @param tNode The node that is requesting a ChangeDetectorRef\n * @param lView The view to which the node belongs\n * @param isPipe Whether the view is being injected into a pipe.\n * @returns The ChangeDetectorRef to use\n */\nfunction createViewRef(tNode: TNode, lView: LView, isPipe: boolean): ChangeDetectorRef {\n if (isComponentHost(tNode) && !isPipe) {\n // The LView represents the location where the component is declared.\n // Instead we want the LView for the component View and so we need to look it up.\n const componentView = getComponentLViewByIndex(tNode.index, lView); // look down\n return new R3_ViewRef(componentView, componentView);\n } else if (tNode.type & (TNodeType.AnyRNode | TNodeType.AnyContainer | TNodeType.Icu)) {\n // The LView represents the location where the injection is requested from.\n // We need to locate the containing LView (in case where the `lView` is an embedded view)\n const hostComponentView = lView[DECLARATION_COMPONENT_VIEW]; // look up\n return new R3_ViewRef(hostComponentView, lView);\n }\n return null!;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {DefaultIterableDifferFactory} from './differs/default_iterable_differ';\nimport {DefaultKeyValueDifferFactory} from './differs/default_keyvalue_differ';\nimport {IterableDifferFactory, IterableDiffers} from './differs/iterable_differs';\nimport {KeyValueDifferFactory, KeyValueDiffers} from './differs/keyvalue_differs';\n\nexport {SimpleChange, SimpleChanges} from '../interface/simple_change';\nexport {devModeEqual, WrappedValue} from './change_detection_util';\nexport {ChangeDetectorRef} from './change_detector_ref';\nexport {ChangeDetectionStrategy, ChangeDetectorStatus, isDefaultChangeDetectionStrategy} from './constants';\nexport {DefaultIterableDifferFactory} from './differs/default_iterable_differ';\nexport {DefaultIterableDiffer} from './differs/default_iterable_differ';\nexport {DefaultKeyValueDifferFactory} from './differs/default_keyvalue_differ';\nexport {IterableChangeRecord, IterableChanges, IterableDiffer, IterableDifferFactory, IterableDiffers, NgIterable, TrackByFunction} from './differs/iterable_differs';\nexport {KeyValueChangeRecord, KeyValueChanges, KeyValueDiffer, KeyValueDifferFactory, KeyValueDiffers} from './differs/keyvalue_differs';\nexport {PipeTransform} from './pipe_transform';\n\n\n\n/**\n * Structural diffing for `Object`s and `Map`s.\n */\nconst keyValDiff: KeyValueDifferFactory[] = [new DefaultKeyValueDifferFactory()];\n\n/**\n * Structural diffing for `Iterable` types such as `Array`s.\n */\nconst iterableDiff: IterableDifferFactory[] = [new DefaultIterableDifferFactory()];\n\nexport const defaultIterableDiffers = new IterableDiffers(iterableDiff);\n\nexport const defaultKeyValueDiffers = new KeyValueDiffers(keyValDiff);\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 {assertLContainer} from '../render3/assert';\nimport {createLView, renderView} from '../render3/instructions/shared';\nimport {TContainerNode, TNode, TNodeType} from '../render3/interfaces/node';\nimport {DECLARATION_LCONTAINER, LView, LViewFlags, QUERIES, TView} from '../render3/interfaces/view';\nimport {getCurrentTNode, getLView} from '../render3/state';\nimport {ViewRef as R3_ViewRef} from '../render3/view_ref';\nimport {assertDefined} from '../util/assert';\nimport {noop} from '../util/noop';\nimport {createElementRef, ElementRef} from './element_ref';\nimport {EmbeddedViewRef} from './view_ref';\n\n\n\nexport const SWITCH_TEMPLATE_REF_FACTORY__POST_R3__ = injectTemplateRef;\nconst SWITCH_TEMPLATE_REF_FACTORY__PRE_R3__ = noop;\nconst SWITCH_TEMPLATE_REF_FACTORY: typeof injectTemplateRef = SWITCH_TEMPLATE_REF_FACTORY__PRE_R3__;\n\n/**\n * Represents an embedded template that can be used to instantiate embedded views.\n * To instantiate embedded views based on a template, use the `ViewContainerRef`\n * method `createEmbeddedView()`.\n *\n * Access a `TemplateRef` instance by placing a directive on an `<ng-template>`\n * element (or directive prefixed with `*`). The `TemplateRef` for the embedded view\n * is injected into the constructor of the directive,\n * using the `TemplateRef` token.\n *\n * You can also use a `Query` to find a `TemplateRef` associated with\n * a component or a directive.\n *\n * @see `ViewContainerRef`\n * @see [Navigate the Component Tree with DI](guide/dependency-injection-navtree)\n *\n * @publicApi\n */\nexport abstract class TemplateRef<C> {\n /**\n * The anchor element in the parent view for this embedded view.\n *\n * The data-binding and injection contexts of embedded views created from this `TemplateRef`\n * inherit from the contexts of this location.\n *\n * Typically new embedded views are attached to the view container of this location, but in\n * advanced use-cases, the view can be attached to a different container while keeping the\n * data-binding and injection context from the original location.\n *\n */\n // TODO(i): rename to anchor or location\n abstract get elementRef(): ElementRef;\n\n /**\n * Instantiates an embedded view based on this template,\n * and attaches it to the view container.\n * @param context The data-binding context of the embedded view, as declared\n * in the `<ng-template>` usage.\n * @returns The new embedded view object.\n */\n abstract createEmbeddedView(context: C): EmbeddedViewRef<C>;\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__: () => TemplateRef<any>| null = SWITCH_TEMPLATE_REF_FACTORY;\n}\n\nconst ViewEngineTemplateRef = TemplateRef;\n\nconst R3TemplateRef = class TemplateRef<T> extends ViewEngineTemplateRef<T> {\n constructor(\n private _declarationLView: LView, private _declarationTContainer: TContainerNode,\n public elementRef: ElementRef) {\n super();\n }\n\n override createEmbeddedView(context: T): EmbeddedViewRef<T> {\n const embeddedTView = this._declarationTContainer.tViews as TView;\n const embeddedLView = createLView(\n this._declarationLView, embeddedTView, context, LViewFlags.CheckAlways, null,\n embeddedTView.declTNode, null, null, null, null);\n\n const declarationLContainer = this._declarationLView[this._declarationTContainer.index];\n ngDevMode && assertLContainer(declarationLContainer);\n embeddedLView[DECLARATION_LCONTAINER] = declarationLContainer;\n\n const declarationViewLQueries = this._declarationLView[QUERIES];\n if (declarationViewLQueries !== null) {\n embeddedLView[QUERIES] = declarationViewLQueries.createEmbeddedView(embeddedTView);\n }\n\n renderView(embeddedTView, embeddedLView, context);\n\n return new R3_ViewRef<T>(embeddedLView);\n }\n};\n\n/**\n * Creates a TemplateRef given a node.\n *\n * @returns The TemplateRef instance to use\n */\nexport function injectTemplateRef<T>(): TemplateRef<T>|null {\n return createTemplateRef<T>(getCurrentTNode()!, getLView());\n}\n\n/**\n * Creates a TemplateRef and stores it on the injector.\n *\n * @param hostTNode The node on which a TemplateRef is requested\n * @param hostLView The `LView` to which the node belongs\n * @returns The TemplateRef instance or null if we can't create a TemplateRef on a given node type\n */\nexport function createTemplateRef<T>(hostTNode: TNode, hostLView: LView): TemplateRef<T>|null {\n if (hostTNode.type & TNodeType.Container) {\n ngDevMode && assertDefined(hostTNode.tViews, 'TView must be allocated');\n return new R3TemplateRef(\n hostLView, hostTNode as TContainerNode, createElementRef(hostTNode, hostLView));\n }\n return null;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '../di/injector';\nimport {Type} from '../interface/type';\n\nimport {ComponentFactoryResolver} from './component_factory_resolver';\n\n\n/**\n * Represents an instance of an `NgModule` created by an `NgModuleFactory`.\n * Provides access to the `NgModule` instance and related objects.\n *\n * @publicApi\n */\nexport abstract class NgModuleRef<T> {\n /**\n * The injector that contains all of the providers of the `NgModule`.\n */\n abstract get injector(): Injector;\n\n /**\n * The resolver that can retrieve the component factories\n * declared in the `entryComponents` property of the module.\n */\n abstract get componentFactoryResolver(): ComponentFactoryResolver;\n\n /**\n * The `NgModule` instance.\n */\n abstract get instance(): T;\n\n /**\n * Destroys the module instance and all of the data structures associated with it.\n */\n abstract destroy(): void;\n\n /**\n * Registers a callback to be executed when the module is destroyed.\n */\n abstract onDestroy(callback: () => void): void;\n}\n\nexport interface InternalNgModuleRef<T> extends NgModuleRef<T> {\n // Note: we are using the prefix _ as NgModuleData is an NgModuleRef and therefore directly\n // exposed to the user.\n _bootstrapComponents: Type<any>[];\n}\n\n/**\n * @publicApi\n */\nexport abstract class NgModuleFactory<T> {\n abstract get moduleType(): Type<T>;\n abstract create(parentInjector: Injector|null): NgModuleRef<T>;\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 '../di/injector';\nimport {assertNodeInjector} from '../render3/assert';\nimport {getParentInjectorLocation, NodeInjector} from '../render3/di';\nimport {addToViewTree, createLContainer} from '../render3/instructions/shared';\nimport {CONTAINER_HEADER_OFFSET, LContainer, NATIVE, VIEW_REFS} from '../render3/interfaces/container';\nimport {NodeInjectorOffset} from '../render3/interfaces/injector';\nimport {TContainerNode, TDirectiveHostNode, TElementContainerNode, TElementNode, TNodeType} from '../render3/interfaces/node';\nimport {RComment, RElement} from '../render3/interfaces/renderer_dom';\nimport {isLContainer} from '../render3/interfaces/type_checks';\nimport {LView, PARENT, RENDERER, T_HOST, TVIEW} from '../render3/interfaces/view';\nimport {assertTNodeType} from '../render3/node_assert';\nimport {addViewToContainer, destroyLView, detachView, getBeforeNodeForView, insertView, nativeInsertBefore, nativeNextSibling, nativeParentNode} from '../render3/node_manipulation';\nimport {getCurrentTNode, getLView} from '../render3/state';\nimport {getParentInjectorIndex, getParentInjectorView, hasParentInjector} from '../render3/util/injector_utils';\nimport {getNativeByTNode, unwrapRNode, viewAttachedToContainer} from '../render3/util/view_utils';\nimport {ViewRef as R3ViewRef} from '../render3/view_ref';\nimport {addToArray, removeFromArray} from '../util/array_utils';\nimport {assertEqual, assertGreaterThan, assertLessThan} from '../util/assert';\nimport {noop} from '../util/noop';\nimport {ComponentFactory, ComponentRef} from './component_factory';\nimport {createElementRef, ElementRef} from './element_ref';\nimport {NgModuleRef} from './ng_module_factory';\nimport {TemplateRef} from './template_ref';\nimport {EmbeddedViewRef, ViewRef} from './view_ref';\n\n\nexport const SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__ = injectViewContainerRef;\nconst SWITCH_VIEW_CONTAINER_REF_FACTORY__PRE_R3__ = noop as typeof injectViewContainerRef;\nconst SWITCH_VIEW_CONTAINER_REF_FACTORY: typeof injectViewContainerRef =\n SWITCH_VIEW_CONTAINER_REF_FACTORY__PRE_R3__;\n\n/**\n * Represents a container where one or more views can be attached to a component.\n *\n * Can contain *host views* (created by instantiating a\n * component with the `createComponent()` method), and *embedded views*\n * (created by instantiating a `TemplateRef` with the `createEmbeddedView()` method).\n *\n * A view container instance can contain other view containers,\n * creating a [view hierarchy](guide/glossary#view-tree).\n *\n * @see `ComponentRef`\n * @see `EmbeddedViewRef`\n *\n * @publicApi\n */\nexport abstract class ViewContainerRef {\n /**\n * Anchor element that specifies the location of this container in the containing view.\n * Each view container can have only one anchor element, and each anchor element\n * can have only a single view container.\n *\n * Root elements of views attached to this container become siblings of the anchor element in\n * the rendered view.\n *\n * Access the `ViewContainerRef` of an element by placing a `Directive` injected\n * with `ViewContainerRef` on the element, or use a `ViewChild` query.\n *\n * <!-- TODO: rename to anchorElement -->\n */\n abstract get element(): ElementRef;\n\n /**\n * The [dependency injector](guide/glossary#injector) for this view container.\n */\n abstract get injector(): Injector;\n\n /** @deprecated No replacement */\n abstract get parentInjector(): Injector;\n\n /**\n * Destroys all views in this container.\n */\n abstract clear(): void;\n\n /**\n * Retrieves a view from this container.\n * @param index The 0-based index of the view to retrieve.\n * @returns The `ViewRef` instance, or null if the index is out of range.\n */\n abstract get(index: number): ViewRef|null;\n\n /**\n * Reports how many views are currently attached to this container.\n * @returns The number of views.\n */\n abstract get length(): number;\n\n /**\n * Instantiates an embedded view and inserts it\n * into this container.\n * @param templateRef The HTML template that defines the view.\n * @param context The data-binding context of the embedded view, as declared\n * in the `<ng-template>` usage.\n * @param index The 0-based index at which to insert the new view into this container.\n * If not specified, appends the new view as the last entry.\n *\n * @returns The `ViewRef` instance for the newly created view.\n */\n abstract createEmbeddedView<C>(templateRef: TemplateRef<C>, context?: C, index?: number):\n EmbeddedViewRef<C>;\n\n /**\n * Instantiates a single component and inserts its host view into this container.\n *\n * @param componentFactory The factory to use.\n * @param index The index at which to insert the new component's host view into this container.\n * If not specified, appends the new view as the last entry.\n * @param injector The injector to use as the parent for the new component.\n * @param projectableNodes\n * @param ngModule\n *\n * @returns The new component instance, containing the host view.\n *\n */\n abstract createComponent<C>(\n componentFactory: ComponentFactory<C>, index?: number, injector?: Injector,\n projectableNodes?: any[][], ngModule?: NgModuleRef<any>): ComponentRef<C>;\n\n /**\n * Inserts a view into this container.\n * @param viewRef The view to insert.\n * @param index The 0-based index at which to insert the view.\n * If not specified, appends the new view as the last entry.\n * @returns The inserted `ViewRef` instance.\n *\n */\n abstract insert(viewRef: ViewRef, index?: number): ViewRef;\n\n /**\n * Moves a view to a new location in this container.\n * @param viewRef The view to move.\n * @param index The 0-based index of the new location.\n * @returns The moved `ViewRef` instance.\n */\n abstract move(viewRef: ViewRef, currentIndex: number): ViewRef;\n\n /**\n * Returns the index of a view within the current container.\n * @param viewRef The view to query.\n * @returns The 0-based index of the view's position in this container,\n * or `-1` if this container doesn't contain the view.\n */\n abstract indexOf(viewRef: ViewRef): number;\n\n /**\n * Destroys a view attached to this container\n * @param index The 0-based index of the view to destroy.\n * If not specified, the last view in the container is removed.\n */\n abstract remove(index?: number): void;\n\n /**\n * Detaches a view from this container without destroying it.\n * Use along with `insert()` to move a view within the current container.\n * @param index The 0-based index of the view to detach.\n * If not specified, the last view in the container is detached.\n */\n abstract detach(index?: number): ViewRef|null;\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__: () => ViewContainerRef = SWITCH_VIEW_CONTAINER_REF_FACTORY;\n}\n\n/**\n * Creates a ViewContainerRef and stores it on the injector. Or, if the ViewContainerRef\n * already exists, retrieves the existing ViewContainerRef.\n *\n * @returns The ViewContainerRef instance to use\n */\nexport function injectViewContainerRef(): ViewContainerRef {\n const previousTNode = getCurrentTNode() as TElementNode | TElementContainerNode | TContainerNode;\n return createContainerRef(previousTNode, getLView());\n}\n\nconst VE_ViewContainerRef = ViewContainerRef;\n\nconst R3ViewContainerRef = class ViewContainerRef extends VE_ViewContainerRef {\n constructor(\n private _lContainer: LContainer,\n private _hostTNode: TElementNode|TContainerNode|TElementContainerNode,\n private _hostLView: LView) {\n super();\n }\n\n override get element(): ElementRef {\n return createElementRef(this._hostTNode, this._hostLView);\n }\n\n override get injector(): Injector {\n return new NodeInjector(this._hostTNode, this._hostLView);\n }\n\n /** @deprecated No replacement */\n override get parentInjector(): Injector {\n const parentLocation = getParentInjectorLocation(this._hostTNode, this._hostLView);\n if (hasParentInjector(parentLocation)) {\n const parentView = getParentInjectorView(parentLocation, this._hostLView);\n const injectorIndex = getParentInjectorIndex(parentLocation);\n ngDevMode && assertNodeInjector(parentView, injectorIndex);\n const parentTNode =\n parentView[TVIEW].data[injectorIndex + NodeInjectorOffset.TNODE] as TElementNode;\n return new NodeInjector(parentTNode, parentView);\n } else {\n return new NodeInjector(null, this._hostLView);\n }\n }\n\n override clear(): void {\n while (this.length > 0) {\n this.remove(this.length - 1);\n }\n }\n\n override get(index: number): ViewRef|null {\n const viewRefs = getViewRefs(this._lContainer);\n return viewRefs !== null && viewRefs[index] || null;\n }\n\n override get length(): number {\n return this._lContainer.length - CONTAINER_HEADER_OFFSET;\n }\n\n override createEmbeddedView<C>(templateRef: TemplateRef<C>, context?: C, index?: number):\n EmbeddedViewRef<C> {\n const viewRef = templateRef.createEmbeddedView(context || <any>{});\n this.insert(viewRef, index);\n return viewRef;\n }\n\n override createComponent<C>(\n componentFactory: ComponentFactory<C>, index?: number|undefined,\n injector?: Injector|undefined, projectableNodes?: any[][]|undefined,\n ngModuleRef?: NgModuleRef<any>|undefined): ComponentRef<C> {\n const contextInjector = injector || this.parentInjector;\n if (!ngModuleRef && (componentFactory as any).ngModule == null && contextInjector) {\n // DO NOT REFACTOR. The code here used to have a `value || undefined` expression\n // which seems to cause internal google apps to fail. This is documented in the\n // following internal bug issue: go/b/142967802\n const result = contextInjector.get(NgModuleRef, null);\n if (result) {\n ngModuleRef = result;\n }\n }\n\n const componentRef =\n componentFactory.create(contextInjector, projectableNodes, undefined, ngModuleRef);\n this.insert(componentRef.hostView, index);\n return componentRef;\n }\n\n override insert(viewRef: ViewRef, index?: number): ViewRef {\n const lView = (viewRef as R3ViewRef<any>)._lView!;\n const tView = lView[TVIEW];\n\n if (ngDevMode && viewRef.destroyed) {\n throw new Error('Cannot insert a destroyed View in a ViewContainer!');\n }\n\n if (viewAttachedToContainer(lView)) {\n // If view is already attached, detach it first so we clean up references appropriately.\n\n const prevIdx = this.indexOf(viewRef);\n\n // A view might be attached either to this or a different container. The `prevIdx` for\n // those cases will be:\n // equal to -1 for views attached to this ViewContainerRef\n // >= 0 for views attached to a different ViewContainerRef\n if (prevIdx !== -1) {\n this.detach(prevIdx);\n } else {\n const prevLContainer = lView[PARENT] as LContainer;\n ngDevMode &&\n assertEqual(\n isLContainer(prevLContainer), true,\n 'An attached view should have its PARENT point to a container.');\n\n\n // We need to re-create a R3ViewContainerRef instance since those are not stored on\n // LView (nor anywhere else).\n const prevVCRef = new R3ViewContainerRef(\n prevLContainer, prevLContainer[T_HOST] as TDirectiveHostNode, prevLContainer[PARENT]);\n\n prevVCRef.detach(prevVCRef.indexOf(viewRef));\n }\n }\n\n // Logical operation of adding `LView` to `LContainer`\n const adjustedIdx = this._adjustIndex(index);\n const lContainer = this._lContainer;\n insertView(tView, lView, lContainer, adjustedIdx);\n\n // Physical operation of adding the DOM nodes.\n const beforeNode = getBeforeNodeForView(adjustedIdx, lContainer);\n const renderer = lView[RENDERER];\n const parentRNode = nativeParentNode(renderer, lContainer[NATIVE] as RElement | RComment);\n if (parentRNode !== null) {\n addViewToContainer(tView, lContainer[T_HOST], renderer, lView, parentRNode, beforeNode);\n }\n\n (viewRef as R3ViewRef<any>).attachToViewContainerRef();\n addToArray(getOrCreateViewRefs(lContainer), adjustedIdx, viewRef);\n\n return viewRef;\n }\n\n override move(viewRef: ViewRef, newIndex: number): ViewRef {\n if (ngDevMode && viewRef.destroyed) {\n throw new Error('Cannot move a destroyed View in a ViewContainer!');\n }\n return this.insert(viewRef, newIndex);\n }\n\n override indexOf(viewRef: ViewRef): number {\n const viewRefsArr = getViewRefs(this._lContainer);\n return viewRefsArr !== null ? viewRefsArr.indexOf(viewRef) : -1;\n }\n\n override remove(index?: number): void {\n const adjustedIdx = this._adjustIndex(index, -1);\n const detachedView = detachView(this._lContainer, adjustedIdx);\n\n if (detachedView) {\n // Before destroying the view, remove it from the container's array of `ViewRef`s.\n // This ensures the view container length is updated before calling\n // `destroyLView`, which could recursively call view container methods that\n // rely on an accurate container length.\n // (e.g. a method on this view container being called by a child directive's OnDestroy\n // lifecycle hook)\n removeFromArray(getOrCreateViewRefs(this._lContainer), adjustedIdx);\n destroyLView(detachedView[TVIEW], detachedView);\n }\n }\n\n override detach(index?: number): ViewRef|null {\n const adjustedIdx = this._adjustIndex(index, -1);\n const view = detachView(this._lContainer, adjustedIdx);\n\n const wasDetached =\n view && removeFromArray(getOrCreateViewRefs(this._lContainer), adjustedIdx) != null;\n return wasDetached ? new R3ViewRef(view!) : null;\n }\n\n private _adjustIndex(index?: number, shift: number = 0) {\n if (index == null) {\n return this.length + shift;\n }\n if (ngDevMode) {\n assertGreaterThan(index, -1, `ViewRef index must be positive, got ${index}`);\n // +1 because it's legal to insert at the end.\n assertLessThan(index, this.length + 1 + shift, 'index');\n }\n return index;\n }\n};\n\nfunction getViewRefs(lContainer: LContainer): ViewRef[]|null {\n return lContainer[VIEW_REFS] as ViewRef[];\n}\n\nfunction getOrCreateViewRefs(lContainer: LContainer): ViewRef[] {\n return (lContainer[VIEW_REFS] || (lContainer[VIEW_REFS] = [])) as ViewRef[];\n}\n\n/**\n * Creates a ViewContainerRef and stores it on the injector.\n *\n * @param ViewContainerRefToken The ViewContainerRef type\n * @param ElementRefToken The ElementRef type\n * @param hostTNode The node that is requesting a ViewContainerRef\n * @param hostLView The view to which the node belongs\n * @returns The ViewContainerRef instance to use\n */\nexport function createContainerRef(\n hostTNode: TElementNode|TContainerNode|TElementContainerNode,\n hostLView: LView): ViewContainerRef {\n ngDevMode && assertTNodeType(hostTNode, TNodeType.AnyContainer | TNodeType.AnyRNode);\n\n let lContainer: LContainer;\n const slotValue = hostLView[hostTNode.index];\n if (isLContainer(slotValue)) {\n // If the host is a container, we don't need to create a new LContainer\n lContainer = slotValue;\n } else {\n let commentNode: RComment;\n // If the host is an element container, the native host element is guaranteed to be a\n // comment and we can reuse that comment as anchor element for the new LContainer.\n // The comment node in question is already part of the DOM structure so we don't need to append\n // it again.\n if (hostTNode.type & TNodeType.ElementContainer) {\n commentNode = unwrapRNode(slotValue) as RComment;\n } else {\n // If the host is a regular element, we have to insert a comment node manually which will\n // be used as an anchor when inserting elements. In this specific case we use low-level DOM\n // manipulation to insert it.\n const renderer = hostLView[RENDERER];\n ngDevMode && ngDevMode.rendererCreateComment++;\n commentNode = renderer.createComment(ngDevMode ? 'container' : '');\n\n const hostNative = getNativeByTNode(hostTNode, hostLView)!;\n const parentOfHostNative = nativeParentNode(renderer, hostNative);\n nativeInsertBefore(\n renderer, parentOfHostNative!, commentNode, nativeNextSibling(renderer, hostNative),\n false);\n }\n\n hostLView[hostTNode.index] = lContainer =\n createLContainer(slotValue, hostLView, commentNode, hostTNode);\n\n addToViewTree(hostLView, lContainer);\n }\n\n return new R3ViewContainerRef(lContainer, hostTNode, hostLView);\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 {getDebugContext} from '../errors';\nimport {ERROR_DEBUG_CONTEXT, ERROR_LOGGER} from '../util/errors';\n\nimport {DebugContext} from './types';\n\nexport function expressionChangedAfterItHasBeenCheckedError(\n context: DebugContext, oldValue: any, currValue: any, isFirstCheck: boolean): Error {\n let msg =\n `ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '${\n oldValue}'. Current value: '${currValue}'.`;\n if (isFirstCheck) {\n msg +=\n ` It seems like the view has been created after its parent and its children have been dirty checked.` +\n ` Has it been created in a change detection hook ?`;\n }\n return viewDebugError(msg, context);\n}\n\nexport function viewWrappedDebugError(err: any, context: DebugContext): Error {\n if (!(err instanceof Error)) {\n // errors that are not Error instances don't have a stack,\n // so it is ok to wrap them into a new Error object...\n err = new Error(err.toString());\n }\n _addDebugContext(err, context);\n return err;\n}\n\nexport function viewDebugError(msg: string, context: DebugContext): Error {\n const err = new Error(msg);\n _addDebugContext(err, context);\n return err;\n}\n\nfunction _addDebugContext(err: Error, context: DebugContext) {\n (err as any)[ERROR_DEBUG_CONTEXT] = context;\n (err as any)[ERROR_LOGGER] = context.logError.bind(context);\n}\n\nexport function isViewDebugError(err: Error): boolean {\n return !!getDebugContext(err);\n}\n\nexport function viewDestroyedError(action: string): Error {\n return new Error(`ViewDestroyedError: Attempt to use a destroyed view: ${action}`);\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 '../di';\nimport {ErrorHandler} from '../error_handler';\nimport {Type} from '../interface/type';\nimport {ComponentFactory} from '../linker/component_factory';\nimport {NgModuleRef} from '../linker/ng_module_factory';\nimport {QueryList} from '../linker/query_list';\nimport {TemplateRef} from '../linker/template_ref';\nimport {ViewContainerRef} from '../linker/view_container_ref';\nimport {Renderer2, RendererFactory2} from '../render/api';\nimport {RendererType2} from '../render/api_flags';\nimport {Sanitizer} from '../sanitization/sanitizer';\nimport {SecurityContext} from '../sanitization/security';\n\n\n\n// -------------------------------------\n// Defs\n// -------------------------------------\n\n/**\n * Factory for ViewDefinitions/NgModuleDefinitions.\n * We use a function so we can reexeute it in case an error happens and use the given logger\n * function to log the error from the definition of the node, which is shown in all browser\n * logs.\n */\nexport interface DefinitionFactory<D extends Definition<any>> {\n (logger: NodeLogger): D;\n}\n\n/**\n * Function to call console.error at the right source location. This is an indirection\n * via another function as browser will log the location that actually called\n * `console.error`.\n */\nexport interface NodeLogger {\n (): () => void;\n}\n\nexport interface Definition<DF extends DefinitionFactory<any>> {\n factory: DF|null;\n}\n\nexport interface NgModuleDefinition extends Definition<NgModuleDefinitionFactory> {\n providers: NgModuleProviderDef[];\n providersByKey: {[tokenKey: string]: NgModuleProviderDef};\n modules: any[];\n scope: 'root'|'platform'|null;\n}\n\nexport interface NgModuleDefinitionFactory extends DefinitionFactory<NgModuleDefinition> {}\n\nexport interface ViewDefinition extends Definition<ViewDefinitionFactory> {\n flags: ViewFlags;\n updateDirectives: ViewUpdateFn;\n updateRenderer: ViewUpdateFn;\n handleEvent: ViewHandleEventFn;\n /**\n * Order: Depth first.\n * Especially providers are before elements / anchors.\n */\n nodes: NodeDef[];\n /** aggregated NodeFlags for all nodes **/\n nodeFlags: NodeFlags;\n rootNodeFlags: NodeFlags;\n lastRenderRootNode: NodeDef|null;\n bindingCount: number;\n outputCount: number;\n /**\n * Binary or of all query ids that are matched by one of the nodes.\n * This includes query ids from templates as well.\n * Used as a bloom filter.\n */\n nodeMatchedQueries: number;\n}\n\nexport interface ViewDefinitionFactory extends DefinitionFactory<ViewDefinition> {}\n\n\nexport interface ViewUpdateFn {\n (check: NodeCheckFn, view: ViewData): void;\n}\n\n// helper functions to create an overloaded function type.\nexport interface NodeCheckFn {\n (view: ViewData, nodeIndex: number, argStyle: ArgumentType.Dynamic, values: any[]): any;\n\n (view: ViewData, nodeIndex: number, argStyle: ArgumentType.Inline, v0?: any, v1?: any, v2?: any,\n v3?: any, v4?: any, v5?: any, v6?: any, v7?: any, v8?: any, v9?: any): any;\n}\n\nexport const enum ArgumentType {\n Inline = 0,\n Dynamic = 1\n}\n\nexport interface ViewHandleEventFn {\n (view: ViewData, nodeIndex: number, eventName: string, event: any): boolean;\n}\n\n/**\n * Bitmask for ViewDefinition.flags.\n */\nexport const enum ViewFlags {\n None = 0,\n OnPush = 1 << 1,\n}\n\n/**\n * A node definition in the view.\n *\n * Note: We use one type for all nodes so that loops that loop over all nodes\n * of a ViewDefinition stay monomorphic!\n */\nexport interface NodeDef {\n flags: NodeFlags;\n // Index of the node in view data and view definition (those are the same)\n nodeIndex: number;\n // Index of the node in the check functions\n // Differ from nodeIndex when nodes are added or removed at runtime (ie after compilation)\n checkIndex: number;\n parent: NodeDef|null;\n renderParent: NodeDef|null;\n /** this is checked against NgContentDef.index to find matched nodes */\n ngContentIndex: number|null;\n /** number of transitive children */\n childCount: number;\n /** aggregated NodeFlags for all transitive children (does not include self) **/\n childFlags: NodeFlags;\n /** aggregated NodeFlags for all direct children (does not include self) **/\n directChildFlags: NodeFlags;\n\n bindingIndex: number;\n bindings: BindingDef[];\n bindingFlags: BindingFlags;\n outputIndex: number;\n outputs: OutputDef[];\n /**\n * references that the user placed on the element\n */\n references: {[refId: string]: QueryValueType};\n /**\n * ids and value types of all queries that are matched by this node.\n */\n matchedQueries: {[queryId: number]: QueryValueType};\n /** Binary or of all matched query ids of this node. */\n matchedQueryIds: number;\n /**\n * Binary or of all query ids that are matched by one of the children.\n * This includes query ids from templates as well.\n * Used as a bloom filter.\n */\n childMatchedQueries: number;\n element: ElementDef|null;\n provider: ProviderDef|null;\n text: TextDef|null;\n query: QueryDef|null;\n ngContent: NgContentDef|null;\n}\n\n/**\n * Bitmask for NodeDef.flags.\n * Naming convention:\n * - `Type...`: flags that are mutually exclusive\n * - `Cat...`: union of multiple `Type...` (short for category).\n */\nexport const enum NodeFlags {\n None = 0,\n TypeElement = 1 << 0,\n TypeText = 1 << 1,\n ProjectedTemplate = 1 << 2,\n CatRenderNode = TypeElement | TypeText,\n TypeNgContent = 1 << 3,\n TypePipe = 1 << 4,\n TypePureArray = 1 << 5,\n TypePureObject = 1 << 6,\n TypePurePipe = 1 << 7,\n CatPureExpression = TypePureArray | TypePureObject | TypePurePipe,\n TypeValueProvider = 1 << 8,\n TypeClassProvider = 1 << 9,\n TypeFactoryProvider = 1 << 10,\n TypeUseExistingProvider = 1 << 11,\n LazyProvider = 1 << 12,\n PrivateProvider = 1 << 13,\n TypeDirective = 1 << 14,\n Component = 1 << 15,\n CatProviderNoDirective =\n TypeValueProvider | TypeClassProvider | TypeFactoryProvider | TypeUseExistingProvider,\n CatProvider = CatProviderNoDirective | TypeDirective,\n OnInit = 1 << 16,\n OnDestroy = 1 << 17,\n DoCheck = 1 << 18,\n OnChanges = 1 << 19,\n AfterContentInit = 1 << 20,\n AfterContentChecked = 1 << 21,\n AfterViewInit = 1 << 22,\n AfterViewChecked = 1 << 23,\n EmbeddedViews = 1 << 24,\n ComponentView = 1 << 25,\n TypeContentQuery = 1 << 26,\n TypeViewQuery = 1 << 27,\n StaticQuery = 1 << 28,\n DynamicQuery = 1 << 29,\n TypeNgModule = 1 << 30,\n EmitDistinctChangesOnly = 1 << 31,\n CatQuery = TypeContentQuery | TypeViewQuery,\n\n // mutually exclusive values...\n Types = CatRenderNode | TypeNgContent | TypePipe | CatPureExpression | CatProvider | CatQuery\n}\n\nexport interface BindingDef {\n flags: BindingFlags;\n ns: string|null;\n name: string|null;\n nonMinifiedName: string|null;\n securityContext: SecurityContext|null;\n suffix: string|null;\n}\n\nexport const enum BindingFlags {\n TypeElementAttribute = 1 << 0,\n TypeElementClass = 1 << 1,\n TypeElementStyle = 1 << 2,\n TypeProperty = 1 << 3,\n SyntheticProperty = 1 << 4,\n SyntheticHostProperty = 1 << 5,\n CatSyntheticProperty = SyntheticProperty | SyntheticHostProperty,\n\n // mutually exclusive values...\n Types = TypeElementAttribute | TypeElementClass | TypeElementStyle | TypeProperty\n}\n\nexport interface OutputDef {\n type: OutputType;\n target: 'window'|'document'|'body'|'component'|null;\n eventName: string;\n propName: string|null;\n}\n\nexport const enum OutputType {\n ElementOutput,\n DirectiveOutput\n}\n\nexport const enum QueryValueType {\n ElementRef = 0,\n RenderElement = 1,\n TemplateRef = 2,\n ViewContainerRef = 3,\n Provider = 4\n}\n\nexport interface ElementDef {\n // set to null for `<ng-container>`\n name: string|null;\n ns: string|null;\n /** ns, name, value */\n attrs: [string, string, string][]|null;\n template: ViewDefinition|null;\n componentProvider: NodeDef|null;\n componentRendererType: RendererType2|null;\n // closure to allow recursive components\n componentView: ViewDefinitionFactory|null;\n /**\n * visible public providers for DI in the view,\n * as see from this element. This does not include private providers.\n */\n publicProviders: {[tokenKey: string]: NodeDef}|null;\n /**\n * same as visiblePublicProviders, but also includes private providers\n * that are located on this element.\n */\n allProviders: {[tokenKey: string]: NodeDef}|null;\n handleEvent: ElementHandleEventFn|null;\n}\n\nexport interface ElementHandleEventFn {\n (view: ViewData, eventName: string, event: any): boolean;\n}\n\nexport interface ProviderDef {\n token: any;\n value: any;\n deps: DepDef[];\n}\n\nexport interface NgModuleProviderDef {\n flags: NodeFlags;\n index: number;\n token: any;\n value: any;\n deps: DepDef[];\n}\n\nexport interface DepDef {\n flags: DepFlags;\n token: any;\n tokenKey: string;\n}\n\n/**\n * Bitmask for DI flags\n */\nexport const enum DepFlags {\n None = 0,\n SkipSelf = 1 << 0,\n Optional = 1 << 1,\n Self = 1 << 2,\n Value = 1 << 3,\n}\n\nexport interface TextDef {\n prefix: string;\n}\n\nexport interface QueryDef {\n id: number;\n // variant of the id that can be used to check against NodeDef.matchedQueryIds, ...\n filterId: number;\n bindings: QueryBindingDef[];\n}\n\nexport interface QueryBindingDef {\n propName: string;\n bindingType: QueryBindingType;\n}\n\nexport const enum QueryBindingType {\n First = 0,\n All = 1\n}\n\nexport interface NgContentDef {\n /**\n * this index is checked against NodeDef.ngContentIndex to find the nodes\n * that are matched by this ng-content.\n * Note that a NodeDef with an ng-content can be reprojected, i.e.\n * have a ngContentIndex on its own.\n */\n index: number;\n}\n\n// -------------------------------------\n// Data\n// -------------------------------------\n\nexport interface NgModuleData extends Injector, NgModuleRef<any> {\n // Note: we are using the prefix _ as NgModuleData is an NgModuleRef and therefore directly\n // exposed to the user.\n _def: NgModuleDefinition;\n _parent: Injector;\n _providers: any[];\n}\n\n/**\n * View instance data.\n * Attention: Adding fields to this is performance sensitive!\n */\nexport interface ViewData {\n def: ViewDefinition;\n root: RootData;\n renderer: Renderer2;\n // index of component provider / anchor.\n parentNodeDef: NodeDef|null;\n parent: ViewData|null;\n viewContainerParent: ViewData|null;\n component: any;\n context: any;\n // Attention: Never loop over this, as this will\n // create a polymorphic usage site.\n // Instead: Always loop over ViewDefinition.nodes,\n // and call the right accessor (e.g. `elementData`) based on\n // the NodeType.\n nodes: {[key: number]: NodeData};\n state: ViewState;\n oldValues: any[];\n disposables: DisposableFn[]|null;\n initIndex: number;\n}\n\n/**\n * Bitmask of states\n */\nexport const enum ViewState {\n BeforeFirstCheck = 1 << 0,\n FirstCheck = 1 << 1,\n Attached = 1 << 2,\n ChecksEnabled = 1 << 3,\n IsProjectedView = 1 << 4,\n CheckProjectedView = 1 << 5,\n CheckProjectedViews = 1 << 6,\n Destroyed = 1 << 7,\n\n // InitState Uses 3 bits\n InitState_Mask = 7 << 8,\n InitState_BeforeInit = 0 << 8,\n InitState_CallingOnInit = 1 << 8,\n InitState_CallingAfterContentInit = 2 << 8,\n InitState_CallingAfterViewInit = 3 << 8,\n InitState_AfterInit = 4 << 8,\n\n CatDetectChanges = Attached | ChecksEnabled,\n CatInit = BeforeFirstCheck | CatDetectChanges | InitState_BeforeInit\n}\n\n// Called before each cycle of a view's check to detect whether this is in the\n// initState for which we need to call ngOnInit, ngAfterContentInit or ngAfterViewInit\n// lifecycle methods. Returns true if this check cycle should call lifecycle\n// methods.\nexport function shiftInitState(\n view: ViewData, priorInitState: ViewState, newInitState: ViewState): boolean {\n // Only update the InitState if we are currently in the prior state.\n // For example, only move into CallingInit if we are in BeforeInit. Only\n // move into CallingContentInit if we are in CallingInit. Normally this will\n // always be true because of how checkCycle is called in checkAndUpdateView.\n // However, if checkAndUpdateView is called recursively or if an exception is\n // thrown while checkAndUpdateView is running, checkAndUpdateView starts over\n // from the beginning. This ensures the state is monotonically increasing,\n // terminating in the AfterInit state, which ensures the Init methods are called\n // at least once and only once.\n const state = view.state;\n const initState = state & ViewState.InitState_Mask;\n if (initState === priorInitState) {\n view.state = (state & ~ViewState.InitState_Mask) | newInitState;\n view.initIndex = -1;\n return true;\n }\n return initState === newInitState;\n}\n\n// Returns true if the lifecycle init method should be called for the node with\n// the given init index.\nexport function shouldCallLifecycleInitHook(\n view: ViewData, initState: ViewState, index: number): boolean {\n if ((view.state & ViewState.InitState_Mask) === initState && view.initIndex <= index) {\n view.initIndex = index + 1;\n return true;\n }\n return false;\n}\n\nexport interface DisposableFn {\n (): void;\n}\n\n/**\n * Node instance data.\n *\n * We have a separate type per NodeType to save memory\n * (TextData | ElementData | ProviderData | PureExpressionData | QueryList<any>)\n *\n * To keep our code monomorphic,\n * we prohibit using `NodeData` directly but enforce the use of accessors (`asElementData`, ...).\n * This way, no usage site can get a `NodeData` from view.nodes and then use it for different\n * purposes.\n */\nexport class NodeData {\n private __brand: any;\n}\n\n/**\n * Data for an instantiated NodeType.Text.\n *\n * Attention: Adding fields to this is performance sensitive!\n */\nexport interface TextData {\n renderText: any;\n}\n\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nexport function asTextData(view: ViewData, index: number): TextData {\n return <any>view.nodes[index];\n}\n\n/**\n * Data for an instantiated NodeType.Element.\n *\n * Attention: Adding fields to this is performance sensitive!\n */\nexport interface ElementData {\n renderElement: any;\n componentView: ViewData;\n viewContainer: ViewContainerData|null;\n template: TemplateData;\n}\n\nexport interface ViewContainerData extends ViewContainerRef {\n // Note: we are using the prefix _ as ViewContainerData is a ViewContainerRef and therefore\n // directly\n // exposed to the user.\n _embeddedViews: ViewData[];\n}\n\nexport interface TemplateData extends TemplateRef<any> {\n // views that have been created from the template\n // of this element,\n // but inserted into the embeddedViews of another element.\n // By default, this is undefined.\n // Note: we are using the prefix _ as TemplateData is a TemplateRef and therefore directly\n // exposed to the user.\n _projectedViews: ViewData[];\n}\n\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nexport function asElementData(view: ViewData, index: number): ElementData {\n return <any>view.nodes[index];\n}\n\n/**\n * Data for an instantiated NodeType.Provider.\n *\n * Attention: Adding fields to this is performance sensitive!\n */\nexport interface ProviderData {\n instance: any;\n}\n\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nexport function asProviderData(view: ViewData, index: number): ProviderData {\n return <any>view.nodes[index];\n}\n\n/**\n * Data for an instantiated NodeType.PureExpression.\n *\n * Attention: Adding fields to this is performance sensitive!\n */\nexport interface PureExpressionData {\n value: any;\n}\n\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nexport function asPureExpressionData(view: ViewData, index: number): PureExpressionData {\n return <any>view.nodes[index];\n}\n\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nexport function asQueryList(view: ViewData, index: number): QueryList<any> {\n return <any>view.nodes[index];\n}\n\nexport interface RootData {\n injector: Injector;\n ngModule: NgModuleRef<any>;\n projectableNodes: any[][];\n selectorOrNode: any;\n renderer: Renderer2;\n rendererFactory: RendererFactory2;\n errorHandler: ErrorHandler;\n sanitizer: Sanitizer;\n}\n\nexport abstract class DebugContext {\n abstract get view(): ViewData;\n abstract get nodeIndex(): number|null;\n abstract get injector(): Injector;\n abstract get component(): any;\n abstract get providerTokens(): any[];\n abstract get references(): {[key: string]: any};\n abstract get context(): any;\n abstract get componentRenderElement(): any;\n abstract get renderNode(): any;\n abstract logError(console: Console, ...values: any[]): void;\n}\n\n// -------------------------------------\n// Other\n// -------------------------------------\n\nexport const enum CheckType {\n CheckAndUpdate,\n CheckNoChanges\n}\n\nexport interface ProviderOverride {\n token: any;\n flags: NodeFlags;\n value: any;\n deps: ([DepFlags, any]|any)[];\n deprecatedBehavior: boolean;\n}\n\nexport interface Services {\n setCurrentNode(view: ViewData, nodeIndex: number): void;\n createRootView(\n injector: Injector, projectableNodes: any[][], rootSelectorOrNode: string|any,\n def: ViewDefinition, ngModule: NgModuleRef<any>, context?: any): ViewData;\n createEmbeddedView(parent: ViewData, anchorDef: NodeDef, viewDef: ViewDefinition, context?: any):\n ViewData;\n createComponentView(\n parentView: ViewData, nodeDef: NodeDef, viewDef: ViewDefinition, hostElement: any): ViewData;\n createNgModuleRef(\n moduleType: Type<any>, parent: Injector, bootstrapComponents: Type<any>[],\n def: NgModuleDefinition): NgModuleRef<any>;\n overrideProvider(override: ProviderOverride): void;\n overrideComponentView(compType: Type<any>, compFactory: ComponentFactory<any>): void;\n clearOverrides(): void;\n checkAndUpdateView(view: ViewData): void;\n checkNoChangesView(view: ViewData): void;\n destroyView(view: ViewData): void;\n resolveDep(\n view: ViewData, elDef: NodeDef|null, allowPrivateServices: boolean, depDef: DepDef,\n notFoundValue?: any): any;\n createDebugContext(view: ViewData, nodeIndex: number): DebugContext;\n handleEvent: ViewHandleEventFn;\n updateDirectives: (view: ViewData, checkType: CheckType) => void;\n updateRenderer: (view: ViewData, checkType: CheckType) => void;\n dirtyParentQueries: (view: ViewData) => void;\n}\n\n/**\n * This object is used to prevent cycles in the source files and to have a place where\n * debug mode can hook it. It is lazily filled when `isDevMode` is known.\n */\nexport const Services: Services = {\n setCurrentNode: undefined!,\n createRootView: undefined!,\n createEmbeddedView: undefined!,\n createComponentView: undefined!,\n createNgModuleRef: undefined!,\n overrideProvider: undefined!,\n overrideComponentView: undefined!,\n clearOverrides: undefined!,\n checkAndUpdateView: undefined!,\n checkNoChangesView: undefined!,\n destroyView: undefined!,\n resolveDep: undefined!,\n createDebugContext: undefined!,\n handleEvent: undefined!,\n updateDirectives: undefined!,\n updateRenderer: undefined!,\n dirtyParentQueries: undefined!,\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 {devModeEqual, WrappedValue} from '../change_detection/change_detection';\nimport {SOURCE} from '../di/injector_compatibility';\nimport {ViewEncapsulation} from '../metadata/view';\nimport {RendererType2} from '../render/api_flags';\nimport {stringify} from '../util/stringify';\n\nimport {expressionChangedAfterItHasBeenCheckedError} from './errors';\nimport {asElementData, asTextData, BindingDef, BindingFlags, Definition, DefinitionFactory, DepDef, DepFlags, ElementData, NodeDef, NodeFlags, QueryValueType, Services, ViewData, ViewDefinition, ViewDefinitionFactory, ViewFlags, ViewState} from './types';\n\nexport const NOOP: any = () => {};\n\nconst _tokenKeyCache = new Map<any, string>();\n\nexport function tokenKey(token: any): string {\n let key = _tokenKeyCache.get(token);\n if (!key) {\n key = stringify(token) + '_' + _tokenKeyCache.size;\n _tokenKeyCache.set(token, key);\n }\n return key;\n}\n\nexport function unwrapValue(view: ViewData, nodeIdx: number, bindingIdx: number, value: any): any {\n if (WrappedValue.isWrapped(value)) {\n value = WrappedValue.unwrap(value);\n const globalBindingIdx = view.def.nodes[nodeIdx].bindingIndex + bindingIdx;\n const oldValue = WrappedValue.unwrap(view.oldValues[globalBindingIdx]);\n view.oldValues[globalBindingIdx] = new WrappedValue(oldValue);\n }\n return value;\n}\n\nconst UNDEFINED_RENDERER_TYPE_ID = '$$undefined';\nconst EMPTY_RENDERER_TYPE_ID = '$$empty';\n\n// Attention: this function is called as top level function.\n// Putting any logic in here will destroy closure tree shaking!\nexport function createRendererType2(values: {\n styles: (string|any[])[],\n encapsulation: ViewEncapsulation,\n data: {[kind: string]: any[]}\n}): RendererType2 {\n return {\n id: UNDEFINED_RENDERER_TYPE_ID,\n styles: values.styles,\n encapsulation: values.encapsulation,\n data: values.data\n };\n}\n\nlet _renderCompCount = 0;\n\nexport function resolveRendererType2(type?: RendererType2|null): RendererType2|null {\n if (type && type.id === UNDEFINED_RENDERER_TYPE_ID) {\n // first time we see this RendererType2. Initialize it...\n const isFilled =\n ((type.encapsulation != null && type.encapsulation !== ViewEncapsulation.None) ||\n type.styles.length || Object.keys(type.data).length);\n if (isFilled) {\n type.id = `c${_renderCompCount++}`;\n } else {\n type.id = EMPTY_RENDERER_TYPE_ID;\n }\n }\n if (type && type.id === EMPTY_RENDERER_TYPE_ID) {\n type = null;\n }\n return type || null;\n}\n\nexport function checkBinding(\n view: ViewData, def: NodeDef, bindingIdx: number, value: any): boolean {\n const oldValues = view.oldValues;\n if ((view.state & ViewState.FirstCheck) ||\n !Object.is(oldValues[def.bindingIndex + bindingIdx], value)) {\n return true;\n }\n return false;\n}\n\nexport function checkAndUpdateBinding(\n view: ViewData, def: NodeDef, bindingIdx: number, value: any): boolean {\n if (checkBinding(view, def, bindingIdx, value)) {\n view.oldValues[def.bindingIndex + bindingIdx] = value;\n return true;\n }\n return false;\n}\n\nexport function checkBindingNoChanges(\n view: ViewData, def: NodeDef, bindingIdx: number, value: any) {\n const oldValue = view.oldValues[def.bindingIndex + bindingIdx];\n if ((view.state & ViewState.BeforeFirstCheck) || !devModeEqual(oldValue, value)) {\n const bindingName = def.bindings[bindingIdx].name;\n throw expressionChangedAfterItHasBeenCheckedError(\n Services.createDebugContext(view, def.nodeIndex), `${bindingName}: ${oldValue}`,\n `${bindingName}: ${value}`, (view.state & ViewState.BeforeFirstCheck) !== 0);\n }\n}\n\nexport function markParentViewsForCheck(view: ViewData) {\n let currView: ViewData|null = view;\n while (currView) {\n if (currView.def.flags & ViewFlags.OnPush) {\n currView.state |= ViewState.ChecksEnabled;\n }\n currView = currView.viewContainerParent || currView.parent;\n }\n}\n\nexport function markParentViewsForCheckProjectedViews(view: ViewData, endView: ViewData) {\n let currView: ViewData|null = view;\n while (currView && currView !== endView) {\n currView.state |= ViewState.CheckProjectedViews;\n currView = currView.viewContainerParent || currView.parent;\n }\n}\n\nexport function dispatchEvent(\n view: ViewData, nodeIndex: number, eventName: string, event: any): boolean|undefined {\n try {\n const nodeDef = view.def.nodes[nodeIndex];\n const startView = nodeDef.flags & NodeFlags.ComponentView ?\n asElementData(view, nodeIndex).componentView :\n view;\n markParentViewsForCheck(startView);\n return Services.handleEvent(view, nodeIndex, eventName, event);\n } catch (e) {\n // Attention: Don't rethrow, as it would cancel Observable subscriptions!\n view.root.errorHandler.handleError(e);\n }\n}\n\nexport function declaredViewContainer(view: ViewData): ElementData|null {\n if (view.parent) {\n const parentView = view.parent;\n return asElementData(parentView, view.parentNodeDef!.nodeIndex);\n }\n return null;\n}\n\n/**\n * for component views, this is the host element.\n * for embedded views, this is the index of the parent node\n * that contains the view container.\n */\nexport function viewParentEl(view: ViewData): NodeDef|null {\n const parentView = view.parent;\n if (parentView) {\n return view.parentNodeDef!.parent;\n } else {\n return null;\n }\n}\n\nexport function renderNode(view: ViewData, def: NodeDef): any {\n switch (def.flags & NodeFlags.Types) {\n case NodeFlags.TypeElement:\n return asElementData(view, def.nodeIndex).renderElement;\n case NodeFlags.TypeText:\n return asTextData(view, def.nodeIndex).renderText;\n }\n}\n\nexport function elementEventFullName(target: string|null, name: string): string {\n return target ? `${target}:${name}` : name;\n}\n\nexport function isComponentView(view: ViewData): boolean {\n return !!view.parent && !!(view.parentNodeDef!.flags & NodeFlags.Component);\n}\n\nexport function isEmbeddedView(view: ViewData): boolean {\n return !!view.parent && !(view.parentNodeDef!.flags & NodeFlags.Component);\n}\n\nexport function filterQueryId(queryId: number): number {\n return 1 << (queryId % 32);\n}\n\nexport function splitMatchedQueriesDsl(matchedQueriesDsl: [string|number, QueryValueType][]|null): {\n matchedQueries: {[queryId: string]: QueryValueType},\n references: {[refId: string]: QueryValueType},\n matchedQueryIds: number\n} {\n const matchedQueries: {[queryId: string]: QueryValueType} = {};\n let matchedQueryIds = 0;\n const references: {[refId: string]: QueryValueType} = {};\n if (matchedQueriesDsl) {\n matchedQueriesDsl.forEach(([queryId, valueType]) => {\n if (typeof queryId === 'number') {\n matchedQueries[queryId] = valueType;\n matchedQueryIds |= filterQueryId(queryId);\n } else {\n references[queryId] = valueType;\n }\n });\n }\n return {matchedQueries, references, matchedQueryIds};\n}\n\nexport function splitDepsDsl(deps: ([DepFlags, any]|any)[], sourceName?: string): DepDef[] {\n return deps.map(value => {\n let token: any;\n let flags: DepFlags;\n if (Array.isArray(value)) {\n [flags, token] = value;\n } else {\n flags = DepFlags.None;\n token = value;\n }\n if (token && (typeof token === 'function' || typeof token === 'object') && sourceName) {\n Object.defineProperty(token, SOURCE, {value: sourceName, configurable: true});\n }\n return {flags, token, tokenKey: tokenKey(token)};\n });\n}\n\nexport function getParentRenderElement(view: ViewData, renderHost: any, def: NodeDef): any {\n let renderParent = def.renderParent;\n if (renderParent) {\n if ((renderParent.flags & NodeFlags.TypeElement) === 0 ||\n (renderParent.flags & NodeFlags.ComponentView) === 0 ||\n (renderParent.element!.componentRendererType &&\n (renderParent.element!.componentRendererType!.encapsulation ===\n ViewEncapsulation.ShadowDom ||\n // TODO(FW-2290): remove the `encapsulation === 1` fallback logic in v12.\n // @ts-ignore TODO: Remove as part of FW-2290. TS complains about us dealing with an enum\n // value that is not known (but previously was the value for ViewEncapsulation.Native)\n renderParent.element!.componentRendererType!.encapsulation === 1))) {\n // only children of non components, or children of components with native encapsulation should\n // be attached.\n return asElementData(view, def.renderParent!.nodeIndex).renderElement;\n }\n } else {\n return renderHost;\n }\n}\n\nconst DEFINITION_CACHE = new WeakMap<any, Definition<any>>();\n\nexport function resolveDefinition<D extends Definition<any>>(factory: DefinitionFactory<D>): D {\n let value = DEFINITION_CACHE.get(factory)! as D;\n if (!value) {\n value = factory(() => NOOP);\n value.factory = factory;\n DEFINITION_CACHE.set(factory, value);\n }\n return value;\n}\n\nexport function rootRenderNodes(view: ViewData): any[] {\n const renderNodes: any[] = [];\n visitRootRenderNodes(view, RenderNodeAction.Collect, undefined, undefined, renderNodes);\n return renderNodes;\n}\n\nexport const enum RenderNodeAction {\n Collect,\n AppendChild,\n InsertBefore,\n RemoveChild\n}\n\nexport function visitRootRenderNodes(\n view: ViewData, action: RenderNodeAction, parentNode: any, nextSibling: any, target?: any[]) {\n // We need to re-compute the parent node in case the nodes have been moved around manually\n if (action === RenderNodeAction.RemoveChild) {\n parentNode = view.renderer.parentNode(renderNode(view, view.def.lastRenderRootNode!));\n }\n visitSiblingRenderNodes(\n view, action, 0, view.def.nodes.length - 1, parentNode, nextSibling, target);\n}\n\nexport function visitSiblingRenderNodes(\n view: ViewData, action: RenderNodeAction, startIndex: number, endIndex: number, parentNode: any,\n nextSibling: any, target?: any[]) {\n for (let i = startIndex; i <= endIndex; i++) {\n const nodeDef = view.def.nodes[i];\n if (nodeDef.flags & (NodeFlags.TypeElement | NodeFlags.TypeText | NodeFlags.TypeNgContent)) {\n visitRenderNode(view, nodeDef, action, parentNode, nextSibling, target);\n }\n // jump to next sibling\n i += nodeDef.childCount;\n }\n}\n\nexport function visitProjectedRenderNodes(\n view: ViewData, ngContentIndex: number, action: RenderNodeAction, parentNode: any,\n nextSibling: any, target?: any[]) {\n let compView: ViewData|null = view;\n while (compView && !isComponentView(compView)) {\n compView = compView.parent;\n }\n const hostView = compView!.parent;\n const hostElDef = viewParentEl(compView!);\n const startIndex = hostElDef!.nodeIndex + 1;\n const endIndex = hostElDef!.nodeIndex + hostElDef!.childCount;\n for (let i = startIndex; i <= endIndex; i++) {\n const nodeDef = hostView!.def.nodes[i];\n if (nodeDef.ngContentIndex === ngContentIndex) {\n visitRenderNode(hostView!, nodeDef, action, parentNode, nextSibling, target);\n }\n // jump to next sibling\n i += nodeDef.childCount;\n }\n if (!hostView!.parent) {\n // a root view\n const projectedNodes = view.root.projectableNodes[ngContentIndex];\n if (projectedNodes) {\n for (let i = 0; i < projectedNodes.length; i++) {\n execRenderNodeAction(view, projectedNodes[i], action, parentNode, nextSibling, target);\n }\n }\n }\n}\n\nfunction visitRenderNode(\n view: ViewData, nodeDef: NodeDef, action: RenderNodeAction, parentNode: any, nextSibling: any,\n target?: any[]) {\n if (nodeDef.flags & NodeFlags.TypeNgContent) {\n visitProjectedRenderNodes(\n view, nodeDef.ngContent!.index, action, parentNode, nextSibling, target);\n } else {\n const rn = renderNode(view, nodeDef);\n if (action === RenderNodeAction.RemoveChild && (nodeDef.flags & NodeFlags.ComponentView) &&\n (nodeDef.bindingFlags & BindingFlags.CatSyntheticProperty)) {\n // Note: we might need to do both actions.\n if (nodeDef.bindingFlags & (BindingFlags.SyntheticProperty)) {\n execRenderNodeAction(view, rn, action, parentNode, nextSibling, target);\n }\n if (nodeDef.bindingFlags & (BindingFlags.SyntheticHostProperty)) {\n const compView = asElementData(view, nodeDef.nodeIndex).componentView;\n execRenderNodeAction(compView, rn, action, parentNode, nextSibling, target);\n }\n } else {\n execRenderNodeAction(view, rn, action, parentNode, nextSibling, target);\n }\n if (nodeDef.flags & NodeFlags.EmbeddedViews) {\n const embeddedViews = asElementData(view, nodeDef.nodeIndex).viewContainer!._embeddedViews;\n for (let k = 0; k < embeddedViews.length; k++) {\n visitRootRenderNodes(embeddedViews[k], action, parentNode, nextSibling, target);\n }\n }\n if (nodeDef.flags & NodeFlags.TypeElement && !nodeDef.element!.name) {\n visitSiblingRenderNodes(\n view, action, nodeDef.nodeIndex + 1, nodeDef.nodeIndex + nodeDef.childCount, parentNode,\n nextSibling, target);\n }\n }\n}\n\nfunction execRenderNodeAction(\n view: ViewData, renderNode: any, action: RenderNodeAction, parentNode: any, nextSibling: any,\n target?: any[]) {\n const renderer = view.renderer;\n switch (action) {\n case RenderNodeAction.AppendChild:\n renderer.appendChild(parentNode, renderNode);\n break;\n case RenderNodeAction.InsertBefore:\n renderer.insertBefore(parentNode, renderNode, nextSibling);\n break;\n case RenderNodeAction.RemoveChild:\n renderer.removeChild(parentNode, renderNode);\n break;\n case RenderNodeAction.Collect:\n target!.push(renderNode);\n break;\n }\n}\n\nconst NS_PREFIX_RE = /^:([^:]+):(.+)$/;\n\nexport function splitNamespace(name: string): string[] {\n if (name[0] === ':') {\n const match = name.match(NS_PREFIX_RE)!;\n return [match[1], match[2]];\n }\n return ['', name];\n}\n\nexport function calcBindingFlags(bindings: BindingDef[]): BindingFlags {\n let flags = 0;\n for (let i = 0; i < bindings.length; i++) {\n flags |= bindings[i].flags;\n }\n return flags;\n}\n\nexport function interpolate(valueCount: number, constAndInterp: string[]): string {\n let result = '';\n for (let i = 0; i < valueCount * 2; i = i + 2) {\n result = result + constAndInterp[i] + _toStringWithNull(constAndInterp[i + 1]);\n }\n return result + constAndInterp[valueCount * 2];\n}\n\nexport function inlineInterpolate(\n valueCount: number, c0: string, a1: any, c1: string, a2?: any, c2?: string, a3?: any,\n c3?: string, a4?: any, c4?: string, a5?: any, c5?: string, a6?: any, c6?: string, a7?: any,\n c7?: string, a8?: any, c8?: string, a9?: any, c9?: string): string {\n switch (valueCount) {\n case 1:\n return c0 + _toStringWithNull(a1) + c1;\n case 2:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2;\n case 3:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3;\n case 4:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4;\n case 5:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5;\n case 6:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) + c6;\n case 7:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) +\n c6 + _toStringWithNull(a7) + c7;\n case 8:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) +\n c6 + _toStringWithNull(a7) + c7 + _toStringWithNull(a8) + c8;\n case 9:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) +\n c6 + _toStringWithNull(a7) + c7 + _toStringWithNull(a8) + c8 + _toStringWithNull(a9) + c9;\n default:\n throw new Error(`Does not support more than 9 expressions`);\n }\n}\n\nfunction _toStringWithNull(v: any): string {\n return v != null ? v.toString() : '';\n}\n\nexport const EMPTY_MAP: {[key: string]: any} = {};\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 {resolveForwardRef} from '../di/forward_ref';\nimport {Injector} from '../di/injector';\nimport {setCurrentInjector} from '../di/injector_compatibility';\nimport {INJECTOR} from '../di/injector_token';\nimport {getInjectableDef, ɵɵInjectableDeclaration} from '../di/interface/defs';\nimport {INJECTOR_SCOPE} from '../di/scope';\nimport {NgModuleRef} from '../linker/ng_module_factory';\nimport {newArray} from '../util/array_utils';\nimport {stringify} from '../util/stringify';\n\nimport {DepDef, DepFlags, NgModuleData, NgModuleDefinition, NgModuleProviderDef, NodeFlags} from './types';\nimport {splitDepsDsl, tokenKey} from './util';\n\nconst UNDEFINED_VALUE = {};\n\nconst InjectorRefTokenKey = tokenKey(Injector);\nconst INJECTORRefTokenKey = tokenKey(INJECTOR);\nconst NgModuleRefTokenKey = tokenKey(NgModuleRef);\n\nexport function moduleProvideDef(\n flags: NodeFlags, token: any, value: any, deps: ([DepFlags, any]|any)[]): NgModuleProviderDef {\n // Need to resolve forwardRefs as e.g. for `useValue` we\n // lowered the expression and then stopped evaluating it,\n // i.e. also didn't unwrap it.\n value = resolveForwardRef(value);\n const depDefs = splitDepsDsl(deps, stringify(token));\n return {\n // will bet set by the module definition\n index: -1,\n deps: depDefs,\n flags,\n token,\n value\n };\n}\n\nexport function moduleDef(providers: NgModuleProviderDef[]): NgModuleDefinition {\n const providersByKey: {[key: string]: NgModuleProviderDef} = {};\n const modules = [];\n let scope: 'root'|'platform'|null = null;\n for (let i = 0; i < providers.length; i++) {\n const provider = providers[i];\n if (provider.token === INJECTOR_SCOPE) {\n scope = provider.value;\n }\n if (provider.flags & NodeFlags.TypeNgModule) {\n modules.push(provider.token);\n }\n provider.index = i;\n providersByKey[tokenKey(provider.token)] = provider;\n }\n return {\n // Will be filled later...\n factory: null,\n providersByKey,\n providers,\n modules,\n scope: scope,\n };\n}\n\nexport function initNgModule(data: NgModuleData) {\n const def = data._def;\n const providers = data._providers = newArray(def.providers.length);\n for (let i = 0; i < def.providers.length; i++) {\n const provDef = def.providers[i];\n if (!(provDef.flags & NodeFlags.LazyProvider)) {\n // Make sure the provider has not been already initialized outside this loop.\n if (providers[i] === undefined) {\n providers[i] = _createProviderInstance(data, provDef);\n }\n }\n }\n}\n\nexport function resolveNgModuleDep(\n data: NgModuleData, depDef: DepDef, notFoundValue: any = Injector.THROW_IF_NOT_FOUND): any {\n const former = setCurrentInjector(data);\n try {\n if (depDef.flags & DepFlags.Value) {\n return depDef.token;\n }\n if (depDef.flags & DepFlags.Optional) {\n notFoundValue = null;\n }\n if (depDef.flags & DepFlags.SkipSelf) {\n return data._parent.get(depDef.token, notFoundValue);\n }\n const tokenKey = depDef.tokenKey;\n switch (tokenKey) {\n case InjectorRefTokenKey:\n case INJECTORRefTokenKey:\n case NgModuleRefTokenKey:\n return data;\n }\n const providerDef = data._def.providersByKey[tokenKey];\n let injectableDef: ɵɵInjectableDeclaration<any>|null;\n if (providerDef) {\n let providerInstance = data._providers[providerDef.index];\n if (providerInstance === undefined) {\n providerInstance = data._providers[providerDef.index] =\n _createProviderInstance(data, providerDef);\n }\n return providerInstance === UNDEFINED_VALUE ? undefined : providerInstance;\n } else if (\n (injectableDef = getInjectableDef(depDef.token)) && targetsModule(data, injectableDef)) {\n const index = data._providers.length;\n data._def.providers[index] = data._def.providersByKey[depDef.tokenKey] = {\n flags: NodeFlags.TypeFactoryProvider | NodeFlags.LazyProvider,\n value: injectableDef.factory,\n deps: [],\n index,\n token: depDef.token,\n };\n data._providers[index] = UNDEFINED_VALUE;\n return (\n data._providers[index] =\n _createProviderInstance(data, data._def.providersByKey[depDef.tokenKey]));\n } else if (depDef.flags & DepFlags.Self) {\n return notFoundValue;\n }\n return data._parent.get(depDef.token, notFoundValue);\n } finally {\n setCurrentInjector(former);\n }\n}\n\nfunction moduleTransitivelyPresent(ngModule: NgModuleData, scope: any): boolean {\n return ngModule._def.modules.indexOf(scope) > -1;\n}\n\nfunction targetsModule(ngModule: NgModuleData, def: ɵɵInjectableDeclaration<any>): boolean {\n const providedIn = resolveForwardRef(def.providedIn);\n return providedIn != null &&\n (providedIn === 'any' || providedIn === ngModule._def.scope ||\n moduleTransitivelyPresent(ngModule, providedIn));\n}\n\nfunction _createProviderInstance(ngModule: NgModuleData, providerDef: NgModuleProviderDef): any {\n let injectable: any;\n switch (providerDef.flags & NodeFlags.Types) {\n case NodeFlags.TypeClassProvider:\n injectable = _createClass(ngModule, providerDef.value, providerDef.deps);\n break;\n case NodeFlags.TypeFactoryProvider:\n injectable = _callFactory(ngModule, providerDef.value, providerDef.deps);\n break;\n case NodeFlags.TypeUseExistingProvider:\n injectable = resolveNgModuleDep(ngModule, providerDef.deps[0]);\n break;\n case NodeFlags.TypeValueProvider:\n injectable = providerDef.value;\n break;\n }\n\n // The read of `ngOnDestroy` here is slightly expensive as it's megamorphic, so it should be\n // avoided if possible. The sequence of checks here determines whether ngOnDestroy needs to be\n // checked. It might not if the `injectable` isn't an object or if NodeFlags.OnDestroy is already\n // set (ngOnDestroy was detected statically).\n if (injectable !== UNDEFINED_VALUE && injectable !== null && typeof injectable === 'object' &&\n !(providerDef.flags & NodeFlags.OnDestroy) && typeof injectable.ngOnDestroy === 'function') {\n providerDef.flags |= NodeFlags.OnDestroy;\n }\n return injectable === undefined ? UNDEFINED_VALUE : injectable;\n}\n\nfunction _createClass(ngModule: NgModuleData, ctor: any, deps: DepDef[]): any {\n const len = deps.length;\n switch (len) {\n case 0:\n return new ctor();\n case 1:\n return new ctor(resolveNgModuleDep(ngModule, deps[0]));\n case 2:\n return new ctor(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]));\n case 3:\n return new ctor(\n resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]),\n resolveNgModuleDep(ngModule, deps[2]));\n default:\n const depValues = [];\n for (let i = 0; i < len; i++) {\n depValues[i] = resolveNgModuleDep(ngModule, deps[i]);\n }\n return new ctor(...depValues);\n }\n}\n\nfunction _callFactory(ngModule: NgModuleData, factory: any, deps: DepDef[]): any {\n const len = deps.length;\n switch (len) {\n case 0:\n return factory();\n case 1:\n return factory(resolveNgModuleDep(ngModule, deps[0]));\n case 2:\n return factory(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]));\n case 3:\n return factory(\n resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]),\n resolveNgModuleDep(ngModule, deps[2]));\n default:\n const depValues = [];\n for (let i = 0; i < len; i++) {\n depValues[i] = resolveNgModuleDep(ngModule, deps[i]);\n }\n return factory(...depValues);\n }\n}\n\nexport function callNgModuleLifecycle(ngModule: NgModuleData, lifecycles: NodeFlags) {\n const def = ngModule._def;\n const destroyed = new Set<any>();\n for (let i = 0; i < def.providers.length; i++) {\n const provDef = def.providers[i];\n if (provDef.flags & NodeFlags.OnDestroy) {\n const instance = ngModule._providers[i];\n if (instance && instance !== UNDEFINED_VALUE) {\n const onDestroy: Function|undefined = instance.ngOnDestroy;\n if (typeof onDestroy === 'function' && !destroyed.has(instance)) {\n onDestroy.apply(instance);\n destroyed.add(instance);\n }\n }\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {addToArray, removeFromArray} from '../util/array_utils';\n\nimport {ElementData, NodeDef, NodeFlags, Services, ViewData, ViewDefinition, ViewState} from './types';\nimport {declaredViewContainer, renderNode, RenderNodeAction, visitRootRenderNodes} from './util';\n\nexport function attachEmbeddedView(\n parentView: ViewData, elementData: ElementData, viewIndex: number|undefined|null,\n view: ViewData) {\n let embeddedViews = elementData.viewContainer!._embeddedViews;\n if (viewIndex === null || viewIndex === undefined) {\n viewIndex = embeddedViews.length;\n }\n view.viewContainerParent = parentView;\n addToArray(embeddedViews, viewIndex!, view);\n attachProjectedView(elementData, view);\n\n Services.dirtyParentQueries(view);\n\n const prevView = viewIndex! > 0 ? embeddedViews[viewIndex! - 1] : null;\n renderAttachEmbeddedView(elementData, prevView, view);\n}\n\nfunction attachProjectedView(vcElementData: ElementData, view: ViewData) {\n const dvcElementData = declaredViewContainer(view);\n if (!dvcElementData || dvcElementData === vcElementData ||\n view.state & ViewState.IsProjectedView) {\n return;\n }\n // Note: For performance reasons, we\n // - add a view to template._projectedViews only 1x throughout its lifetime,\n // and remove it not until the view is destroyed.\n // (hard, as when a parent view is attached/detached we would need to attach/detach all\n // nested projected views as well, even across component boundaries).\n // - don't track the insertion order of views in the projected views array\n // (hard, as when the views of the same template are inserted different view containers)\n view.state |= ViewState.IsProjectedView;\n let projectedViews = dvcElementData.template._projectedViews;\n if (!projectedViews) {\n projectedViews = dvcElementData.template._projectedViews = [];\n }\n projectedViews.push(view);\n // Note: we are changing the NodeDef here as we cannot calculate\n // the fact whether a template is used for projection during compilation.\n markNodeAsProjectedTemplate(view.parent!.def, view.parentNodeDef!);\n}\n\nfunction markNodeAsProjectedTemplate(viewDef: ViewDefinition, nodeDef: NodeDef) {\n if (nodeDef.flags & NodeFlags.ProjectedTemplate) {\n return;\n }\n viewDef.nodeFlags |= NodeFlags.ProjectedTemplate;\n nodeDef.flags |= NodeFlags.ProjectedTemplate;\n let parentNodeDef = nodeDef.parent;\n while (parentNodeDef) {\n parentNodeDef.childFlags |= NodeFlags.ProjectedTemplate;\n parentNodeDef = parentNodeDef.parent;\n }\n}\n\nexport function detachEmbeddedView(elementData: ElementData, viewIndex?: number): ViewData|null {\n const embeddedViews = elementData.viewContainer!._embeddedViews;\n if (viewIndex == null || viewIndex >= embeddedViews.length) {\n viewIndex = embeddedViews.length - 1;\n }\n if (viewIndex < 0) {\n return null;\n }\n const view = embeddedViews[viewIndex];\n view.viewContainerParent = null;\n removeFromArray(embeddedViews, viewIndex);\n\n // See attachProjectedView for why we don't update projectedViews here.\n Services.dirtyParentQueries(view);\n\n renderDetachView(view);\n\n return view;\n}\n\nexport function detachProjectedView(view: ViewData) {\n if (!(view.state & ViewState.IsProjectedView)) {\n return;\n }\n const dvcElementData = declaredViewContainer(view);\n if (dvcElementData) {\n const projectedViews = dvcElementData.template._projectedViews;\n if (projectedViews) {\n removeFromArray(projectedViews, projectedViews.indexOf(view));\n Services.dirtyParentQueries(view);\n }\n }\n}\n\nexport function moveEmbeddedView(\n elementData: ElementData, oldViewIndex: number, newViewIndex: number): ViewData {\n const embeddedViews = elementData.viewContainer!._embeddedViews;\n const view = embeddedViews[oldViewIndex];\n removeFromArray(embeddedViews, oldViewIndex);\n if (newViewIndex == null) {\n newViewIndex = embeddedViews.length;\n }\n addToArray(embeddedViews, newViewIndex, view);\n\n // Note: Don't need to change projectedViews as the order in there\n // as always invalid...\n\n Services.dirtyParentQueries(view);\n\n renderDetachView(view);\n const prevView = newViewIndex > 0 ? embeddedViews[newViewIndex - 1] : null;\n renderAttachEmbeddedView(elementData, prevView, view);\n\n return view;\n}\n\nfunction renderAttachEmbeddedView(\n elementData: ElementData, prevView: ViewData|null, view: ViewData) {\n const prevRenderNode =\n prevView ? renderNode(prevView, prevView.def.lastRenderRootNode!) : elementData.renderElement;\n const parentNode = view.renderer.parentNode(prevRenderNode);\n const nextSibling = view.renderer.nextSibling(prevRenderNode);\n // Note: We can't check if `nextSibling` is present, as on WebWorkers it will always be!\n // However, browsers automatically do `appendChild` when there is no `nextSibling`.\n visitRootRenderNodes(view, RenderNodeAction.InsertBefore, parentNode, nextSibling, undefined);\n}\n\nexport function renderDetachView(view: ViewData) {\n visitRootRenderNodes(view, RenderNodeAction.RemoveChild, null, null, undefined);\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 {ChangeDetectorRef} from '../change_detection/change_detection';\nimport {Injector} from '../di/injector';\nimport {InjectFlags} from '../di/interface/injector';\nimport {Type} from '../interface/type';\nimport {ComponentFactory, ComponentRef} from '../linker/component_factory';\nimport {ComponentFactoryBoundToModule, ComponentFactoryResolver} from '../linker/component_factory_resolver';\nimport {ElementRef} from '../linker/element_ref';\nimport {InternalNgModuleRef, NgModuleRef} from '../linker/ng_module_factory';\nimport {TemplateRef} from '../linker/template_ref';\nimport {ViewContainerRef} from '../linker/view_container_ref';\nimport {EmbeddedViewRef, InternalViewRef, ViewRef, ViewRefTracker} from '../linker/view_ref';\nimport {stringify} from '../util/stringify';\nimport {VERSION} from '../version';\n\nimport {callNgModuleLifecycle, initNgModule, resolveNgModuleDep} from './ng_module';\nimport {asElementData, asProviderData, asTextData, DepFlags, ElementData, NgModuleData, NgModuleDefinition, NodeDef, NodeFlags, Services, TemplateData, ViewContainerData, ViewData, ViewDefinitionFactory, ViewState} from './types';\nimport {markParentViewsForCheck, resolveDefinition, rootRenderNodes, tokenKey, viewParentEl} from './util';\nimport {attachEmbeddedView, detachEmbeddedView, moveEmbeddedView, renderDetachView} from './view_attach';\n\nconst EMPTY_CONTEXT = {};\n\n// Attention: this function is called as top level function.\n// Putting any logic in here will destroy closure tree shaking!\nexport function createComponentFactory(\n selector: string, componentType: Type<any>, viewDefFactory: ViewDefinitionFactory,\n inputs: {[propName: string]: string}|null, outputs: {[propName: string]: string},\n ngContentSelectors: string[]): ComponentFactory<any> {\n return new ComponentFactory_(\n selector, componentType, viewDefFactory, inputs, outputs, ngContentSelectors);\n}\n\nexport function getComponentViewDefinitionFactory(componentFactory: ComponentFactory<any>):\n ViewDefinitionFactory {\n return (componentFactory as ComponentFactory_).viewDefFactory;\n}\n\nclass ComponentFactory_ extends ComponentFactory<any> {\n /**\n * @internal\n */\n viewDefFactory: ViewDefinitionFactory;\n\n constructor(\n public selector: string, public componentType: Type<any>,\n viewDefFactory: ViewDefinitionFactory, private _inputs: {[propName: string]: string}|null,\n private _outputs: {[propName: string]: string}, public ngContentSelectors: string[]) {\n // Attention: this ctor is called as top level function.\n // Putting any logic in here will destroy closure tree shaking!\n super();\n this.viewDefFactory = viewDefFactory;\n }\n\n override get inputs() {\n const inputsArr: {propName: string, templateName: string}[] = [];\n const inputs = this._inputs!;\n for (let propName in inputs) {\n const templateName = inputs[propName];\n inputsArr.push({propName, templateName});\n }\n return inputsArr;\n }\n\n override get outputs() {\n const outputsArr: {propName: string, templateName: string}[] = [];\n for (let propName in this._outputs) {\n const templateName = this._outputs[propName];\n outputsArr.push({propName, templateName});\n }\n return outputsArr;\n }\n\n /**\n * Creates a new component.\n */\n override create(\n injector: Injector, projectableNodes?: any[][], rootSelectorOrNode?: string|any,\n ngModule?: NgModuleRef<any>): ComponentRef<any> {\n if (!ngModule) {\n throw new Error('ngModule should be provided');\n }\n const viewDef = resolveDefinition(this.viewDefFactory);\n const componentNodeIndex = viewDef.nodes[0].element!.componentProvider!.nodeIndex;\n const view = Services.createRootView(\n injector, projectableNodes || [], rootSelectorOrNode, viewDef, ngModule, EMPTY_CONTEXT);\n const component = asProviderData(view, componentNodeIndex).instance;\n if (rootSelectorOrNode) {\n view.renderer.setAttribute(asElementData(view, 0).renderElement, 'ng-version', VERSION.full);\n }\n\n return new ComponentRef_(view, new ViewRef_(view), component);\n }\n}\n\nclass ComponentRef_ extends ComponentRef<any> {\n public override readonly hostView: ViewRef;\n public override readonly instance: any;\n public override readonly changeDetectorRef: ChangeDetectorRef;\n private _elDef: NodeDef;\n constructor(private _view: ViewData, private _viewRef: ViewRef, private _component: any) {\n super();\n this._elDef = this._view.def.nodes[0];\n this.hostView = _viewRef;\n this.changeDetectorRef = _viewRef;\n this.instance = _component;\n }\n override get location(): ElementRef {\n return new ElementRef(asElementData(this._view, this._elDef.nodeIndex).renderElement);\n }\n override get injector(): Injector {\n return new Injector_(this._view, this._elDef);\n }\n override get componentType(): Type<any> {\n return <any>this._component.constructor;\n }\n\n override destroy(): void {\n this._viewRef.destroy();\n }\n override onDestroy(callback: Function): void {\n this._viewRef.onDestroy(callback);\n }\n}\n\nexport function createViewContainerData(\n view: ViewData, elDef: NodeDef, elData: ElementData): ViewContainerData {\n return new ViewContainerRef_(view, elDef, elData);\n}\n\nclass ViewContainerRef_ implements ViewContainerData {\n /**\n * @internal\n */\n _embeddedViews: ViewData[] = [];\n constructor(private _view: ViewData, private _elDef: NodeDef, private _data: ElementData) {}\n\n get element(): ElementRef {\n return new ElementRef(this._data.renderElement);\n }\n\n get injector(): Injector {\n return new Injector_(this._view, this._elDef);\n }\n\n /** @deprecated No replacement */\n get parentInjector(): Injector {\n let view = this._view;\n let elDef = this._elDef.parent;\n while (!elDef && view) {\n elDef = viewParentEl(view);\n view = view.parent!;\n }\n\n return view ? new Injector_(view, elDef) : new Injector_(this._view, null);\n }\n\n clear(): void {\n const len = this._embeddedViews.length;\n for (let i = len - 1; i >= 0; i--) {\n const view = detachEmbeddedView(this._data, i)!;\n Services.destroyView(view);\n }\n }\n\n get(index: number): ViewRef|null {\n const view = this._embeddedViews[index];\n if (view) {\n const ref = new ViewRef_(view);\n ref.attachToViewContainerRef(this);\n return ref;\n }\n return null;\n }\n\n get length(): number {\n return this._embeddedViews.length;\n }\n\n createEmbeddedView<C>(templateRef: TemplateRef<C>, context?: C, index?: number):\n EmbeddedViewRef<C> {\n const viewRef = templateRef.createEmbeddedView(context || <any>{});\n this.insert(viewRef, index);\n return viewRef;\n }\n\n createComponent<C>(\n componentFactory: ComponentFactory<C>, index?: number, injector?: Injector,\n projectableNodes?: any[][], ngModuleRef?: NgModuleRef<any>): ComponentRef<C> {\n const contextInjector = injector || this.parentInjector;\n if (!ngModuleRef && !(componentFactory instanceof ComponentFactoryBoundToModule)) {\n ngModuleRef = contextInjector.get(NgModuleRef);\n }\n const componentRef =\n componentFactory.create(contextInjector, projectableNodes, undefined, ngModuleRef);\n this.insert(componentRef.hostView, index);\n return componentRef;\n }\n\n insert(viewRef: ViewRef, index?: number): ViewRef {\n if (viewRef.destroyed) {\n throw new Error('Cannot insert a destroyed View in a ViewContainer!');\n }\n const viewRef_ = <ViewRef_>viewRef;\n const viewData = viewRef_._view;\n attachEmbeddedView(this._view, this._data, index, viewData);\n viewRef_.attachToViewContainerRef(this);\n return viewRef;\n }\n\n move(viewRef: ViewRef_, currentIndex: number): ViewRef {\n if (viewRef.destroyed) {\n throw new Error('Cannot move a destroyed View in a ViewContainer!');\n }\n const previousIndex = this._embeddedViews.indexOf(viewRef._view);\n moveEmbeddedView(this._data, previousIndex, currentIndex);\n return viewRef;\n }\n\n indexOf(viewRef: ViewRef): number {\n return this._embeddedViews.indexOf((<ViewRef_>viewRef)._view);\n }\n\n remove(index?: number): void {\n const viewData = detachEmbeddedView(this._data, index);\n if (viewData) {\n Services.destroyView(viewData);\n }\n }\n\n detach(index?: number): ViewRef|null {\n const view = detachEmbeddedView(this._data, index);\n return view ? new ViewRef_(view) : null;\n }\n}\n\nexport function createChangeDetectorRef(view: ViewData): ChangeDetectorRef {\n return new ViewRef_(view);\n}\n\nexport class ViewRef_ implements EmbeddedViewRef<any>, InternalViewRef {\n /** @internal */\n _view: ViewData;\n private _viewContainerRef: ViewContainerRef|null;\n private _appRef: ViewRefTracker|null;\n\n constructor(_view: ViewData) {\n this._view = _view;\n this._viewContainerRef = null;\n this._appRef = null;\n }\n\n get rootNodes(): any[] {\n return rootRenderNodes(this._view);\n }\n\n get context() {\n return this._view.context;\n }\n\n set context(value: any) {\n this._view.context = value;\n }\n\n get destroyed(): boolean {\n return (this._view.state & ViewState.Destroyed) !== 0;\n }\n\n markForCheck(): void {\n markParentViewsForCheck(this._view);\n }\n detach(): void {\n this._view.state &= ~ViewState.Attached;\n }\n detectChanges(): void {\n const fs = this._view.root.rendererFactory;\n if (fs.begin) {\n fs.begin();\n }\n try {\n Services.checkAndUpdateView(this._view);\n } finally {\n if (fs.end) {\n fs.end();\n }\n }\n }\n checkNoChanges(): void {\n Services.checkNoChangesView(this._view);\n }\n\n reattach(): void {\n this._view.state |= ViewState.Attached;\n }\n onDestroy(callback: Function) {\n if (!this._view.disposables) {\n this._view.disposables = [];\n }\n this._view.disposables.push(<any>callback);\n }\n\n destroy() {\n if (this._appRef) {\n this._appRef.detachView(this);\n } else if (this._viewContainerRef) {\n this._viewContainerRef.detach(this._viewContainerRef.indexOf(this));\n }\n Services.destroyView(this._view);\n }\n\n detachFromAppRef() {\n this._appRef = null;\n renderDetachView(this._view);\n Services.dirtyParentQueries(this._view);\n }\n\n attachToAppRef(appRef: ViewRefTracker) {\n if (this._viewContainerRef) {\n throw new Error('This view is already attached to a ViewContainer!');\n }\n this._appRef = appRef;\n }\n\n attachToViewContainerRef(vcRef: ViewContainerRef) {\n if (this._appRef) {\n throw new Error('This view is already attached directly to the ApplicationRef!');\n }\n this._viewContainerRef = vcRef;\n }\n}\n\nexport function createTemplateData(view: ViewData, def: NodeDef): TemplateData {\n return new TemplateRef_(view, def);\n}\n\nclass TemplateRef_ extends TemplateRef<any> implements TemplateData {\n /**\n * @internal\n */\n // TODO(issue/24571): remove '!'.\n _projectedViews!: ViewData[];\n\n constructor(private _parentView: ViewData, private _def: NodeDef) {\n super();\n }\n\n override createEmbeddedView(context: any): EmbeddedViewRef<any> {\n return new ViewRef_(Services.createEmbeddedView(\n this._parentView, this._def, this._def.element!.template !, context));\n }\n\n override get elementRef(): ElementRef {\n return new ElementRef(asElementData(this._parentView, this._def.nodeIndex).renderElement);\n }\n}\n\nexport function createInjector(view: ViewData, elDef: NodeDef): Injector {\n return new Injector_(view, elDef);\n}\n\nclass Injector_ implements Injector {\n constructor(private view: ViewData, private elDef: NodeDef|null) {}\n get(token: any, notFoundValue: any = Injector.THROW_IF_NOT_FOUND): any {\n const allowPrivateServices =\n this.elDef ? (this.elDef.flags & NodeFlags.ComponentView) !== 0 : false;\n return Services.resolveDep(\n this.view, this.elDef, allowPrivateServices,\n {flags: DepFlags.None, token, tokenKey: tokenKey(token)}, notFoundValue);\n }\n}\n\nexport function nodeValue(view: ViewData, index: number): any {\n const def = view.def.nodes[index];\n if (def.flags & NodeFlags.TypeElement) {\n const elData = asElementData(view, def.nodeIndex);\n return def.element!.template ? elData.template : elData.renderElement;\n } else if (def.flags & NodeFlags.TypeText) {\n return asTextData(view, def.nodeIndex).renderText;\n } else if (def.flags & (NodeFlags.CatProvider | NodeFlags.TypePipe)) {\n return asProviderData(view, def.nodeIndex).instance;\n }\n throw new Error(`Illegal state: read nodeValue for node index ${index}`);\n}\n\nexport function createNgModuleRef(\n moduleType: Type<any>, parent: Injector, bootstrapComponents: Type<any>[],\n def: NgModuleDefinition): NgModuleRef<any> {\n return new NgModuleRef_(moduleType, parent, bootstrapComponents, def);\n}\n\nclass NgModuleRef_ implements NgModuleData, InternalNgModuleRef<any> {\n private _destroyListeners: (() => void)[] = [];\n private _destroyed: boolean = false;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _providers!: any[];\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _modules!: any[];\n\n readonly injector: Injector = this;\n\n constructor(\n private _moduleType: Type<any>, public _parent: Injector,\n public _bootstrapComponents: Type<any>[], public _def: NgModuleDefinition) {\n initNgModule(this);\n }\n\n get(token: any, notFoundValue: any = Injector.THROW_IF_NOT_FOUND,\n injectFlags: InjectFlags = InjectFlags.Default): any {\n let flags = DepFlags.None;\n if (injectFlags & InjectFlags.SkipSelf) {\n flags |= DepFlags.SkipSelf;\n } else if (injectFlags & InjectFlags.Self) {\n flags |= DepFlags.Self;\n }\n return resolveNgModuleDep(\n this, {token: token, tokenKey: tokenKey(token), flags: flags}, notFoundValue);\n }\n\n get instance() {\n return this.get(this._moduleType);\n }\n\n get componentFactoryResolver() {\n return this.get(ComponentFactoryResolver);\n }\n\n destroy(): void {\n if (this._destroyed) {\n throw new Error(\n `The ng module ${stringify(this.instance.constructor)} has already been destroyed.`);\n }\n this._destroyed = true;\n callNgModuleLifecycle(this, NodeFlags.OnDestroy);\n this._destroyListeners.forEach((listener) => listener());\n }\n\n onDestroy(callback: () => void): void {\n this._destroyListeners.push(callback);\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 {ChangeDetectorRef, SimpleChange, SimpleChanges, WrappedValue} from '../change_detection/change_detection';\nimport {INJECTOR, Injector, resolveForwardRef} from '../di';\nimport {ElementRef} from '../linker/element_ref';\nimport {TemplateRef} from '../linker/template_ref';\nimport {ViewContainerRef} from '../linker/view_container_ref';\nimport {Renderer2} from '../render/api';\nimport {isObservable} from '../util/lang';\nimport {stringify} from '../util/stringify';\n\nimport {createChangeDetectorRef, createInjector} from './refs';\nimport {asElementData, asProviderData, BindingDef, BindingFlags, DepDef, DepFlags, NodeDef, NodeFlags, OutputDef, OutputType, ProviderData, QueryValueType, Services, shouldCallLifecycleInitHook, ViewData, ViewFlags, ViewState} from './types';\nimport {calcBindingFlags, checkBinding, dispatchEvent, isComponentView, splitDepsDsl, splitMatchedQueriesDsl, tokenKey, viewParentEl} from './util';\n\nconst Renderer2TokenKey = tokenKey(Renderer2);\nconst ElementRefTokenKey = tokenKey(ElementRef);\nconst ViewContainerRefTokenKey = tokenKey(ViewContainerRef);\nconst TemplateRefTokenKey = tokenKey(TemplateRef);\nconst ChangeDetectorRefTokenKey = tokenKey(ChangeDetectorRef);\nconst InjectorRefTokenKey = tokenKey(Injector);\nconst INJECTORRefTokenKey = tokenKey(INJECTOR);\n\nexport function directiveDef(\n checkIndex: number, flags: NodeFlags, matchedQueries: null|[string | number, QueryValueType][],\n childCount: number, ctor: any, deps: ([DepFlags, any]|any)[],\n props?: null|{[name: string]: [number, string]},\n outputs?: null|{[name: string]: string}): NodeDef {\n const bindings: BindingDef[] = [];\n if (props) {\n for (let prop in props) {\n const [bindingIndex, nonMinifiedName] = props[prop];\n bindings[bindingIndex] = {\n flags: BindingFlags.TypeProperty,\n name: prop,\n nonMinifiedName,\n ns: null,\n securityContext: null,\n suffix: null\n };\n }\n }\n const outputDefs: OutputDef[] = [];\n if (outputs) {\n for (let propName in outputs) {\n outputDefs.push(\n {type: OutputType.DirectiveOutput, propName, target: null, eventName: outputs[propName]});\n }\n }\n flags |= NodeFlags.TypeDirective;\n return _def(\n checkIndex, flags, matchedQueries, childCount, ctor, ctor, deps, bindings, outputDefs);\n}\n\nexport function pipeDef(flags: NodeFlags, ctor: any, deps: ([DepFlags, any]|any)[]): NodeDef {\n flags |= NodeFlags.TypePipe;\n return _def(-1, flags, null, 0, ctor, ctor, deps);\n}\n\nexport function providerDef(\n flags: NodeFlags, matchedQueries: null|[string | number, QueryValueType][], token: any,\n value: any, deps: ([DepFlags, any]|any)[]): NodeDef {\n return _def(-1, flags, matchedQueries, 0, token, value, deps);\n}\n\nexport function _def(\n checkIndex: number, flags: NodeFlags, matchedQueriesDsl: [string|number, QueryValueType][]|null,\n childCount: number, token: any, value: any, deps: ([DepFlags, any]|any)[],\n bindings?: BindingDef[], outputs?: OutputDef[]): NodeDef {\n const {matchedQueries, references, matchedQueryIds} = splitMatchedQueriesDsl(matchedQueriesDsl);\n if (!outputs) {\n outputs = [];\n }\n if (!bindings) {\n bindings = [];\n }\n // Need to resolve forwardRefs as e.g. for `useValue` we\n // lowered the expression and then stopped evaluating it,\n // i.e. also didn't unwrap it.\n value = resolveForwardRef(value);\n\n const depDefs = splitDepsDsl(deps, stringify(token));\n\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n checkIndex,\n flags,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n matchedQueries,\n matchedQueryIds,\n references,\n ngContentIndex: -1,\n childCount,\n bindings,\n bindingFlags: calcBindingFlags(bindings),\n outputs,\n element: null,\n provider: {token, value, deps: depDefs},\n text: null,\n query: null,\n ngContent: null\n };\n}\n\nexport function createProviderInstance(view: ViewData, def: NodeDef): any {\n return _createProviderInstance(view, def);\n}\n\nexport function createPipeInstance(view: ViewData, def: NodeDef): any {\n // deps are looked up from component.\n let compView = view;\n while (compView.parent && !isComponentView(compView)) {\n compView = compView.parent;\n }\n // pipes can see the private services of the component\n const allowPrivateServices = true;\n // pipes are always eager and classes!\n return createClass(\n compView.parent!, viewParentEl(compView)!, allowPrivateServices, def.provider!.value,\n def.provider!.deps);\n}\n\nexport function createDirectiveInstance(view: ViewData, def: NodeDef): any {\n // components can see other private services, other directives can't.\n const allowPrivateServices = (def.flags & NodeFlags.Component) > 0;\n // directives are always eager and classes!\n const instance =\n createClass(view, def.parent!, allowPrivateServices, def.provider!.value, def.provider!.deps);\n if (def.outputs.length) {\n for (let i = 0; i < def.outputs.length; i++) {\n const output = def.outputs[i];\n const outputObservable = instance[output.propName!];\n if (isObservable(outputObservable)) {\n const subscription = outputObservable.subscribe(\n eventHandlerClosure(view, def.parent!.nodeIndex, output.eventName));\n view.disposables![def.outputIndex + i] = subscription.unsubscribe.bind(subscription);\n } else {\n throw new Error(\n `@Output ${output.propName} not initialized in '${instance.constructor.name}'.`);\n }\n }\n }\n return instance;\n}\n\nfunction eventHandlerClosure(view: ViewData, index: number, eventName: string) {\n return (event: any) => dispatchEvent(view, index, eventName, event);\n}\n\nexport function checkAndUpdateDirectiveInline(\n view: ViewData, def: NodeDef, v0: any, v1: any, v2: any, v3: any, v4: any, v5: any, v6: any,\n v7: any, v8: any, v9: any): boolean {\n const providerData = asProviderData(view, def.nodeIndex);\n const directive = providerData.instance;\n let changed = false;\n let changes: SimpleChanges = undefined!;\n const bindLen = def.bindings.length;\n if (bindLen > 0 && checkBinding(view, def, 0, v0)) {\n changed = true;\n changes = updateProp(view, providerData, def, 0, v0, changes);\n }\n if (bindLen > 1 && checkBinding(view, def, 1, v1)) {\n changed = true;\n changes = updateProp(view, providerData, def, 1, v1, changes);\n }\n if (bindLen > 2 && checkBinding(view, def, 2, v2)) {\n changed = true;\n changes = updateProp(view, providerData, def, 2, v2, changes);\n }\n if (bindLen > 3 && checkBinding(view, def, 3, v3)) {\n changed = true;\n changes = updateProp(view, providerData, def, 3, v3, changes);\n }\n if (bindLen > 4 && checkBinding(view, def, 4, v4)) {\n changed = true;\n changes = updateProp(view, providerData, def, 4, v4, changes);\n }\n if (bindLen > 5 && checkBinding(view, def, 5, v5)) {\n changed = true;\n changes = updateProp(view, providerData, def, 5, v5, changes);\n }\n if (bindLen > 6 && checkBinding(view, def, 6, v6)) {\n changed = true;\n changes = updateProp(view, providerData, def, 6, v6, changes);\n }\n if (bindLen > 7 && checkBinding(view, def, 7, v7)) {\n changed = true;\n changes = updateProp(view, providerData, def, 7, v7, changes);\n }\n if (bindLen > 8 && checkBinding(view, def, 8, v8)) {\n changed = true;\n changes = updateProp(view, providerData, def, 8, v8, changes);\n }\n if (bindLen > 9 && checkBinding(view, def, 9, v9)) {\n changed = true;\n changes = updateProp(view, providerData, def, 9, v9, changes);\n }\n if (changes) {\n directive.ngOnChanges(changes);\n }\n if ((def.flags & NodeFlags.OnInit) &&\n shouldCallLifecycleInitHook(view, ViewState.InitState_CallingOnInit, def.nodeIndex)) {\n directive.ngOnInit();\n }\n if (def.flags & NodeFlags.DoCheck) {\n directive.ngDoCheck();\n }\n return changed;\n}\n\nexport function checkAndUpdateDirectiveDynamic(\n view: ViewData, def: NodeDef, values: any[]): boolean {\n const providerData = asProviderData(view, def.nodeIndex);\n const directive = providerData.instance;\n let changed = false;\n let changes: SimpleChanges = undefined!;\n for (let i = 0; i < values.length; i++) {\n if (checkBinding(view, def, i, values[i])) {\n changed = true;\n changes = updateProp(view, providerData, def, i, values[i], changes);\n }\n }\n if (changes) {\n directive.ngOnChanges(changes);\n }\n if ((def.flags & NodeFlags.OnInit) &&\n shouldCallLifecycleInitHook(view, ViewState.InitState_CallingOnInit, def.nodeIndex)) {\n directive.ngOnInit();\n }\n if (def.flags & NodeFlags.DoCheck) {\n directive.ngDoCheck();\n }\n return changed;\n}\n\nfunction _createProviderInstance(view: ViewData, def: NodeDef): any {\n // private services can see other private services\n const allowPrivateServices = (def.flags & NodeFlags.PrivateProvider) > 0;\n const providerDef = def.provider;\n switch (def.flags & NodeFlags.Types) {\n case NodeFlags.TypeClassProvider:\n return createClass(\n view, def.parent!, allowPrivateServices, providerDef!.value, providerDef!.deps);\n case NodeFlags.TypeFactoryProvider:\n return callFactory(\n view, def.parent!, allowPrivateServices, providerDef!.value, providerDef!.deps);\n case NodeFlags.TypeUseExistingProvider:\n return resolveDep(view, def.parent!, allowPrivateServices, providerDef!.deps[0]);\n case NodeFlags.TypeValueProvider:\n return providerDef!.value;\n }\n}\n\nfunction createClass(\n view: ViewData, elDef: NodeDef, allowPrivateServices: boolean, ctor: any, deps: DepDef[]): any {\n const len = deps.length;\n switch (len) {\n case 0:\n return new ctor();\n case 1:\n return new ctor(resolveDep(view, elDef, allowPrivateServices, deps[0]));\n case 2:\n return new ctor(\n resolveDep(view, elDef, allowPrivateServices, deps[0]),\n resolveDep(view, elDef, allowPrivateServices, deps[1]));\n case 3:\n return new ctor(\n resolveDep(view, elDef, allowPrivateServices, deps[0]),\n resolveDep(view, elDef, allowPrivateServices, deps[1]),\n resolveDep(view, elDef, allowPrivateServices, deps[2]));\n default:\n const depValues = [];\n for (let i = 0; i < len; i++) {\n depValues.push(resolveDep(view, elDef, allowPrivateServices, deps[i]));\n }\n return new ctor(...depValues);\n }\n}\n\nfunction callFactory(\n view: ViewData, elDef: NodeDef, allowPrivateServices: boolean, factory: any,\n deps: DepDef[]): any {\n const len = deps.length;\n switch (len) {\n case 0:\n return factory();\n case 1:\n return factory(resolveDep(view, elDef, allowPrivateServices, deps[0]));\n case 2:\n return factory(\n resolveDep(view, elDef, allowPrivateServices, deps[0]),\n resolveDep(view, elDef, allowPrivateServices, deps[1]));\n case 3:\n return factory(\n resolveDep(view, elDef, allowPrivateServices, deps[0]),\n resolveDep(view, elDef, allowPrivateServices, deps[1]),\n resolveDep(view, elDef, allowPrivateServices, deps[2]));\n default:\n const depValues = [];\n for (let i = 0; i < len; i++) {\n depValues.push(resolveDep(view, elDef, allowPrivateServices, deps[i]));\n }\n return factory(...depValues);\n }\n}\n\n// This default value is when checking the hierarchy for a token.\n//\n// It means both:\n// - the token is not provided by the current injector,\n// - only the element injectors should be checked (ie do not check module injectors\n//\n// mod1\n// /\n// el1 mod2\n// \\ /\n// el2\n//\n// When requesting el2.injector.get(token), we should check in the following order and return the\n// first found value:\n// - el2.injector.get(token, default)\n// - el1.injector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) -> do not check the module\n// - mod2.injector.get(token, default)\nexport const NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR = {};\n\nexport function resolveDep(\n view: ViewData, elDef: NodeDef, allowPrivateServices: boolean, depDef: DepDef,\n notFoundValue: any = Injector.THROW_IF_NOT_FOUND): any {\n if (depDef.flags & DepFlags.Value) {\n return depDef.token;\n }\n const startView = view;\n if (depDef.flags & DepFlags.Optional) {\n notFoundValue = null;\n }\n const tokenKey = depDef.tokenKey;\n\n if (tokenKey === ChangeDetectorRefTokenKey) {\n // directives on the same element as a component should be able to control the change detector\n // of that component as well.\n allowPrivateServices = !!(elDef && elDef.element!.componentView);\n }\n\n if (elDef && (depDef.flags & DepFlags.SkipSelf)) {\n allowPrivateServices = false;\n elDef = elDef.parent!;\n }\n\n let searchView: ViewData|null = view;\n while (searchView) {\n if (elDef) {\n switch (tokenKey) {\n case Renderer2TokenKey: {\n const compView = findCompView(searchView, elDef, allowPrivateServices);\n return compView.renderer;\n }\n case ElementRefTokenKey:\n return new ElementRef(asElementData(searchView, elDef.nodeIndex).renderElement);\n case ViewContainerRefTokenKey:\n return asElementData(searchView, elDef.nodeIndex).viewContainer;\n case TemplateRefTokenKey: {\n if (elDef.element!.template) {\n return asElementData(searchView, elDef.nodeIndex).template;\n }\n break;\n }\n case ChangeDetectorRefTokenKey: {\n let cdView = findCompView(searchView, elDef, allowPrivateServices);\n return createChangeDetectorRef(cdView);\n }\n case InjectorRefTokenKey:\n case INJECTORRefTokenKey:\n return createInjector(searchView, elDef);\n default:\n const providerDef =\n (allowPrivateServices ? elDef.element!.allProviders :\n elDef.element!.publicProviders)![tokenKey];\n if (providerDef) {\n let providerData = asProviderData(searchView, providerDef.nodeIndex);\n if (!providerData) {\n providerData = {instance: _createProviderInstance(searchView, providerDef)};\n searchView.nodes[providerDef.nodeIndex] = providerData as any;\n }\n return providerData.instance;\n }\n }\n }\n\n allowPrivateServices = isComponentView(searchView);\n elDef = viewParentEl(searchView)!;\n searchView = searchView.parent!;\n\n if (depDef.flags & DepFlags.Self) {\n searchView = null;\n }\n }\n\n const value = startView.root.injector.get(depDef.token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR);\n\n if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR ||\n notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) {\n // Return the value from the root element injector when\n // - it provides it\n // (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n // - the module injector should not be checked\n // (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n return value;\n }\n\n return startView.root.ngModule.injector.get(depDef.token, notFoundValue);\n}\n\nfunction findCompView(view: ViewData, elDef: NodeDef, allowPrivateServices: boolean) {\n let compView: ViewData;\n if (allowPrivateServices) {\n compView = asElementData(view, elDef.nodeIndex).componentView;\n } else {\n compView = view;\n while (compView.parent && !isComponentView(compView)) {\n compView = compView.parent;\n }\n }\n return compView;\n}\n\nfunction updateProp(\n view: ViewData, providerData: ProviderData, def: NodeDef, bindingIdx: number, value: any,\n changes: SimpleChanges): SimpleChanges {\n if (def.flags & NodeFlags.Component) {\n const compView = asElementData(view, def.parent!.nodeIndex).componentView;\n if (compView.def.flags & ViewFlags.OnPush) {\n compView.state |= ViewState.ChecksEnabled;\n }\n }\n const binding = def.bindings[bindingIdx];\n const propName = binding.name!;\n // Note: This is still safe with Closure Compiler as\n // the user passed in the property name as an object has to `providerDef`,\n // so Closure Compiler will have renamed the property correctly already.\n providerData.instance[propName] = value;\n if (def.flags & NodeFlags.OnChanges) {\n changes = changes || {};\n const oldValue = WrappedValue.unwrap(view.oldValues[def.bindingIndex + bindingIdx]);\n const binding = def.bindings[bindingIdx];\n changes[binding.nonMinifiedName!] =\n new SimpleChange(oldValue, value, (view.state & ViewState.FirstCheck) !== 0);\n }\n view.oldValues[def.bindingIndex + bindingIdx] = value;\n return changes;\n}\n\n// This function calls the ngAfterContentCheck, ngAfterContentInit,\n// ngAfterViewCheck, and ngAfterViewInit lifecycle hooks (depending on the node\n// flags in lifecycle). Unlike ngDoCheck, ngOnChanges and ngOnInit, which are\n// called during a pre-order traversal of the view tree (that is calling the\n// parent hooks before the child hooks) these events are sent in using a\n// post-order traversal of the tree (children before parents). This changes the\n// meaning of initIndex in the view state. For ngOnInit, initIndex tracks the\n// expected nodeIndex which a ngOnInit should be called. When sending\n// ngAfterContentInit and ngAfterViewInit it is the expected count of\n// ngAfterContentInit or ngAfterViewInit methods that have been called. This\n// ensure that despite being called recursively or after picking up after an\n// exception, the ngAfterContentInit or ngAfterViewInit will be called on the\n// correct nodes. Consider for example, the following (where E is an element\n// and D is a directive)\n// Tree: pre-order index post-order index\n// E1 0 6\n// E2 1 1\n// D3 2 0\n// E4 3 5\n// E5 4 4\n// E6 5 2\n// E7 6 3\n// As can be seen, the post-order index has an unclear relationship to the\n// pre-order index (postOrderIndex === preOrderIndex - parentCount +\n// childCount). Since number of calls to ngAfterContentInit and ngAfterViewInit\n// are stable (will be the same for the same view regardless of exceptions or\n// recursion) we just need to count them which will roughly correspond to the\n// post-order index (it skips elements and directives that do not have\n// lifecycle hooks).\n//\n// For example, if an exception is raised in the E6.onAfterViewInit() the\n// initIndex is left at 3 (by shouldCallLifecycleInitHook() which set it to\n// initIndex + 1). When checkAndUpdateView() is called again D3, E2 and E6 will\n// not have their ngAfterViewInit() called but, starting with E7, the rest of\n// the view will begin getting ngAfterViewInit() called until a check and\n// pass is complete.\n//\n// This algorthim also handles recursion. Consider if E4's ngAfterViewInit()\n// indirectly calls E1's ChangeDetectorRef.detectChanges(). The expected\n// initIndex is set to 6, the recusive checkAndUpdateView() starts walk again.\n// D3, E2, E6, E7, E5 and E4 are skipped, ngAfterViewInit() is called on E1.\n// When the recursion returns the initIndex will be 7 so E1 is skipped as it\n// has already been called in the recursively called checkAnUpdateView().\nexport function callLifecycleHooksChildrenFirst(view: ViewData, lifecycles: NodeFlags) {\n if (!(view.def.nodeFlags & lifecycles)) {\n return;\n }\n const nodes = view.def.nodes;\n let initIndex = 0;\n for (let i = 0; i < nodes.length; i++) {\n const nodeDef = nodes[i];\n let parent = nodeDef.parent;\n if (!parent && nodeDef.flags & lifecycles) {\n // matching root node (e.g. a pipe)\n callProviderLifecycles(view, i, nodeDef.flags & lifecycles, initIndex++);\n }\n if ((nodeDef.childFlags & lifecycles) === 0) {\n // no child matches one of the lifecycles\n i += nodeDef.childCount;\n }\n while (parent && (parent.flags & NodeFlags.TypeElement) &&\n i === parent.nodeIndex + parent.childCount) {\n // last child of an element\n if (parent.directChildFlags & lifecycles) {\n initIndex = callElementProvidersLifecycles(view, parent, lifecycles, initIndex);\n }\n parent = parent.parent;\n }\n }\n}\n\nfunction callElementProvidersLifecycles(\n view: ViewData, elDef: NodeDef, lifecycles: NodeFlags, initIndex: number): number {\n for (let i = elDef.nodeIndex + 1; i <= elDef.nodeIndex + elDef.childCount; i++) {\n const nodeDef = view.def.nodes[i];\n if (nodeDef.flags & lifecycles) {\n callProviderLifecycles(view, i, nodeDef.flags & lifecycles, initIndex++);\n }\n // only visit direct children\n i += nodeDef.childCount;\n }\n return initIndex;\n}\n\nfunction callProviderLifecycles(\n view: ViewData, index: number, lifecycles: NodeFlags, initIndex: number) {\n const providerData = asProviderData(view, index);\n if (!providerData) {\n return;\n }\n const provider = providerData.instance;\n if (!provider) {\n return;\n }\n Services.setCurrentNode(view, index);\n if (lifecycles & NodeFlags.AfterContentInit &&\n shouldCallLifecycleInitHook(view, ViewState.InitState_CallingAfterContentInit, initIndex)) {\n provider.ngAfterContentInit();\n }\n if (lifecycles & NodeFlags.AfterContentChecked) {\n provider.ngAfterContentChecked();\n }\n if (lifecycles & NodeFlags.AfterViewInit &&\n shouldCallLifecycleInitHook(view, ViewState.InitState_CallingAfterViewInit, initIndex)) {\n provider.ngAfterViewInit();\n }\n if (lifecycles & NodeFlags.AfterViewChecked) {\n provider.ngAfterViewChecked();\n }\n if (lifecycles & NodeFlags.OnDestroy) {\n provider.ngOnDestroy();\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 {ChangeDetectorRef as ViewEngine_ChangeDetectorRef} from '../change_detection/change_detector_ref';\nimport {InjectionToken} from '../di/injection_token';\nimport {Injector} from '../di/injector';\nimport {InjectFlags} from '../di/interface/injector';\nimport {ProviderToken} from '../di/provider_token';\nimport {Type} from '../interface/type';\nimport {ComponentFactory as viewEngine_ComponentFactory, ComponentRef as viewEngine_ComponentRef} from '../linker/component_factory';\nimport {ComponentFactoryResolver as viewEngine_ComponentFactoryResolver} from '../linker/component_factory_resolver';\nimport {createElementRef, ElementRef as viewEngine_ElementRef} from '../linker/element_ref';\nimport {NgModuleRef as viewEngine_NgModuleRef} from '../linker/ng_module_factory';\nimport {RendererFactory2} from '../render/api';\nimport {Sanitizer} from '../sanitization/sanitizer';\nimport {VERSION} from '../version';\nimport {NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR} from '../view/provider';\nimport {assertComponentType} from './assert';\nimport {createRootComponent, createRootComponentView, createRootContext, LifecycleHooksFeature} from './component';\nimport {getComponentDef} from './definition';\nimport {NodeInjector} from './di';\nimport {createLView, createTView, locateHostElement, renderView} from './instructions/shared';\nimport {ComponentDef} from './interfaces/definition';\nimport {TContainerNode, TElementContainerNode, TElementNode, TNode} from './interfaces/node';\nimport {domRendererFactory3, RendererFactory3} from './interfaces/renderer';\nimport {RNode} from './interfaces/renderer_dom';\nimport {HEADER_OFFSET, LView, LViewFlags, TViewType} from './interfaces/view';\nimport {MATH_ML_NAMESPACE, SVG_NAMESPACE} from './namespaces';\nimport {createElementNode, writeDirectClass} from './node_manipulation';\nimport {extractAttrsAndClassesFromSelector, stringifyCSSSelectorList} from './node_selector_matcher';\nimport {enterView, leaveView} from './state';\nimport {setUpAttributes} from './util/attrs_utils';\nimport {defaultScheduler} from './util/misc_utils';\nimport {getTNode} from './util/view_utils';\nimport {RootViewRef, ViewRef} from './view_ref';\n\nexport class ComponentFactoryResolver extends viewEngine_ComponentFactoryResolver {\n /**\n * @param ngModule The NgModuleRef to which all resolved factories are bound.\n */\n constructor(private ngModule?: viewEngine_NgModuleRef<any>) {\n super();\n }\n\n override resolveComponentFactory<T>(component: Type<T>): viewEngine_ComponentFactory<T> {\n ngDevMode && assertComponentType(component);\n const componentDef = getComponentDef(component)!;\n return new ComponentFactory(componentDef, this.ngModule);\n }\n}\n\nfunction toRefArray(map: {[key: string]: string}): {propName: string; templateName: string;}[] {\n const array: {propName: string; templateName: string;}[] = [];\n for (let nonMinified in map) {\n if (map.hasOwnProperty(nonMinified)) {\n const minified = map[nonMinified];\n array.push({propName: minified, templateName: nonMinified});\n }\n }\n return array;\n}\n\nfunction getNamespace(elementName: string): string|null {\n const name = elementName.toLowerCase();\n return name === 'svg' ? SVG_NAMESPACE : (name === 'math' ? MATH_ML_NAMESPACE : null);\n}\n\n/**\n * A change detection scheduler token for {@link RootContext}. This token is the default value used\n * for the default `RootContext` found in the {@link ROOT_CONTEXT} token.\n */\nexport const SCHEDULER = new InjectionToken<((fn: () => void) => void)>('SCHEDULER_TOKEN', {\n providedIn: 'root',\n factory: () => defaultScheduler,\n});\n\nfunction createChainedInjector(rootViewInjector: Injector, moduleInjector: Injector): Injector {\n return {\n get: <T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): T => {\n const value = rootViewInjector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as T, flags);\n\n if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR ||\n notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) {\n // Return the value from the root element injector when\n // - it provides it\n // (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n // - the module injector should not be checked\n // (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n return value;\n }\n\n return moduleInjector.get(token, notFoundValue, flags);\n }\n };\n}\n\n/**\n * Render3 implementation of {@link viewEngine_ComponentFactory}.\n */\nexport class ComponentFactory<T> extends viewEngine_ComponentFactory<T> {\n override selector: string;\n override componentType: Type<any>;\n override ngContentSelectors: string[];\n isBoundToModule: boolean;\n\n override get inputs(): {propName: string; templateName: string;}[] {\n return toRefArray(this.componentDef.inputs);\n }\n\n override get outputs(): {propName: string; templateName: string;}[] {\n return toRefArray(this.componentDef.outputs);\n }\n\n /**\n * @param componentDef The component definition.\n * @param ngModule The NgModuleRef to which the factory is bound.\n */\n constructor(\n private componentDef: ComponentDef<any>, private ngModule?: viewEngine_NgModuleRef<any>) {\n super();\n this.componentType = componentDef.type;\n this.selector = stringifyCSSSelectorList(componentDef.selectors);\n this.ngContentSelectors =\n componentDef.ngContentSelectors ? componentDef.ngContentSelectors : [];\n this.isBoundToModule = !!ngModule;\n }\n\n override create(\n injector: Injector, projectableNodes?: any[][]|undefined, rootSelectorOrNode?: any,\n ngModule?: viewEngine_NgModuleRef<any>|undefined): viewEngine_ComponentRef<T> {\n ngModule = ngModule || this.ngModule;\n\n const rootViewInjector =\n ngModule ? createChainedInjector(injector, ngModule.injector) : injector;\n\n const rendererFactory =\n rootViewInjector.get(RendererFactory2, domRendererFactory3) as RendererFactory3;\n const sanitizer = rootViewInjector.get(Sanitizer, null);\n\n const hostRenderer = rendererFactory.createRenderer(null, this.componentDef);\n // Determine a tag name used for creating host elements when this component is created\n // dynamically. Default to 'div' if this component did not specify any tag name in its selector.\n const elementName = this.componentDef.selectors[0][0] as string || 'div';\n const hostRNode = rootSelectorOrNode ?\n locateHostElement(hostRenderer, rootSelectorOrNode, this.componentDef.encapsulation) :\n createElementNode(\n rendererFactory.createRenderer(null, this.componentDef), elementName,\n getNamespace(elementName));\n\n const rootFlags = this.componentDef.onPush ? LViewFlags.Dirty | LViewFlags.IsRoot :\n LViewFlags.CheckAlways | LViewFlags.IsRoot;\n const rootContext = createRootContext();\n\n // Create the root view. Uses empty TView and ContentTemplate.\n const rootTView = createTView(TViewType.Root, null, null, 1, 0, null, null, null, null, null);\n const rootLView = createLView(\n null, rootTView, rootContext, rootFlags, null, null, rendererFactory, hostRenderer,\n sanitizer, rootViewInjector);\n\n // rootView is the parent when bootstrapping\n // TODO(misko): it looks like we are entering view here but we don't really need to as\n // `renderView` does that. However as the code is written it is needed because\n // `createRootComponentView` and `createRootComponent` both read global state. Fixing those\n // issues would allow us to drop this.\n enterView(rootLView);\n\n let component: T;\n let tElementNode: TElementNode;\n\n try {\n const componentView = createRootComponentView(\n hostRNode, this.componentDef, rootLView, rendererFactory, hostRenderer);\n if (hostRNode) {\n if (rootSelectorOrNode) {\n setUpAttributes(hostRenderer, hostRNode, ['ng-version', VERSION.full]);\n } else {\n // If host element is created as a part of this function call (i.e. `rootSelectorOrNode`\n // is not defined), also apply attributes and classes extracted from component selector.\n // Extract attributes and classes from the first selector only to match VE behavior.\n const {attrs, classes} =\n extractAttrsAndClassesFromSelector(this.componentDef.selectors[0]);\n if (attrs) {\n setUpAttributes(hostRenderer, hostRNode, attrs);\n }\n if (classes && classes.length > 0) {\n writeDirectClass(hostRenderer, hostRNode, classes.join(' '));\n }\n }\n }\n\n tElementNode = getTNode(rootTView, HEADER_OFFSET) as TElementNode;\n\n if (projectableNodes !== undefined) {\n const projection: (TNode|RNode[]|null)[] = tElementNode.projection = [];\n for (let i = 0; i < this.ngContentSelectors.length; i++) {\n const nodesforSlot = projectableNodes[i];\n // Projectable nodes can be passed as array of arrays or an array of iterables (ngUpgrade\n // case). Here we do normalize passed data structure to be an array of arrays to avoid\n // complex checks down the line.\n // We also normalize the length of the passed in projectable nodes (to match the number of\n // <ng-container> slots defined by a component).\n projection.push(nodesforSlot != null ? Array.from(nodesforSlot) : null);\n }\n }\n\n // TODO: should LifecycleHooksFeature and other host features be generated by the compiler and\n // executed here?\n // Angular 5 reference: https://stackblitz.com/edit/lifecycle-hooks-vcref\n component = createRootComponent(\n componentView, this.componentDef, rootLView, rootContext, [LifecycleHooksFeature]);\n\n renderView(rootTView, rootLView, null);\n } finally {\n leaveView();\n }\n\n return new ComponentRef(\n this.componentType, component, createElementRef(tElementNode, rootLView), rootLView,\n tElementNode);\n }\n}\n\nconst componentFactoryResolver: ComponentFactoryResolver = new ComponentFactoryResolver();\n\n/**\n * Creates a ComponentFactoryResolver and stores it on the injector. Or, if the\n * ComponentFactoryResolver\n * already exists, retrieves the existing ComponentFactoryResolver.\n *\n * @returns The ComponentFactoryResolver instance to use\n */\nexport function injectComponentFactoryResolver(): viewEngine_ComponentFactoryResolver {\n return componentFactoryResolver;\n}\n\n/**\n * Represents an instance of a Component created via a {@link ComponentFactory}.\n *\n * `ComponentRef` provides access to the Component Instance as well other objects related to this\n * Component Instance and allows you to destroy the Component Instance via the {@link #destroy}\n * method.\n *\n */\nexport class ComponentRef<T> extends viewEngine_ComponentRef<T> {\n override instance: T;\n override hostView: ViewRef<T>;\n override changeDetectorRef: ViewEngine_ChangeDetectorRef;\n override componentType: Type<T>;\n\n constructor(\n componentType: Type<T>, instance: T, public location: viewEngine_ElementRef,\n private _rootLView: LView,\n private _tNode: TElementNode|TContainerNode|TElementContainerNode) {\n super();\n this.instance = instance;\n this.hostView = this.changeDetectorRef = new RootViewRef<T>(_rootLView);\n this.componentType = componentType;\n }\n\n override get injector(): Injector {\n return new NodeInjector(this._tNode, this._rootLView);\n }\n\n override destroy(): void {\n this.hostView.destroy();\n }\n\n override onDestroy(callback: () => void): void {\n this.hostView.onDestroy(callback);\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 {Type} from '../interface/type';\nimport {noSideEffects} from '../util/closure';\n\ninterface TypeWithMetadata extends Type<any> {\n decorators?: any[];\n ctorParameters?: () => any[];\n propDecorators?: {[field: string]: any};\n}\n\n/**\n * Adds decorator, constructor, and property metadata to a given type via static metadata fields\n * on the type.\n *\n * These metadata fields can later be read with Angular's `ReflectionCapabilities` API.\n *\n * Calls to `setClassMetadata` can be guarded by ngDevMode, resulting in the metadata assignments\n * being tree-shaken away during production builds.\n */\nexport function setClassMetadata(\n type: Type<any>, decorators: any[]|null, ctorParameters: (() => any[])|null,\n propDecorators: {[field: string]: any}|null): void {\n return noSideEffects(() => {\n const clazz = type as TypeWithMetadata;\n\n if (decorators !== null) {\n if (clazz.hasOwnProperty('decorators') && clazz.decorators !== undefined) {\n clazz.decorators.push(...decorators);\n } else {\n clazz.decorators = decorators;\n }\n }\n if (ctorParameters !== null) {\n // Rather than merging, clobber the existing parameters. If other projects exist which\n // use tsickle-style annotations and reflect over them in the same way, this could\n // cause issues, but that is vanishingly unlikely.\n clazz.ctorParameters = ctorParameters;\n }\n if (propDecorators !== null) {\n // The property decorator objects are merged as it is possible different fields have\n // different decorator types. Decorators on individual fields are not merged, as it's\n // also incredibly unlikely that a field will be decorated both with an Angular\n // decorator and a non-Angular decorator that's also been downleveled.\n if (clazz.hasOwnProperty('propDecorators') && clazz.propDecorators !== undefined) {\n clazz.propDecorators = {...clazz.propDecorators, ...propDecorators};\n } else {\n clazz.propDecorators = propDecorators;\n }\n }\n }) as never;\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\nimport {Type} from '../interface/type';\nimport {NgModuleType} from '../metadata/ng_module_def';\nimport {autoRegisterModuleById, getNgModuleDef} from '../render3/definition';\nimport {maybeUnwrapFn} from '../render3/util/misc_utils';\nimport {stringify} from '../util/stringify';\n\nimport {NgModuleFactory} from './ng_module_factory';\n\n\n/**\n * Map of module-id to the corresponding NgModule.\n * - In pre Ivy we track NgModuleFactory,\n * - In post Ivy we track the NgModuleType\n */\nconst modules = new Map<string, NgModuleFactory<any>|NgModuleType>();\n\n/**\n * Registers a loaded module. Should only be called from generated NgModuleFactory code.\n * @publicApi\n */\nexport function registerModuleFactory(id: string, factory: NgModuleFactory<any>) {\n const existing = modules.get(id) as NgModuleFactory<any>;\n assertSameOrNotExisting(id, existing && existing.moduleType, factory.moduleType);\n modules.set(id, factory);\n}\n\nfunction assertSameOrNotExisting(id: string, type: Type<any>|null, incoming: Type<any>): void {\n if (type && type !== incoming) {\n throw new Error(\n `Duplicate module registered for ${id} - ${stringify(type)} vs ${stringify(type.name)}`);\n }\n}\n\nexport function registerNgModuleType(ngModuleType: NgModuleType): void {\n const visited = new Set<NgModuleType>();\n recurse(ngModuleType);\n function recurse(ngModuleType: NgModuleType): void {\n // The imports array of an NgModule must refer to other NgModules,\n // so an error is thrown if no module definition is available.\n const def = getNgModuleDef(ngModuleType, /* throwNotFound */ true);\n const id = def.id;\n if (id !== null) {\n const existing = modules.get(id) as NgModuleType | null;\n assertSameOrNotExisting(id, existing, ngModuleType);\n modules.set(id, ngModuleType);\n }\n\n const imports = maybeUnwrapFn(def.imports) as NgModuleType[];\n for (const i of imports) {\n if (!visited.has(i)) {\n visited.add(i);\n recurse(i);\n }\n }\n }\n}\n\nexport function clearModulesForTest(): void {\n modules.clear();\n}\n\nexport function getRegisteredNgModuleType(id: string) {\n return modules.get(id) || autoRegisterModuleById[id];\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 '../di/injector';\nimport {INJECTOR} from '../di/injector_token';\nimport {InjectFlags} from '../di/interface/injector';\nimport {createInjectorWithoutInjectorInstances, R3Injector} from '../di/r3_injector';\nimport {Type} from '../interface/type';\nimport {ComponentFactoryResolver as viewEngine_ComponentFactoryResolver} from '../linker/component_factory_resolver';\nimport {InternalNgModuleRef, NgModuleFactory as viewEngine_NgModuleFactory, NgModuleRef as viewEngine_NgModuleRef} from '../linker/ng_module_factory';\nimport {registerNgModuleType} from '../linker/ng_module_factory_registration';\nimport {NgModuleType} from '../metadata/ng_module_def';\nimport {assertDefined} from '../util/assert';\nimport {stringify} from '../util/stringify';\n\nimport {ComponentFactoryResolver} from './component_ref';\nimport {getNgLocaleIdDef, getNgModuleDef} from './definition';\nimport {setLocaleId} from './i18n/i18n_locale_id';\nimport {maybeUnwrapFn} from './util/misc_utils';\n\nexport class NgModuleRef<T> extends viewEngine_NgModuleRef<T> implements InternalNgModuleRef<T> {\n // tslint:disable-next-line:require-internal-with-underscore\n _bootstrapComponents: Type<any>[] = [];\n // tslint:disable-next-line:require-internal-with-underscore\n _r3Injector: R3Injector;\n override injector: Injector = this;\n override instance: T;\n destroyCbs: (() => void)[]|null = [];\n\n // When bootstrapping a module we have a dependency graph that looks like this:\n // ApplicationRef -> ComponentFactoryResolver -> NgModuleRef. The problem is that if the\n // module being resolved tries to inject the ComponentFactoryResolver, it'll create a\n // circular dependency which will result in a runtime error, because the injector doesn't\n // exist yet. We work around the issue by creating the ComponentFactoryResolver ourselves\n // and providing it, rather than letting the injector resolve it.\n override readonly componentFactoryResolver: ComponentFactoryResolver =\n new ComponentFactoryResolver(this);\n\n constructor(ngModuleType: Type<T>, public _parent: Injector|null) {\n super();\n const ngModuleDef = getNgModuleDef(ngModuleType);\n ngDevMode &&\n assertDefined(\n ngModuleDef,\n `NgModule '${stringify(ngModuleType)}' is not a subtype of 'NgModuleType'.`);\n\n const ngLocaleIdDef = getNgLocaleIdDef(ngModuleType);\n ngLocaleIdDef && setLocaleId(ngLocaleIdDef);\n this._bootstrapComponents = maybeUnwrapFn(ngModuleDef!.bootstrap);\n this._r3Injector = createInjectorWithoutInjectorInstances(\n ngModuleType, _parent,\n [\n {provide: viewEngine_NgModuleRef, useValue: this}, {\n provide: viewEngine_ComponentFactoryResolver,\n useValue: this.componentFactoryResolver\n }\n ],\n stringify(ngModuleType)) as R3Injector;\n\n // We need to resolve the injector types separately from the injector creation, because\n // the module might be trying to use this ref in its contructor for DI which will cause a\n // circular error that will eventually error out, because the injector isn't created yet.\n this._r3Injector._resolveInjectorDefTypes();\n this.instance = this.get(ngModuleType);\n }\n\n get(token: any, notFoundValue: any = Injector.THROW_IF_NOT_FOUND,\n injectFlags: InjectFlags = InjectFlags.Default): any {\n if (token === Injector || token === viewEngine_NgModuleRef || token === INJECTOR) {\n return this;\n }\n return this._r3Injector.get(token, notFoundValue, injectFlags);\n }\n\n override destroy(): void {\n ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');\n const injector = this._r3Injector;\n !injector.destroyed && injector.destroy();\n this.destroyCbs!.forEach(fn => fn());\n this.destroyCbs = null;\n }\n override onDestroy(callback: () => void): void {\n ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');\n this.destroyCbs!.push(callback);\n }\n}\n\nexport class NgModuleFactory<T> extends viewEngine_NgModuleFactory<T> {\n constructor(public moduleType: Type<T>) {\n super();\n\n const ngModuleDef = getNgModuleDef(moduleType);\n if (ngModuleDef !== null) {\n // Register the NgModule with Angular's module registry. The location (and hence timing) of\n // this call is critical to ensure this works correctly (modules get registered when expected)\n // without bloating bundles (modules are registered when otherwise not referenced).\n //\n // In View Engine, registration occurs in the .ngfactory.js file as a side effect. This has\n // several practical consequences:\n //\n // - If an .ngfactory file is not imported from, the module won't be registered (and can be\n // tree shaken).\n // - If an .ngfactory file is imported from, the module will be registered even if an instance\n // is not actually created (via `create` below).\n // - Since an .ngfactory file in View Engine references the .ngfactory files of the NgModule's\n // imports,\n //\n // In Ivy, things are a bit different. .ngfactory files still exist for compatibility, but are\n // not a required API to use - there are other ways to obtain an NgModuleFactory for a given\n // NgModule. Thus, relying on a side effect in the .ngfactory file is not sufficient. Instead,\n // the side effect of registration is added here, in the constructor of NgModuleFactory,\n // ensuring no matter how a factory is created, the module is registered correctly.\n //\n // An alternative would be to include the registration side effect inline following the actual\n // NgModule definition. This also has the correct timing, but breaks tree-shaking - modules\n // will be registered and retained even if they're otherwise never referenced.\n registerNgModuleType(moduleType as NgModuleType);\n }\n }\n\n override create(parentInjector: Injector|null): viewEngine_NgModuleRef<T> {\n return new NgModuleRef(this.moduleType, parentInjector);\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 {assertIndexInRange} from '../util/assert';\nimport {bindingUpdated, bindingUpdated2, bindingUpdated3, bindingUpdated4, getBinding, updateBinding} from './bindings';\nimport {LView} from './interfaces/view';\nimport {getBindingRoot, getLView} from './state';\nimport {NO_CHANGE} from './tokens';\n\n\n/**\n * Bindings for pure functions are stored after regular bindings.\n *\n * |-------decls------|---------vars---------| |----- hostVars (dir1) ------|\n * ------------------------------------------------------------------------------------------\n * | nodes/refs/pipes | bindings | fn slots | injector | dir1 | host bindings | host slots |\n * ------------------------------------------------------------------------------------------\n * ^ ^\n * TView.bindingStartIndex TView.expandoStartIndex\n *\n * Pure function instructions are given an offset from the binding root. Adding the offset to the\n * binding root gives the first index where the bindings are stored. In component views, the binding\n * root is the bindingStartIndex. In host bindings, the binding root is the expandoStartIndex +\n * any directive instances + any hostVars in directives evaluated before it.\n *\n * See VIEW_DATA.md for more information about host binding resolution.\n */\n\n/**\n * If the value hasn't been saved, calls the pure function to store and return the\n * value. If it has been saved, returns the saved value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn Function that returns a value\n * @param thisArg Optional calling context of pureFn\n * @returns value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction0<T>(slotOffset: number, pureFn: () => T, thisArg?: any): T {\n const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n return lView[bindingIndex] === NO_CHANGE ?\n updateBinding(lView, bindingIndex, thisArg ? pureFn.call(thisArg) : pureFn()) :\n getBinding(lView, bindingIndex);\n}\n\n/**\n * If the value of the provided exp has changed, calls the pure function to return\n * an updated value. Or if the value has not changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn Function that returns an updated value\n * @param exp Updated expression value\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction1(\n slotOffset: number, pureFn: (v: any) => any, exp: any, thisArg?: any): any {\n return pureFunction1Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp, thisArg);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction2(\n slotOffset: number, pureFn: (v1: any, v2: any) => any, exp1: any, exp2: any,\n thisArg?: any): any {\n return pureFunction2Internal(\n getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, thisArg);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction3(\n slotOffset: number, pureFn: (v1: any, v2: any, v3: any) => any, exp1: any, exp2: any, exp3: any,\n thisArg?: any): any {\n return pureFunction3Internal(\n getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, exp3, thisArg);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction4(\n slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any) => any, exp1: any, exp2: any,\n exp3: any, exp4: any, thisArg?: any): any {\n return pureFunction4Internal(\n getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, exp3, exp4, thisArg);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction5(\n slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any) => any, exp1: any,\n exp2: any, exp3: any, exp4: any, exp5: any, thisArg?: any): any {\n const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n return bindingUpdated(lView, bindingIndex + 4, exp5) || different ?\n updateBinding(\n lView, bindingIndex + 5,\n thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5) :\n pureFn(exp1, exp2, exp3, exp4, exp5)) :\n getBinding(lView, bindingIndex + 5);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction6(\n slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any) => any,\n exp1: any, exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, thisArg?: any): any {\n const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n return bindingUpdated2(lView, bindingIndex + 4, exp5, exp6) || different ?\n updateBinding(\n lView, bindingIndex + 6,\n thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6) :\n pureFn(exp1, exp2, exp3, exp4, exp5, exp6)) :\n getBinding(lView, bindingIndex + 6);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param exp7\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction7(\n slotOffset: number,\n pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any, v7: any) => any, exp1: any,\n exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, exp7: any, thisArg?: any): any {\n const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n let different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n return bindingUpdated3(lView, bindingIndex + 4, exp5, exp6, exp7) || different ?\n updateBinding(\n lView, bindingIndex + 7,\n thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7) :\n pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7)) :\n getBinding(lView, bindingIndex + 7);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param exp7\n * @param exp8\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction8(\n slotOffset: number,\n pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any, v7: any, v8: any) => any,\n exp1: any, exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, exp7: any, exp8: any,\n thisArg?: any): any {\n const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n return bindingUpdated4(lView, bindingIndex + 4, exp5, exp6, exp7, exp8) || different ?\n updateBinding(\n lView, bindingIndex + 8,\n thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8) :\n pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8)) :\n getBinding(lView, bindingIndex + 8);\n}\n\n/**\n * pureFunction instruction that can support any number of bindings.\n *\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn A pure function that takes binding values and builds an object or array\n * containing those values.\n * @param exps An array of binding values\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunctionV(\n slotOffset: number, pureFn: (...v: any[]) => any, exps: any[], thisArg?: any): any {\n return pureFunctionVInternal(getLView(), getBindingRoot(), slotOffset, pureFn, exps, thisArg);\n}\n\n/**\n * Results of a pure function invocation are stored in LView in a dedicated slot that is initialized\n * to NO_CHANGE. In rare situations a pure pipe might throw an exception on the very first\n * invocation and not produce any valid results. In this case LView would keep holding the NO_CHANGE\n * value. The NO_CHANGE is not something that we can use in expressions / bindings thus we convert\n * it to `undefined`.\n */\nfunction getPureFunctionReturnValue(lView: LView, returnValueIndex: number) {\n ngDevMode && assertIndexInRange(lView, returnValueIndex);\n const lastReturnValue = lView[returnValueIndex];\n return lastReturnValue === NO_CHANGE ? undefined : lastReturnValue;\n}\n\n/**\n * If the value of the provided exp has changed, calls the pure function to return\n * an updated value. Or if the value has not changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn Function that returns an updated value\n * @param exp Updated expression value\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\nexport function pureFunction1Internal(\n lView: LView, bindingRoot: number, slotOffset: number, pureFn: (v: any) => any, exp: any,\n thisArg?: any): any {\n const bindingIndex = bindingRoot + slotOffset;\n return bindingUpdated(lView, bindingIndex, exp) ?\n updateBinding(lView, bindingIndex + 1, thisArg ? pureFn.call(thisArg, exp) : pureFn(exp)) :\n getPureFunctionReturnValue(lView, bindingIndex + 1);\n}\n\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\nexport function pureFunction2Internal(\n lView: LView, bindingRoot: number, slotOffset: number, pureFn: (v1: any, v2: any) => any,\n exp1: any, exp2: any, thisArg?: any): any {\n const bindingIndex = bindingRoot + slotOffset;\n return bindingUpdated2(lView, bindingIndex, exp1, exp2) ?\n updateBinding(\n lView, bindingIndex + 2,\n thisArg ? pureFn.call(thisArg, exp1, exp2) : pureFn(exp1, exp2)) :\n getPureFunctionReturnValue(lView, bindingIndex + 2);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\nexport function pureFunction3Internal(\n lView: LView, bindingRoot: number, slotOffset: number,\n pureFn: (v1: any, v2: any, v3: any) => any, exp1: any, exp2: any, exp3: any,\n thisArg?: any): any {\n const bindingIndex = bindingRoot + slotOffset;\n return bindingUpdated3(lView, bindingIndex, exp1, exp2, exp3) ?\n updateBinding(\n lView, bindingIndex + 3,\n thisArg ? pureFn.call(thisArg, exp1, exp2, exp3) : pureFn(exp1, exp2, exp3)) :\n getPureFunctionReturnValue(lView, bindingIndex + 3);\n}\n\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n */\nexport function pureFunction4Internal(\n lView: LView, bindingRoot: number, slotOffset: number,\n pureFn: (v1: any, v2: any, v3: any, v4: any) => any, exp1: any, exp2: any, exp3: any, exp4: any,\n thisArg?: any): any {\n const bindingIndex = bindingRoot + slotOffset;\n return bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4) ?\n updateBinding(\n lView, bindingIndex + 4,\n thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4) : pureFn(exp1, exp2, exp3, exp4)) :\n getPureFunctionReturnValue(lView, bindingIndex + 4);\n}\n\n/**\n * pureFunction instruction that can support any number of bindings.\n *\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn A pure function that takes binding values and builds an object or array\n * containing those values.\n * @param exps An array of binding values\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\nexport function pureFunctionVInternal(\n lView: LView, bindingRoot: number, slotOffset: number, pureFn: (...v: any[]) => any,\n exps: any[], thisArg?: any): any {\n let bindingIndex = bindingRoot + slotOffset;\n let different = false;\n for (let i = 0; i < exps.length; i++) {\n bindingUpdated(lView, bindingIndex++, exps[i]) && (different = true);\n }\n return different ? updateBinding(lView, bindingIndex, pureFn.apply(thisArg, exps)) :\n getPureFunctionReturnValue(lView, bindingIndex);\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 {WrappedValue} from '../change_detection/change_detection_util';\nimport {PipeTransform} from '../change_detection/pipe_transform';\nimport {setInjectImplementation} from '../di/inject_switch';\nimport {getFactoryDef} from './definition_factory';\nimport {setIncludeViewProviders} from './di';\nimport {RuntimeError, RuntimeErrorCode} from './error_code';\nimport {store, ɵɵdirectiveInject} from './instructions/all';\nimport {PipeDef, PipeDefList} from './interfaces/definition';\nimport {HEADER_OFFSET, LView, TVIEW} from './interfaces/view';\nimport {pureFunction1Internal, pureFunction2Internal, pureFunction3Internal, pureFunction4Internal, pureFunctionVInternal} from './pure_function';\nimport {getBindingIndex, getBindingRoot, getLView, getTView} from './state';\nimport {NO_CHANGE} from './tokens';\nimport {load} from './util/view_utils';\n\n\n\n/**\n * Create a pipe.\n *\n * @param index Pipe index where the pipe will be stored.\n * @param pipeName The name of the pipe\n * @returns T the instance of the pipe.\n *\n * @codeGenApi\n */\nexport function ɵɵpipe(index: number, pipeName: string): any {\n const tView = getTView();\n let pipeDef: PipeDef<any>;\n const adjustedIndex = index + HEADER_OFFSET;\n\n if (tView.firstCreatePass) {\n pipeDef = getPipeDef(pipeName, tView.pipeRegistry);\n tView.data[adjustedIndex] = pipeDef;\n if (pipeDef.onDestroy) {\n (tView.destroyHooks || (tView.destroyHooks = [])).push(adjustedIndex, pipeDef.onDestroy);\n }\n } else {\n pipeDef = tView.data[adjustedIndex] as PipeDef<any>;\n }\n\n const pipeFactory = pipeDef.factory || (pipeDef.factory = getFactoryDef(pipeDef.type, true));\n const previousInjectImplementation = setInjectImplementation(ɵɵdirectiveInject);\n try {\n // DI for pipes is supposed to behave like directives when placed on a component\n // host node, which means that we have to disable access to `viewProviders`.\n const previousIncludeViewProviders = setIncludeViewProviders(false);\n const pipeInstance = pipeFactory();\n setIncludeViewProviders(previousIncludeViewProviders);\n store(tView, getLView(), adjustedIndex, pipeInstance);\n return pipeInstance;\n } finally {\n // we have to restore the injector implementation in finally, just in case the creation of the\n // pipe throws an error.\n setInjectImplementation(previousInjectImplementation);\n }\n}\n\n/**\n * Searches the pipe registry for a pipe with the given name. If one is found,\n * returns the pipe. Otherwise, an error is thrown because the pipe cannot be resolved.\n *\n * @param name Name of pipe to resolve\n * @param registry Full list of available pipes\n * @returns Matching PipeDef\n */\nfunction getPipeDef(name: string, registry: PipeDefList|null): PipeDef<any> {\n if (registry) {\n for (let i = registry.length - 1; i >= 0; i--) {\n const pipeDef = registry[i];\n if (name === pipeDef.name) {\n return pipeDef;\n }\n }\n }\n throw new RuntimeError(RuntimeErrorCode.PIPE_NOT_FOUND, `The pipe '${name}' could not be found!`);\n}\n\n/**\n * Invokes a pipe with 1 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nexport function ɵɵpipeBind1(index: number, slotOffset: number, v1: any): any {\n const adjustedIndex = index + HEADER_OFFSET;\n const lView = getLView();\n const pipeInstance = load<PipeTransform>(lView, adjustedIndex);\n return unwrapValue(\n lView,\n isPure(lView, adjustedIndex) ?\n pureFunction1Internal(\n lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, pipeInstance) :\n pipeInstance.transform(v1));\n}\n\n/**\n * Invokes a pipe with 2 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nexport function ɵɵpipeBind2(index: number, slotOffset: number, v1: any, v2: any): any {\n const adjustedIndex = index + HEADER_OFFSET;\n const lView = getLView();\n const pipeInstance = load<PipeTransform>(lView, adjustedIndex);\n return unwrapValue(\n lView,\n isPure(lView, adjustedIndex) ?\n pureFunction2Internal(\n lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, v2, pipeInstance) :\n pipeInstance.transform(v1, v2));\n}\n\n/**\n * Invokes a pipe with 3 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n * @param v3 4rd argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nexport function ɵɵpipeBind3(index: number, slotOffset: number, v1: any, v2: any, v3: any): any {\n const adjustedIndex = index + HEADER_OFFSET;\n const lView = getLView();\n const pipeInstance = load<PipeTransform>(lView, adjustedIndex);\n return unwrapValue(\n lView,\n isPure(lView, adjustedIndex) ? pureFunction3Internal(\n lView, getBindingRoot(), slotOffset,\n pipeInstance.transform, v1, v2, v3, pipeInstance) :\n pipeInstance.transform(v1, v2, v3));\n}\n\n/**\n * Invokes a pipe with 4 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n * @param v3 3rd argument to {@link PipeTransform#transform}.\n * @param v4 4th argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nexport function ɵɵpipeBind4(\n index: number, slotOffset: number, v1: any, v2: any, v3: any, v4: any): any {\n const adjustedIndex = index + HEADER_OFFSET;\n const lView = getLView();\n const pipeInstance = load<PipeTransform>(lView, adjustedIndex);\n return unwrapValue(\n lView,\n isPure(lView, adjustedIndex) ? pureFunction4Internal(\n lView, getBindingRoot(), slotOffset,\n pipeInstance.transform, v1, v2, v3, v4, pipeInstance) :\n pipeInstance.transform(v1, v2, v3, v4));\n}\n\n/**\n * Invokes a pipe with variable number of arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param values Array of arguments to pass to {@link PipeTransform#transform} method.\n *\n * @codeGenApi\n */\nexport function ɵɵpipeBindV(index: number, slotOffset: number, values: [any, ...any[]]): any {\n const adjustedIndex = index + HEADER_OFFSET;\n const lView = getLView();\n const pipeInstance = load<PipeTransform>(lView, adjustedIndex);\n return unwrapValue(\n lView,\n isPure(lView, adjustedIndex) ?\n pureFunctionVInternal(\n lView, getBindingRoot(), slotOffset, pipeInstance.transform, values, pipeInstance) :\n pipeInstance.transform.apply(pipeInstance, values));\n}\n\nfunction isPure(lView: LView, index: number): boolean {\n return (<PipeDef<any>>lView[TVIEW].data[index]).pure;\n}\n\n/**\n * Unwrap the output of a pipe transformation.\n * In order to trick change detection into considering that the new value is always different from\n * the old one, the old value is overwritten by NO_CHANGE.\n *\n * @param newValue the pipe transformation output.\n */\nfunction unwrapValue(lView: LView, newValue: any): any {\n if (WrappedValue.isWrapped(newValue)) {\n newValue = WrappedValue.unwrap(newValue);\n // The NO_CHANGE value needs to be written at the index where the impacted binding value is\n // stored\n const bindingToInvalidateIdx = getBindingIndex();\n lView[bindingToInvalidateIdx] = NO_CHANGE;\n }\n return newValue;\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/// <reference types=\"rxjs\" />\n\nimport {PartialObserver, Subject, Subscription} from 'rxjs';\n\n/**\n * Use in components with the `@Output` directive to emit custom events\n * synchronously or asynchronously, and register handlers for those events\n * by subscribing to an instance.\n *\n * @usageNotes\n *\n * Extends\n * [RxJS `Subject`](https://rxjs.dev/api/index/class/Subject)\n * for Angular by adding the `emit()` method.\n *\n * In the following example, a component defines two output properties\n * that create event emitters. When the title is clicked, the emitter\n * emits an open or close event to toggle the current visibility state.\n *\n * ```html\n * @Component({\n * selector: 'zippy',\n * template: `\n * <div class=\"zippy\">\n * <div (click)=\"toggle()\">Toggle</div>\n * <div [hidden]=\"!visible\">\n * <ng-content></ng-content>\n * </div>\n * </div>`})\n * export class Zippy {\n * visible: boolean = true;\n * @Output() open: EventEmitter<any> = new EventEmitter();\n * @Output() close: EventEmitter<any> = new EventEmitter();\n *\n * toggle() {\n * this.visible = !this.visible;\n * if (this.visible) {\n * this.open.emit(null);\n * } else {\n * this.close.emit(null);\n * }\n * }\n * }\n * ```\n *\n * Access the event object with the `$event` argument passed to the output event\n * handler:\n *\n * ```html\n * <zippy (open)=\"onOpen($event)\" (close)=\"onClose($event)\"></zippy>\n * ```\n *\n * @see [Observables in Angular](guide/observables-in-angular)\n * @publicApi\n */\nexport interface EventEmitter<T> extends Subject<T> {\n /**\n * @internal\n */\n __isAsync: boolean;\n\n /**\n * Creates an instance of this class that can\n * deliver events synchronously or asynchronously.\n *\n * @param [isAsync=false] When true, deliver events asynchronously.\n *\n */\n new(isAsync?: boolean): EventEmitter<T>;\n\n /**\n * Emits an event containing a given value.\n * @param value The value to emit.\n */\n emit(value?: T): void;\n\n /**\n * Registers handlers for events emitted by this instance.\n * @param next When supplied, a custom handler for emitted events.\n * @param error When supplied, a custom handler for an error notification from this emitter.\n * @param complete When supplied, a custom handler for a completion notification from this\n * emitter.\n */\n subscribe(next?: (value: T) => void, error?: (error: any) => void, complete?: () => void):\n Subscription;\n /**\n * Registers handlers for events emitted by this instance.\n * @param observerOrNext When supplied, a custom handler for emitted events, or an observer\n * object.\n * @param error When supplied, a custom handler for an error notification from this emitter.\n * @param complete When supplied, a custom handler for a completion notification from this\n * emitter.\n */\n subscribe(observerOrNext?: any, error?: any, complete?: any): Subscription;\n}\n\nclass EventEmitter_ extends Subject<any> {\n __isAsync: boolean; // tslint:disable-line\n\n constructor(isAsync: boolean = false) {\n super();\n this.__isAsync = isAsync;\n }\n\n emit(value?: any) {\n super.next(value);\n }\n\n override subscribe(observerOrNext?: any, error?: any, complete?: any): Subscription {\n let nextFn = observerOrNext;\n let errorFn = error || (() => null);\n let completeFn = complete;\n\n if (observerOrNext && typeof observerOrNext === 'object') {\n const observer = observerOrNext as PartialObserver<unknown>;\n nextFn = observer.next?.bind(observer);\n errorFn = observer.error?.bind(observer);\n completeFn = observer.complete?.bind(observer);\n }\n\n if (this.__isAsync) {\n errorFn = _wrapInTimeout(errorFn);\n\n if (nextFn) {\n nextFn = _wrapInTimeout(nextFn);\n }\n\n if (completeFn) {\n completeFn = _wrapInTimeout(completeFn);\n }\n }\n\n const sink = super.subscribe({next: nextFn, error: errorFn, complete: completeFn});\n\n if (observerOrNext instanceof Subscription) {\n observerOrNext.add(sink);\n }\n\n return sink;\n }\n}\n\nfunction _wrapInTimeout(fn: (value: unknown) => any) {\n return (value: unknown) => {\n setTimeout(fn, undefined, value);\n };\n}\n\n/**\n * @publicApi\n */\nexport const EventEmitter: {\n new (isAsync?: boolean): EventEmitter<any>; new<T>(isAsync?: boolean): EventEmitter<T>;\n readonly prototype: EventEmitter<any>;\n} = EventEmitter_ as any;\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 {Observable} from 'rxjs';\n\nimport {EventEmitter} from '../event_emitter';\nimport {arrayEquals, flatten} from '../util/array_utils';\nimport {getSymbolIterator} from '../util/symbol';\n\nfunction symbolIterator<T>(this: QueryList<T>): Iterator<T> {\n return ((this as any as {_results: Array<T>})._results as any)[getSymbolIterator()]();\n}\n\n/**\n * An unmodifiable list of items that Angular keeps up to date when the state\n * of the application changes.\n *\n * The type of object that {@link ViewChildren}, {@link ContentChildren}, and {@link QueryList}\n * provide.\n *\n * Implements an iterable interface, therefore it can be used in both ES6\n * javascript `for (var i of items)` loops as well as in Angular templates with\n * `*ngFor=\"let i of myList\"`.\n *\n * Changes can be observed by subscribing to the changes `Observable`.\n *\n * NOTE: In the future this class will implement an `Observable` interface.\n *\n * @usageNotes\n * ### Example\n * ```typescript\n * @Component({...})\n * class Container {\n * @ViewChildren(Item) items:QueryList<Item>;\n * }\n * ```\n *\n * @publicApi\n */\nexport class QueryList<T> implements Iterable<T> {\n public readonly dirty = true;\n private _results: Array<T> = [];\n private _changesDetected: boolean = false;\n private _changes: EventEmitter<QueryList<T>>|null = null;\n\n readonly length: number = 0;\n readonly first: T = undefined!;\n readonly last: T = undefined!;\n\n /**\n * Returns `Observable` of `QueryList` notifying the subscriber of changes.\n */\n get changes(): Observable<any> {\n return this._changes || (this._changes = new EventEmitter());\n }\n\n /**\n * @param emitDistinctChangesOnly Whether `QueryList.changes` should fire only when actual change\n * has occurred. Or if it should fire when query is recomputed. (recomputing could resolve in\n * the same result)\n */\n constructor(private _emitDistinctChangesOnly: boolean = false) {\n // This function should be declared on the prototype, but doing so there will cause the class\n // declaration to have side-effects and become not tree-shakable. For this reason we do it in\n // the constructor.\n // [getSymbolIterator()](): Iterator<T> { ... }\n const symbol = getSymbolIterator();\n const proto = QueryList.prototype as any;\n if (!proto[symbol]) proto[symbol] = symbolIterator;\n }\n\n /**\n * Returns the QueryList entry at `index`.\n */\n get(index: number): T|undefined {\n return this._results[index];\n }\n\n /**\n * See\n * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\n */\n map<U>(fn: (item: T, index: number, array: T[]) => U): U[] {\n return this._results.map(fn);\n }\n\n /**\n * See\n * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)\n */\n filter(fn: (item: T, index: number, array: T[]) => boolean): T[] {\n return this._results.filter(fn);\n }\n\n /**\n * See\n * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)\n */\n find(fn: (item: T, index: number, array: T[]) => boolean): T|undefined {\n return this._results.find(fn);\n }\n\n /**\n * See\n * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)\n */\n reduce<U>(fn: (prevValue: U, curValue: T, curIndex: number, array: T[]) => U, init: U): U {\n return this._results.reduce(fn, init);\n }\n\n /**\n * See\n * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)\n */\n forEach(fn: (item: T, index: number, array: T[]) => void): void {\n this._results.forEach(fn);\n }\n\n /**\n * See\n * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)\n */\n some(fn: (value: T, index: number, array: T[]) => boolean): boolean {\n return this._results.some(fn);\n }\n\n /**\n * Returns a copy of the internal results list as an Array.\n */\n toArray(): T[] {\n return this._results.slice();\n }\n\n toString(): string {\n return this._results.toString();\n }\n\n /**\n * Updates the stored data of the query list, and resets the `dirty` flag to `false`, so that\n * on change detection, it will not notify of changes to the queries, unless a new change\n * occurs.\n *\n * @param resultsTree The query results to store\n * @param identityAccessor Optional function for extracting stable object identity from a value\n * in the array. This function is executed for each element of the query result list while\n * comparing current query list with the new one (provided as a first argument of the `reset`\n * function) to detect if the lists are different. If the function is not provided, elements\n * are compared as is (without any pre-processing).\n */\n reset(resultsTree: Array<T|any[]>, identityAccessor?: (value: T) => unknown): void {\n // Cast to `QueryListInternal` so that we can mutate fields which are readonly for the usage of\n // QueryList (but not for QueryList itself.)\n const self = this as QueryListInternal<T>;\n (self as {dirty: boolean}).dirty = false;\n const newResultFlat = flatten(resultsTree);\n if (this._changesDetected = !arrayEquals(self._results, newResultFlat, identityAccessor)) {\n self._results = newResultFlat;\n self.length = newResultFlat.length;\n self.last = newResultFlat[this.length - 1];\n self.first = newResultFlat[0];\n }\n }\n\n /**\n * Triggers a change event by emitting on the `changes` {@link EventEmitter}.\n */\n notifyOnChanges(): void {\n if (this._changes && (this._changesDetected || !this._emitDistinctChangesOnly))\n this._changes.emit(this);\n }\n\n /** internal */\n setDirty() {\n (this as {dirty: boolean}).dirty = true;\n }\n\n /** internal */\n destroy(): void {\n (this.changes as EventEmitter<any>).complete();\n (this.changes as EventEmitter<any>).unsubscribe();\n }\n\n // The implementation of `Symbol.iterator` should be declared here, but this would cause\n // tree-shaking issues with `QueryList. So instead, it's added in the constructor (see comments\n // there) and this declaration is left here to ensure that TypeScript considers QueryList to\n // implement the Iterable interface. This is required for template type-checking of NgFor loops\n // over QueryLists to work correctly, since QueryList must be assignable to NgIterable.\n [Symbol.iterator]!: () => Iterator<T>;\n}\n\n/**\n * Internal set of APIs used by the framework. (not to be made public)\n */\ninterface QueryListInternal<T> extends QueryList<T> {\n reset(a: any[]): void;\n notifyOnChanges(): void;\n length: number;\n last: T;\n first: T;\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 {ProcessProvidersFunction} from '../../di/interface/provider';\nimport {Type} from '../../interface/type';\nimport {SchemaMetadata} from '../../metadata/schema';\nimport {ViewEncapsulation} from '../../metadata/view';\nimport {FactoryFn} from '../definition_factory';\n\nimport {TAttributes, TConstantsOrFactory} from './node';\nimport {CssSelectorList} from './projection';\nimport {TView} from './view';\n\n\n/**\n * Definition of what a template rendering function should look like for a component.\n */\nexport type ComponentTemplate<T> = {\n // Note: the ctx parameter is typed as T|U, as using only U would prevent a template with\n // e.g. ctx: {} from being assigned to ComponentTemplate<any> as TypeScript won't infer U = any\n // in that scenario. By including T this incompatibility is resolved.\n <U extends T>(rf: RenderFlags, ctx: T|U): void;\n};\n\n/**\n * Definition of what a view queries function should look like.\n */\nexport type ViewQueriesFunction<T> = <U extends T>(rf: RenderFlags, ctx: U) => void;\n\n/**\n * Definition of what a content queries function should look like.\n */\nexport type ContentQueriesFunction<T> =\n <U extends T>(rf: RenderFlags, ctx: U, directiveIndex: number) => void;\n\n/**\n * Flags passed into template functions to determine which blocks (i.e. creation, update)\n * should be executed.\n *\n * Typically, a template runs both the creation block and the update block on initialization and\n * subsequent runs only execute the update block. However, dynamically created views require that\n * the creation block be executed separately from the update block (for backwards compat).\n */\nexport const enum RenderFlags {\n /* Whether to run the creation block (e.g. create elements and directives) */\n Create = 0b01,\n\n /* Whether to run the update block (e.g. refresh bindings) */\n Update = 0b10\n}\n\n/**\n * A subclass of `Type` which has a static `ɵcmp`:`ComponentDef` field making it\n * consumable for rendering.\n */\nexport interface ComponentType<T> extends Type<T> {\n ɵcmp: unknown;\n}\n\n/**\n * A subclass of `Type` which has a static `ɵdir`:`DirectiveDef` field making it\n * consumable for rendering.\n */\nexport interface DirectiveType<T> extends Type<T> {\n ɵdir: unknown;\n ɵfac: unknown;\n}\n\n/**\n * A subclass of `Type` which has a static `ɵpipe`:`PipeDef` field making it\n * consumable for rendering.\n */\nexport interface PipeType<T> extends Type<T> {\n ɵpipe: unknown;\n}\n\n\n\n/**\n * Runtime link information for Directives.\n *\n * This is an internal data structure used by the render to link\n * directives into templates.\n *\n * NOTE: Always use `defineDirective` function to create this object,\n * never create the object directly since the shape of this object\n * can change between versions.\n *\n * @param Selector type metadata specifying the selector of the directive or component\n *\n * See: {@link defineDirective}\n */\nexport interface DirectiveDef<T> {\n /**\n * A dictionary mapping the inputs' minified property names to their public API names, which\n * are their aliases if any, or their original unminified property names\n * (as in `@Input('alias') propertyName: any;`).\n */\n readonly inputs: {[P in keyof T]: string};\n\n /**\n * @deprecated This is only here because `NgOnChanges` incorrectly uses declared name instead of\n * public or minified name.\n */\n readonly declaredInputs: {[P in keyof T]: string};\n\n /**\n * A dictionary mapping the outputs' minified property names to their public API names, which\n * are their aliases if any, or their original unminified property names\n * (as in `@Output('alias') propertyName: any;`).\n */\n readonly outputs: {[P in keyof T]: string};\n\n /**\n * Function to create and refresh content queries associated with a given directive.\n */\n contentQueries: ContentQueriesFunction<T>|null;\n\n /**\n * Query-related instructions for a directive. Note that while directives don't have a\n * view and as such view queries won't necessarily do anything, there might be\n * components that extend the directive.\n */\n viewQuery: ViewQueriesFunction<T>|null;\n\n /**\n * Refreshes host bindings on the associated directive.\n */\n readonly hostBindings: HostBindingsFunction<T>|null;\n\n /**\n * The number of bindings in this directive `hostBindings` (including pure fn bindings).\n *\n * Used to calculate the length of the component's LView array, so we\n * can pre-fill the array and set the host binding start index.\n */\n readonly hostVars: number;\n\n /**\n * Assign static attribute values to a host element.\n *\n * This property will assign static attribute values as well as class and style\n * values to a host element. Since attribute values can consist of different types of values, the\n * `hostAttrs` array must include the values in the following format:\n *\n * attrs = [\n * // static attributes (like `title`, `name`, `id`...)\n * attr1, value1, attr2, value,\n *\n * // a single namespace value (like `x:id`)\n * NAMESPACE_MARKER, namespaceUri1, name1, value1,\n *\n * // another single namespace value (like `x:name`)\n * NAMESPACE_MARKER, namespaceUri2, name2, value2,\n *\n * // a series of CSS classes that will be applied to the element (no spaces)\n * CLASSES_MARKER, class1, class2, class3,\n *\n * // a series of CSS styles (property + value) that will be applied to the element\n * STYLES_MARKER, prop1, value1, prop2, value2\n * ]\n *\n * All non-class and non-style attributes must be defined at the start of the list\n * first before all class and style values are set. When there is a change in value\n * type (like when classes and styles are introduced) a marker must be used to separate\n * the entries. The marker values themselves are set via entries found in the\n * [AttributeMarker] enum.\n */\n readonly hostAttrs: TAttributes|null;\n\n /** Token representing the directive. Used by DI. */\n readonly type: Type<T>;\n\n /** Function that resolves providers and publishes them into the DI system. */\n providersResolver:\n (<U extends T>(def: DirectiveDef<U>, processProvidersFn?: ProcessProvidersFunction) =>\n void)|null;\n\n /** The selectors that will be used to match nodes to this directive. */\n readonly selectors: CssSelectorList;\n\n /**\n * Name under which the directive is exported (for use with local references in template)\n */\n readonly exportAs: string[]|null;\n\n /**\n * Factory function used to create a new directive instance. Will be null initially.\n * Populated when the factory is first requested by directive instantiation logic.\n */\n readonly factory: FactoryFn<T>|null;\n\n /**\n * The features applied to this directive\n */\n readonly features: DirectiveDefFeature[]|null;\n\n setInput:\n (<U extends T>(\n this: DirectiveDef<U>, instance: U, value: any, publicName: string,\n privateName: string) => void)|null;\n}\n\n/**\n * Runtime link information for Components.\n *\n * This is an internal data structure used by the render to link\n * components into templates.\n *\n * NOTE: Always use `defineComponent` function to create this object,\n * never create the object directly since the shape of this object\n * can change between versions.\n *\n * See: {@link defineComponent}\n */\nexport interface ComponentDef<T> extends DirectiveDef<T> {\n /**\n * Runtime unique component ID.\n */\n readonly id: string;\n\n /**\n * The View template of the component.\n */\n readonly template: ComponentTemplate<T>;\n\n /** Constants associated with the component's view. */\n readonly consts: TConstantsOrFactory|null;\n\n /**\n * An array of `ngContent[selector]` values that were found in the template.\n */\n readonly ngContentSelectors?: string[];\n\n /**\n * A set of styles that the component needs to be present for component to render correctly.\n */\n readonly styles: string[];\n\n /**\n * The number of nodes, local refs, and pipes in this component template.\n *\n * Used to calculate the length of the component's LView array, so we\n * can pre-fill the array and set the binding start index.\n */\n // TODO(kara): remove queries from this count\n readonly decls: number;\n\n /**\n * The number of bindings in this component template (including pure fn bindings).\n *\n * Used to calculate the length of the component's LView array, so we\n * can pre-fill the array and set the host binding start index.\n */\n readonly vars: number;\n\n /**\n * Query-related instructions for a component.\n */\n viewQuery: ViewQueriesFunction<T>|null;\n\n /**\n * The view encapsulation type, which determines how styles are applied to\n * DOM elements. One of\n * - `Emulated` (default): Emulate native scoping of styles.\n * - `Native`: Use the native encapsulation mechanism of the renderer.\n * - `ShadowDom`: Use modern [ShadowDOM](https://w3c.github.io/webcomponents/spec/shadow/) and\n * create a ShadowRoot for component's host element.\n * - `None`: Do not provide any template or style encapsulation.\n */\n readonly encapsulation: ViewEncapsulation;\n\n /**\n * Defines arbitrary developer-defined data to be stored on a renderer instance.\n * This is useful for renderers that delegate to other renderers.\n */\n readonly data: {[kind: string]: any};\n\n /** Whether or not this component's ChangeDetectionStrategy is OnPush */\n readonly onPush: boolean;\n\n /**\n * Registry of directives and components that may be found in this view.\n *\n * The property is either an array of `DirectiveDef`s or a function which returns the array of\n * `DirectiveDef`s. The function is necessary to be able to support forward declarations.\n */\n directiveDefs: DirectiveDefListOrFactory|null;\n\n /**\n * Registry of pipes that may be found in this view.\n *\n * The property is either an array of `PipeDefs`s or a function which returns the array of\n * `PipeDefs`s. The function is necessary to be able to support forward declarations.\n */\n pipeDefs: PipeDefListOrFactory|null;\n\n /**\n * The set of schemas that declare elements to be allowed in the component's template.\n */\n schemas: SchemaMetadata[]|null;\n\n /**\n * Ivy runtime uses this place to store the computed tView for the component. This gets filled on\n * the first run of component.\n */\n tView: TView|null;\n\n /**\n * Used to store the result of `noSideEffects` function so that it is not removed by closure\n * compiler. The property should never be read.\n */\n readonly _?: unknown;\n}\n\n/**\n * Runtime link information for Pipes.\n *\n * This is an internal data structure used by the renderer to link\n * pipes into templates.\n *\n * NOTE: Always use `definePipe` function to create this object,\n * never create the object directly since the shape of this object\n * can change between versions.\n *\n * See: {@link definePipe}\n */\nexport interface PipeDef<T> {\n /** Token representing the pipe. */\n type: Type<T>;\n\n /**\n * Pipe name.\n *\n * Used to resolve pipe in templates.\n */\n readonly name: string;\n\n /**\n * Factory function used to create a new pipe instance. Will be null initially.\n * Populated when the factory is first requested by pipe instantiation logic.\n */\n factory: FactoryFn<T>|null;\n\n /**\n * Whether or not the pipe is pure.\n *\n * Pure pipes result only depends on the pipe input and not on internal\n * state of the pipe.\n */\n readonly pure: boolean;\n\n /* The following are lifecycle hooks for this pipe */\n onDestroy: (() => void)|null;\n}\n\nexport interface DirectiveDefFeature {\n <T>(directiveDef: DirectiveDef<T>): void;\n /**\n * Marks a feature as something that {@link InheritDefinitionFeature} will execute\n * during inheritance.\n *\n * NOTE: DO NOT SET IN ROOT OF MODULE! Doing so will result in tree-shakers/bundlers\n * identifying the change as a side effect, and the feature will be included in\n * every bundle.\n */\n ngInherit?: true;\n}\n\nexport interface ComponentDefFeature {\n <T>(componentDef: ComponentDef<T>): void;\n /**\n * Marks a feature as something that {@link InheritDefinitionFeature} will execute\n * during inheritance.\n *\n * NOTE: DO NOT SET IN ROOT OF MODULE! Doing so will result in tree-shakers/bundlers\n * identifying the change as a side effect, and the feature will be included in\n * every bundle.\n */\n ngInherit?: true;\n}\n\n\n/**\n * Type used for directiveDefs on component definition.\n *\n * The function is necessary to be able to support forward declarations.\n */\nexport type DirectiveDefListOrFactory = (() => DirectiveDefList)|DirectiveDefList;\n\nexport type DirectiveDefList = (DirectiveDef<any>|ComponentDef<any>)[];\n\nexport type DirectiveTypesOrFactory = (() => DirectiveTypeList)|DirectiveTypeList;\n\nexport type DirectiveTypeList =\n (DirectiveType<any>|ComponentType<any>|\n Type<any>/* Type as workaround for: Microsoft/TypeScript/issues/4881 */)[];\n\nexport type HostBindingsFunction<T> = <U extends T>(rf: RenderFlags, ctx: U) => void;\n\n/**\n * Type used for PipeDefs on component definition.\n *\n * The function is necessary to be able to support forward declarations.\n */\nexport type PipeDefListOrFactory = (() => PipeDefList)|PipeDefList;\n\nexport type PipeDefList = PipeDef<any>[];\n\nexport type PipeTypesOrFactory = (() => PipeTypeList)|PipeTypeList;\n\nexport type PipeTypeList =\n (PipeType<any>|Type<any>/* Type as workaround for: Microsoft/TypeScript/issues/4881 */)[];\n\n\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nexport const unusedValueExportToPlacateAjd = 1;\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 {ProviderToken} from '../../di/provider_token';\nimport {QueryList} from '../../linker/query_list';\n\nimport {TNode} from './node';\nimport {TView} from './view';\n\n/**\n * An object representing query metadata extracted from query annotations.\n */\nexport interface TQueryMetadata {\n predicate: ProviderToken<unknown>|string[];\n read: any;\n flags: QueryFlags;\n}\n\n/**\n * A set of flags to be used with Queries.\n *\n * NOTE: Ensure changes here are reflected in `packages/compiler/src/render3/view/compiler.ts`\n */\nexport const enum QueryFlags {\n /**\n * No flags\n */\n none = 0b0000,\n\n /**\n * Whether or not the query should descend into children.\n */\n descendants = 0b0001,\n\n /**\n * The query can be computed statically and hence can be assigned eagerly.\n *\n * NOTE: Backwards compatibility with ViewEngine.\n */\n isStatic = 0b0010,\n\n /**\n * If the `QueryList` should fire change event only if actual change to query was computed (vs old\n * behavior where the change was fired whenever the query was recomputed, even if the recomputed\n * query resulted in the same list.)\n */\n emitDistinctChangesOnly = 0b0100,\n}\n\n/**\n * TQuery objects represent all the query-related data that remain the same from one view instance\n * to another and can be determined on the very first template pass. Most notably TQuery holds all\n * the matches for a given view.\n */\nexport interface TQuery {\n /**\n * Query metadata extracted from query annotations.\n */\n metadata: TQueryMetadata;\n\n /**\n * Index of a query in a declaration view in case of queries propagated to en embedded view, -1\n * for queries declared in a given view. We are storing this index so we can find a parent query\n * to clone for an embedded view (when an embedded view is created).\n */\n indexInDeclarationView: number;\n\n /**\n * Matches collected on the first template pass. Each match is a pair of:\n * - TNode index;\n * - match index;\n *\n * A TNode index can be either:\n * - a positive number (the most common case) to indicate a matching TNode;\n * - a negative number to indicate that a given query is crossing a <ng-template> element and\n * results from views created based on TemplateRef should be inserted at this place.\n *\n * A match index is a number used to find an actual value (for a given node) when query results\n * are materialized. This index can have one of the following values:\n * - -2 - indicates that we need to read a special token (TemplateRef, ViewContainerRef etc.);\n * - -1 - indicates that we need to read a default value based on the node type (TemplateRef for\n * ng-template and ElementRef for other elements);\n * - a positive number - index of an injectable to be read from the element injector.\n */\n matches: number[]|null;\n\n /**\n * A flag indicating if a given query crosses an <ng-template> element. This flag exists for\n * performance reasons: we can notice that queries not crossing any <ng-template> elements will\n * have matches from a given view only (and adapt processing accordingly).\n */\n crossesNgTemplate: boolean;\n\n /**\n * A method call when a given query is crossing an element (or element container). This is where a\n * given TNode is matched against a query predicate.\n * @param tView\n * @param tNode\n */\n elementStart(tView: TView, tNode: TNode): void;\n\n /**\n * A method called when processing the elementEnd instruction - this is mostly useful to determine\n * if a given content query should match any nodes past this point.\n * @param tNode\n */\n elementEnd(tNode: TNode): void;\n\n /**\n * A method called when processing the template instruction. This is where a\n * given TContainerNode is matched against a query predicate.\n * @param tView\n * @param tNode\n */\n template(tView: TView, tNode: TNode): void;\n\n /**\n * A query-related method called when an embedded TView is created based on the content of a\n * <ng-template> element. We call this method to determine if a given query should be propagated\n * to the embedded view and if so - return a cloned TQuery for this embedded view.\n * @param tNode\n * @param childQueryIndex\n */\n embeddedTView(tNode: TNode, childQueryIndex: number): TQuery|null;\n}\n\n/**\n * TQueries represent a collection of individual TQuery objects tracked in a given view. Most of the\n * methods on this interface are simple proxy methods to the corresponding functionality on TQuery.\n */\nexport interface TQueries {\n /**\n * Adds a new TQuery to a collection of queries tracked in a given view.\n * @param tQuery\n */\n track(tQuery: TQuery): void;\n\n /**\n * Returns a TQuery instance for at the given index in the queries array.\n * @param index\n */\n getByIndex(index: number): TQuery;\n\n /**\n * Returns the number of queries tracked in a given view.\n */\n length: number;\n\n /**\n * A proxy method that iterates over all the TQueries in a given TView and calls the corresponding\n * `elementStart` on each and every TQuery.\n * @param tView\n * @param tNode\n */\n elementStart(tView: TView, tNode: TNode): void;\n\n /**\n * A proxy method that iterates over all the TQueries in a given TView and calls the corresponding\n * `elementEnd` on each and every TQuery.\n * @param tNode\n */\n elementEnd(tNode: TNode): void;\n\n /**\n * A proxy method that iterates over all the TQueries in a given TView and calls the corresponding\n * `template` on each and every TQuery.\n * @param tView\n * @param tNode\n */\n template(tView: TView, tNode: TNode): void;\n\n /**\n * A proxy method that iterates over all the TQueries in a given TView and calls the corresponding\n * `embeddedTView` on each and every TQuery.\n * @param tNode\n */\n embeddedTView(tNode: TNode): TQueries|null;\n}\n\n/**\n * An interface that represents query-related information specific to a view instance. Most notably\n * it contains:\n * - materialized query matches;\n * - a pointer to a QueryList where materialized query results should be reported.\n */\nexport interface LQuery<T> {\n /**\n * Materialized query matches for a given view only (!). Results are initialized lazily so the\n * array of matches is set to `null` initially.\n */\n matches: (T|null)[]|null;\n\n /**\n * A QueryList where materialized query results should be reported.\n */\n queryList: QueryList<T>;\n\n /**\n * Clones an LQuery for an embedded view. A cloned query shares the same `QueryList` but has a\n * separate collection of materialized matches.\n */\n clone(): LQuery<T>;\n\n /**\n * Called when an embedded view, impacting results of this query, is inserted or removed.\n */\n setDirty(): void;\n}\n\n/**\n * lQueries represent a collection of individual LQuery objects tracked in a given view.\n */\nexport interface LQueries {\n /**\n * A collection of queries tracked in a given view.\n */\n queries: LQuery<any>[];\n\n /**\n * A method called when a new embedded view is created. As a result a set of LQueries applicable\n * for a new embedded view is instantiated (cloned) from the declaration view.\n * @param tView\n */\n createEmbeddedView(tView: TView): LQueries|null;\n\n /**\n * A method called when an embedded view is inserted into a container. As a result all impacted\n * `LQuery` objects (and associated `QueryList`) are marked as dirty.\n * @param tView\n */\n insertView(tView: TView): void;\n\n /**\n * A method called when an embedded view is detached from a container. As a result all impacted\n * `LQuery` objects (and associated `QueryList`) are marked as dirty.\n * @param tView\n */\n detachView(tView: TView): void;\n}\n\n\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nexport const unusedValueExportToPlacateAjd = 1;\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// We are temporarily importing the existing viewEngine_from core so we can be sure we are\n// correctly implementing its interfaces for backwards compatibility.\n\nimport {ProviderToken} from '../di/provider_token';\nimport {createElementRef, ElementRef as ViewEngine_ElementRef, unwrapElementRef} from '../linker/element_ref';\nimport {QueryList} from '../linker/query_list';\nimport {createTemplateRef, TemplateRef as ViewEngine_TemplateRef} from '../linker/template_ref';\nimport {createContainerRef, ViewContainerRef} from '../linker/view_container_ref';\nimport {assertDefined, assertIndexInRange, assertNumber, throwError} from '../util/assert';\nimport {stringify} from '../util/stringify';\nimport {assertFirstCreatePass, assertLContainer} from './assert';\nimport {getNodeInjectable, locateDirectiveOrProvider} from './di';\nimport {storeCleanupWithContext} from './instructions/shared';\nimport {CONTAINER_HEADER_OFFSET, LContainer, MOVED_VIEWS} from './interfaces/container';\nimport {unusedValueExportToPlacateAjd as unused1} from './interfaces/definition';\nimport {unusedValueExportToPlacateAjd as unused2} from './interfaces/injector';\nimport {TContainerNode, TElementContainerNode, TElementNode, TNode, TNodeType, unusedValueExportToPlacateAjd as unused3} from './interfaces/node';\nimport {LQueries, LQuery, QueryFlags, TQueries, TQuery, TQueryMetadata, unusedValueExportToPlacateAjd as unused4} from './interfaces/query';\nimport {DECLARATION_LCONTAINER, LView, PARENT, QUERIES, TVIEW, TView} from './interfaces/view';\nimport {assertTNodeType} from './node_assert';\nimport {getCurrentQueryIndex, getCurrentTNode, getLView, getTView, setCurrentQueryIndex} from './state';\nimport {isCreationMode} from './util/view_utils';\n\nconst unusedValueToPlacateAjd = unused1 + unused2 + unused3 + unused4;\n\nclass LQuery_<T> implements LQuery<T> {\n matches: (T|null)[]|null = null;\n constructor(public queryList: QueryList<T>) {}\n clone(): LQuery<T> {\n return new LQuery_(this.queryList);\n }\n setDirty(): void {\n this.queryList.setDirty();\n }\n}\n\nclass LQueries_ implements LQueries {\n constructor(public queries: LQuery<any>[] = []) {}\n\n createEmbeddedView(tView: TView): LQueries|null {\n const tQueries = tView.queries;\n if (tQueries !== null) {\n const noOfInheritedQueries =\n tView.contentQueries !== null ? tView.contentQueries[0] : tQueries.length;\n const viewLQueries: LQuery<any>[] = [];\n\n // An embedded view has queries propagated from a declaration view at the beginning of the\n // TQueries collection and up until a first content query declared in the embedded view. Only\n // propagated LQueries are created at this point (LQuery corresponding to declared content\n // queries will be instantiated from the content query instructions for each directive).\n for (let i = 0; i < noOfInheritedQueries; i++) {\n const tQuery = tQueries.getByIndex(i);\n const parentLQuery = this.queries[tQuery.indexInDeclarationView];\n viewLQueries.push(parentLQuery.clone());\n }\n\n return new LQueries_(viewLQueries);\n }\n\n return null;\n }\n\n insertView(tView: TView): void {\n this.dirtyQueriesWithMatches(tView);\n }\n\n detachView(tView: TView): void {\n this.dirtyQueriesWithMatches(tView);\n }\n\n private dirtyQueriesWithMatches(tView: TView) {\n for (let i = 0; i < this.queries.length; i++) {\n if (getTQuery(tView, i).matches !== null) {\n this.queries[i].setDirty();\n }\n }\n }\n}\n\nclass TQueryMetadata_ implements TQueryMetadata {\n constructor(\n public predicate: ProviderToken<unknown>|string[], public flags: QueryFlags,\n public read: any = null) {}\n}\n\nclass TQueries_ implements TQueries {\n constructor(private queries: TQuery[] = []) {}\n\n elementStart(tView: TView, tNode: TNode): void {\n ngDevMode &&\n assertFirstCreatePass(\n tView, 'Queries should collect results on the first template pass only');\n for (let i = 0; i < this.queries.length; i++) {\n this.queries[i].elementStart(tView, tNode);\n }\n }\n elementEnd(tNode: TNode): void {\n for (let i = 0; i < this.queries.length; i++) {\n this.queries[i].elementEnd(tNode);\n }\n }\n embeddedTView(tNode: TNode): TQueries|null {\n let queriesForTemplateRef: TQuery[]|null = null;\n\n for (let i = 0; i < this.length; i++) {\n const childQueryIndex = queriesForTemplateRef !== null ? queriesForTemplateRef.length : 0;\n const tqueryClone = this.getByIndex(i).embeddedTView(tNode, childQueryIndex);\n\n if (tqueryClone) {\n tqueryClone.indexInDeclarationView = i;\n if (queriesForTemplateRef !== null) {\n queriesForTemplateRef.push(tqueryClone);\n } else {\n queriesForTemplateRef = [tqueryClone];\n }\n }\n }\n\n return queriesForTemplateRef !== null ? new TQueries_(queriesForTemplateRef) : null;\n }\n\n template(tView: TView, tNode: TNode): void {\n ngDevMode &&\n assertFirstCreatePass(\n tView, 'Queries should collect results on the first template pass only');\n for (let i = 0; i < this.queries.length; i++) {\n this.queries[i].template(tView, tNode);\n }\n }\n\n getByIndex(index: number): TQuery {\n ngDevMode && assertIndexInRange(this.queries, index);\n return this.queries[index];\n }\n\n get length(): number {\n return this.queries.length;\n }\n\n track(tquery: TQuery): void {\n this.queries.push(tquery);\n }\n}\n\nclass TQuery_ implements TQuery {\n matches: number[]|null = null;\n indexInDeclarationView = -1;\n crossesNgTemplate = false;\n\n /**\n * A node index on which a query was declared (-1 for view queries and ones inherited from the\n * declaration template). We use this index (alongside with _appliesToNextNode flag) to know\n * when to apply content queries to elements in a template.\n */\n private _declarationNodeIndex: number;\n\n /**\n * A flag indicating if a given query still applies to nodes it is crossing. We use this flag\n * (alongside with _declarationNodeIndex) to know when to stop applying content queries to\n * elements in a template.\n */\n private _appliesToNextNode = true;\n\n constructor(public metadata: TQueryMetadata, nodeIndex: number = -1) {\n this._declarationNodeIndex = nodeIndex;\n }\n\n elementStart(tView: TView, tNode: TNode): void {\n if (this.isApplyingToNode(tNode)) {\n this.matchTNode(tView, tNode);\n }\n }\n\n elementEnd(tNode: TNode): void {\n if (this._declarationNodeIndex === tNode.index) {\n this._appliesToNextNode = false;\n }\n }\n\n template(tView: TView, tNode: TNode): void {\n this.elementStart(tView, tNode);\n }\n\n embeddedTView(tNode: TNode, childQueryIndex: number): TQuery|null {\n if (this.isApplyingToNode(tNode)) {\n this.crossesNgTemplate = true;\n // A marker indicating a `<ng-template>` element (a placeholder for query results from\n // embedded views created based on this `<ng-template>`).\n this.addMatch(-tNode.index, childQueryIndex);\n return new TQuery_(this.metadata);\n }\n return null;\n }\n\n private isApplyingToNode(tNode: TNode): boolean {\n if (this._appliesToNextNode &&\n (this.metadata.flags & QueryFlags.descendants) !== QueryFlags.descendants) {\n const declarationNodeIdx = this._declarationNodeIndex;\n let parent = tNode.parent;\n // Determine if a given TNode is a \"direct\" child of a node on which a content query was\n // declared (only direct children of query's host node can match with the descendants: false\n // option). There are 3 main use-case / conditions to consider here:\n // - <needs-target><i #target></i></needs-target>: here <i #target> parent node is a query\n // host node;\n // - <needs-target><ng-template [ngIf]=\"true\"><i #target></i></ng-template></needs-target>:\n // here <i #target> parent node is null;\n // - <needs-target><ng-container><i #target></i></ng-container></needs-target>: here we need\n // to go past `<ng-container>` to determine <i #target> parent node (but we shouldn't traverse\n // up past the query's host node!).\n while (parent !== null && (parent.type & TNodeType.ElementContainer) &&\n parent.index !== declarationNodeIdx) {\n parent = parent.parent;\n }\n return declarationNodeIdx === (parent !== null ? parent.index : -1);\n }\n return this._appliesToNextNode;\n }\n\n private matchTNode(tView: TView, tNode: TNode): void {\n const predicate = this.metadata.predicate;\n if (Array.isArray(predicate)) {\n for (let i = 0; i < predicate.length; i++) {\n const name = predicate[i];\n this.matchTNodeWithReadOption(tView, tNode, getIdxOfMatchingSelector(tNode, name));\n // Also try matching the name to a provider since strings can be used as DI tokens too.\n this.matchTNodeWithReadOption(\n tView, tNode, locateDirectiveOrProvider(tNode, tView, name, false, false));\n }\n } else {\n if ((predicate as any) === ViewEngine_TemplateRef) {\n if (tNode.type & TNodeType.Container) {\n this.matchTNodeWithReadOption(tView, tNode, -1);\n }\n } else {\n this.matchTNodeWithReadOption(\n tView, tNode, locateDirectiveOrProvider(tNode, tView, predicate, false, false));\n }\n }\n }\n\n private matchTNodeWithReadOption(tView: TView, tNode: TNode, nodeMatchIdx: number|null): void {\n if (nodeMatchIdx !== null) {\n const read = this.metadata.read;\n if (read !== null) {\n if (read === ViewEngine_ElementRef || read === ViewContainerRef ||\n read === ViewEngine_TemplateRef && (tNode.type & TNodeType.Container)) {\n this.addMatch(tNode.index, -2);\n } else {\n const directiveOrProviderIdx =\n locateDirectiveOrProvider(tNode, tView, read, false, false);\n if (directiveOrProviderIdx !== null) {\n this.addMatch(tNode.index, directiveOrProviderIdx);\n }\n }\n } else {\n this.addMatch(tNode.index, nodeMatchIdx);\n }\n }\n }\n\n private addMatch(tNodeIdx: number, matchIdx: number) {\n if (this.matches === null) {\n this.matches = [tNodeIdx, matchIdx];\n } else {\n this.matches.push(tNodeIdx, matchIdx);\n }\n }\n}\n\n/**\n * Iterates over local names for a given node and returns directive index\n * (or -1 if a local name points to an element).\n *\n * @param tNode static data of a node to check\n * @param selector selector to match\n * @returns directive index, -1 or null if a selector didn't match any of the local names\n */\nfunction getIdxOfMatchingSelector(tNode: TNode, selector: string): number|null {\n const localNames = tNode.localNames;\n if (localNames !== null) {\n for (let i = 0; i < localNames.length; i += 2) {\n if (localNames[i] === selector) {\n return localNames[i + 1] as number;\n }\n }\n }\n return null;\n}\n\n\nfunction createResultByTNodeType(tNode: TNode, currentView: LView): any {\n if (tNode.type & (TNodeType.AnyRNode | TNodeType.ElementContainer)) {\n return createElementRef(tNode, currentView);\n } else if (tNode.type & TNodeType.Container) {\n return createTemplateRef(tNode, currentView);\n }\n return null;\n}\n\n\nfunction createResultForNode(lView: LView, tNode: TNode, matchingIdx: number, read: any): any {\n if (matchingIdx === -1) {\n // if read token and / or strategy is not specified, detect it using appropriate tNode type\n return createResultByTNodeType(tNode, lView);\n } else if (matchingIdx === -2) {\n // read a special token from a node injector\n return createSpecialToken(lView, tNode, read);\n } else {\n // read a token\n return getNodeInjectable(lView, lView[TVIEW], matchingIdx, tNode as TElementNode);\n }\n}\n\nfunction createSpecialToken(lView: LView, tNode: TNode, read: any): any {\n if (read === ViewEngine_ElementRef) {\n return createElementRef(tNode, lView);\n } else if (read === ViewEngine_TemplateRef) {\n return createTemplateRef(tNode, lView);\n } else if (read === ViewContainerRef) {\n ngDevMode && assertTNodeType(tNode, TNodeType.AnyRNode | TNodeType.AnyContainer);\n return createContainerRef(\n tNode as TElementNode | TContainerNode | TElementContainerNode, lView);\n } else {\n ngDevMode &&\n throwError(\n `Special token to read should be one of ElementRef, TemplateRef or ViewContainerRef but got ${\n stringify(read)}.`);\n }\n}\n\n/**\n * A helper function that creates query results for a given view. This function is meant to do the\n * processing once and only once for a given view instance (a set of results for a given view\n * doesn't change).\n */\nfunction materializeViewResults<T>(\n tView: TView, lView: LView, tQuery: TQuery, queryIndex: number): (T|null)[] {\n const lQuery = lView[QUERIES]!.queries![queryIndex];\n if (lQuery.matches === null) {\n const tViewData = tView.data;\n const tQueryMatches = tQuery.matches!;\n const result: T|null[] = [];\n for (let i = 0; i < tQueryMatches.length; i += 2) {\n const matchedNodeIdx = tQueryMatches[i];\n if (matchedNodeIdx < 0) {\n // we at the <ng-template> marker which might have results in views created based on this\n // <ng-template> - those results will be in separate views though, so here we just leave\n // null as a placeholder\n result.push(null);\n } else {\n ngDevMode && assertIndexInRange(tViewData, matchedNodeIdx);\n const tNode = tViewData[matchedNodeIdx] as TNode;\n result.push(createResultForNode(lView, tNode, tQueryMatches[i + 1], tQuery.metadata.read));\n }\n }\n lQuery.matches = result;\n }\n\n return lQuery.matches;\n}\n\n/**\n * A helper function that collects (already materialized) query results from a tree of views,\n * starting with a provided LView.\n */\nfunction collectQueryResults<T>(tView: TView, lView: LView, queryIndex: number, result: T[]): T[] {\n const tQuery = tView.queries!.getByIndex(queryIndex);\n const tQueryMatches = tQuery.matches;\n if (tQueryMatches !== null) {\n const lViewResults = materializeViewResults<T>(tView, lView, tQuery, queryIndex);\n\n for (let i = 0; i < tQueryMatches.length; i += 2) {\n const tNodeIdx = tQueryMatches[i];\n if (tNodeIdx > 0) {\n result.push(lViewResults[i / 2] as T);\n } else {\n const childQueryIndex = tQueryMatches[i + 1];\n\n const declarationLContainer = lView[-tNodeIdx] as LContainer;\n ngDevMode && assertLContainer(declarationLContainer);\n\n // collect matches for views inserted in this container\n for (let i = CONTAINER_HEADER_OFFSET; i < declarationLContainer.length; i++) {\n const embeddedLView = declarationLContainer[i];\n if (embeddedLView[DECLARATION_LCONTAINER] === embeddedLView[PARENT]) {\n collectQueryResults(embeddedLView[TVIEW], embeddedLView, childQueryIndex, result);\n }\n }\n\n // collect matches for views created from this declaration container and inserted into\n // different containers\n if (declarationLContainer[MOVED_VIEWS] !== null) {\n const embeddedLViews = declarationLContainer[MOVED_VIEWS]!;\n for (let i = 0; i < embeddedLViews.length; i++) {\n const embeddedLView = embeddedLViews[i];\n collectQueryResults(embeddedLView[TVIEW], embeddedLView, childQueryIndex, result);\n }\n }\n }\n }\n }\n return result;\n}\n\n/**\n * Refreshes a query by combining matches from all active views and removing matches from deleted\n * views.\n *\n * @returns `true` if a query got dirty during change detection or if this is a static query\n * resolving in creation mode, `false` otherwise.\n *\n * @codeGenApi\n */\nexport function ɵɵqueryRefresh(queryList: QueryList<any>): boolean {\n const lView = getLView();\n const tView = getTView();\n const queryIndex = getCurrentQueryIndex();\n\n setCurrentQueryIndex(queryIndex + 1);\n\n const tQuery = getTQuery(tView, queryIndex);\n if (queryList.dirty &&\n (isCreationMode(lView) ===\n ((tQuery.metadata.flags & QueryFlags.isStatic) === QueryFlags.isStatic))) {\n if (tQuery.matches === null) {\n queryList.reset([]);\n } else {\n const result = tQuery.crossesNgTemplate ?\n collectQueryResults(tView, lView, queryIndex, []) :\n materializeViewResults(tView, lView, tQuery, queryIndex);\n queryList.reset(result, unwrapElementRef);\n queryList.notifyOnChanges();\n }\n return true;\n }\n\n return false;\n}\n\n/**\n * Creates new QueryList, stores the reference in LView and returns QueryList.\n *\n * @param predicate The type for which the query will search\n * @param flags Flags associated with the query\n * @param read What to save in the query\n *\n * @codeGenApi\n */\nexport function ɵɵviewQuery<T>(\n predicate: ProviderToken<unknown>|string[], flags: QueryFlags, read?: any): void {\n ngDevMode && assertNumber(flags, 'Expecting flags');\n const tView = getTView();\n if (tView.firstCreatePass) {\n createTQuery(tView, new TQueryMetadata_(predicate, flags, read), -1);\n if ((flags & QueryFlags.isStatic) === QueryFlags.isStatic) {\n tView.staticViewQueries = true;\n }\n }\n createLQuery<T>(tView, getLView(), flags);\n}\n\n/**\n * Registers a QueryList, associated with a content query, for later refresh (part of a view\n * refresh).\n *\n * @param directiveIndex Current directive index\n * @param predicate The type for which the query will search\n * @param flags Flags associated with the query\n * @param read What to save in the query\n * @returns QueryList<T>\n *\n * @codeGenApi\n */\nexport function ɵɵcontentQuery<T>(\n directiveIndex: number, predicate: ProviderToken<unknown>|string[], flags: QueryFlags,\n read?: any): void {\n ngDevMode && assertNumber(flags, 'Expecting flags');\n const tView = getTView();\n if (tView.firstCreatePass) {\n const tNode = getCurrentTNode()!;\n createTQuery(tView, new TQueryMetadata_(predicate, flags, read), tNode.index);\n saveContentQueryAndDirectiveIndex(tView, directiveIndex);\n if ((flags & QueryFlags.isStatic) === QueryFlags.isStatic) {\n tView.staticContentQueries = true;\n }\n }\n\n createLQuery<T>(tView, getLView(), flags);\n}\n\n/**\n * Loads a QueryList corresponding to the current view or content query.\n *\n * @codeGenApi\n */\nexport function ɵɵloadQuery<T>(): QueryList<T> {\n return loadQueryInternal<T>(getLView(), getCurrentQueryIndex());\n}\n\nfunction loadQueryInternal<T>(lView: LView, queryIndex: number): QueryList<T> {\n ngDevMode &&\n assertDefined(lView[QUERIES], 'LQueries should be defined when trying to load a query');\n ngDevMode && assertIndexInRange(lView[QUERIES]!.queries, queryIndex);\n return lView[QUERIES]!.queries[queryIndex].queryList;\n}\n\nfunction createLQuery<T>(tView: TView, lView: LView, flags: QueryFlags) {\n const queryList = new QueryList<T>(\n (flags & QueryFlags.emitDistinctChangesOnly) === QueryFlags.emitDistinctChangesOnly);\n storeCleanupWithContext(tView, lView, queryList, queryList.destroy);\n\n if (lView[QUERIES] === null) lView[QUERIES] = new LQueries_();\n lView[QUERIES]!.queries.push(new LQuery_(queryList));\n}\n\nfunction createTQuery(tView: TView, metadata: TQueryMetadata, nodeIndex: number): void {\n if (tView.queries === null) tView.queries = new TQueries_();\n tView.queries.track(new TQuery_(metadata, nodeIndex));\n}\n\nfunction saveContentQueryAndDirectiveIndex(tView: TView, directiveIndex: number) {\n const tViewContentQueries = tView.contentQueries || (tView.contentQueries = []);\n const lastSavedDirectiveIndex =\n tViewContentQueries.length ? tViewContentQueries[tViewContentQueries.length - 1] : -1;\n if (directiveIndex !== lastSavedDirectiveIndex) {\n tViewContentQueries.push(tView.queries!.length - 1, directiveIndex);\n }\n}\n\nfunction getTQuery(tView: TView, index: number): TQuery {\n ngDevMode && assertDefined(tView.queries, 'TQueries must be defined to retrieve a TQuery');\n return tView.queries!.getByIndex(index);\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\nimport {ChangeDetectorRef, injectChangeDetectorRef} from '../change_detection/change_detector_ref';\nimport {InjectFlags} from '../di/interface/injector';\nimport {createTemplateRef, TemplateRef} from '../linker/template_ref';\nimport {throwProviderNotFoundError} from './errors_di';\nimport {TNode} from './interfaces/node';\nimport {LView} from './interfaces/view';\n\n\n/**\n * Retrieves `TemplateRef` instance from `Injector` when a local reference is placed on the\n * `<ng-template>` element.\n *\n * @codeGenApi\n */\nexport function ɵɵtemplateRefExtractor(tNode: TNode, lView: LView): TemplateRef<any>|null {\n return createTemplateRef(tNode, lView);\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 */\nimport {LifecycleHooksFeature, renderComponent, whenRendered} from './component';\nimport {ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdefineNgModule, ɵɵdefinePipe, ɵɵsetComponentScope, ɵɵsetNgModuleScope} from './definition';\nimport {ɵɵCopyDefinitionFeature} from './features/copy_definition_feature';\nimport {ɵɵInheritDefinitionFeature} from './features/inherit_definition_feature';\nimport {ɵɵNgOnChangesFeature} from './features/ng_onchanges_feature';\nimport {ɵɵProvidersFeature} from './features/providers_feature';\nimport {ComponentDef, ComponentTemplate, ComponentType, DirectiveDef, DirectiveType, PipeDef} from './interfaces/definition';\nimport {ɵɵComponentDeclaration, ɵɵDirectiveDeclaration, ɵɵFactoryDeclaration, ɵɵInjectorDeclaration, ɵɵNgModuleDeclaration, ɵɵPipeDeclaration} from './interfaces/public_definitions';\nimport {ComponentDebugMetadata, DirectiveDebugMetadata, getComponent, getDirectiveMetadata, getDirectives, getHostElement, getRenderedText} from './util/discovery_utils';\n\nexport {NgModuleType} from '../metadata/ng_module_def';\nexport {ComponentFactory, ComponentFactoryResolver, ComponentRef, injectComponentFactoryResolver} from './component_ref';\nexport {ɵɵgetInheritedFactory} from './di';\nexport {getLocaleId, setLocaleId} from './i18n/i18n_locale_id';\n// clang-format off\nexport {\n detectChanges,\n markDirty,\n store,\n tick,\n ɵɵadvance,\n\n ɵɵattribute,\n ɵɵattributeInterpolate1,\n ɵɵattributeInterpolate2,\n ɵɵattributeInterpolate3,\n ɵɵattributeInterpolate4,\n ɵɵattributeInterpolate5,\n ɵɵattributeInterpolate6,\n ɵɵattributeInterpolate7,\n ɵɵattributeInterpolate8,\n ɵɵattributeInterpolateV,\n\n ɵɵclassMap,\n ɵɵclassMapInterpolate1,\n ɵɵclassMapInterpolate2,\n ɵɵclassMapInterpolate3,\n ɵɵclassMapInterpolate4,\n ɵɵclassMapInterpolate5,\n ɵɵclassMapInterpolate6,\n ɵɵclassMapInterpolate7,\n ɵɵclassMapInterpolate8,\n ɵɵclassMapInterpolateV,\n\n ɵɵclassProp,\n\n ɵɵdirectiveInject,\n\n ɵɵelement,\n\n ɵɵelementContainer,\n ɵɵelementContainerEnd,\n ɵɵelementContainerStart,\n ɵɵelementEnd,\n ɵɵelementStart,\n\n ɵɵgetCurrentView,\n ɵɵhostProperty,\n ɵɵinjectAttribute,\n ɵɵinvalidFactory,\n\n ɵɵlistener,\n\n ɵɵnamespaceHTML,\n ɵɵnamespaceMathML,\n ɵɵnamespaceSVG,\n\n ɵɵnextContext,\n\n ɵɵprojection,\n ɵɵprojectionDef,\n ɵɵproperty,\n ɵɵpropertyInterpolate,\n ɵɵpropertyInterpolate1,\n ɵɵpropertyInterpolate2,\n ɵɵpropertyInterpolate3,\n ɵɵpropertyInterpolate4,\n ɵɵpropertyInterpolate5,\n ɵɵpropertyInterpolate6,\n ɵɵpropertyInterpolate7,\n ɵɵpropertyInterpolate8,\n ɵɵpropertyInterpolateV,\n\n ɵɵreference,\n\n ɵɵstyleMap,\n ɵɵstyleMapInterpolate1,\n ɵɵstyleMapInterpolate2,\n ɵɵstyleMapInterpolate3,\n ɵɵstyleMapInterpolate4,\n ɵɵstyleMapInterpolate5,\n ɵɵstyleMapInterpolate6,\n ɵɵstyleMapInterpolate7,\n ɵɵstyleMapInterpolate8,\n ɵɵstyleMapInterpolateV,\n\n ɵɵstyleProp,\n ɵɵstylePropInterpolate1,\n ɵɵstylePropInterpolate2,\n ɵɵstylePropInterpolate3,\n ɵɵstylePropInterpolate4,\n ɵɵstylePropInterpolate5,\n ɵɵstylePropInterpolate6,\n ɵɵstylePropInterpolate7,\n ɵɵstylePropInterpolate8,\n ɵɵstylePropInterpolateV,\n\n ɵɵsyntheticHostListener,\n ɵɵsyntheticHostProperty,\n\n ɵɵtemplate,\n\n ɵɵtext,\n ɵɵtextInterpolate,\n ɵɵtextInterpolate1,\n ɵɵtextInterpolate2,\n ɵɵtextInterpolate3,\n ɵɵtextInterpolate4,\n ɵɵtextInterpolate5,\n ɵɵtextInterpolate6,\n ɵɵtextInterpolate7,\n ɵɵtextInterpolate8,\n ɵɵtextInterpolateV,\n} from './instructions/all';\nexport {ɵɵi18n, ɵɵi18nApply, ɵɵi18nAttributes, ɵɵi18nEnd, ɵɵi18nExp,ɵɵi18nPostprocess, ɵɵi18nStart} from './instructions/i18n';\nexport {RenderFlags} from './interfaces/definition';\nexport {\n AttributeMarker\n} from './interfaces/node';\nexport {CssSelectorList, ProjectionSlots} from './interfaces/projection';\nexport {\n setClassMetadata,\n} from './metadata';\nexport {NgModuleFactory, NgModuleRef} from './ng_module_ref';\nexport {\n ɵɵpipe,\n ɵɵpipeBind1,\n ɵɵpipeBind2,\n ɵɵpipeBind3,\n ɵɵpipeBind4,\n ɵɵpipeBindV,\n} from './pipe';\nexport {\n ɵɵpureFunction0,\n ɵɵpureFunction1,\n ɵɵpureFunction2,\n ɵɵpureFunction3,\n ɵɵpureFunction4,\n ɵɵpureFunction5,\n ɵɵpureFunction6,\n ɵɵpureFunction7,\n ɵɵpureFunction8,\n ɵɵpureFunctionV,\n} from './pure_function';\nexport {\n ɵɵcontentQuery,\n ɵɵloadQuery,\n ɵɵqueryRefresh,\n ɵɵviewQuery} from './query';\nexport {\n ɵɵdisableBindings,\n\n ɵɵenableBindings,\n ɵɵrestoreView,\n} from './state';\nexport {NO_CHANGE} from './tokens';\nexport { ɵɵresolveBody, ɵɵresolveDocument,ɵɵresolveWindow} from './util/misc_utils';\nexport { ɵɵtemplateRefExtractor} from './view_engine_compatibility_prebound';\n// clang-format on\n\nexport {\n ComponentDebugMetadata,\n ComponentDef,\n ComponentTemplate,\n ComponentType,\n DirectiveDebugMetadata,\n DirectiveDef,\n DirectiveType,\n getComponent,\n getDirectiveMetadata,\n getDirectives,\n getHostElement,\n getRenderedText,\n LifecycleHooksFeature,\n PipeDef,\n renderComponent,\n whenRendered,\n ɵɵComponentDeclaration,\n ɵɵCopyDefinitionFeature,\n ɵɵdefineComponent,\n ɵɵdefineDirective,\n ɵɵdefineNgModule,\n ɵɵdefinePipe,\n ɵɵDirectiveDeclaration,\n ɵɵFactoryDeclaration,\n ɵɵInheritDefinitionFeature,\n ɵɵInjectorDeclaration,\n ɵɵNgModuleDeclaration,\n ɵɵNgOnChangesFeature,\n ɵɵPipeDeclaration,\n ɵɵProvidersFeature,\n ɵɵsetComponentScope,\n ɵɵsetNgModuleScope,\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 {forwardRef, resolveForwardRef} from '../../di/forward_ref';\nimport {ɵɵinject, ɵɵinvalidFactoryDep} from '../../di/injector_compatibility';\nimport {ɵɵdefineInjectable, ɵɵdefineInjector} from '../../di/interface/defs';\nimport * as sanitization from '../../sanitization/sanitization';\nimport * as r3 from '../index';\n\n\n/**\n * A mapping of the @angular/core API surface used in generated expressions to the actual symbols.\n *\n * This should be kept up to date with the public exports of @angular/core.\n */\nexport const angularCoreEnv: {[name: string]: Function} =\n (() => ({\n 'ɵɵattribute': r3.ɵɵattribute,\n 'ɵɵattributeInterpolate1': r3.ɵɵattributeInterpolate1,\n 'ɵɵattributeInterpolate2': r3.ɵɵattributeInterpolate2,\n 'ɵɵattributeInterpolate3': r3.ɵɵattributeInterpolate3,\n 'ɵɵattributeInterpolate4': r3.ɵɵattributeInterpolate4,\n 'ɵɵattributeInterpolate5': r3.ɵɵattributeInterpolate5,\n 'ɵɵattributeInterpolate6': r3.ɵɵattributeInterpolate6,\n 'ɵɵattributeInterpolate7': r3.ɵɵattributeInterpolate7,\n 'ɵɵattributeInterpolate8': r3.ɵɵattributeInterpolate8,\n 'ɵɵattributeInterpolateV': r3.ɵɵattributeInterpolateV,\n 'ɵɵdefineComponent': r3.ɵɵdefineComponent,\n 'ɵɵdefineDirective': r3.ɵɵdefineDirective,\n 'ɵɵdefineInjectable': ɵɵdefineInjectable,\n 'ɵɵdefineInjector': ɵɵdefineInjector,\n 'ɵɵdefineNgModule': r3.ɵɵdefineNgModule,\n 'ɵɵdefinePipe': r3.ɵɵdefinePipe,\n 'ɵɵdirectiveInject': r3.ɵɵdirectiveInject,\n 'ɵɵgetInheritedFactory': r3.ɵɵgetInheritedFactory,\n 'ɵɵinject': ɵɵinject,\n 'ɵɵinjectAttribute': r3.ɵɵinjectAttribute,\n 'ɵɵinvalidFactory': r3.ɵɵinvalidFactory,\n 'ɵɵinvalidFactoryDep': ɵɵinvalidFactoryDep,\n 'ɵɵtemplateRefExtractor': r3.ɵɵtemplateRefExtractor,\n 'ɵɵNgOnChangesFeature': r3.ɵɵNgOnChangesFeature,\n 'ɵɵProvidersFeature': r3.ɵɵProvidersFeature,\n 'ɵɵCopyDefinitionFeature': r3.ɵɵCopyDefinitionFeature,\n 'ɵɵInheritDefinitionFeature': r3.ɵɵInheritDefinitionFeature,\n 'ɵɵnextContext': r3.ɵɵnextContext,\n 'ɵɵnamespaceHTML': r3.ɵɵnamespaceHTML,\n 'ɵɵnamespaceMathML': r3.ɵɵnamespaceMathML,\n 'ɵɵnamespaceSVG': r3.ɵɵnamespaceSVG,\n 'ɵɵenableBindings': r3.ɵɵenableBindings,\n 'ɵɵdisableBindings': r3.ɵɵdisableBindings,\n 'ɵɵelementStart': r3.ɵɵelementStart,\n 'ɵɵelementEnd': r3.ɵɵelementEnd,\n 'ɵɵelement': r3.ɵɵelement,\n 'ɵɵelementContainerStart': r3.ɵɵelementContainerStart,\n 'ɵɵelementContainerEnd': r3.ɵɵelementContainerEnd,\n 'ɵɵelementContainer': r3.ɵɵelementContainer,\n 'ɵɵpureFunction0': r3.ɵɵpureFunction0,\n 'ɵɵpureFunction1': r3.ɵɵpureFunction1,\n 'ɵɵpureFunction2': r3.ɵɵpureFunction2,\n 'ɵɵpureFunction3': r3.ɵɵpureFunction3,\n 'ɵɵpureFunction4': r3.ɵɵpureFunction4,\n 'ɵɵpureFunction5': r3.ɵɵpureFunction5,\n 'ɵɵpureFunction6': r3.ɵɵpureFunction6,\n 'ɵɵpureFunction7': r3.ɵɵpureFunction7,\n 'ɵɵpureFunction8': r3.ɵɵpureFunction8,\n 'ɵɵpureFunctionV': r3.ɵɵpureFunctionV,\n 'ɵɵgetCurrentView': r3.ɵɵgetCurrentView,\n 'ɵɵrestoreView': r3.ɵɵrestoreView,\n 'ɵɵlistener': r3.ɵɵlistener,\n 'ɵɵprojection': r3.ɵɵprojection,\n 'ɵɵsyntheticHostProperty': r3.ɵɵsyntheticHostProperty,\n 'ɵɵsyntheticHostListener': r3.ɵɵsyntheticHostListener,\n 'ɵɵpipeBind1': r3.ɵɵpipeBind1,\n 'ɵɵpipeBind2': r3.ɵɵpipeBind2,\n 'ɵɵpipeBind3': r3.ɵɵpipeBind3,\n 'ɵɵpipeBind4': r3.ɵɵpipeBind4,\n 'ɵɵpipeBindV': r3.ɵɵpipeBindV,\n 'ɵɵprojectionDef': r3.ɵɵprojectionDef,\n 'ɵɵhostProperty': r3.ɵɵhostProperty,\n 'ɵɵproperty': r3.ɵɵproperty,\n 'ɵɵpropertyInterpolate': r3.ɵɵpropertyInterpolate,\n 'ɵɵpropertyInterpolate1': r3.ɵɵpropertyInterpolate1,\n 'ɵɵpropertyInterpolate2': r3.ɵɵpropertyInterpolate2,\n 'ɵɵpropertyInterpolate3': r3.ɵɵpropertyInterpolate3,\n 'ɵɵpropertyInterpolate4': r3.ɵɵpropertyInterpolate4,\n 'ɵɵpropertyInterpolate5': r3.ɵɵpropertyInterpolate5,\n 'ɵɵpropertyInterpolate6': r3.ɵɵpropertyInterpolate6,\n 'ɵɵpropertyInterpolate7': r3.ɵɵpropertyInterpolate7,\n 'ɵɵpropertyInterpolate8': r3.ɵɵpropertyInterpolate8,\n 'ɵɵpropertyInterpolateV': r3.ɵɵpropertyInterpolateV,\n 'ɵɵpipe': r3.ɵɵpipe,\n 'ɵɵqueryRefresh': r3.ɵɵqueryRefresh,\n 'ɵɵviewQuery': r3.ɵɵviewQuery,\n 'ɵɵloadQuery': r3.ɵɵloadQuery,\n 'ɵɵcontentQuery': r3.ɵɵcontentQuery,\n 'ɵɵreference': r3.ɵɵreference,\n 'ɵɵclassMap': r3.ɵɵclassMap,\n 'ɵɵclassMapInterpolate1': r3.ɵɵclassMapInterpolate1,\n 'ɵɵclassMapInterpolate2': r3.ɵɵclassMapInterpolate2,\n 'ɵɵclassMapInterpolate3': r3.ɵɵclassMapInterpolate3,\n 'ɵɵclassMapInterpolate4': r3.ɵɵclassMapInterpolate4,\n 'ɵɵclassMapInterpolate5': r3.ɵɵclassMapInterpolate5,\n 'ɵɵclassMapInterpolate6': r3.ɵɵclassMapInterpolate6,\n 'ɵɵclassMapInterpolate7': r3.ɵɵclassMapInterpolate7,\n 'ɵɵclassMapInterpolate8': r3.ɵɵclassMapInterpolate8,\n 'ɵɵclassMapInterpolateV': r3.ɵɵclassMapInterpolateV,\n 'ɵɵstyleMap': r3.ɵɵstyleMap,\n 'ɵɵstyleMapInterpolate1': r3.ɵɵstyleMapInterpolate1,\n 'ɵɵstyleMapInterpolate2': r3.ɵɵstyleMapInterpolate2,\n 'ɵɵstyleMapInterpolate3': r3.ɵɵstyleMapInterpolate3,\n 'ɵɵstyleMapInterpolate4': r3.ɵɵstyleMapInterpolate4,\n 'ɵɵstyleMapInterpolate5': r3.ɵɵstyleMapInterpolate5,\n 'ɵɵstyleMapInterpolate6': r3.ɵɵstyleMapInterpolate6,\n 'ɵɵstyleMapInterpolate7': r3.ɵɵstyleMapInterpolate7,\n 'ɵɵstyleMapInterpolate8': r3.ɵɵstyleMapInterpolate8,\n 'ɵɵstyleMapInterpolateV': r3.ɵɵstyleMapInterpolateV,\n 'ɵɵstyleProp': r3.ɵɵstyleProp,\n 'ɵɵstylePropInterpolate1': r3.ɵɵstylePropInterpolate1,\n 'ɵɵstylePropInterpolate2': r3.ɵɵstylePropInterpolate2,\n 'ɵɵstylePropInterpolate3': r3.ɵɵstylePropInterpolate3,\n 'ɵɵstylePropInterpolate4': r3.ɵɵstylePropInterpolate4,\n 'ɵɵstylePropInterpolate5': r3.ɵɵstylePropInterpolate5,\n 'ɵɵstylePropInterpolate6': r3.ɵɵstylePropInterpolate6,\n 'ɵɵstylePropInterpolate7': r3.ɵɵstylePropInterpolate7,\n 'ɵɵstylePropInterpolate8': r3.ɵɵstylePropInterpolate8,\n 'ɵɵstylePropInterpolateV': r3.ɵɵstylePropInterpolateV,\n 'ɵɵclassProp': r3.ɵɵclassProp,\n 'ɵɵadvance': r3.ɵɵadvance,\n 'ɵɵtemplate': r3.ɵɵtemplate,\n 'ɵɵtext': r3.ɵɵtext,\n 'ɵɵtextInterpolate': r3.ɵɵtextInterpolate,\n 'ɵɵtextInterpolate1': r3.ɵɵtextInterpolate1,\n 'ɵɵtextInterpolate2': r3.ɵɵtextInterpolate2,\n 'ɵɵtextInterpolate3': r3.ɵɵtextInterpolate3,\n 'ɵɵtextInterpolate4': r3.ɵɵtextInterpolate4,\n 'ɵɵtextInterpolate5': r3.ɵɵtextInterpolate5,\n 'ɵɵtextInterpolate6': r3.ɵɵtextInterpolate6,\n 'ɵɵtextInterpolate7': r3.ɵɵtextInterpolate7,\n 'ɵɵtextInterpolate8': r3.ɵɵtextInterpolate8,\n 'ɵɵtextInterpolateV': r3.ɵɵtextInterpolateV,\n 'ɵɵi18n': r3.ɵɵi18n,\n 'ɵɵi18nAttributes': r3.ɵɵi18nAttributes,\n 'ɵɵi18nExp': r3.ɵɵi18nExp,\n 'ɵɵi18nStart': r3.ɵɵi18nStart,\n 'ɵɵi18nEnd': r3.ɵɵi18nEnd,\n 'ɵɵi18nApply': r3.ɵɵi18nApply,\n 'ɵɵi18nPostprocess': r3.ɵɵi18nPostprocess,\n 'ɵɵresolveWindow': r3.ɵɵresolveWindow,\n 'ɵɵresolveDocument': r3.ɵɵresolveDocument,\n 'ɵɵresolveBody': r3.ɵɵresolveBody,\n 'ɵɵsetComponentScope': r3.ɵɵsetComponentScope,\n 'ɵɵsetNgModuleScope': r3.ɵɵsetNgModuleScope,\n\n 'ɵɵsanitizeHtml': sanitization.ɵɵsanitizeHtml,\n 'ɵɵsanitizeStyle': sanitization.ɵɵsanitizeStyle,\n 'ɵɵsanitizeResourceUrl': sanitization.ɵɵsanitizeResourceUrl,\n 'ɵɵsanitizeScript': sanitization.ɵɵsanitizeScript,\n 'ɵɵsanitizeUrl': sanitization.ɵɵsanitizeUrl,\n 'ɵɵsanitizeUrlOrResourceUrl': sanitization.ɵɵsanitizeUrlOrResourceUrl,\n 'ɵɵtrustConstantHtml': sanitization.ɵɵtrustConstantHtml,\n 'ɵɵtrustConstantResourceUrl': sanitization.ɵɵtrustConstantResourceUrl,\n\n 'forwardRef': forwardRef,\n 'resolveForwardRef': resolveForwardRef,\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 */\nimport {ViewEncapsulation} from '../../metadata/view';\n\nexport interface JitCompilerOptions {\n defaultEncapsulation?: ViewEncapsulation;\n preserveWhitespaces?: boolean;\n}\n\nlet jitOptions: JitCompilerOptions|null = null;\n\nexport function setJitOptions(options: JitCompilerOptions): void {\n if (jitOptions !== null) {\n if (options.defaultEncapsulation !== jitOptions.defaultEncapsulation) {\n ngDevMode &&\n console.error(\n 'Provided value for `defaultEncapsulation` can not be changed once it has been set.');\n return;\n }\n if (options.preserveWhitespaces !== jitOptions.preserveWhitespaces) {\n ngDevMode &&\n console.error(\n 'Provided value for `preserveWhitespaces` can not be changed once it has been set.');\n return;\n }\n }\n jitOptions = options;\n}\n\nexport function getJitOptions(): JitCompilerOptions|null {\n return jitOptions;\n}\n\nexport function resetJitOptions(): void {\n jitOptions = null;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {getCompilerFacade, JitCompilerUsage, R3InjectorMetadataFacade} from '../../compiler/compiler_facade';\nimport {resolveForwardRef} from '../../di/forward_ref';\nimport {NG_INJ_DEF} from '../../di/interface/defs';\nimport {reflectDependencies} from '../../di/jit/util';\nimport {Type} from '../../interface/type';\nimport {Component} from '../../metadata/directives';\nimport {ModuleWithProviders, NgModule} from '../../metadata/ng_module';\nimport {NgModuleDef, NgModuleTransitiveScopes, NgModuleType} from '../../metadata/ng_module_def';\nimport {deepForEach, flatten} from '../../util/array_utils';\nimport {assertDefined} from '../../util/assert';\nimport {EMPTY_ARRAY} from '../../util/empty';\nimport {getComponentDef, getDirectiveDef, getNgModuleDef, getPipeDef} from '../definition';\nimport {NG_COMP_DEF, NG_DIR_DEF, NG_FACTORY_DEF, NG_MOD_DEF, NG_PIPE_DEF} from '../fields';\nimport {ComponentDef} from '../interfaces/definition';\nimport {maybeUnwrapFn} from '../util/misc_utils';\nimport {stringifyForError} from '../util/stringify_utils';\n\nimport {angularCoreEnv} from './environment';\n\ninterface ModuleQueueItem {\n moduleType: Type<any>;\n ngModule: NgModule;\n}\n\nconst moduleQueue: ModuleQueueItem[] = [];\n\n/**\n * Enqueues moduleDef to be checked later to see if scope can be set on its\n * component declarations.\n */\nfunction enqueueModuleForDelayedScoping(moduleType: Type<any>, ngModule: NgModule) {\n moduleQueue.push({moduleType, ngModule});\n}\n\nlet flushingModuleQueue = false;\n/**\n * Loops over queued module definitions, if a given module definition has all of its\n * declarations resolved, it dequeues that module definition and sets the scope on\n * its declarations.\n */\nexport function flushModuleScopingQueueAsMuchAsPossible() {\n if (!flushingModuleQueue) {\n flushingModuleQueue = true;\n try {\n for (let i = moduleQueue.length - 1; i >= 0; i--) {\n const {moduleType, ngModule} = moduleQueue[i];\n\n if (ngModule.declarations && ngModule.declarations.every(isResolvedDeclaration)) {\n // dequeue\n moduleQueue.splice(i, 1);\n setScopeOnDeclaredComponents(moduleType, ngModule);\n }\n }\n } finally {\n flushingModuleQueue = false;\n }\n }\n}\n\n/**\n * Returns truthy if a declaration has resolved. If the declaration happens to be\n * an array of declarations, it will recurse to check each declaration in that array\n * (which may also be arrays).\n */\nfunction isResolvedDeclaration(declaration: any[]|Type<any>): boolean {\n if (Array.isArray(declaration)) {\n return declaration.every(isResolvedDeclaration);\n }\n return !!resolveForwardRef(declaration);\n}\n\n/**\n * Compiles a module in JIT mode.\n *\n * This function automatically gets called when a class has a `@NgModule` decorator.\n */\nexport function compileNgModule(moduleType: Type<any>, ngModule: NgModule = {}): void {\n compileNgModuleDefs(moduleType as NgModuleType, ngModule);\n\n // Because we don't know if all declarations have resolved yet at the moment the\n // NgModule decorator is executing, we're enqueueing the setting of module scope\n // on its declarations to be run at a later time when all declarations for the module,\n // including forward refs, have resolved.\n enqueueModuleForDelayedScoping(moduleType, ngModule);\n}\n\n/**\n * Compiles and adds the `ɵmod`, `ɵfac` and `ɵinj` properties to the module class.\n *\n * It's possible to compile a module via this API which will allow duplicate declarations in its\n * root.\n */\nexport function compileNgModuleDefs(\n moduleType: NgModuleType, ngModule: NgModule,\n allowDuplicateDeclarationsInRoot: boolean = false): void {\n ngDevMode && assertDefined(moduleType, 'Required value moduleType');\n ngDevMode && assertDefined(ngModule, 'Required value ngModule');\n const declarations: Type<any>[] = flatten(ngModule.declarations || EMPTY_ARRAY);\n let ngModuleDef: any = null;\n Object.defineProperty(moduleType, NG_MOD_DEF, {\n configurable: true,\n get: () => {\n if (ngModuleDef === null) {\n if (ngDevMode && ngModule.imports && ngModule.imports.indexOf(moduleType) > -1) {\n // We need to assert this immediately, because allowing it to continue will cause it to\n // go into an infinite loop before we've reached the point where we throw all the errors.\n throw new Error(`'${stringifyForError(moduleType)}' module can't import itself`);\n }\n const compiler = getCompilerFacade(\n {usage: JitCompilerUsage.Decorator, kind: 'NgModule', type: moduleType});\n ngModuleDef = compiler.compileNgModule(angularCoreEnv, `ng:///${moduleType.name}/ɵmod.js`, {\n type: moduleType,\n bootstrap: flatten(ngModule.bootstrap || EMPTY_ARRAY).map(resolveForwardRef),\n declarations: declarations.map(resolveForwardRef),\n imports: flatten(ngModule.imports || EMPTY_ARRAY)\n .map(resolveForwardRef)\n .map(expandModuleWithProviders),\n exports: flatten(ngModule.exports || EMPTY_ARRAY)\n .map(resolveForwardRef)\n .map(expandModuleWithProviders),\n schemas: ngModule.schemas ? flatten(ngModule.schemas) : null,\n id: ngModule.id || null,\n });\n // Set `schemas` on ngModuleDef to an empty array in JIT mode to indicate that runtime\n // should verify that there are no unknown elements in a template. In AOT mode, that check\n // happens at compile time and `schemas` information is not present on Component and Module\n // defs after compilation (so the check doesn't happen the second time at runtime).\n if (!ngModuleDef.schemas) {\n ngModuleDef.schemas = [];\n }\n }\n return ngModuleDef;\n }\n });\n\n let ngFactoryDef: any = null;\n Object.defineProperty(moduleType, NG_FACTORY_DEF, {\n get: () => {\n if (ngFactoryDef === null) {\n const compiler = getCompilerFacade(\n {usage: JitCompilerUsage.Decorator, kind: 'NgModule', type: moduleType});\n ngFactoryDef = compiler.compileFactory(angularCoreEnv, `ng:///${moduleType.name}/ɵfac.js`, {\n name: moduleType.name,\n type: moduleType,\n deps: reflectDependencies(moduleType),\n target: compiler.FactoryTarget.NgModule,\n typeArgumentCount: 0,\n });\n }\n return ngFactoryDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n\n let ngInjectorDef: any = null;\n Object.defineProperty(moduleType, NG_INJ_DEF, {\n get: () => {\n if (ngInjectorDef === null) {\n ngDevMode &&\n verifySemanticsOfNgModuleDef(\n moduleType as any as NgModuleType, allowDuplicateDeclarationsInRoot);\n const meta: R3InjectorMetadataFacade = {\n name: moduleType.name,\n type: moduleType,\n providers: ngModule.providers || EMPTY_ARRAY,\n imports: [\n (ngModule.imports || EMPTY_ARRAY).map(resolveForwardRef),\n (ngModule.exports || EMPTY_ARRAY).map(resolveForwardRef),\n ],\n };\n const compiler = getCompilerFacade(\n {usage: JitCompilerUsage.Decorator, kind: 'NgModule', type: moduleType});\n ngInjectorDef =\n compiler.compileInjector(angularCoreEnv, `ng:///${moduleType.name}/ɵinj.js`, meta);\n }\n return ngInjectorDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n}\n\nfunction verifySemanticsOfNgModuleDef(\n moduleType: NgModuleType, allowDuplicateDeclarationsInRoot: boolean,\n importingModule?: NgModuleType): void {\n if (verifiedNgModule.get(moduleType)) return;\n verifiedNgModule.set(moduleType, true);\n moduleType = resolveForwardRef(moduleType);\n let ngModuleDef: NgModuleDef<any>;\n if (importingModule) {\n ngModuleDef = getNgModuleDef(moduleType)!;\n if (!ngModuleDef) {\n throw new Error(`Unexpected value '${moduleType.name}' imported by the module '${\n importingModule.name}'. Please add an @NgModule annotation.`);\n }\n } else {\n ngModuleDef = getNgModuleDef(moduleType, true);\n }\n const errors: string[] = [];\n const declarations = maybeUnwrapFn(ngModuleDef.declarations);\n const imports = maybeUnwrapFn(ngModuleDef.imports);\n flatten(imports).map(unwrapModuleWithProvidersImports).forEach(mod => {\n verifySemanticsOfNgModuleImport(mod, moduleType);\n verifySemanticsOfNgModuleDef(mod, false, moduleType);\n });\n const exports = maybeUnwrapFn(ngModuleDef.exports);\n declarations.forEach(verifyDeclarationsHaveDefinitions);\n declarations.forEach(verifyDirectivesHaveSelector);\n const combinedDeclarations: Type<any>[] = [\n ...declarations.map(resolveForwardRef),\n ...flatten(imports.map(computeCombinedExports)).map(resolveForwardRef),\n ];\n exports.forEach(verifyExportsAreDeclaredOrReExported);\n declarations.forEach(decl => verifyDeclarationIsUnique(decl, allowDuplicateDeclarationsInRoot));\n declarations.forEach(verifyComponentEntryComponentsIsPartOfNgModule);\n\n const ngModule = getAnnotation<NgModule>(moduleType, 'NgModule');\n if (ngModule) {\n ngModule.imports &&\n flatten(ngModule.imports).map(unwrapModuleWithProvidersImports).forEach(mod => {\n verifySemanticsOfNgModuleImport(mod, moduleType);\n verifySemanticsOfNgModuleDef(mod, false, moduleType);\n });\n ngModule.bootstrap && deepForEach(ngModule.bootstrap, verifyCorrectBootstrapType);\n ngModule.bootstrap && deepForEach(ngModule.bootstrap, verifyComponentIsPartOfNgModule);\n ngModule.entryComponents &&\n deepForEach(ngModule.entryComponents, verifyComponentIsPartOfNgModule);\n }\n\n // Throw Error if any errors were detected.\n if (errors.length) {\n throw new Error(errors.join('\\n'));\n }\n ////////////////////////////////////////////////////////////////////////////////////////////////\n function verifyDeclarationsHaveDefinitions(type: Type<any>): void {\n type = resolveForwardRef(type);\n const def = getComponentDef(type) || getDirectiveDef(type) || getPipeDef(type);\n if (!def) {\n errors.push(`Unexpected value '${stringifyForError(type)}' declared by the module '${\n stringifyForError(moduleType)}'. Please add a @Pipe/@Directive/@Component annotation.`);\n }\n }\n\n function verifyDirectivesHaveSelector(type: Type<any>): void {\n type = resolveForwardRef(type);\n const def = getDirectiveDef(type);\n if (!getComponentDef(type) && def && def.selectors.length == 0) {\n errors.push(`Directive ${stringifyForError(type)} has no selector, please add it!`);\n }\n }\n\n function verifyExportsAreDeclaredOrReExported(type: Type<any>) {\n type = resolveForwardRef(type);\n const kind = getComponentDef(type) && 'component' || getDirectiveDef(type) && 'directive' ||\n getPipeDef(type) && 'pipe';\n if (kind) {\n // only checked if we are declared as Component, Directive, or Pipe\n // Modules don't need to be declared or imported.\n if (combinedDeclarations.lastIndexOf(type) === -1) {\n // We are exporting something which we don't explicitly declare or import.\n errors.push(`Can't export ${kind} ${stringifyForError(type)} from ${\n stringifyForError(moduleType)} as it was neither declared nor imported!`);\n }\n }\n }\n\n function verifyDeclarationIsUnique(type: Type<any>, suppressErrors: boolean) {\n type = resolveForwardRef(type);\n const existingModule = ownerNgModule.get(type);\n if (existingModule && existingModule !== moduleType) {\n if (!suppressErrors) {\n const modules = [existingModule, moduleType].map(stringifyForError).sort();\n errors.push(\n `Type ${stringifyForError(type)} is part of the declarations of 2 modules: ${\n modules[0]} and ${modules[1]}! ` +\n `Please consider moving ${stringifyForError(type)} to a higher module that imports ${\n modules[0]} and ${modules[1]}. ` +\n `You can also create a new NgModule that exports and includes ${\n stringifyForError(\n type)} then import that NgModule in ${modules[0]} and ${modules[1]}.`);\n }\n } else {\n // Mark type as having owner.\n ownerNgModule.set(type, moduleType);\n }\n }\n\n function verifyComponentIsPartOfNgModule(type: Type<any>) {\n type = resolveForwardRef(type);\n const existingModule = ownerNgModule.get(type);\n if (!existingModule) {\n errors.push(`Component ${\n stringifyForError(\n type)} is not part of any NgModule or the module has not been imported into your module.`);\n }\n }\n\n function verifyCorrectBootstrapType(type: Type<any>) {\n type = resolveForwardRef(type);\n if (!getComponentDef(type)) {\n errors.push(`${stringifyForError(type)} cannot be used as an entry component.`);\n }\n }\n\n function verifyComponentEntryComponentsIsPartOfNgModule(type: Type<any>) {\n type = resolveForwardRef(type);\n if (getComponentDef(type)) {\n // We know we are component\n const component = getAnnotation<Component>(type, 'Component');\n if (component && component.entryComponents) {\n deepForEach(component.entryComponents, verifyComponentIsPartOfNgModule);\n }\n }\n }\n\n function verifySemanticsOfNgModuleImport(type: Type<any>, importingModule: Type<any>) {\n type = resolveForwardRef(type);\n\n if (getComponentDef(type) || getDirectiveDef(type)) {\n throw new Error(`Unexpected directive '${type.name}' imported by the module '${\n importingModule.name}'. Please add an @NgModule annotation.`);\n }\n\n if (getPipeDef(type)) {\n throw new Error(`Unexpected pipe '${type.name}' imported by the module '${\n importingModule.name}'. Please add an @NgModule annotation.`);\n }\n }\n}\n\nfunction unwrapModuleWithProvidersImports(typeOrWithProviders: NgModuleType<any>|\n {ngModule: NgModuleType<any>}): NgModuleType<any> {\n typeOrWithProviders = resolveForwardRef(typeOrWithProviders);\n return (typeOrWithProviders as any).ngModule || typeOrWithProviders;\n}\n\nfunction getAnnotation<T>(type: any, name: string): T|null {\n let annotation: T|null = null;\n collect(type.__annotations__);\n collect(type.decorators);\n return annotation;\n\n function collect(annotations: any[]|null) {\n if (annotations) {\n annotations.forEach(readAnnotation);\n }\n }\n\n function readAnnotation(\n decorator: {type: {prototype: {ngMetadataName: string}, args: any[]}, args: any}): void {\n if (!annotation) {\n const proto = Object.getPrototypeOf(decorator);\n if (proto.ngMetadataName == name) {\n annotation = decorator as any;\n } else if (decorator.type) {\n const proto = Object.getPrototypeOf(decorator.type);\n if (proto.ngMetadataName == name) {\n annotation = decorator.args[0];\n }\n }\n }\n }\n}\n\n/**\n * Keep track of compiled components. This is needed because in tests we often want to compile the\n * same component with more than one NgModule. This would cause an error unless we reset which\n * NgModule the component belongs to. We keep the list of compiled components here so that the\n * TestBed can reset it later.\n */\nlet ownerNgModule = new WeakMap<Type<any>, NgModuleType<any>>();\nlet verifiedNgModule = new WeakMap<NgModuleType<any>, boolean>();\n\nexport function resetCompiledComponents(): void {\n ownerNgModule = new WeakMap<Type<any>, NgModuleType<any>>();\n verifiedNgModule = new WeakMap<NgModuleType<any>, boolean>();\n moduleQueue.length = 0;\n}\n\n/**\n * Computes the combined declarations of explicit declarations, as well as declarations inherited by\n * traversing the exports of imported modules.\n * @param type\n */\nfunction computeCombinedExports(type: Type<any>): Type<any>[] {\n type = resolveForwardRef(type);\n const ngModuleDef = getNgModuleDef(type, true);\n return [...flatten(maybeUnwrapFn(ngModuleDef.exports).map((type) => {\n const ngModuleDef = getNgModuleDef(type);\n if (ngModuleDef) {\n verifySemanticsOfNgModuleDef(type as any as NgModuleType, false);\n return computeCombinedExports(type);\n } else {\n return type;\n }\n }))];\n}\n\n/**\n * Some declared components may be compiled asynchronously, and thus may not have their\n * ɵcmp set yet. If this is the case, then a reference to the module is written into\n * the `ngSelectorScope` property of the declared type.\n */\nfunction setScopeOnDeclaredComponents(moduleType: Type<any>, ngModule: NgModule) {\n const declarations: Type<any>[] = flatten(ngModule.declarations || EMPTY_ARRAY);\n\n const transitiveScopes = transitiveScopesFor(moduleType);\n\n declarations.forEach(declaration => {\n if (declaration.hasOwnProperty(NG_COMP_DEF)) {\n // A `ɵcmp` field exists - go ahead and patch the component directly.\n const component = declaration as Type<any>& {ɵcmp: ComponentDef<any>};\n const componentDef = getComponentDef(component)!;\n patchComponentDefWithScope(componentDef, transitiveScopes);\n } else if (\n !declaration.hasOwnProperty(NG_DIR_DEF) && !declaration.hasOwnProperty(NG_PIPE_DEF)) {\n // Set `ngSelectorScope` for future reference when the component compilation finishes.\n (declaration as Type<any>& {ngSelectorScope?: any}).ngSelectorScope = moduleType;\n }\n });\n}\n\n/**\n * Patch the definition of a component with directives and pipes from the compilation scope of\n * a given module.\n */\nexport function patchComponentDefWithScope<C>(\n componentDef: ComponentDef<C>, transitiveScopes: NgModuleTransitiveScopes) {\n componentDef.directiveDefs = () =>\n Array.from(transitiveScopes.compilation.directives)\n .map(\n dir => dir.hasOwnProperty(NG_COMP_DEF) ? getComponentDef(dir)! : getDirectiveDef(dir)!\n )\n .filter(def => !!def);\n componentDef.pipeDefs = () =>\n Array.from(transitiveScopes.compilation.pipes).map(pipe => getPipeDef(pipe)!);\n componentDef.schemas = transitiveScopes.schemas;\n\n // Since we avoid Components/Directives/Pipes recompiling in case there are no overrides, we\n // may face a problem where previously compiled defs available to a given Component/Directive\n // are cached in TView and may become stale (in case any of these defs gets recompiled). In\n // order to avoid this problem, we force fresh TView to be created.\n componentDef.tView = null;\n}\n\n/**\n * Compute the pair of transitive scopes (compilation scope and exported scope) for a given module.\n *\n * This operation is memoized and the result is cached on the module's definition. This function can\n * be called on modules with components that have not fully compiled yet, but the result should not\n * be used until they have.\n *\n * @param moduleType module that transitive scope should be calculated for.\n */\nexport function transitiveScopesFor<T>(moduleType: Type<T>): NgModuleTransitiveScopes {\n if (!isNgModule(moduleType)) {\n throw new Error(`${moduleType.name} does not have a module def (ɵmod property)`);\n }\n const def = getNgModuleDef(moduleType)!;\n\n if (def.transitiveCompileScopes !== null) {\n return def.transitiveCompileScopes;\n }\n\n const scopes: NgModuleTransitiveScopes = {\n schemas: def.schemas || null,\n compilation: {\n directives: new Set<any>(),\n pipes: new Set<any>(),\n },\n exported: {\n directives: new Set<any>(),\n pipes: new Set<any>(),\n },\n };\n\n maybeUnwrapFn(def.imports).forEach(<I>(imported: Type<I>) => {\n const importedType = imported as Type<I>& {\n // If imported is an @NgModule:\n ɵmod?: NgModuleDef<I>;\n };\n\n if (!isNgModule<I>(importedType)) {\n throw new Error(`Importing ${importedType.name} which does not have a ɵmod property`);\n }\n\n // When this module imports another, the imported module's exported directives and pipes are\n // added to the compilation scope of this module.\n const importedScope = transitiveScopesFor(importedType);\n importedScope.exported.directives.forEach(entry => scopes.compilation.directives.add(entry));\n importedScope.exported.pipes.forEach(entry => scopes.compilation.pipes.add(entry));\n });\n\n maybeUnwrapFn(def.declarations).forEach(declared => {\n const declaredWithDefs = declared as Type<any>& {\n ɵpipe?: any;\n };\n\n if (getPipeDef(declaredWithDefs)) {\n scopes.compilation.pipes.add(declared);\n } else {\n // Either declared has a ɵcmp or ɵdir, or it's a component which hasn't\n // had its template compiled yet. In either case, it gets added to the compilation's\n // directives.\n scopes.compilation.directives.add(declared);\n }\n });\n\n maybeUnwrapFn(def.exports).forEach(<E>(exported: Type<E>) => {\n const exportedType = exported as Type<E>& {\n // Components, Directives, NgModules, and Pipes can all be exported.\n ɵcmp?: any;\n ɵdir?: any;\n ɵmod?: NgModuleDef<E>;\n ɵpipe?: any;\n };\n\n // Either the type is a module, a pipe, or a component/directive (which may not have a\n // ɵcmp as it might be compiled asynchronously).\n if (isNgModule(exportedType)) {\n // When this module exports another, the exported module's exported directives and pipes are\n // added to both the compilation and exported scopes of this module.\n const exportedScope = transitiveScopesFor(exportedType);\n exportedScope.exported.directives.forEach(entry => {\n scopes.compilation.directives.add(entry);\n scopes.exported.directives.add(entry);\n });\n exportedScope.exported.pipes.forEach(entry => {\n scopes.compilation.pipes.add(entry);\n scopes.exported.pipes.add(entry);\n });\n } else if (getPipeDef(exportedType)) {\n scopes.exported.pipes.add(exportedType);\n } else {\n scopes.exported.directives.add(exportedType);\n }\n });\n\n def.transitiveCompileScopes = scopes;\n return scopes;\n}\n\nfunction expandModuleWithProviders(value: Type<any>|ModuleWithProviders<{}>): Type<any> {\n if (isModuleWithProviders(value)) {\n return value.ngModule;\n }\n return value;\n}\n\nfunction isModuleWithProviders(value: any): value is ModuleWithProviders<{}> {\n return (value as {ngModule?: any}).ngModule !== undefined;\n}\n\nfunction isNgModule<T>(value: Type<T>): value is Type<T>&{ɵmod: NgModuleDef<T>} {\n return !!getNgModuleDef(value);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {getCompilerFacade, JitCompilerUsage, R3DirectiveMetadataFacade} from '../../compiler/compiler_facade';\nimport {R3ComponentMetadataFacade, R3QueryMetadataFacade} from '../../compiler/compiler_facade_interface';\nimport {resolveForwardRef} from '../../di/forward_ref';\nimport {getReflect, reflectDependencies} from '../../di/jit/util';\nimport {Type} from '../../interface/type';\nimport {Query} from '../../metadata/di';\nimport {Component, Directive, Input} from '../../metadata/directives';\nimport {componentNeedsResolution, maybeQueueResolutionOfComponentResources} from '../../metadata/resource_loading';\nimport {ViewEncapsulation} from '../../metadata/view';\nimport {EMPTY_ARRAY, EMPTY_OBJ} from '../../util/empty';\nimport {initNgDevMode} from '../../util/ng_dev_mode';\nimport {getComponentDef, getDirectiveDef} from '../definition';\nimport {NG_COMP_DEF, NG_DIR_DEF, NG_FACTORY_DEF} from '../fields';\nimport {ComponentType} from '../interfaces/definition';\nimport {stringifyForError} from '../util/stringify_utils';\n\nimport {angularCoreEnv} from './environment';\nimport {getJitOptions} from './jit_options';\nimport {flushModuleScopingQueueAsMuchAsPossible, patchComponentDefWithScope, transitiveScopesFor} from './module';\n\n/**\n * Keep track of the compilation depth to avoid reentrancy issues during JIT compilation. This\n * matters in the following scenario:\n *\n * Consider a component 'A' that extends component 'B', both declared in module 'M'. During\n * the compilation of 'A' the definition of 'B' is requested to capture the inheritance chain,\n * potentially triggering compilation of 'B'. If this nested compilation were to trigger\n * `flushModuleScopingQueueAsMuchAsPossible` it may happen that module 'M' is still pending in the\n * queue, resulting in 'A' and 'B' to be patched with the NgModule scope. As the compilation of\n * 'A' is still in progress, this would introduce a circular dependency on its compilation. To avoid\n * this issue, the module scope queue is only flushed for compilations at the depth 0, to ensure\n * all compilations have finished.\n */\nlet compilationDepth = 0;\n\n/**\n * Compile an Angular component according to its decorator metadata, and patch the resulting\n * component def (ɵcmp) onto the component type.\n *\n * Compilation may be asynchronous (due to the need to resolve URLs for the component template or\n * other resources, for example). In the event that compilation is not immediate, `compileComponent`\n * will enqueue resource resolution into a global queue and will fail to return the `ɵcmp`\n * until the global queue has been resolved with a call to `resolveComponentResources`.\n */\nexport function compileComponent(type: Type<any>, metadata: Component): void {\n // Initialize ngDevMode. This must be the first statement in compileComponent.\n // See the `initNgDevMode` docstring for more information.\n (typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode();\n\n let ngComponentDef: any = null;\n\n // Metadata may have resources which need to be resolved.\n maybeQueueResolutionOfComponentResources(type, metadata);\n\n // Note that we're using the same function as `Directive`, because that's only subset of metadata\n // that we need to create the ngFactoryDef. We're avoiding using the component metadata\n // because we'd have to resolve the asynchronous templates.\n addDirectiveFactoryDef(type, metadata);\n\n Object.defineProperty(type, NG_COMP_DEF, {\n get: () => {\n if (ngComponentDef === null) {\n const compiler =\n getCompilerFacade({usage: JitCompilerUsage.Decorator, kind: 'component', type: type});\n\n if (componentNeedsResolution(metadata)) {\n const error = [`Component '${type.name}' is not resolved:`];\n if (metadata.templateUrl) {\n error.push(` - templateUrl: ${metadata.templateUrl}`);\n }\n if (metadata.styleUrls && metadata.styleUrls.length) {\n error.push(` - styleUrls: ${JSON.stringify(metadata.styleUrls)}`);\n }\n error.push(`Did you run and wait for 'resolveComponentResources()'?`);\n throw new Error(error.join('\\n'));\n }\n\n // This const was called `jitOptions` previously but had to be renamed to `options` because\n // of a bug with Terser that caused optimized JIT builds to throw a `ReferenceError`.\n // This bug was investigated in https://github.com/angular/angular-cli/issues/17264.\n // We should not rename it back until https://github.com/terser/terser/issues/615 is fixed.\n const options = getJitOptions();\n let preserveWhitespaces = metadata.preserveWhitespaces;\n if (preserveWhitespaces === undefined) {\n if (options !== null && options.preserveWhitespaces !== undefined) {\n preserveWhitespaces = options.preserveWhitespaces;\n } else {\n preserveWhitespaces = false;\n }\n }\n let encapsulation = metadata.encapsulation;\n if (encapsulation === undefined) {\n if (options !== null && options.defaultEncapsulation !== undefined) {\n encapsulation = options.defaultEncapsulation;\n } else {\n encapsulation = ViewEncapsulation.Emulated;\n }\n }\n\n const templateUrl = metadata.templateUrl || `ng:///${type.name}/template.html`;\n const meta: R3ComponentMetadataFacade = {\n ...directiveMetadata(type, metadata),\n typeSourceSpan: compiler.createParseSourceSpan('Component', type.name, templateUrl),\n template: metadata.template || '',\n preserveWhitespaces,\n styles: metadata.styles || EMPTY_ARRAY,\n animations: metadata.animations,\n directives: [],\n changeDetection: metadata.changeDetection,\n pipes: new Map(),\n encapsulation,\n interpolation: metadata.interpolation,\n viewProviders: metadata.viewProviders || null,\n };\n\n compilationDepth++;\n try {\n if (meta.usesInheritance) {\n addDirectiveDefToUndecoratedParents(type);\n }\n ngComponentDef = compiler.compileComponent(angularCoreEnv, templateUrl, meta);\n } finally {\n // Ensure that the compilation depth is decremented even when the compilation failed.\n compilationDepth--;\n }\n\n if (compilationDepth === 0) {\n // When NgModule decorator executed, we enqueued the module definition such that\n // it would only dequeue and add itself as module scope to all of its declarations,\n // but only if if all of its declarations had resolved. This call runs the check\n // to see if any modules that are in the queue can be dequeued and add scope to\n // their declarations.\n flushModuleScopingQueueAsMuchAsPossible();\n }\n\n // If component compilation is async, then the @NgModule annotation which declares the\n // component may execute and set an ngSelectorScope property on the component type. This\n // allows the component to patch itself with directiveDefs from the module after it\n // finishes compiling.\n if (hasSelectorScope(type)) {\n const scopes = transitiveScopesFor(type.ngSelectorScope);\n patchComponentDefWithScope(ngComponentDef, scopes);\n }\n }\n return ngComponentDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n}\n\nfunction hasSelectorScope<T>(component: Type<T>): component is Type<T>&\n {ngSelectorScope: Type<any>} {\n return (component as {ngSelectorScope?: any}).ngSelectorScope !== undefined;\n}\n\n/**\n * Compile an Angular directive according to its decorator metadata, and patch the resulting\n * directive def onto the component type.\n *\n * In the event that compilation is not immediate, `compileDirective` will return a `Promise` which\n * will resolve when compilation completes and the directive becomes usable.\n */\nexport function compileDirective(type: Type<any>, directive: Directive|null): void {\n let ngDirectiveDef: any = null;\n\n addDirectiveFactoryDef(type, directive || {});\n\n Object.defineProperty(type, NG_DIR_DEF, {\n get: () => {\n if (ngDirectiveDef === null) {\n // `directive` can be null in the case of abstract directives as a base class\n // that use `@Directive()` with no selector. In that case, pass empty object to the\n // `directiveMetadata` function instead of null.\n const meta = getDirectiveMetadata(type, directive || {});\n const compiler =\n getCompilerFacade({usage: JitCompilerUsage.Decorator, kind: 'directive', type});\n ngDirectiveDef =\n compiler.compileDirective(angularCoreEnv, meta.sourceMapUrl, meta.metadata);\n }\n return ngDirectiveDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n}\n\nfunction getDirectiveMetadata(type: Type<any>, metadata: Directive) {\n const name = type && type.name;\n const sourceMapUrl = `ng:///${name}/ɵdir.js`;\n const compiler = getCompilerFacade({usage: JitCompilerUsage.Decorator, kind: 'directive', type});\n const facade = directiveMetadata(type as ComponentType<any>, metadata);\n facade.typeSourceSpan = compiler.createParseSourceSpan('Directive', name, sourceMapUrl);\n if (facade.usesInheritance) {\n addDirectiveDefToUndecoratedParents(type);\n }\n return {metadata: facade, sourceMapUrl};\n}\n\nfunction addDirectiveFactoryDef(type: Type<any>, metadata: Directive|Component) {\n let ngFactoryDef: any = null;\n\n Object.defineProperty(type, NG_FACTORY_DEF, {\n get: () => {\n if (ngFactoryDef === null) {\n const meta = getDirectiveMetadata(type, metadata);\n const compiler =\n getCompilerFacade({usage: JitCompilerUsage.Decorator, kind: 'directive', type});\n ngFactoryDef = compiler.compileFactory(angularCoreEnv, `ng:///${type.name}/ɵfac.js`, {\n name: meta.metadata.name,\n type: meta.metadata.type,\n typeArgumentCount: 0,\n deps: reflectDependencies(type),\n target: compiler.FactoryTarget.Directive\n });\n }\n return ngFactoryDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n}\n\nexport function extendsDirectlyFromObject(type: Type<any>): boolean {\n return Object.getPrototypeOf(type.prototype) === Object.prototype;\n}\n\n/**\n * Extract the `R3DirectiveMetadata` for a particular directive (either a `Directive` or a\n * `Component`).\n */\nexport function directiveMetadata(type: Type<any>, metadata: Directive): R3DirectiveMetadataFacade {\n // Reflect inputs and outputs.\n const reflect = getReflect();\n const propMetadata = reflect.ownPropMetadata(type);\n\n return {\n name: type.name,\n type: type,\n selector: metadata.selector !== undefined ? metadata.selector : null,\n host: metadata.host || EMPTY_OBJ,\n propMetadata: propMetadata,\n inputs: metadata.inputs || EMPTY_ARRAY,\n outputs: metadata.outputs || EMPTY_ARRAY,\n queries: extractQueriesMetadata(type, propMetadata, isContentQuery),\n lifecycle: {usesOnChanges: reflect.hasLifecycleHook(type, 'ngOnChanges')},\n typeSourceSpan: null!,\n usesInheritance: !extendsDirectlyFromObject(type),\n exportAs: extractExportAs(metadata.exportAs),\n providers: metadata.providers || null,\n viewQueries: extractQueriesMetadata(type, propMetadata, isViewQuery)\n };\n}\n\n/**\n * Adds a directive definition to all parent classes of a type that don't have an Angular decorator.\n */\nfunction addDirectiveDefToUndecoratedParents(type: Type<any>) {\n const objPrototype = Object.prototype;\n let parent = Object.getPrototypeOf(type.prototype).constructor;\n\n // Go up the prototype until we hit `Object`.\n while (parent && parent !== objPrototype) {\n // Since inheritance works if the class was annotated already, we only need to add\n // the def if there are no annotations and the def hasn't been created already.\n if (!getDirectiveDef(parent) && !getComponentDef(parent) &&\n shouldAddAbstractDirective(parent)) {\n compileDirective(parent, null);\n }\n parent = Object.getPrototypeOf(parent);\n }\n}\n\nfunction convertToR3QueryPredicate(selector: any): any|string[] {\n return typeof selector === 'string' ? splitByComma(selector) : resolveForwardRef(selector);\n}\n\nexport function convertToR3QueryMetadata(propertyName: string, ann: Query): R3QueryMetadataFacade {\n return {\n propertyName: propertyName,\n predicate: convertToR3QueryPredicate(ann.selector),\n descendants: ann.descendants,\n first: ann.first,\n read: ann.read ? ann.read : null,\n static: !!ann.static,\n emitDistinctChangesOnly: !!ann.emitDistinctChangesOnly,\n };\n}\nfunction extractQueriesMetadata(\n type: Type<any>, propMetadata: {[key: string]: any[]},\n isQueryAnn: (ann: any) => ann is Query): R3QueryMetadataFacade[] {\n const queriesMeta: R3QueryMetadataFacade[] = [];\n for (const field in propMetadata) {\n if (propMetadata.hasOwnProperty(field)) {\n const annotations = propMetadata[field];\n annotations.forEach(ann => {\n if (isQueryAnn(ann)) {\n if (!ann.selector) {\n throw new Error(\n `Can't construct a query for the property \"${field}\" of ` +\n `\"${stringifyForError(type)}\" since the query selector wasn't defined.`);\n }\n if (annotations.some(isInputAnnotation)) {\n throw new Error(`Cannot combine @Input decorators with query decorators`);\n }\n queriesMeta.push(convertToR3QueryMetadata(field, ann));\n }\n });\n }\n }\n return queriesMeta;\n}\n\nfunction extractExportAs(exportAs: string|undefined): string[]|null {\n return exportAs === undefined ? null : splitByComma(exportAs);\n}\n\nfunction isContentQuery(value: any): value is Query {\n const name = value.ngMetadataName;\n return name === 'ContentChild' || name === 'ContentChildren';\n}\n\nfunction isViewQuery(value: any): value is Query {\n const name = value.ngMetadataName;\n return name === 'ViewChild' || name === 'ViewChildren';\n}\n\nfunction isInputAnnotation(value: any): value is Input {\n return value.ngMetadataName === 'Input';\n}\n\nfunction splitByComma(value: string): string[] {\n return value.split(',').map(piece => piece.trim());\n}\n\nconst LIFECYCLE_HOOKS = [\n 'ngOnChanges', 'ngOnInit', 'ngOnDestroy', 'ngDoCheck', 'ngAfterViewInit', 'ngAfterViewChecked',\n 'ngAfterContentInit', 'ngAfterContentChecked'\n];\n\nfunction shouldAddAbstractDirective(type: Type<any>): boolean {\n const reflect = getReflect();\n\n if (LIFECYCLE_HOOKS.some(hookName => reflect.hasLifecycleHook(type, hookName))) {\n return true;\n }\n\n const propMetadata = reflect.propMetadata(type);\n\n for (const field in propMetadata) {\n const annotations = propMetadata[field];\n\n for (let i = 0; i < annotations.length; i++) {\n const current = annotations[i];\n const metadataName = current.ngMetadataName;\n\n if (isInputAnnotation(current) || isContentQuery(current) || isViewQuery(current) ||\n metadataName === 'Output' || metadataName === 'HostBinding' ||\n metadataName === 'HostListener') {\n return true;\n }\n }\n }\n\n return 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 {getCompilerFacade, JitCompilerUsage, R3PipeMetadataFacade} from '../../compiler/compiler_facade';\nimport {reflectDependencies} from '../../di/jit/util';\nimport {Type} from '../../interface/type';\nimport {Pipe} from '../../metadata/directives';\nimport {NG_FACTORY_DEF, NG_PIPE_DEF} from '../fields';\n\nimport {angularCoreEnv} from './environment';\n\nexport function compilePipe(type: Type<any>, meta: Pipe): void {\n let ngPipeDef: any = null;\n let ngFactoryDef: any = null;\n\n Object.defineProperty(type, NG_FACTORY_DEF, {\n get: () => {\n if (ngFactoryDef === null) {\n const metadata = getPipeMetadata(type, meta);\n const compiler = getCompilerFacade(\n {usage: JitCompilerUsage.Decorator, kind: 'pipe', type: metadata.type});\n ngFactoryDef = compiler.compileFactory(angularCoreEnv, `ng:///${metadata.name}/ɵfac.js`, {\n name: metadata.name,\n type: metadata.type,\n typeArgumentCount: 0,\n deps: reflectDependencies(type),\n target: compiler.FactoryTarget.Pipe\n });\n }\n return ngFactoryDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n\n Object.defineProperty(type, NG_PIPE_DEF, {\n get: () => {\n if (ngPipeDef === null) {\n const metadata = getPipeMetadata(type, meta);\n const compiler = getCompilerFacade(\n {usage: JitCompilerUsage.Decorator, kind: 'pipe', type: metadata.type});\n ngPipeDef =\n compiler.compilePipe(angularCoreEnv, `ng:///${metadata.name}/ɵpipe.js`, metadata);\n }\n return ngPipeDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n}\n\nfunction getPipeMetadata(type: Type<any>, meta: Pipe): R3PipeMetadataFacade {\n return {\n type: type,\n name: type.name,\n pipeName: meta.name,\n pure: meta.pure !== undefined ? meta.pure : true\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 {ChangeDetectionStrategy} from '../change_detection/constants';\nimport {Provider} from '../di/interface/provider';\nimport {Type} from '../interface/type';\nimport {compileComponent as render3CompileComponent, compileDirective as render3CompileDirective} from '../render3/jit/directive';\nimport {compilePipe as render3CompilePipe} from '../render3/jit/pipe';\nimport {makeDecorator, makePropDecorator, TypeDecorator} from '../util/decorators';\nimport {noop} from '../util/noop';\n\nimport {ViewEncapsulation} from './view';\n\n\n\n/**\n * Type of the Directive decorator / constructor function.\n * @publicApi\n */\nexport interface DirectiveDecorator {\n /**\n * Decorator that marks a class as an Angular directive.\n * You can define your own directives to attach custom behavior to elements in the DOM.\n *\n * The options provide configuration metadata that determines\n * how the directive should be processed, instantiated and used at\n * runtime.\n *\n * Directive classes, like component classes, can implement\n * [life-cycle hooks](guide/lifecycle-hooks) to influence their configuration and behavior.\n *\n *\n * @usageNotes\n * To define a directive, mark the class with the decorator and provide metadata.\n *\n * ```ts\n * import {Directive} from '@angular/core';\n *\n * @Directive({\n * selector: 'my-directive',\n * })\n * export class MyDirective {\n * ...\n * }\n * ```\n *\n * ### Declaring directives\n *\n * Directives are [declarables](guide/glossary#declarable).\n * They must be declared by an NgModule\n * in order to be usable in an app.\n *\n * A directive must belong to exactly one NgModule. Do not re-declare\n * a directive imported from another module.\n * List the directive class in the `declarations` field of an NgModule.\n *\n * ```ts\n * declarations: [\n * AppComponent,\n * MyDirective\n * ],\n * ```\n *\n * @Annotation\n */\n (obj?: Directive): TypeDecorator;\n\n /**\n * See the `Directive` decorator.\n */\n new(obj?: Directive): Directive;\n}\n\n/**\n * Directive decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport interface Directive {\n /**\n * The CSS selector that identifies this directive in a template\n * and triggers instantiation of the directive.\n *\n * Declare as one of the following:\n *\n * - `element-name`: Select by element name.\n * - `.class`: Select by class name.\n * - `[attribute]`: Select by attribute name.\n * - `[attribute=value]`: Select by attribute name and value.\n * - `:not(sub_selector)`: Select only if the element does not match the `sub_selector`.\n * - `selector1, selector2`: Select if either `selector1` or `selector2` matches.\n *\n * Angular only allows directives to apply on CSS selectors that do not cross\n * element boundaries.\n *\n * For the following template HTML, a directive with an `input[type=text]` selector,\n * would be instantiated only on the `<input type=\"text\">` element.\n *\n * ```html\n * <form>\n * <input type=\"text\">\n * <input type=\"radio\">\n * <form>\n * ```\n *\n */\n selector?: string;\n\n /**\n * Enumerates the set of data-bound input properties for a directive\n *\n * Angular automatically updates input properties during change detection.\n * The `inputs` property defines a set of `directiveProperty` to `bindingProperty`\n * configuration:\n *\n * - `directiveProperty` specifies the component property where the value is written.\n * - `bindingProperty` specifies the DOM property where the value is read from.\n *\n * When `bindingProperty` is not provided, it is assumed to be equal to `directiveProperty`.\n *\n * @usageNotes\n *\n * The following example creates a component with two data-bound properties.\n *\n * ```typescript\n * @Component({\n * selector: 'bank-account',\n * inputs: ['bankName', 'id: account-id'],\n * template: `\n * Bank Name: {{bankName}}\n * Account Id: {{id}}\n * `\n * })\n * class BankAccount {\n * bankName: string;\n * id: string;\n * }\n * ```\n *\n */\n inputs?: string[];\n\n /**\n * Enumerates the set of event-bound output properties.\n *\n * When an output property emits an event, an event handler attached to that event\n * in the template is invoked.\n *\n * The `outputs` property defines a set of `directiveProperty` to `bindingProperty`\n * configuration:\n *\n * - `directiveProperty` specifies the component property that emits events.\n * - `bindingProperty` specifies the DOM property the event handler is attached to.\n *\n * @usageNotes\n *\n * ```typescript\n * @Component({\n * selector: 'child-dir',\n * outputs: [ 'bankNameChange' ]\n * template: `<input (input)=\"bankNameChange.emit($event.target.value)\" />`\n * })\n * class ChildDir {\n * bankNameChange: EventEmitter<string> = new EventEmitter<string>();\n * }\n *\n * @Component({\n * selector: 'main',\n * template: `\n * {{ bankName }} <child-dir (bankNameChange)=\"onBankNameChange($event)\"></child-dir>\n * `\n * })\n * class MainComponent {\n * bankName: string;\n *\n * onBankNameChange(bankName: string) {\n * this.bankName = bankName;\n * }\n * }\n * ```\n *\n */\n outputs?: string[];\n\n /**\n * Configures the [injector](guide/glossary#injector) of this\n * directive or component with a [token](guide/glossary#di-token)\n * that maps to a [provider](guide/glossary#provider) of a dependency.\n */\n providers?: Provider[];\n\n /**\n * Defines the name that can be used in the template to assign this directive to a variable.\n *\n * @usageNotes\n *\n * ```ts\n * @Directive({\n * selector: 'child-dir',\n * exportAs: 'child'\n * })\n * class ChildDir {\n * }\n *\n * @Component({\n * selector: 'main',\n * template: `<child-dir #c=\"child\"></child-dir>`\n * })\n * class MainComponent {\n * }\n * ```\n *\n */\n exportAs?: string;\n\n /**\n * Configures the queries that will be injected into the directive.\n *\n * Content queries are set before the `ngAfterContentInit` callback is called.\n * View queries are set before the `ngAfterViewInit` callback is called.\n *\n * @usageNotes\n *\n * The following example shows how queries are defined\n * and when their results are available in lifecycle hooks:\n *\n * ```ts\n * @Component({\n * selector: 'someDir',\n * queries: {\n * contentChildren: new ContentChildren(ChildDirective),\n * viewChildren: new ViewChildren(ChildDirective)\n * },\n * template: '<child-directive></child-directive>'\n * })\n * class SomeDir {\n * contentChildren: QueryList<ChildDirective>,\n * viewChildren: QueryList<ChildDirective>\n *\n * ngAfterContentInit() {\n * // contentChildren is set\n * }\n *\n * ngAfterViewInit() {\n * // viewChildren is set\n * }\n * }\n * ```\n *\n * @Annotation\n */\n queries?: {[key: string]: any};\n\n /**\n * Maps class properties to host element bindings for properties,\n * attributes, and events, using a set of key-value pairs.\n *\n * Angular automatically checks host property bindings during change detection.\n * If a binding changes, Angular updates the directive's host element.\n *\n * When the key is a property of the host element, the property value is\n * the propagated to the specified DOM property.\n *\n * When the key is a static attribute in the DOM, the attribute value\n * is propagated to the specified property in the host element.\n *\n * For event handling:\n * - The key is the DOM event that the directive listens to.\n * To listen to global events, add the target to the event name.\n * The target can be `window`, `document` or `body`.\n * - The value is the statement to execute when the event occurs. If the\n * statement evaluates to `false`, then `preventDefault` is applied on the DOM\n * event. A handler method can refer to the `$event` local variable.\n *\n */\n host?: {[key: string]: string};\n\n /**\n * When present, this directive/component is ignored by the AOT compiler.\n * It remains in distributed code, and the JIT compiler attempts to compile it\n * at run time, in the browser.\n * To ensure the correct behavior, the app must import `@angular/compiler`.\n */\n jit?: true;\n}\n\n/**\n * Type of the Directive metadata.\n *\n * @publicApi\n */\nexport const Directive: DirectiveDecorator = makeDecorator(\n 'Directive', (dir: Directive = {}) => dir, undefined, undefined,\n (type: Type<any>, meta: Directive) => SWITCH_COMPILE_DIRECTIVE(type, meta));\n\n/**\n * Component decorator interface\n *\n * @publicApi\n */\nexport interface ComponentDecorator {\n /**\n * Decorator that marks a class as an Angular component and provides configuration\n * metadata that determines how the component should be processed,\n * instantiated, and used at runtime.\n *\n * Components are the most basic UI building block of an Angular app.\n * An Angular app contains a tree of Angular components.\n *\n * Angular components are a subset of directives, always associated with a template.\n * Unlike other directives, only one component can be instantiated for a given element in a\n * template.\n *\n * A component must belong to an NgModule in order for it to be available\n * to another component or application. To make it a member of an NgModule,\n * list it in the `declarations` field of the `NgModule` metadata.\n *\n * Note that, in addition to these options for configuring a directive,\n * you can control a component's runtime behavior by implementing\n * life-cycle hooks. For more information, see the\n * [Lifecycle Hooks](guide/lifecycle-hooks) guide.\n *\n * @usageNotes\n *\n * ### Setting component inputs\n *\n * The following example creates a component with two data-bound properties,\n * specified by the `inputs` value.\n *\n * <code-example path=\"core/ts/metadata/directives.ts\" region=\"component-input\"></code-example>\n *\n *\n * ### Setting component outputs\n *\n * The following example shows two event emitters that emit on an interval. One\n * emits an output every second, while the other emits every five seconds.\n *\n * {@example core/ts/metadata/directives.ts region='component-output-interval'}\n *\n * ### Injecting a class with a view provider\n *\n * The following simple example injects a class into a component\n * using the view provider specified in component metadata:\n *\n * ```ts\n * class Greeter {\n * greet(name:string) {\n * return 'Hello ' + name + '!';\n * }\n * }\n *\n * @Directive({\n * selector: 'needs-greeter'\n * })\n * class NeedsGreeter {\n * greeter:Greeter;\n *\n * constructor(greeter:Greeter) {\n * this.greeter = greeter;\n * }\n * }\n *\n * @Component({\n * selector: 'greet',\n * viewProviders: [\n * Greeter\n * ],\n * template: `<needs-greeter></needs-greeter>`\n * })\n * class HelloWorld {\n * }\n *\n * ```\n *\n * ### Preserving whitespace\n *\n * Removing whitespace can greatly reduce AOT-generated code size and speed up view creation.\n * As of Angular 6, the default for `preserveWhitespaces` is false (whitespace is removed).\n * To change the default setting for all components in your application, set\n * the `preserveWhitespaces` option of the AOT compiler.\n *\n * By default, the AOT compiler removes whitespace characters as follows:\n * * Trims all whitespaces at the beginning and the end of a template.\n * * Removes whitespace-only text nodes. For example,\n *\n * ```html\n * <button>Action 1</button> <button>Action 2</button>\n * ```\n *\n * becomes:\n *\n * ```html\n * <button>Action 1</button><button>Action 2</button>\n * ```\n *\n * * Replaces a series of whitespace characters in text nodes with a single space.\n * For example, `<span>\\n some text\\n</span>` becomes `<span> some text </span>`.\n * * Does NOT alter text nodes inside HTML tags such as `<pre>` or `<textarea>`,\n * where whitespace characters are significant.\n *\n * Note that these transformations can influence DOM nodes layout, although impact\n * should be minimal.\n *\n * You can override the default behavior to preserve whitespace characters\n * in certain fragments of a template. For example, you can exclude an entire\n * DOM sub-tree by using the `ngPreserveWhitespaces` attribute:\n *\n * ```html\n * <div ngPreserveWhitespaces>\n * whitespaces are preserved here\n * <span> and here </span>\n * </div>\n * ```\n *\n * You can force a single space to be preserved in a text node by using `&ngsp;`,\n * which is replaced with a space character by Angular's template\n * compiler:\n *\n * ```html\n * <a>Spaces</a>&ngsp;<a>between</a>&ngsp;<a>links.</a>\n * <!-- compiled to be equivalent to:\n * <a>Spaces</a> <a>between</a> <a>links.</a> -->\n * ```\n *\n * Note that sequences of `&ngsp;` are still collapsed to just one space character when\n * the `preserveWhitespaces` option is set to `false`.\n *\n * ```html\n * <a>before</a>&ngsp;&ngsp;&ngsp;<a>after</a>\n * <!-- compiled to be equivalent to:\n * <a>before</a> <a>after</a> -->\n * ```\n *\n * To preserve sequences of whitespace characters, use the\n * `ngPreserveWhitespaces` attribute.\n *\n * @Annotation\n */\n (obj: Component): TypeDecorator;\n /**\n * See the `Component` decorator.\n */\n new(obj: Component): Component;\n}\n\n/**\n * Supplies configuration metadata for an Angular component.\n *\n * @publicApi\n */\nexport interface Component extends Directive {\n /**\n * The change-detection strategy to use for this component.\n *\n * When a component is instantiated, Angular creates a change detector,\n * which is responsible for propagating the component's bindings.\n * The strategy is one of:\n * - `ChangeDetectionStrategy#OnPush` sets the strategy to `CheckOnce` (on demand).\n * - `ChangeDetectionStrategy#Default` sets the strategy to `CheckAlways`.\n */\n changeDetection?: ChangeDetectionStrategy;\n\n /**\n * Defines the set of injectable objects that are visible to its view DOM children.\n * See [example](#injecting-a-class-with-a-view-provider).\n *\n */\n viewProviders?: Provider[];\n\n /**\n * The module ID of the module that contains the component.\n * The component must be able to resolve relative URLs for templates and styles.\n * SystemJS exposes the `__moduleName` variable within each module.\n * In CommonJS, this can be set to `module.id`.\n *\n */\n moduleId?: string;\n\n /**\n * The relative path or absolute URL of a template file for an Angular component.\n * If provided, do not supply an inline template using `template`.\n *\n */\n templateUrl?: string;\n\n /**\n * An inline template for an Angular component. If provided,\n * do not supply a template file using `templateUrl`.\n *\n */\n template?: string;\n\n /**\n * One or more relative paths or absolute URLs for files containing CSS stylesheets to use\n * in this component.\n */\n styleUrls?: string[];\n\n /**\n * One or more inline CSS stylesheets to use\n * in this component.\n */\n styles?: string[];\n\n /**\n * One or more animation `trigger()` calls, containing\n * `state()` and `transition()` definitions.\n * See the [Animations guide](/guide/animations) and animations API documentation.\n *\n */\n animations?: any[];\n\n /**\n * An encapsulation policy for the template and CSS styles. One of:\n * - `ViewEncapsulation.Emulated`: Use shimmed CSS that\n * emulates the native behavior.\n * - `ViewEncapsulation.None`: Use global CSS without any\n * encapsulation.\n * - `ViewEncapsulation.ShadowDom`: Use Shadow DOM v1 to encapsulate styles.\n *\n * If not supplied, the value is taken from `CompilerOptions`. The default compiler option is\n * `ViewEncapsulation.Emulated`.\n *\n * If the policy is set to `ViewEncapsulation.Emulated` and the component has no `styles`\n * or `styleUrls` specified, the policy is automatically switched to `ViewEncapsulation.None`.\n */\n encapsulation?: ViewEncapsulation;\n\n /**\n * Overrides the default interpolation start and end delimiters (`{{` and `}}`).\n */\n interpolation?: [string, string];\n\n /**\n * A set of components that should be compiled along with\n * this component. For each component listed here,\n * Angular creates a {@link ComponentFactory} and stores it in the\n * {@link ComponentFactoryResolver}.\n * @deprecated Since 9.0.0. With Ivy, this property is no longer necessary.\n */\n entryComponents?: Array<Type<any>|any[]>;\n\n /**\n * True to preserve or false to remove potentially superfluous whitespace characters\n * from the compiled template. Whitespace characters are those matching the `\\s`\n * character class in JavaScript regular expressions. Default is false, unless\n * overridden in compiler options.\n */\n preserveWhitespaces?: boolean;\n}\n\n/**\n * Component decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Component: ComponentDecorator = makeDecorator(\n 'Component', (c: Component = {}) => ({changeDetection: ChangeDetectionStrategy.Default, ...c}),\n Directive, undefined,\n (type: Type<any>, meta: Component) => SWITCH_COMPILE_COMPONENT(type, meta));\n\n/**\n * Type of the Pipe decorator / constructor function.\n *\n * @publicApi\n */\nexport interface PipeDecorator {\n /**\n *\n * Decorator that marks a class as pipe and supplies configuration metadata.\n *\n * A pipe class must implement the `PipeTransform` interface.\n * For example, if the name is \"myPipe\", use a template binding expression\n * such as the following:\n *\n * ```\n * {{ exp | myPipe }}\n * ```\n *\n * The result of the expression is passed to the pipe's `transform()` method.\n *\n * A pipe must belong to an NgModule in order for it to be available\n * to a template. To make it a member of an NgModule,\n * list it in the `declarations` field of the `NgModule` metadata.\n *\n * @see [Style Guide: Pipe Names](guide/styleguide#02-09)\n *\n */\n (obj: Pipe): TypeDecorator;\n\n /**\n * See the `Pipe` decorator.\n */\n new(obj: Pipe): Pipe;\n}\n\n/**\n * Type of the Pipe metadata.\n *\n * @publicApi\n */\nexport interface Pipe {\n /**\n * The pipe name to use in template bindings.\n * Typically uses [lowerCamelCase](guide/glossary#case-types)\n * because the name cannot contain hyphens.\n */\n name: string;\n\n /**\n * When true, the pipe is pure, meaning that the\n * `transform()` method is invoked only when its input arguments\n * change. Pipes are pure by default.\n *\n * If the pipe has internal state (that is, the result\n * depends on state other than its arguments), set `pure` to false.\n * In this case, the pipe is invoked on each change-detection cycle,\n * even if the arguments have not changed.\n */\n pure?: boolean;\n}\n\n/**\n * @Annotation\n * @publicApi\n */\nexport const Pipe: PipeDecorator = makeDecorator(\n 'Pipe', (p: Pipe) => ({pure: true, ...p}), undefined, undefined,\n (type: Type<any>, meta: Pipe) => SWITCH_COMPILE_PIPE(type, meta));\n\n\n/**\n * @publicApi\n */\nexport interface InputDecorator {\n /**\n * Decorator that marks a class field as an input property and supplies configuration metadata.\n * The input property is bound to a DOM property in the template. During change detection,\n * Angular automatically updates the data property with the DOM property's value.\n *\n * @usageNotes\n *\n * You can supply an optional name to use in templates when the\n * component is instantiated, that maps to the\n * name of the bound property. By default, the original\n * name of the bound property is used for input binding.\n *\n * The following example creates a component with two input properties,\n * one of which is given a special binding name.\n *\n * ```typescript\n * @Component({\n * selector: 'bank-account',\n * template: `\n * Bank Name: {{bankName}}\n * Account Id: {{id}}\n * `\n * })\n * class BankAccount {\n * // This property is bound using its original name.\n * @Input() bankName: string;\n * // this property value is bound to a different property name\n * // when this component is instantiated in a template.\n * @Input('account-id') id: string;\n *\n * // this property is not bound, and is not automatically updated by Angular\n * normalizedBankName: string;\n * }\n *\n * @Component({\n * selector: 'app',\n * template: `\n * <bank-account bankName=\"RBC\" account-id=\"4747\"></bank-account>\n * `\n * })\n * class App {}\n * ```\n *\n * @see [Input and Output properties](guide/inputs-outputs)\n */\n (bindingPropertyName?: string): any;\n new(bindingPropertyName?: string): any;\n}\n\n/**\n * Type of metadata for an `Input` property.\n *\n * @publicApi\n */\nexport interface Input {\n /**\n * The name of the DOM property to which the input property is bound.\n */\n bindingPropertyName?: string;\n}\n\n/**\n * @Annotation\n * @publicApi\n */\nexport const Input: InputDecorator =\n makePropDecorator('Input', (bindingPropertyName?: string) => ({bindingPropertyName}));\n\n/**\n * Type of the Output decorator / constructor function.\n *\n * @publicApi\n */\nexport interface OutputDecorator {\n /**\n * Decorator that marks a class field as an output property and supplies configuration metadata.\n * The DOM property bound to the output property is automatically updated during change detection.\n *\n * @usageNotes\n *\n * You can supply an optional name to use in templates when the\n * component is instantiated, that maps to the\n * name of the bound property. By default, the original\n * name of the bound property is used for output binding.\n *\n * See `Input` decorator for an example of providing a binding name.\n *\n * @see [Input and Output properties](guide/inputs-outputs)\n *\n */\n (bindingPropertyName?: string): any;\n new(bindingPropertyName?: string): any;\n}\n\n/**\n * Type of the Output metadata.\n *\n * @publicApi\n */\nexport interface Output {\n /**\n * The name of the DOM property to which the output property is bound.\n */\n bindingPropertyName?: string;\n}\n\n/**\n * @Annotation\n * @publicApi\n */\nexport const Output: OutputDecorator =\n makePropDecorator('Output', (bindingPropertyName?: string) => ({bindingPropertyName}));\n\n\n\n/**\n * Type of the HostBinding decorator / constructor function.\n *\n * @publicApi\n */\nexport interface HostBindingDecorator {\n /**\n * Decorator that marks a DOM property as a host-binding property and supplies configuration\n * metadata.\n * Angular automatically checks host property bindings during change detection, and\n * if a binding changes it updates the host element of the directive.\n *\n * @usageNotes\n *\n * The following example creates a directive that sets the `valid` and `invalid`\n * properties on the DOM element that has an `ngModel` directive on it.\n *\n * ```typescript\n * @Directive({selector: '[ngModel]'})\n * class NgModelStatus {\n * constructor(public control: NgModel) {}\n * @HostBinding('class.valid') get valid() { return this.control.valid; }\n * @HostBinding('class.invalid') get invalid() { return this.control.invalid; }\n * }\n *\n * @Component({\n * selector: 'app',\n * template: `<input [(ngModel)]=\"prop\">`,\n * })\n * class App {\n * prop;\n * }\n * ```\n *\n */\n (hostPropertyName?: string): any;\n new(hostPropertyName?: string): any;\n}\n\n/**\n * Type of the HostBinding metadata.\n *\n * @publicApi\n */\nexport interface HostBinding {\n /**\n * The DOM property that is bound to a data property.\n */\n hostPropertyName?: string;\n}\n\n/**\n * @Annotation\n * @publicApi\n */\nexport const HostBinding: HostBindingDecorator =\n makePropDecorator('HostBinding', (hostPropertyName?: string) => ({hostPropertyName}));\n\n\n/**\n * Type of the HostListener decorator / constructor function.\n *\n * @publicApi\n */\nexport interface HostListenerDecorator {\n /**\n * Decorator that declares a DOM event to listen for,\n * and provides a handler method to run when that event occurs.\n *\n * Angular invokes the supplied handler method when the host element emits the specified event,\n * and updates the bound element with the result.\n *\n * If the handler method returns false, applies `preventDefault` on the bound element.\n */\n (eventName: string, args?: string[]): any;\n new(eventName: string, args?: string[]): any;\n}\n\n/**\n * Type of the HostListener metadata.\n *\n * @publicApi\n */\nexport interface HostListener {\n /**\n * The DOM event to listen for.\n */\n eventName?: string;\n /**\n * A set of arguments to pass to the handler method when the event occurs.\n */\n args?: string[];\n}\n\n/**\n * Decorator that binds a DOM event to a host listener and supplies configuration metadata.\n * Angular invokes the supplied handler method when the host element emits the specified event,\n * and updates the bound element with the result.\n *\n * If the handler method returns false, applies `preventDefault` on the bound element.\n *\n * @usageNotes\n *\n * The following example declares a directive\n * that attaches a click listener to a button and counts clicks.\n *\n * ```ts\n * @Directive({selector: 'button[counting]'})\n * class CountClicks {\n * numberOfClicks = 0;\n *\n * @HostListener('click', ['$event.target'])\n * onClick(btn) {\n * console.log('button', btn, 'number of clicks:', this.numberOfClicks++);\n * }\n * }\n *\n * @Component({\n * selector: 'app',\n * template: '<button counting>Increment</button>',\n * })\n * class App {}\n *\n * ```\n *\n * The following example registers another DOM event handler that listens for key-press events.\n * ``` ts\n * import { HostListener, Component } from \"@angular/core\";\n *\n * @Component({\n * selector: 'app',\n * template: `<h1>Hello, you have pressed keys {{counter}} number of times!</h1> Press any key to\n * increment the counter.\n * <button (click)=\"resetCounter()\">Reset Counter</button>`\n * })\n * class AppComponent {\n * counter = 0;\n * @HostListener('window:keydown', ['$event'])\n * handleKeyDown(event: KeyboardEvent) {\n * this.counter++;\n * }\n * resetCounter() {\n * this.counter = 0;\n * }\n * }\n * ```\n *\n * @Annotation\n * @publicApi\n */\nexport const HostListener: HostListenerDecorator =\n makePropDecorator('HostListener', (eventName?: string, args?: string[]) => ({eventName, args}));\n\n\n\nexport const SWITCH_COMPILE_COMPONENT__POST_R3__ = render3CompileComponent;\nexport const SWITCH_COMPILE_DIRECTIVE__POST_R3__ = render3CompileDirective;\nexport const SWITCH_COMPILE_PIPE__POST_R3__ = render3CompilePipe;\n\nconst SWITCH_COMPILE_COMPONENT__PRE_R3__ = noop;\nconst SWITCH_COMPILE_DIRECTIVE__PRE_R3__ = noop;\nconst SWITCH_COMPILE_PIPE__PRE_R3__ = noop;\n\nconst SWITCH_COMPILE_COMPONENT: typeof render3CompileComponent = SWITCH_COMPILE_COMPONENT__PRE_R3__;\nconst SWITCH_COMPILE_DIRECTIVE: typeof render3CompileDirective = SWITCH_COMPILE_DIRECTIVE__PRE_R3__;\nconst SWITCH_COMPILE_PIPE: typeof render3CompilePipe = SWITCH_COMPILE_PIPE__PRE_R3__;\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 {InjectorType, ɵɵdefineInjector} from '../di/interface/defs';\nimport {Provider} from '../di/interface/provider';\nimport {convertInjectableProviderToFactory} from '../di/util';\nimport {Type} from '../interface/type';\nimport {SchemaMetadata} from '../metadata/schema';\nimport {compileNgModule as render3CompileNgModule} from '../render3/jit/module';\nimport {makeDecorator, TypeDecorator} from '../util/decorators';\n\n\n/**\n * A wrapper around an NgModule that associates it with [providers](guide/glossary#provider\n * \"Definition\"). Usage without a generic type is deprecated.\n *\n * @see [Deprecations](guide/deprecations#modulewithproviders-type-without-a-generic)\n *\n * @publicApi\n */\nexport interface ModuleWithProviders<T> {\n ngModule: Type<T>;\n providers?: Provider[];\n}\n\n\n/**\n * Type of the NgModule decorator / constructor function.\n *\n * @publicApi\n */\nexport interface NgModuleDecorator {\n /**\n * Decorator that marks a class as an NgModule and supplies configuration metadata.\n */\n (obj?: NgModule): TypeDecorator;\n new(obj?: NgModule): NgModule;\n}\n\n/**\n * Type of the NgModule metadata.\n *\n * @publicApi\n */\nexport interface NgModule {\n /**\n * The set of injectable objects that are available in the injector\n * of this module.\n *\n * @see [Dependency Injection guide](guide/dependency-injection)\n * @see [NgModule guide](guide/providers)\n *\n * @usageNotes\n *\n * Dependencies whose providers are listed here become available for injection\n * into any component, directive, pipe or service that is a child of this injector.\n * The NgModule used for bootstrapping uses the root injector, and can provide dependencies\n * to any part of the app.\n *\n * A lazy-loaded module has its own injector, typically a child of the app root injector.\n * Lazy-loaded services are scoped to the lazy-loaded module's injector.\n * If a lazy-loaded module also provides the `UserService`, any component created\n * within that module's context (such as by router navigation) gets the local instance\n * of the service, not the instance in the root injector.\n * Components in external modules continue to receive the instance provided by their injectors.\n *\n * ### Example\n *\n * The following example defines a class that is injected in\n * the HelloWorld NgModule:\n *\n * ```\n * class Greeter {\n * greet(name:string) {\n * return 'Hello ' + name + '!';\n * }\n * }\n *\n * @NgModule({\n * providers: [\n * Greeter\n * ]\n * })\n * class HelloWorld {\n * greeter:Greeter;\n *\n * constructor(greeter:Greeter) {\n * this.greeter = greeter;\n * }\n * }\n * ```\n */\n providers?: Provider[];\n\n /**\n * The set of components, directives, and pipes ([declarables](guide/glossary#declarable))\n * that belong to this module.\n *\n * @usageNotes\n *\n * The set of selectors that are available to a template include those declared here, and\n * those that are exported from imported NgModules.\n *\n * Declarables must belong to exactly one module.\n * The compiler emits an error if you try to declare the same class in more than one module.\n * Be careful not to declare a class that is imported from another module.\n *\n * ### Example\n *\n * The following example allows the CommonModule to use the `NgFor`\n * directive.\n *\n * ```javascript\n * @NgModule({\n * declarations: [NgFor]\n * })\n * class CommonModule {\n * }\n * ```\n */\n declarations?: Array<Type<any>|any[]>;\n\n /**\n * The set of NgModules whose exported [declarables](guide/glossary#declarable)\n * are available to templates in this module.\n *\n * @usageNotes\n *\n * A template can use exported declarables from any\n * imported module, including those from modules that are imported indirectly\n * and re-exported.\n * For example, `ModuleA` imports `ModuleB`, and also exports\n * it, which makes the declarables from `ModuleB` available\n * wherever `ModuleA` is imported.\n *\n * ### Example\n *\n * The following example allows MainModule to use anything exported by\n * `CommonModule`:\n *\n * ```javascript\n * @NgModule({\n * imports: [CommonModule]\n * })\n * class MainModule {\n * }\n * ```\n *\n */\n imports?: Array<Type<any>|ModuleWithProviders<{}>|any[]>;\n\n /**\n * The set of components, directives, and pipes declared in this\n * NgModule that can be used in the template of any component that is part of an\n * NgModule that imports this NgModule. Exported declarations are the module's public API.\n *\n * A declarable belongs to one and only one NgModule.\n * A module can list another module among its exports, in which case all of that module's\n * public declaration are exported.\n *\n * @usageNotes\n *\n * Declarations are private by default.\n * If this ModuleA does not export UserComponent, then only the components within this\n * ModuleA can use UserComponent.\n *\n * ModuleA can import ModuleB and also export it, making exports from ModuleB\n * available to an NgModule that imports ModuleA.\n *\n * ### Example\n *\n * The following example exports the `NgFor` directive from CommonModule.\n *\n * ```javascript\n * @NgModule({\n * exports: [NgFor]\n * })\n * class CommonModule {\n * }\n * ```\n */\n exports?: Array<Type<any>|any[]>;\n\n /**\n * The set of components to compile when this NgModule is defined,\n * so that they can be dynamically loaded into the view.\n *\n * For each component listed here, Angular creates a `ComponentFactory`\n * and stores it in the `ComponentFactoryResolver`.\n *\n * Angular automatically adds components in the module's bootstrap\n * and route definitions into the `entryComponents` list. Use this\n * option to add components that are bootstrapped\n * using one of the imperative techniques, such as `ViewContainerRef.createComponent()`.\n *\n * @see [Entry Components](guide/entry-components)\n * @deprecated\n * Since 9.0.0. With Ivy, this property is no longer necessary.\n * (You may need to keep these if building a library that will be consumed by a View Engine\n * application.)\n */\n entryComponents?: Array<Type<any>|any[]>;\n\n /**\n * The set of components that are bootstrapped when\n * this module is bootstrapped. The components listed here\n * are automatically added to `entryComponents`.\n */\n bootstrap?: Array<Type<any>|any[]>;\n\n /**\n * The set of schemas that declare elements to be allowed in the NgModule.\n * Elements and properties that are neither Angular components nor directives\n * must be declared in a schema.\n *\n * Allowed value are `NO_ERRORS_SCHEMA` and `CUSTOM_ELEMENTS_SCHEMA`.\n *\n * @security When using one of `NO_ERRORS_SCHEMA` or `CUSTOM_ELEMENTS_SCHEMA`\n * you must ensure that allowed elements and properties securely escape inputs.\n */\n schemas?: Array<SchemaMetadata|any[]>;\n\n /**\n * A name or path that uniquely identifies this NgModule in `getModuleFactory`.\n * If left `undefined`, the NgModule is not registered with\n * `getModuleFactory`.\n */\n id?: string;\n\n /**\n * When present, this module is ignored by the AOT compiler.\n * It remains in distributed code, and the JIT compiler attempts to compile it\n * at run time, in the browser.\n * To ensure the correct behavior, the app must import `@angular/compiler`.\n */\n jit?: true;\n}\n\n/**\n * @Annotation\n * @publicApi\n */\nexport const NgModule: NgModuleDecorator = makeDecorator(\n 'NgModule', (ngModule: NgModule) => ngModule, undefined, undefined,\n /**\n * Decorator that marks the following class as an NgModule, and supplies\n * configuration metadata for it.\n *\n * * The `declarations` and `entryComponents` options configure the compiler\n * with information about what belongs to the NgModule.\n * * The `providers` options configures the NgModule's injector to provide\n * dependencies the NgModule members.\n * * The `imports` and `exports` options bring in members from other modules, and make\n * this module's members available to others.\n */\n (type: Type<any>, meta: NgModule) => SWITCH_COMPILE_NGMODULE(type, meta));\n\n\nfunction preR3NgModuleCompile(moduleType: Type<any>, metadata?: NgModule): void {\n let imports = (metadata && metadata.imports) || [];\n if (metadata && metadata.exports) {\n imports = [...imports, metadata.exports];\n }\n\n const moduleInjectorType = moduleType as InjectorType<any>;\n moduleInjectorType.ɵfac = convertInjectableProviderToFactory(moduleType, {useClass: moduleType});\n moduleInjectorType.ɵinj =\n ɵɵdefineInjector({providers: metadata && metadata.providers, imports: imports});\n}\n\n\nexport const SWITCH_COMPILE_NGMODULE__POST_R3__ = render3CompileNgModule;\nconst SWITCH_COMPILE_NGMODULE__PRE_R3__ = preR3NgModuleCompile;\nconst SWITCH_COMPILE_NGMODULE: typeof render3CompileNgModule = SWITCH_COMPILE_NGMODULE__PRE_R3__;\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 * This indirection is needed to free up Component, etc symbols in the public API\n * to be used by the decorator versions of these annotations.\n */\n\n\nexport {Attribute, AttributeDecorator} from './di/metadata_attr';\nexport {AfterContentChecked, AfterContentInit, AfterViewChecked, AfterViewInit, DoCheck, OnChanges, OnDestroy, OnInit} from './interface/lifecycle_hooks';\nexport {ANALYZE_FOR_ENTRY_COMPONENTS, ContentChild, ContentChildDecorator, ContentChildren, ContentChildrenDecorator, Query, ViewChild, ViewChildDecorator, ViewChildren, ViewChildrenDecorator} from './metadata/di';\nexport {Component, ComponentDecorator, Directive, DirectiveDecorator, HostBinding, HostBindingDecorator, HostListener, HostListenerDecorator, Input, InputDecorator, Output, OutputDecorator, Pipe, PipeDecorator} from './metadata/directives';\nexport {DoBootstrap} from './metadata/do_boostrap';\nexport {ModuleWithProviders, NgModule, NgModuleDecorator} from './metadata/ng_module';\nexport {CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA, SchemaMetadata} from './metadata/schema';\nexport {ViewEncapsulation} from './metadata/view';\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 {Observable} from 'rxjs';\nimport {Inject, Injectable, InjectionToken, Optional} from './di';\nimport {isObservable, isPromise} from './util/lang';\nimport {noop} from './util/noop';\n\n\n/**\n * A [DI token](guide/glossary#di-token \"DI token definition\") that you can use to provide\n * one or more initialization functions.\n *\n * The provided functions are injected at application startup and executed during\n * app initialization. If any of these functions returns a Promise or an Observable, initialization\n * does not complete until the Promise is resolved or the Observable is completed.\n *\n * You can, for example, create a factory function that loads language data\n * or an external configuration, and provide that function to the `APP_INITIALIZER` token.\n * The function is executed during the application bootstrap process,\n * and the needed data is available on startup.\n *\n * @see `ApplicationInitStatus`\n *\n * @usageNotes\n *\n * The following example illustrates how to configure a multi-provider using `APP_INITIALIZER` token\n * and a function returning a promise.\n *\n * ```\n * function initializeApp(): Promise<any> {\n * return new Promise((resolve, reject) => {\n * // Do some asynchronous stuff\n * resolve();\n * });\n * }\n *\n * @NgModule({\n * imports: [BrowserModule],\n * declarations: [AppComponent],\n * bootstrap: [AppComponent],\n * providers: [{\n * provide: APP_INITIALIZER,\n * useFactory: () => initializeApp,\n * multi: true\n * }]\n * })\n * export class AppModule {}\n * ```\n *\n * It's also possible to configure a multi-provider using `APP_INITIALIZER` token and a function\n * returning an observable, see an example below. Note: the `HttpClient` in this example is used for\n * demo purposes to illustrate how the factory function can work with other providers available\n * through DI.\n *\n * ```\n * function initializeAppFactory(httpClient: HttpClient): () => Observable<any> {\n * return () => httpClient.get(\"https://someUrl.com/api/user\")\n * .pipe(\n * tap(user => { ... })\n * );\n * }\n *\n * @NgModule({\n * imports: [BrowserModule, HttpClientModule],\n * declarations: [AppComponent],\n * bootstrap: [AppComponent],\n * providers: [{\n * provide: APP_INITIALIZER,\n * useFactory: initializeAppFactory,\n * deps: [HttpClient],\n * multi: true\n * }]\n * })\n * export class AppModule {}\n * ```\n *\n * @publicApi\n */\nexport const APP_INITIALIZER =\n new InjectionToken<ReadonlyArray<() => Observable<unknown>| Promise<unknown>| void>>(\n 'Application Initializer');\n\n/**\n * A class that reflects the state of running {@link APP_INITIALIZER} functions.\n *\n * @publicApi\n */\n@Injectable()\nexport class ApplicationInitStatus {\n private resolve = noop;\n private reject = noop;\n private initialized = false;\n public readonly donePromise: Promise<any>;\n public readonly done = false;\n\n constructor(@Inject(APP_INITIALIZER) @Optional() private readonly appInits:\n ReadonlyArray<() => Observable<unknown>| Promise<unknown>| void>) {\n this.donePromise = new Promise((res, rej) => {\n this.resolve = res;\n this.reject = rej;\n });\n }\n\n /** @internal */\n runInitializers() {\n if (this.initialized) {\n return;\n }\n\n const asyncInitPromises: Promise<any>[] = [];\n\n const complete = () => {\n (this as {done: boolean}).done = true;\n this.resolve();\n };\n\n if (this.appInits) {\n for (let i = 0; i < this.appInits.length; i++) {\n const initResult = this.appInits[i]();\n if (isPromise(initResult)) {\n asyncInitPromises.push(initResult);\n } else if (isObservable(initResult)) {\n const observableAsPromise = new Promise<void>((resolve, reject) => {\n initResult.subscribe({complete: resolve, error: reject});\n });\n asyncInitPromises.push(observableAsPromise);\n }\n }\n }\n\n Promise.all(asyncInitPromises)\n .then(() => {\n complete();\n })\n .catch(e => {\n this.reject(e);\n });\n\n if (asyncInitPromises.length === 0) {\n complete();\n }\n this.initialized = true;\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 {InjectionToken} from './di';\nimport {ComponentRef} from './linker/component_factory';\n\n\n/**\n * A [DI token](guide/glossary#di-token \"DI token definition\") representing a unique string ID, used\n * primarily for prefixing application attributes and CSS styles when\n * {@link ViewEncapsulation#Emulated ViewEncapsulation.Emulated} is being used.\n *\n * BY default, the value is randomly generated and assigned to the application by Angular.\n * To provide a custom ID value, use a DI provider <!-- TODO: provider --> to configure\n * the root {@link Injector} that uses this token.\n *\n * @publicApi\n */\nexport const APP_ID = new InjectionToken<string>('AppId');\n\nexport function _appIdRandomProviderFactory() {\n return `${_randomChar()}${_randomChar()}${_randomChar()}`;\n}\n\n/**\n * Providers that generate a random `APP_ID_TOKEN`.\n * @publicApi\n */\nexport const APP_ID_RANDOM_PROVIDER = {\n provide: APP_ID,\n useFactory: _appIdRandomProviderFactory,\n deps: <any[]>[],\n};\n\nfunction _randomChar(): string {\n return String.fromCharCode(97 + Math.floor(Math.random() * 25));\n}\n\n/**\n * A function that is executed when a platform is initialized.\n * @publicApi\n */\nexport const PLATFORM_INITIALIZER = new InjectionToken<Array<() => void>>('Platform Initializer');\n\n/**\n * A token that indicates an opaque platform ID.\n * @publicApi\n */\nexport const PLATFORM_ID = new InjectionToken<Object>('Platform ID');\n\n/**\n * A [DI token](guide/glossary#di-token \"DI token definition\") that provides a set of callbacks to\n * be called for every component that is bootstrapped.\n *\n * Each callback must take a `ComponentRef` instance and return nothing.\n *\n * `(componentRef: ComponentRef) => void`\n *\n * @publicApi\n */\nexport const APP_BOOTSTRAP_LISTENER =\n new InjectionToken<Array<(compRef: ComponentRef<any>) => void>>('appBootstrapListener');\n\n/**\n * A [DI token](guide/glossary#di-token \"DI token definition\") that indicates the root directory of\n * the application\n * @publicApi\n */\nexport const PACKAGE_ROOT_URL = new InjectionToken<string>('Application Packages Root URL');\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 {Injectable} from './di';\n\n@Injectable()\nexport class Console {\n log(message: string): void {\n // tslint:disable-next-line:no-console\n console.log(message);\n }\n // Note: for reporting errors use `DOM.logError()` as it is platform specific\n warn(message: string): void {\n // tslint:disable-next-line:no-console\n console.warn(message);\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 {InjectionToken} from '../di/injection_token';\n\n/**\n * Provide this token to set the locale of your application.\n * It is used for i18n extraction, by i18n pipes (DatePipe, I18nPluralPipe, CurrencyPipe,\n * DecimalPipe and PercentPipe) and by ICU expressions.\n *\n * See the [i18n guide](guide/i18n-common-locale-id) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { LOCALE_ID } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: LOCALE_ID, useValue: 'en-US' }]\n * });\n * ```\n *\n * @publicApi\n */\nexport const LOCALE_ID = new InjectionToken<string>('LocaleId');\n\n/**\n * Provide this token to set the default currency code your application uses for\n * CurrencyPipe when there is no currency code passed into it. This is only used by\n * CurrencyPipe and has no relation to locale currency. Defaults to USD if not configured.\n *\n * See the [i18n guide](guide/i18n-common-locale-id) for more information.\n *\n * <div class=\"alert is-helpful\">\n *\n * **Deprecation notice:**\n *\n * The default currency code is currently always `USD` but this is deprecated from v9.\n *\n * **In v10 the default currency code will be taken from the current locale.**\n *\n * If you need the previous behavior then set it by creating a `DEFAULT_CURRENCY_CODE` provider in\n * your application `NgModule`:\n *\n * ```ts\n * {provide: DEFAULT_CURRENCY_CODE, useValue: 'USD'}\n * ```\n *\n * </div>\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: DEFAULT_CURRENCY_CODE, useValue: 'EUR' }]\n * });\n * ```\n *\n * @publicApi\n */\nexport const DEFAULT_CURRENCY_CODE = new InjectionToken<string>('DefaultCurrencyCode');\n\n/**\n * Use this token at bootstrap to provide the content of your translation file (`xtb`,\n * `xlf` or `xlf2`) when you want to translate your application in another language.\n *\n * See the [i18n guide](guide/i18n-common-merge) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { TRANSLATIONS } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * // content of your translation file\n * const translations = '....';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: TRANSLATIONS, useValue: translations }]\n * });\n * ```\n *\n * @publicApi\n */\nexport const TRANSLATIONS = new InjectionToken<string>('Translations');\n\n/**\n * Provide this token at bootstrap to set the format of your {@link TRANSLATIONS}: `xtb`,\n * `xlf` or `xlf2`.\n *\n * See the [i18n guide](guide/i18n-common-merge) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { TRANSLATIONS_FORMAT } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: TRANSLATIONS_FORMAT, useValue: 'xlf' }]\n * });\n * ```\n *\n * @publicApi\n */\nexport const TRANSLATIONS_FORMAT = new InjectionToken<string>('TranslationsFormat');\n\n/**\n * Use this enum at bootstrap as an option of `bootstrapModule` to define the strategy\n * that the compiler should use in case of missing translations:\n * - Error: throw if you have missing translations.\n * - Warning (default): show a warning in the console and/or shell.\n * - Ignore: do nothing.\n *\n * See the [i18n guide](guide/i18n-common-merge#report-missing-translations) for more information.\n *\n * @usageNotes\n * ### Example\n * ```typescript\n * import { MissingTranslationStrategy } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * missingTranslation: MissingTranslationStrategy.Error\n * });\n * ```\n *\n * @publicApi\n */\nexport enum MissingTranslationStrategy {\n Error = 0,\n Warning = 1,\n Ignore = 2,\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport const SWITCH_IVY_ENABLED__POST_R3__ = true;\nconst SWITCH_IVY_ENABLED__PRE_R3__ = false;\nexport const ivyEnabled = SWITCH_IVY_ENABLED__PRE_R3__;\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 {Injectable} from '../di/injectable';\nimport {InjectionToken} from '../di/injection_token';\nimport {StaticProvider} from '../di/interface/provider';\nimport {MissingTranslationStrategy} from '../i18n/tokens';\nimport {Type} from '../interface/type';\nimport {ViewEncapsulation} from '../metadata/view';\nimport {ComponentFactory as ComponentFactoryR3} from '../render3/component_ref';\nimport {getComponentDef, getNgModuleDef} from '../render3/definition';\nimport {NgModuleFactory as NgModuleFactoryR3} from '../render3/ng_module_ref';\nimport {maybeUnwrapFn} from '../render3/util/misc_utils';\n\nimport {ComponentFactory} from './component_factory';\nimport {NgModuleFactory} from './ng_module_factory';\n\n\n\n/**\n * Combination of NgModuleFactory and ComponentFactories.\n *\n * @publicApi\n */\nexport class ModuleWithComponentFactories<T> {\n constructor(\n public ngModuleFactory: NgModuleFactory<T>,\n public componentFactories: ComponentFactory<any>[]) {}\n}\n\n\nfunction _throwError() {\n throw new Error(`Runtime compiler is not loaded`);\n}\n\nconst Compiler_compileModuleSync__PRE_R3__: <T>(moduleType: Type<T>) => NgModuleFactory<T> =\n _throwError as any;\nexport const Compiler_compileModuleSync__POST_R3__: <T>(moduleType: Type<T>) =>\n NgModuleFactory<T> = function<T>(moduleType: Type<T>): NgModuleFactory<T> {\n return new NgModuleFactoryR3(moduleType);\n};\nconst Compiler_compileModuleSync = Compiler_compileModuleSync__PRE_R3__;\n\nconst Compiler_compileModuleAsync__PRE_R3__: <T>(moduleType: Type<T>) =>\n Promise<NgModuleFactory<T>> = _throwError as any;\nexport const Compiler_compileModuleAsync__POST_R3__: <T>(moduleType: Type<T>) =>\n Promise<NgModuleFactory<T>> = function<T>(moduleType: Type<T>): Promise<NgModuleFactory<T>> {\n return Promise.resolve(Compiler_compileModuleSync__POST_R3__(moduleType));\n};\nconst Compiler_compileModuleAsync = Compiler_compileModuleAsync__PRE_R3__;\n\nconst Compiler_compileModuleAndAllComponentsSync__PRE_R3__: <T>(moduleType: Type<T>) =>\n ModuleWithComponentFactories<T> = _throwError as any;\nexport const Compiler_compileModuleAndAllComponentsSync__POST_R3__: <T>(moduleType: Type<T>) =>\n ModuleWithComponentFactories<T> = function<T>(moduleType: Type<T>):\n ModuleWithComponentFactories<T> {\n const ngModuleFactory = Compiler_compileModuleSync__POST_R3__(moduleType);\n const moduleDef = getNgModuleDef(moduleType)!;\n const componentFactories =\n maybeUnwrapFn(moduleDef.declarations)\n .reduce((factories: ComponentFactory<any>[], declaration: Type<any>) => {\n const componentDef = getComponentDef(declaration);\n componentDef && factories.push(new ComponentFactoryR3(componentDef));\n return factories;\n }, [] as ComponentFactory<any>[]);\n return new ModuleWithComponentFactories(ngModuleFactory, componentFactories);\n};\nconst Compiler_compileModuleAndAllComponentsSync =\n Compiler_compileModuleAndAllComponentsSync__PRE_R3__;\n\nconst Compiler_compileModuleAndAllComponentsAsync__PRE_R3__: <T>(moduleType: Type<T>) =>\n Promise<ModuleWithComponentFactories<T>> = _throwError as any;\nexport const Compiler_compileModuleAndAllComponentsAsync__POST_R3__: <T>(moduleType: Type<T>) =>\n Promise<ModuleWithComponentFactories<T>> = function<T>(moduleType: Type<T>):\n Promise<ModuleWithComponentFactories<T>> {\n return Promise.resolve(Compiler_compileModuleAndAllComponentsSync__POST_R3__(moduleType));\n};\nconst Compiler_compileModuleAndAllComponentsAsync =\n Compiler_compileModuleAndAllComponentsAsync__PRE_R3__;\n\n/**\n * Low-level service for running the angular compiler during runtime\n * to create {@link ComponentFactory}s, which\n * can later be used to create and render a Component instance.\n *\n * Each `@NgModule` provides an own `Compiler` to its injector,\n * that will use the directives/pipes of the ng module for compilation\n * of components.\n *\n * @publicApi\n */\n@Injectable()\nexport class Compiler {\n /**\n * Compiles the given NgModule and all of its components. All templates of the components listed\n * in `entryComponents` have to be inlined.\n */\n compileModuleSync: <T>(moduleType: Type<T>) => NgModuleFactory<T> = Compiler_compileModuleSync;\n\n /**\n * Compiles the given NgModule and all of its components\n */\n compileModuleAsync:\n <T>(moduleType: Type<T>) => Promise<NgModuleFactory<T>> = Compiler_compileModuleAsync;\n\n /**\n * Same as {@link #compileModuleSync} but also creates ComponentFactories for all components.\n */\n compileModuleAndAllComponentsSync: <T>(moduleType: Type<T>) => ModuleWithComponentFactories<T> =\n Compiler_compileModuleAndAllComponentsSync;\n\n /**\n * Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components.\n */\n compileModuleAndAllComponentsAsync: <T>(moduleType: Type<T>) =>\n Promise<ModuleWithComponentFactories<T>> = Compiler_compileModuleAndAllComponentsAsync;\n\n /**\n * Clears all caches.\n */\n clearCache(): void {}\n\n /**\n * Clears the cache for the given component/ngModule.\n */\n clearCacheFor(type: Type<any>) {}\n\n /**\n * Returns the id for a given NgModule, if one is defined and known to the compiler.\n */\n getModuleId(moduleType: Type<any>): string|undefined {\n return undefined;\n }\n}\n\n/**\n * Options for creating a compiler\n *\n * @publicApi\n */\nexport type CompilerOptions = {\n useJit?: boolean,\n defaultEncapsulation?: ViewEncapsulation,\n providers?: StaticProvider[],\n missingTranslation?: MissingTranslationStrategy,\n preserveWhitespaces?: boolean,\n};\n\n/**\n * Token to provide CompilerOptions in the platform injector.\n *\n * @publicApi\n */\nexport const COMPILER_OPTIONS = new InjectionToken<CompilerOptions[]>('compilerOptions');\n\n/**\n * A factory for creating a Compiler\n *\n * @publicApi\n */\nexport abstract class CompilerFactory {\n abstract createCompiler(options?: CompilerOptions[]): Compiler;\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\nconst promise: Promise<any> = (() => Promise.resolve(0))();\n\ndeclare const Zone: any;\n\nexport function scheduleMicroTask(fn: Function) {\n if (typeof Zone === 'undefined') {\n // use promise to schedule microTask instead of use Zone\n promise.then(() => {\n fn && fn.apply(null, null);\n });\n } else {\n Zone.current.scheduleMicroTask('scheduleMicrotask', fn);\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 */\nimport {global} from './global';\n\nexport function getNativeRequestAnimationFrame() {\n let nativeRequestAnimationFrame: (callback: FrameRequestCallback) => number =\n global['requestAnimationFrame'];\n let nativeCancelAnimationFrame: (handle: number) => void = global['cancelAnimationFrame'];\n if (typeof Zone !== 'undefined' && nativeRequestAnimationFrame && nativeCancelAnimationFrame) {\n // use unpatched version of requestAnimationFrame(native delegate) if possible\n // to avoid another Change detection\n const unpatchedRequestAnimationFrame =\n (nativeRequestAnimationFrame as any)[(Zone as any).__symbol__('OriginalDelegate')];\n if (unpatchedRequestAnimationFrame) {\n nativeRequestAnimationFrame = unpatchedRequestAnimationFrame;\n }\n const unpatchedCancelAnimationFrame =\n (nativeCancelAnimationFrame as any)[(Zone as any).__symbol__('OriginalDelegate')];\n if (unpatchedCancelAnimationFrame) {\n nativeCancelAnimationFrame = unpatchedCancelAnimationFrame;\n }\n }\n return {nativeRequestAnimationFrame, nativeCancelAnimationFrame};\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 {EventEmitter} from '../event_emitter';\nimport {global} from '../util/global';\nimport {noop} from '../util/noop';\nimport {getNativeRequestAnimationFrame} from '../util/raf';\n\n\n/**\n * An injectable service for executing work inside or outside of the Angular zone.\n *\n * The most common use of this service is to optimize performance when starting a work consisting of\n * one or more asynchronous tasks that don't require UI updates or error handling to be handled by\n * Angular. Such tasks can be kicked off via {@link #runOutsideAngular} and if needed, these tasks\n * can reenter the Angular zone via {@link #run}.\n *\n * <!-- TODO: add/fix links to:\n * - docs explaining zones and the use of zones in Angular and change-detection\n * - link to runOutsideAngular/run (throughout this file!)\n * -->\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * import {Component, NgZone} from '@angular/core';\n * import {NgIf} from '@angular/common';\n *\n * @Component({\n * selector: 'ng-zone-demo',\n * template: `\n * <h2>Demo: NgZone</h2>\n *\n * <p>Progress: {{progress}}%</p>\n * <p *ngIf=\"progress >= 100\">Done processing {{label}} of Angular zone!</p>\n *\n * <button (click)=\"processWithinAngularZone()\">Process within Angular zone</button>\n * <button (click)=\"processOutsideOfAngularZone()\">Process outside of Angular zone</button>\n * `,\n * })\n * export class NgZoneDemo {\n * progress: number = 0;\n * label: string;\n *\n * constructor(private _ngZone: NgZone) {}\n *\n * // Loop inside the Angular zone\n * // so the UI DOES refresh after each setTimeout cycle\n * processWithinAngularZone() {\n * this.label = 'inside';\n * this.progress = 0;\n * this._increaseProgress(() => console.log('Inside Done!'));\n * }\n *\n * // Loop outside of the Angular zone\n * // so the UI DOES NOT refresh after each setTimeout cycle\n * processOutsideOfAngularZone() {\n * this.label = 'outside';\n * this.progress = 0;\n * this._ngZone.runOutsideAngular(() => {\n * this._increaseProgress(() => {\n * // reenter the Angular zone and display done\n * this._ngZone.run(() => { console.log('Outside Done!'); });\n * });\n * });\n * }\n *\n * _increaseProgress(doneCallback: () => void) {\n * this.progress += 1;\n * console.log(`Current progress: ${this.progress}%`);\n *\n * if (this.progress < 100) {\n * window.setTimeout(() => this._increaseProgress(doneCallback), 10);\n * } else {\n * doneCallback();\n * }\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class NgZone {\n readonly hasPendingMacrotasks: boolean = false;\n readonly hasPendingMicrotasks: boolean = false;\n\n /**\n * Whether there are no outstanding microtasks or macrotasks.\n */\n readonly isStable: boolean = true;\n\n /**\n * Notifies when code enters Angular Zone. This gets fired first on VM Turn.\n */\n readonly onUnstable: EventEmitter<any> = new EventEmitter(false);\n\n /**\n * Notifies when there is no more microtasks enqueued in the current VM Turn.\n * This is a hint for Angular to do change detection, which may enqueue more microtasks.\n * For this reason this event can fire multiple times per VM Turn.\n */\n readonly onMicrotaskEmpty: EventEmitter<any> = new EventEmitter(false);\n\n /**\n * Notifies when the last `onMicrotaskEmpty` has run and there are no more microtasks, which\n * implies we are about to relinquish VM turn.\n * This event gets called just once.\n */\n readonly onStable: EventEmitter<any> = new EventEmitter(false);\n\n /**\n * Notifies that an error has been delivered.\n */\n readonly onError: EventEmitter<any> = new EventEmitter(false);\n\n\n constructor({\n enableLongStackTrace = false,\n shouldCoalesceEventChangeDetection = false,\n shouldCoalesceRunChangeDetection = false\n }) {\n if (typeof Zone == 'undefined') {\n throw new Error(`In this configuration Angular requires Zone.js`);\n }\n\n Zone.assertZonePatched();\n const self = this as any as NgZonePrivate;\n self._nesting = 0;\n\n self._outer = self._inner = Zone.current;\n\n if ((Zone as any)['TaskTrackingZoneSpec']) {\n self._inner = self._inner.fork(new ((Zone as any)['TaskTrackingZoneSpec'] as any));\n }\n\n if (enableLongStackTrace && (Zone as any)['longStackTraceZoneSpec']) {\n self._inner = self._inner.fork((Zone as any)['longStackTraceZoneSpec']);\n }\n // if shouldCoalesceRunChangeDetection is true, all tasks including event tasks will be\n // coalesced, so shouldCoalesceEventChangeDetection option is not necessary and can be skipped.\n self.shouldCoalesceEventChangeDetection =\n !shouldCoalesceRunChangeDetection && shouldCoalesceEventChangeDetection;\n self.shouldCoalesceRunChangeDetection = shouldCoalesceRunChangeDetection;\n self.lastRequestAnimationFrameId = -1;\n self.nativeRequestAnimationFrame = getNativeRequestAnimationFrame().nativeRequestAnimationFrame;\n forkInnerZoneWithAngularBehavior(self);\n }\n\n static isInAngularZone(): boolean {\n return Zone.current.get('isAngularZone') === true;\n }\n\n static assertInAngularZone(): void {\n if (!NgZone.isInAngularZone()) {\n throw new Error('Expected to be in Angular Zone, but it is not!');\n }\n }\n\n static assertNotInAngularZone(): void {\n if (NgZone.isInAngularZone()) {\n throw new Error('Expected to not be in Angular Zone, but it is!');\n }\n }\n\n /**\n * Executes the `fn` function synchronously within the Angular zone and returns value returned by\n * the function.\n *\n * Running functions via `run` allows you to reenter Angular zone from a task that was executed\n * outside of the Angular zone (typically started via {@link #runOutsideAngular}).\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * within the Angular zone.\n *\n * If a synchronous error happens it will be rethrown and not reported via `onError`.\n */\n run<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T {\n return (this as any as NgZonePrivate)._inner.run(fn, applyThis, applyArgs);\n }\n\n /**\n * Executes the `fn` function synchronously within the Angular zone as a task and returns value\n * returned by the function.\n *\n * Running functions via `run` allows you to reenter Angular zone from a task that was executed\n * outside of the Angular zone (typically started via {@link #runOutsideAngular}).\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * within the Angular zone.\n *\n * If a synchronous error happens it will be rethrown and not reported via `onError`.\n */\n runTask<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[], name?: string): T {\n const zone = (this as any as NgZonePrivate)._inner;\n const task = zone.scheduleEventTask('NgZoneEvent: ' + name, fn, EMPTY_PAYLOAD, noop, noop);\n try {\n return zone.runTask(task, applyThis, applyArgs);\n } finally {\n zone.cancelTask(task);\n }\n }\n\n /**\n * Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not\n * rethrown.\n */\n runGuarded<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T {\n return (this as any as NgZonePrivate)._inner.runGuarded(fn, applyThis, applyArgs);\n }\n\n /**\n * Executes the `fn` function synchronously in Angular's parent zone and returns value returned by\n * the function.\n *\n * Running functions via {@link #runOutsideAngular} allows you to escape Angular's zone and do\n * work that\n * doesn't trigger Angular change-detection or is subject to Angular's error handling.\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * outside of the Angular zone.\n *\n * Use {@link #run} to reenter the Angular zone and do work that updates the application model.\n */\n runOutsideAngular<T>(fn: (...args: any[]) => T): T {\n return (this as any as NgZonePrivate)._outer.run(fn);\n }\n}\n\nconst EMPTY_PAYLOAD = {};\n\ninterface NgZonePrivate extends NgZone {\n _outer: Zone;\n _inner: Zone;\n _nesting: number;\n _hasPendingMicrotasks: boolean;\n\n hasPendingMacrotasks: boolean;\n hasPendingMicrotasks: boolean;\n lastRequestAnimationFrameId: number;\n /**\n * A flag to indicate if NgZone is currently inside\n * checkStable and to prevent re-entry. The flag is\n * needed because it is possible to invoke the change\n * detection from within change detection leading to\n * incorrect behavior.\n *\n * For detail, please refer here,\n * https://github.com/angular/angular/pull/40540\n */\n isCheckStableRunning: boolean;\n isStable: boolean;\n /**\n * Optionally specify coalescing event change detections or not.\n * Consider the following case.\n *\n * <div (click)=\"doSomething()\">\n * <button (click)=\"doSomethingElse()\"></button>\n * </div>\n *\n * When button is clicked, because of the event bubbling, both\n * event handlers will be called and 2 change detections will be\n * triggered. We can coalesce such kind of events to trigger\n * change detection only once.\n *\n * By default, this option will be false. So the events will not be\n * coalesced and the change detection will be triggered multiple times.\n * And if this option be set to true, the change detection will be\n * triggered async by scheduling it in an animation frame. So in the case above,\n * the change detection will only be trigged once.\n */\n shouldCoalesceEventChangeDetection: boolean;\n /**\n * Optionally specify if `NgZone#run()` method invocations should be coalesced\n * into a single change detection.\n *\n * Consider the following case.\n *\n * for (let i = 0; i < 10; i ++) {\n * ngZone.run(() => {\n * // do something\n * });\n * }\n *\n * This case triggers the change detection multiple times.\n * With ngZoneRunCoalescing options, all change detections in an event loops trigger only once.\n * In addition, the change detection executes in requestAnimation.\n *\n */\n shouldCoalesceRunChangeDetection: boolean;\n\n nativeRequestAnimationFrame: (callback: FrameRequestCallback) => number;\n\n // Cache a \"fake\" top eventTask so you don't need to schedule a new task every\n // time you run a `checkStable`.\n fakeTopEventTask: Task;\n}\n\nfunction checkStable(zone: NgZonePrivate) {\n // TODO: @JiaLiPassion, should check zone.isCheckStableRunning to prevent\n // re-entry. The case is:\n //\n // @Component({...})\n // export class AppComponent {\n // constructor(private ngZone: NgZone) {\n // this.ngZone.onStable.subscribe(() => {\n // this.ngZone.run(() => console.log('stable'););\n // });\n // }\n //\n // The onStable subscriber run another function inside ngZone\n // which causes `checkStable()` re-entry.\n // But this fix causes some issues in g3, so this fix will be\n // launched in another PR.\n if (zone._nesting == 0 && !zone.hasPendingMicrotasks && !zone.isStable) {\n try {\n zone._nesting++;\n zone.onMicrotaskEmpty.emit(null);\n } finally {\n zone._nesting--;\n if (!zone.hasPendingMicrotasks) {\n try {\n zone.runOutsideAngular(() => zone.onStable.emit(null));\n } finally {\n zone.isStable = true;\n }\n }\n }\n }\n}\n\nfunction delayChangeDetectionForEvents(zone: NgZonePrivate) {\n /**\n * We also need to check _nesting here\n * Consider the following case with shouldCoalesceRunChangeDetection = true\n *\n * ngZone.run(() => {});\n * ngZone.run(() => {});\n *\n * We want the two `ngZone.run()` only trigger one change detection\n * when shouldCoalesceRunChangeDetection is true.\n * And because in this case, change detection run in async way(requestAnimationFrame),\n * so we also need to check the _nesting here to prevent multiple\n * change detections.\n */\n if (zone.isCheckStableRunning || zone.lastRequestAnimationFrameId !== -1) {\n return;\n }\n zone.lastRequestAnimationFrameId = zone.nativeRequestAnimationFrame.call(global, () => {\n // This is a work around for https://github.com/angular/angular/issues/36839.\n // The core issue is that when event coalescing is enabled it is possible for microtasks\n // to get flushed too early (As is the case with `Promise.then`) between the\n // coalescing eventTasks.\n //\n // To workaround this we schedule a \"fake\" eventTask before we process the\n // coalescing eventTasks. The benefit of this is that the \"fake\" container eventTask\n // will prevent the microtasks queue from getting drained in between the coalescing\n // eventTask execution.\n if (!zone.fakeTopEventTask) {\n zone.fakeTopEventTask = Zone.root.scheduleEventTask('fakeTopEventTask', () => {\n zone.lastRequestAnimationFrameId = -1;\n updateMicroTaskStatus(zone);\n zone.isCheckStableRunning = true;\n checkStable(zone);\n zone.isCheckStableRunning = false;\n }, undefined, () => {}, () => {});\n }\n zone.fakeTopEventTask.invoke();\n });\n updateMicroTaskStatus(zone);\n}\n\nfunction forkInnerZoneWithAngularBehavior(zone: NgZonePrivate) {\n const delayChangeDetectionForEventsDelegate = () => {\n delayChangeDetectionForEvents(zone);\n };\n zone._inner = zone._inner.fork({\n name: 'angular',\n properties: <any>{'isAngularZone': true},\n onInvokeTask:\n (delegate: ZoneDelegate, current: Zone, target: Zone, task: Task, applyThis: any,\n applyArgs: any): any => {\n try {\n onEnter(zone);\n return delegate.invokeTask(target, task, applyThis, applyArgs);\n } finally {\n if ((zone.shouldCoalesceEventChangeDetection && task.type === 'eventTask') ||\n zone.shouldCoalesceRunChangeDetection) {\n delayChangeDetectionForEventsDelegate();\n }\n onLeave(zone);\n }\n },\n\n onInvoke:\n (delegate: ZoneDelegate, current: Zone, target: Zone, callback: Function, applyThis: any,\n applyArgs?: any[], source?: string): any => {\n try {\n onEnter(zone);\n return delegate.invoke(target, callback, applyThis, applyArgs, source);\n } finally {\n if (zone.shouldCoalesceRunChangeDetection) {\n delayChangeDetectionForEventsDelegate();\n }\n onLeave(zone);\n }\n },\n\n onHasTask:\n (delegate: ZoneDelegate, current: Zone, target: Zone, hasTaskState: HasTaskState) => {\n delegate.hasTask(target, hasTaskState);\n if (current === target) {\n // We are only interested in hasTask events which originate from our zone\n // (A child hasTask event is not interesting to us)\n if (hasTaskState.change == 'microTask') {\n zone._hasPendingMicrotasks = hasTaskState.microTask;\n updateMicroTaskStatus(zone);\n checkStable(zone);\n } else if (hasTaskState.change == 'macroTask') {\n zone.hasPendingMacrotasks = hasTaskState.macroTask;\n }\n }\n },\n\n onHandleError: (delegate: ZoneDelegate, current: Zone, target: Zone, error: any): boolean => {\n delegate.handleError(target, error);\n zone.runOutsideAngular(() => zone.onError.emit(error));\n return false;\n }\n });\n}\n\nfunction updateMicroTaskStatus(zone: NgZonePrivate) {\n if (zone._hasPendingMicrotasks ||\n ((zone.shouldCoalesceEventChangeDetection || zone.shouldCoalesceRunChangeDetection) &&\n zone.lastRequestAnimationFrameId !== -1)) {\n zone.hasPendingMicrotasks = true;\n } else {\n zone.hasPendingMicrotasks = false;\n }\n}\n\nfunction onEnter(zone: NgZonePrivate) {\n zone._nesting++;\n if (zone.isStable) {\n zone.isStable = false;\n zone.onUnstable.emit(null);\n }\n}\n\nfunction onLeave(zone: NgZonePrivate) {\n zone._nesting--;\n checkStable(zone);\n}\n\n/**\n * Provides a noop implementation of `NgZone` which does nothing. This zone requires explicit calls\n * to framework to perform rendering.\n */\nexport class NoopNgZone implements NgZone {\n readonly hasPendingMicrotasks: boolean = false;\n readonly hasPendingMacrotasks: boolean = false;\n readonly isStable: boolean = true;\n readonly onUnstable: EventEmitter<any> = new EventEmitter();\n readonly onMicrotaskEmpty: EventEmitter<any> = new EventEmitter();\n readonly onStable: EventEmitter<any> = new EventEmitter();\n readonly onError: EventEmitter<any> = new EventEmitter();\n\n run<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any): T {\n return fn.apply(applyThis, applyArgs);\n }\n\n runGuarded<T>(fn: (...args: any[]) => any, applyThis?: any, applyArgs?: any): T {\n return fn.apply(applyThis, applyArgs);\n }\n\n runOutsideAngular<T>(fn: (...args: any[]) => T): T {\n return fn();\n }\n\n runTask<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any, name?: string): T {\n return fn.apply(applyThis, applyArgs);\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 {Injectable} from '../di';\nimport {scheduleMicroTask} from '../util/microtask';\nimport {NgZone} from '../zone/ng_zone';\n\n/**\n * Testability API.\n * `declare` keyword causes tsickle to generate externs, so these methods are\n * not renamed by Closure Compiler.\n * @publicApi\n */\nexport declare interface PublicTestability {\n isStable(): boolean;\n whenStable(callback: Function, timeout?: number, updateCallback?: Function): void;\n findProviders(using: any, provider: string, exactMatch: boolean): any[];\n}\n\n// Angular internal, not intended for public API.\nexport interface PendingMacrotask {\n source: string;\n creationLocation: Error;\n runCount?: number;\n data?: TaskData;\n}\n\nexport interface TaskData {\n target?: XMLHttpRequest;\n delay?: number;\n isPeriodic?: boolean;\n}\n\n// Angular internal, not intended for public API.\nexport type DoneCallback = (didWork: boolean, tasks?: PendingMacrotask[]) => void;\nexport type UpdateCallback = (tasks: PendingMacrotask[]) => boolean;\n\ninterface WaitCallback {\n // Needs to be 'any' - setTimeout returns a number according to ES6, but\n // on NodeJS it returns a Timer.\n timeoutId: any;\n doneCb: DoneCallback;\n updateCb?: UpdateCallback;\n}\n\n/**\n * The Testability service provides testing hooks that can be accessed from\n * the browser. Each bootstrapped Angular application on the page will have\n * an instance of Testability.\n * @publicApi\n */\n@Injectable()\nexport class Testability implements PublicTestability {\n private _pendingCount: number = 0;\n private _isZoneStable: boolean = true;\n /**\n * Whether any work was done since the last 'whenStable' callback. This is\n * useful to detect if this could have potentially destabilized another\n * component while it is stabilizing.\n * @internal\n */\n private _didWork: boolean = false;\n private _callbacks: WaitCallback[] = [];\n\n private taskTrackingZone: {macroTasks: Task[]}|null = null;\n\n constructor(private _ngZone: NgZone) {\n this._watchAngularEvents();\n _ngZone.run(() => {\n this.taskTrackingZone =\n typeof Zone == 'undefined' ? null : Zone.current.get('TaskTrackingZone');\n });\n }\n\n private _watchAngularEvents(): void {\n this._ngZone.onUnstable.subscribe({\n next: () => {\n this._didWork = true;\n this._isZoneStable = false;\n }\n });\n\n this._ngZone.runOutsideAngular(() => {\n this._ngZone.onStable.subscribe({\n next: () => {\n NgZone.assertNotInAngularZone();\n scheduleMicroTask(() => {\n this._isZoneStable = true;\n this._runCallbacksIfReady();\n });\n }\n });\n });\n }\n\n /**\n * Increases the number of pending request\n * @deprecated pending requests are now tracked with zones.\n */\n increasePendingRequestCount(): number {\n this._pendingCount += 1;\n this._didWork = true;\n return this._pendingCount;\n }\n\n /**\n * Decreases the number of pending request\n * @deprecated pending requests are now tracked with zones\n */\n decreasePendingRequestCount(): number {\n this._pendingCount -= 1;\n if (this._pendingCount < 0) {\n throw new Error('pending async requests below zero');\n }\n this._runCallbacksIfReady();\n return this._pendingCount;\n }\n\n /**\n * Whether an associated application is stable\n */\n isStable(): boolean {\n return this._isZoneStable && this._pendingCount === 0 && !this._ngZone.hasPendingMacrotasks;\n }\n\n private _runCallbacksIfReady(): void {\n if (this.isStable()) {\n // Schedules the call backs in a new frame so that it is always async.\n scheduleMicroTask(() => {\n while (this._callbacks.length !== 0) {\n let cb = this._callbacks.pop()!;\n clearTimeout(cb.timeoutId);\n cb.doneCb(this._didWork);\n }\n this._didWork = false;\n });\n } else {\n // Still not stable, send updates.\n let pending = this.getPendingTasks();\n this._callbacks = this._callbacks.filter((cb) => {\n if (cb.updateCb && cb.updateCb(pending)) {\n clearTimeout(cb.timeoutId);\n return false;\n }\n\n return true;\n });\n\n this._didWork = true;\n }\n }\n\n private getPendingTasks(): PendingMacrotask[] {\n if (!this.taskTrackingZone) {\n return [];\n }\n\n // Copy the tasks data so that we don't leak tasks.\n return this.taskTrackingZone.macroTasks.map((t: Task) => {\n return {\n source: t.source,\n // From TaskTrackingZone:\n // https://github.com/angular/zone.js/blob/master/lib/zone-spec/task-tracking.ts#L40\n creationLocation: (t as any).creationLocation as Error,\n data: t.data\n };\n });\n }\n\n private addCallback(cb: DoneCallback, timeout?: number, updateCb?: UpdateCallback) {\n let timeoutId: any = -1;\n if (timeout && timeout > 0) {\n timeoutId = setTimeout(() => {\n this._callbacks = this._callbacks.filter((cb) => cb.timeoutId !== timeoutId);\n cb(this._didWork, this.getPendingTasks());\n }, timeout);\n }\n this._callbacks.push(<WaitCallback>{doneCb: cb, timeoutId: timeoutId, updateCb: updateCb});\n }\n\n /**\n * Wait for the application to be stable with a timeout. If the timeout is reached before that\n * happens, the callback receives a list of the macro tasks that were pending, otherwise null.\n *\n * @param doneCb The callback to invoke when Angular is stable or the timeout expires\n * whichever comes first.\n * @param timeout Optional. The maximum time to wait for Angular to become stable. If not\n * specified, whenStable() will wait forever.\n * @param updateCb Optional. If specified, this callback will be invoked whenever the set of\n * pending macrotasks changes. If this callback returns true doneCb will not be invoked\n * and no further updates will be issued.\n */\n whenStable(doneCb: Function, timeout?: number, updateCb?: Function): void {\n if (updateCb && !this.taskTrackingZone) {\n throw new Error(\n 'Task tracking zone is required when passing an update callback to ' +\n 'whenStable(). Is \"zone.js/plugins/task-tracking\" loaded?');\n }\n // These arguments are 'Function' above to keep the public API simple.\n this.addCallback(doneCb as DoneCallback, timeout, updateCb as UpdateCallback);\n this._runCallbacksIfReady();\n }\n\n /**\n * Get the number of pending requests\n * @deprecated pending requests are now tracked with zones\n */\n getPendingRequestCount(): number {\n return this._pendingCount;\n }\n\n /**\n * Find providers by name\n * @param using The root element to search from\n * @param provider The name of binding variable\n * @param exactMatch Whether using exactMatch\n */\n findProviders(using: any, provider: string, exactMatch: boolean): any[] {\n // TODO(juliemr): implement.\n return [];\n }\n}\n\n/**\n * A global registry of {@link Testability} instances for specific elements.\n * @publicApi\n */\n@Injectable()\nexport class TestabilityRegistry {\n /** @internal */\n _applications = new Map<any, Testability>();\n\n constructor() {\n _testabilityGetter.addToWindow(this);\n }\n\n /**\n * Registers an application with a testability hook so that it can be tracked\n * @param token token of application, root element\n * @param testability Testability hook\n */\n registerApplication(token: any, testability: Testability) {\n this._applications.set(token, testability);\n }\n\n /**\n * Unregisters an application.\n * @param token token of application, root element\n */\n unregisterApplication(token: any) {\n this._applications.delete(token);\n }\n\n /**\n * Unregisters all applications\n */\n unregisterAllApplications() {\n this._applications.clear();\n }\n\n /**\n * Get a testability hook associated with the application\n * @param elem root element\n */\n getTestability(elem: any): Testability|null {\n return this._applications.get(elem) || null;\n }\n\n /**\n * Get all registered testabilities\n */\n getAllTestabilities(): Testability[] {\n return Array.from(this._applications.values());\n }\n\n /**\n * Get all registered applications(root elements)\n */\n getAllRootElements(): any[] {\n return Array.from(this._applications.keys());\n }\n\n /**\n * Find testability of a node in the Tree\n * @param elem node\n * @param findInAncestors whether finding testability in ancestors if testability was not found in\n * current node\n */\n findTestabilityInTree(elem: Node, findInAncestors: boolean = true): Testability|null {\n return _testabilityGetter.findTestabilityInTree(this, elem, findInAncestors);\n }\n}\n\n/**\n * Adapter interface for retrieving the `Testability` service associated for a\n * particular context.\n *\n * @publicApi\n */\nexport interface GetTestability {\n addToWindow(registry: TestabilityRegistry): void;\n findTestabilityInTree(registry: TestabilityRegistry, elem: any, findInAncestors: boolean):\n Testability|null;\n}\n\nclass _NoopGetTestability implements GetTestability {\n addToWindow(registry: TestabilityRegistry): void {}\n findTestabilityInTree(registry: TestabilityRegistry, elem: any, findInAncestors: boolean):\n Testability|null {\n return null;\n }\n}\n\n/**\n * Set the {@link GetTestability} implementation used by the Angular testing framework.\n * @publicApi\n */\nexport function setTestabilityGetter(getter: GetTestability): void {\n _testabilityGetter = getter;\n}\n\nlet _testabilityGetter: GetTestability = new _NoopGetTestability();\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 {global} from './global';\n\n/**\n * This file is used to control if the default rendering pipeline should be `ViewEngine` or `Ivy`.\n *\n * For more information on how to run and debug tests with either Ivy or View Engine (legacy),\n * please see [BAZEL.md](./docs/BAZEL.md).\n */\n\nlet _devMode: boolean = true;\nlet _runModeLocked: boolean = false;\n\n\n/**\n * Returns whether Angular is in development mode. After called once,\n * the value is locked and won't change any more.\n *\n * By default, this is true, unless a user calls `enableProdMode` before calling this.\n *\n * @publicApi\n */\nexport function isDevMode(): boolean {\n _runModeLocked = true;\n return _devMode;\n}\n\n/**\n * Disable Angular's development mode, which turns off assertions and other\n * checks within the framework.\n *\n * One important assertion this disables verifies that a change detection pass\n * does not result in additional changes to any bindings (also known as\n * unidirectional data flow).\n *\n * @publicApi\n */\nexport function enableProdMode(): void {\n if (_runModeLocked) {\n throw new Error('Cannot enable prod mode after platform setup.');\n }\n\n // The below check is there so when ngDevMode is set via terser\n // `global['ngDevMode'] = false;` is also dropped.\n if (typeof ngDevMode === undefined || !!ngDevMode) {\n global['ngDevMode'] = false;\n }\n\n _devMode = 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 './util/ng_jit_mode';\n\nimport {merge, Observable, Observer, Subscription} from 'rxjs';\nimport {share} from 'rxjs/operators';\n\nimport {ApplicationInitStatus} from './application_init';\nimport {APP_BOOTSTRAP_LISTENER, PLATFORM_INITIALIZER} from './application_tokens';\nimport {getCompilerFacade, JitCompilerUsage} from './compiler/compiler_facade';\nimport {Console} from './console';\nimport {Injectable} from './di/injectable';\nimport {InjectionToken} from './di/injection_token';\nimport {Injector} from './di/injector';\nimport {StaticProvider} from './di/interface/provider';\nimport {INJECTOR_SCOPE} from './di/scope';\nimport {ErrorHandler} from './error_handler';\nimport {DEFAULT_LOCALE_ID} from './i18n/localization';\nimport {LOCALE_ID} from './i18n/tokens';\nimport {Type} from './interface/type';\nimport {ivyEnabled} from './ivy_switch';\nimport {COMPILER_OPTIONS, CompilerFactory, CompilerOptions} from './linker/compiler';\nimport {ComponentFactory, ComponentRef} from './linker/component_factory';\nimport {ComponentFactoryBoundToModule, ComponentFactoryResolver} from './linker/component_factory_resolver';\nimport {InternalNgModuleRef, NgModuleFactory, NgModuleRef} from './linker/ng_module_factory';\nimport {InternalViewRef, ViewRef} from './linker/view_ref';\nimport {isComponentResourceResolutionQueueEmpty, resolveComponentResources} from './metadata/resource_loading';\nimport {assertNgModuleType} from './render3/assert';\nimport {ComponentFactory as R3ComponentFactory} from './render3/component_ref';\nimport {setLocaleId} from './render3/i18n/i18n_locale_id';\nimport {setJitOptions} from './render3/jit/jit_options';\nimport {NgModuleFactory as R3NgModuleFactory} from './render3/ng_module_ref';\nimport {publishDefaultGlobalUtils as _publishDefaultGlobalUtils} from './render3/util/global_utils';\nimport {Testability, TestabilityRegistry} from './testability/testability';\nimport {isDevMode} from './util/is_dev_mode';\nimport {isPromise} from './util/lang';\nimport {scheduleMicroTask} from './util/microtask';\nimport {stringify} from './util/stringify';\nimport {NgZone, NoopNgZone} from './zone/ng_zone';\n\nlet _platform: PlatformRef;\n\nlet compileNgModuleFactory:\n <M>(injector: Injector, options: CompilerOptions, moduleType: Type<M>) =>\n Promise<NgModuleFactory<M>> = compileNgModuleFactory__PRE_R3__;\n\nfunction compileNgModuleFactory__PRE_R3__<M>(\n injector: Injector, options: CompilerOptions,\n moduleType: Type<M>): Promise<NgModuleFactory<M>> {\n const compilerFactory: CompilerFactory = injector.get(CompilerFactory);\n const compiler = compilerFactory.createCompiler([options]);\n return compiler.compileModuleAsync(moduleType);\n}\n\nexport function compileNgModuleFactory__POST_R3__<M>(\n injector: Injector, options: CompilerOptions,\n moduleType: Type<M>): Promise<NgModuleFactory<M>> {\n ngDevMode && assertNgModuleType(moduleType);\n\n const moduleFactory = new R3NgModuleFactory(moduleType);\n\n // All of the logic below is irrelevant for AOT-compiled code.\n if (typeof ngJitMode !== 'undefined' && !ngJitMode) {\n return Promise.resolve(moduleFactory);\n }\n\n const compilerOptions = injector.get(COMPILER_OPTIONS, []).concat(options);\n\n // Configure the compiler to use the provided options. This call may fail when multiple modules\n // are bootstrapped with incompatible options, as a component can only be compiled according to\n // a single set of options.\n setJitOptions({\n defaultEncapsulation: _lastDefined(compilerOptions.map(opts => opts.defaultEncapsulation)),\n preserveWhitespaces: _lastDefined(compilerOptions.map(opts => opts.preserveWhitespaces)),\n });\n\n if (isComponentResourceResolutionQueueEmpty()) {\n return Promise.resolve(moduleFactory);\n }\n\n const compilerProviders = _mergeArrays(compilerOptions.map(o => o.providers!));\n\n // In case there are no compiler providers, we just return the module factory as\n // there won't be any resource loader. This can happen with Ivy, because AOT compiled\n // modules can be still passed through \"bootstrapModule\". In that case we shouldn't\n // unnecessarily require the JIT compiler.\n if (compilerProviders.length === 0) {\n return Promise.resolve(moduleFactory);\n }\n\n const compiler = getCompilerFacade({\n usage: JitCompilerUsage.Decorator,\n kind: 'NgModule',\n type: moduleType,\n });\n const compilerInjector = Injector.create({providers: compilerProviders});\n const resourceLoader = compilerInjector.get(compiler.ResourceLoader);\n // The resource loader can also return a string while the \"resolveComponentResources\"\n // always expects a promise. Therefore we need to wrap the returned value in a promise.\n return resolveComponentResources(url => Promise.resolve(resourceLoader.get(url)))\n .then(() => moduleFactory);\n}\n\n// the `window.ng` global utilities are only available in non-VE versions of\n// Angular. The function switch below will make sure that the code is not\n// included into Angular when PRE mode is active.\nexport function publishDefaultGlobalUtils__PRE_R3__() {}\nexport function publishDefaultGlobalUtils__POST_R3__() {\n ngDevMode && _publishDefaultGlobalUtils();\n}\n\nlet publishDefaultGlobalUtils: () => any = publishDefaultGlobalUtils__PRE_R3__;\n\nlet isBoundToModule: <C>(cf: ComponentFactory<C>) => boolean = isBoundToModule__PRE_R3__;\n\nexport function isBoundToModule__PRE_R3__<C>(cf: ComponentFactory<C>): boolean {\n return cf instanceof ComponentFactoryBoundToModule;\n}\n\nexport function isBoundToModule__POST_R3__<C>(cf: ComponentFactory<C>): boolean {\n return (cf as R3ComponentFactory<C>).isBoundToModule;\n}\n\nexport const ALLOW_MULTIPLE_PLATFORMS = new InjectionToken<boolean>('AllowMultipleToken');\n\n\n\n/**\n * A token for third-party components that can register themselves with NgProbe.\n *\n * @publicApi\n */\nexport class NgProbeToken {\n constructor(public name: string, public token: any) {}\n}\n\n/**\n * Creates a platform.\n * Platforms must be created on launch using this function.\n *\n * @publicApi\n */\nexport function createPlatform(injector: Injector): PlatformRef {\n if (_platform && !_platform.destroyed &&\n !_platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {\n throw new Error(\n 'There can be only one platform. Destroy the previous one to create a new one.');\n }\n publishDefaultGlobalUtils();\n _platform = injector.get(PlatformRef);\n const inits = injector.get(PLATFORM_INITIALIZER, null);\n if (inits) inits.forEach((init: any) => init());\n return _platform;\n}\n\n/**\n * Creates a factory for a platform. Can be used to provide or override `Providers` specific to\n * your application's runtime needs, such as `PLATFORM_INITIALIZER` and `PLATFORM_ID`.\n * @param parentPlatformFactory Another platform factory to modify. Allows you to compose factories\n * to build up configurations that might be required by different libraries or parts of the\n * application.\n * @param name Identifies the new platform factory.\n * @param providers A set of dependency providers for platforms created with the new factory.\n *\n * @publicApi\n */\nexport function createPlatformFactory(\n parentPlatformFactory: ((extraProviders?: StaticProvider[]) => PlatformRef)|null, name: string,\n providers: StaticProvider[] = []): (extraProviders?: StaticProvider[]) => PlatformRef {\n const desc = `Platform: ${name}`;\n const marker = new InjectionToken(desc);\n return (extraProviders: StaticProvider[] = []) => {\n let platform = getPlatform();\n if (!platform || platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {\n if (parentPlatformFactory) {\n parentPlatformFactory(\n providers.concat(extraProviders).concat({provide: marker, useValue: true}));\n } else {\n const injectedProviders: StaticProvider[] =\n providers.concat(extraProviders).concat({provide: marker, useValue: true}, {\n provide: INJECTOR_SCOPE,\n useValue: 'platform'\n });\n createPlatform(Injector.create({providers: injectedProviders, name: desc}));\n }\n }\n return assertPlatform(marker);\n };\n}\n\n/**\n * Checks that there is currently a platform that contains the given token as a provider.\n *\n * @publicApi\n */\nexport function assertPlatform(requiredToken: any): PlatformRef {\n const platform = getPlatform();\n\n if (!platform) {\n throw new Error('No platform exists!');\n }\n\n if (!platform.injector.get(requiredToken, null)) {\n throw new Error(\n 'A platform with a different configuration has been created. Please destroy it first.');\n }\n\n return platform;\n}\n\n/**\n * Destroys the current Angular platform and all Angular applications on the page.\n * Destroys all modules and listeners registered with the platform.\n *\n * @publicApi\n */\nexport function destroyPlatform(): void {\n if (_platform && !_platform.destroyed) {\n _platform.destroy();\n }\n}\n\n/**\n * Returns the current platform.\n *\n * @publicApi\n */\nexport function getPlatform(): PlatformRef|null {\n return _platform && !_platform.destroyed ? _platform : null;\n}\n\n/**\n * Provides additional options to the bootstraping process.\n *\n *\n */\nexport interface BootstrapOptions {\n /**\n * Optionally specify which `NgZone` should be used.\n *\n * - Provide your own `NgZone` instance.\n * - `zone.js` - Use default `NgZone` which requires `Zone.js`.\n * - `noop` - Use `NoopNgZone` which does nothing.\n */\n ngZone?: NgZone|'zone.js'|'noop';\n\n /**\n * Optionally specify coalescing event change detections or not.\n * Consider the following case.\n *\n * <div (click)=\"doSomething()\">\n * <button (click)=\"doSomethingElse()\"></button>\n * </div>\n *\n * When button is clicked, because of the event bubbling, both\n * event handlers will be called and 2 change detections will be\n * triggered. We can colesce such kind of events to only trigger\n * change detection only once.\n *\n * By default, this option will be false. So the events will not be\n * coalesced and the change detection will be triggered multiple times.\n * And if this option be set to true, the change detection will be\n * triggered async by scheduling a animation frame. So in the case above,\n * the change detection will only be triggered once.\n */\n ngZoneEventCoalescing?: boolean;\n\n /**\n * Optionally specify if `NgZone#run()` method invocations should be coalesced\n * into a single change detection.\n *\n * Consider the following case.\n *\n * for (let i = 0; i < 10; i ++) {\n * ngZone.run(() => {\n * // do something\n * });\n * }\n *\n * This case triggers the change detection multiple times.\n * With ngZoneRunCoalescing options, all change detections in an event loop trigger only once.\n * In addition, the change detection executes in requestAnimation.\n *\n */\n ngZoneRunCoalescing?: boolean;\n}\n\n/**\n * The Angular platform is the entry point for Angular on a web page.\n * Each page has exactly one platform. Services (such as reflection) which are common\n * to every Angular application running on the page are bound in its scope.\n * A page's platform is initialized implicitly when a platform is created using a platform\n * factory such as `PlatformBrowser`, or explicitly by calling the `createPlatform()` function.\n *\n * @publicApi\n */\n@Injectable()\nexport class PlatformRef {\n private _modules: NgModuleRef<any>[] = [];\n private _destroyListeners: Function[] = [];\n private _destroyed: boolean = false;\n\n /** @internal */\n constructor(private _injector: Injector) {}\n\n /**\n * Creates an instance of an `@NgModule` for the given platform for offline compilation.\n *\n * @usageNotes\n *\n * The following example creates the NgModule for a browser platform.\n *\n * ```typescript\n * my_module.ts:\n *\n * @NgModule({\n * imports: [BrowserModule]\n * })\n * class MyModule {}\n *\n * main.ts:\n * import {MyModuleNgFactory} from './my_module.ngfactory';\n * import {platformBrowser} from '@angular/platform-browser';\n *\n * let moduleRef = platformBrowser().bootstrapModuleFactory(MyModuleNgFactory);\n * ```\n */\n bootstrapModuleFactory<M>(moduleFactory: NgModuleFactory<M>, options?: BootstrapOptions):\n Promise<NgModuleRef<M>> {\n // Note: We need to create the NgZone _before_ we instantiate the module,\n // as instantiating the module creates some providers eagerly.\n // So we create a mini parent injector that just contains the new NgZone and\n // pass that as parent to the NgModuleFactory.\n const ngZoneOption = options ? options.ngZone : undefined;\n const ngZoneEventCoalescing = (options && options.ngZoneEventCoalescing) || false;\n const ngZoneRunCoalescing = (options && options.ngZoneRunCoalescing) || false;\n const ngZone = getNgZone(ngZoneOption, {ngZoneEventCoalescing, ngZoneRunCoalescing});\n const providers: StaticProvider[] = [{provide: NgZone, useValue: ngZone}];\n // Note: Create ngZoneInjector within ngZone.run so that all of the instantiated services are\n // created within the Angular zone\n // Do not try to replace ngZone.run with ApplicationRef#run because ApplicationRef would then be\n // created outside of the Angular zone.\n return ngZone.run(() => {\n const ngZoneInjector = Injector.create(\n {providers: providers, parent: this.injector, name: moduleFactory.moduleType.name});\n const moduleRef = <InternalNgModuleRef<M>>moduleFactory.create(ngZoneInjector);\n const exceptionHandler: ErrorHandler|null = moduleRef.injector.get(ErrorHandler, null);\n if (!exceptionHandler) {\n throw new Error('No ErrorHandler. Is platform module (BrowserModule) included?');\n }\n ngZone!.runOutsideAngular(() => {\n const subscription = ngZone!.onError.subscribe({\n next: (error: any) => {\n exceptionHandler.handleError(error);\n }\n });\n moduleRef.onDestroy(() => {\n remove(this._modules, moduleRef);\n subscription.unsubscribe();\n });\n });\n return _callAndReportToErrorHandler(exceptionHandler, ngZone!, () => {\n const initStatus: ApplicationInitStatus = moduleRef.injector.get(ApplicationInitStatus);\n initStatus.runInitializers();\n return initStatus.donePromise.then(() => {\n if (ivyEnabled) {\n // If the `LOCALE_ID` provider is defined at bootstrap then we set the value for ivy\n const localeId = moduleRef.injector.get(LOCALE_ID, DEFAULT_LOCALE_ID);\n setLocaleId(localeId || DEFAULT_LOCALE_ID);\n }\n this._moduleDoBootstrap(moduleRef);\n return moduleRef;\n });\n });\n });\n }\n\n /**\n * Creates an instance of an `@NgModule` for a given platform using the given runtime compiler.\n *\n * @usageNotes\n * ### Simple Example\n *\n * ```typescript\n * @NgModule({\n * imports: [BrowserModule]\n * })\n * class MyModule {}\n *\n * let moduleRef = platformBrowser().bootstrapModule(MyModule);\n * ```\n *\n */\n bootstrapModule<M>(\n moduleType: Type<M>,\n compilerOptions: (CompilerOptions&BootstrapOptions)|\n Array<CompilerOptions&BootstrapOptions> = []): Promise<NgModuleRef<M>> {\n const options = optionsReducer({}, compilerOptions);\n return compileNgModuleFactory(this.injector, options, moduleType)\n .then(moduleFactory => this.bootstrapModuleFactory(moduleFactory, options));\n }\n\n private _moduleDoBootstrap(moduleRef: InternalNgModuleRef<any>): void {\n const appRef = moduleRef.injector.get(ApplicationRef) as ApplicationRef;\n if (moduleRef._bootstrapComponents.length > 0) {\n moduleRef._bootstrapComponents.forEach(f => appRef.bootstrap(f));\n } else if (moduleRef.instance.ngDoBootstrap) {\n moduleRef.instance.ngDoBootstrap(appRef);\n } else {\n throw new Error(\n `The module ${\n stringify(\n moduleRef.instance\n .constructor)} was bootstrapped, but it does not declare \"@NgModule.bootstrap\" components nor a \"ngDoBootstrap\" method. ` +\n `Please define one of these.`);\n }\n this._modules.push(moduleRef);\n }\n\n /**\n * Registers a listener to be called when the platform is destroyed.\n */\n onDestroy(callback: () => void): void {\n this._destroyListeners.push(callback);\n }\n\n /**\n * Retrieves the platform {@link Injector}, which is the parent injector for\n * every Angular application on the page and provides singleton providers.\n */\n get injector(): Injector {\n return this._injector;\n }\n\n /**\n * Destroys the current Angular platform and all Angular applications on the page.\n * Destroys all modules and listeners registered with the platform.\n */\n destroy() {\n if (this._destroyed) {\n throw new Error('The platform has already been destroyed!');\n }\n this._modules.slice().forEach(module => module.destroy());\n this._destroyListeners.forEach(listener => listener());\n this._destroyed = true;\n }\n\n get destroyed() {\n return this._destroyed;\n }\n}\n\nfunction getNgZone(\n ngZoneOption: NgZone|'zone.js'|'noop'|undefined,\n extra?: {ngZoneEventCoalescing: boolean, ngZoneRunCoalescing: boolean}): NgZone {\n let ngZone: NgZone;\n\n if (ngZoneOption === 'noop') {\n ngZone = new NoopNgZone();\n } else {\n ngZone = (ngZoneOption === 'zone.js' ? undefined : ngZoneOption) || new NgZone({\n enableLongStackTrace: isDevMode(),\n shouldCoalesceEventChangeDetection: !!extra?.ngZoneEventCoalescing,\n shouldCoalesceRunChangeDetection: !!extra?.ngZoneRunCoalescing\n });\n }\n return ngZone;\n}\n\nfunction _callAndReportToErrorHandler(\n errorHandler: ErrorHandler, ngZone: NgZone, callback: () => any): any {\n try {\n const result = callback();\n if (isPromise(result)) {\n return result.catch((e: any) => {\n ngZone.runOutsideAngular(() => errorHandler.handleError(e));\n // rethrow as the exception handler might not do it\n throw e;\n });\n }\n\n return result;\n } catch (e) {\n ngZone.runOutsideAngular(() => errorHandler.handleError(e));\n // rethrow as the exception handler might not do it\n throw e;\n }\n}\n\nfunction optionsReducer<T extends Object>(dst: any, objs: T|T[]): T {\n if (Array.isArray(objs)) {\n dst = objs.reduce(optionsReducer, dst);\n } else {\n dst = {...dst, ...(objs as any)};\n }\n return dst;\n}\n\n/**\n * A reference to an Angular application running on a page.\n *\n * @usageNotes\n *\n * {@a is-stable-examples}\n * ### isStable examples and caveats\n *\n * Note two important points about `isStable`, demonstrated in the examples below:\n * - the application will never be stable if you start any kind\n * of recurrent asynchronous task when the application starts\n * (for example for a polling process, started with a `setInterval`, a `setTimeout`\n * or using RxJS operators like `interval`);\n * - the `isStable` Observable runs outside of the Angular zone.\n *\n * Let's imagine that you start a recurrent task\n * (here incrementing a counter, using RxJS `interval`),\n * and at the same time subscribe to `isStable`.\n *\n * ```\n * constructor(appRef: ApplicationRef) {\n * appRef.isStable.pipe(\n * filter(stable => stable)\n * ).subscribe(() => console.log('App is stable now');\n * interval(1000).subscribe(counter => console.log(counter));\n * }\n * ```\n * In this example, `isStable` will never emit `true`,\n * and the trace \"App is stable now\" will never get logged.\n *\n * If you want to execute something when the app is stable,\n * you have to wait for the application to be stable\n * before starting your polling process.\n *\n * ```\n * constructor(appRef: ApplicationRef) {\n * appRef.isStable.pipe(\n * first(stable => stable),\n * tap(stable => console.log('App is stable now')),\n * switchMap(() => interval(1000))\n * ).subscribe(counter => console.log(counter));\n * }\n * ```\n * In this example, the trace \"App is stable now\" will be logged\n * and then the counter starts incrementing every second.\n *\n * Note also that this Observable runs outside of the Angular zone,\n * which means that the code in the subscription\n * to this Observable will not trigger the change detection.\n *\n * Let's imagine that instead of logging the counter value,\n * you update a field of your component\n * and display it in its template.\n *\n * ```\n * constructor(appRef: ApplicationRef) {\n * appRef.isStable.pipe(\n * first(stable => stable),\n * switchMap(() => interval(1000))\n * ).subscribe(counter => this.value = counter);\n * }\n * ```\n * As the `isStable` Observable runs outside the zone,\n * the `value` field will be updated properly,\n * but the template will not be refreshed!\n *\n * You'll have to manually trigger the change detection to update the template.\n *\n * ```\n * constructor(appRef: ApplicationRef, cd: ChangeDetectorRef) {\n * appRef.isStable.pipe(\n * first(stable => stable),\n * switchMap(() => interval(1000))\n * ).subscribe(counter => {\n * this.value = counter;\n * cd.detectChanges();\n * });\n * }\n * ```\n *\n * Or make the subscription callback run inside the zone.\n *\n * ```\n * constructor(appRef: ApplicationRef, zone: NgZone) {\n * appRef.isStable.pipe(\n * first(stable => stable),\n * switchMap(() => interval(1000))\n * ).subscribe(counter => zone.run(() => this.value = counter));\n * }\n * ```\n *\n * @publicApi\n */\n@Injectable()\nexport class ApplicationRef {\n /** @internal */\n private _bootstrapListeners: ((compRef: ComponentRef<any>) => void)[] = [];\n private _views: InternalViewRef[] = [];\n private _runningTick: boolean = false;\n private _stable = true;\n private _onMicrotaskEmptySubscription: Subscription;\n\n /**\n * Get a list of component types registered to this application.\n * This list is populated even before the component is created.\n */\n public readonly componentTypes: Type<any>[] = [];\n\n /**\n * Get a list of components registered to this application.\n */\n public readonly components: ComponentRef<any>[] = [];\n\n /**\n * Returns an Observable that indicates when the application is stable or unstable.\n *\n * @see [Usage notes](#is-stable-examples) for examples and caveats when using this API.\n */\n // TODO(issue/24571): remove '!'.\n public readonly isStable!: Observable<boolean>;\n\n /** @internal */\n constructor(\n private _zone: NgZone, private _injector: Injector, private _exceptionHandler: ErrorHandler,\n private _componentFactoryResolver: ComponentFactoryResolver,\n private _initStatus: ApplicationInitStatus) {\n this._onMicrotaskEmptySubscription = this._zone.onMicrotaskEmpty.subscribe({\n next: () => {\n this._zone.run(() => {\n this.tick();\n });\n }\n });\n\n const isCurrentlyStable = new Observable<boolean>((observer: Observer<boolean>) => {\n this._stable = this._zone.isStable && !this._zone.hasPendingMacrotasks &&\n !this._zone.hasPendingMicrotasks;\n this._zone.runOutsideAngular(() => {\n observer.next(this._stable);\n observer.complete();\n });\n });\n\n const isStable = new Observable<boolean>((observer: Observer<boolean>) => {\n // Create the subscription to onStable outside the Angular Zone so that\n // the callback is run outside the Angular Zone.\n let stableSub: Subscription;\n this._zone.runOutsideAngular(() => {\n stableSub = this._zone.onStable.subscribe(() => {\n NgZone.assertNotInAngularZone();\n\n // Check whether there are no pending macro/micro tasks in the next tick\n // to allow for NgZone to update the state.\n scheduleMicroTask(() => {\n if (!this._stable && !this._zone.hasPendingMacrotasks &&\n !this._zone.hasPendingMicrotasks) {\n this._stable = true;\n observer.next(true);\n }\n });\n });\n });\n\n const unstableSub: Subscription = this._zone.onUnstable.subscribe(() => {\n NgZone.assertInAngularZone();\n if (this._stable) {\n this._stable = false;\n this._zone.runOutsideAngular(() => {\n observer.next(false);\n });\n }\n });\n\n return () => {\n stableSub.unsubscribe();\n unstableSub.unsubscribe();\n };\n });\n\n (this as {isStable: Observable<boolean>}).isStable =\n merge(isCurrentlyStable, isStable.pipe(share()));\n }\n\n /**\n * Bootstrap a component onto the element identified by its selector or, optionally, to a\n * specified element.\n *\n * @usageNotes\n * ### Bootstrap process\n *\n * When bootstrapping a component, Angular mounts it onto a target DOM element\n * and kicks off automatic change detection. The target DOM element can be\n * provided using the `rootSelectorOrNode` argument.\n *\n * If the target DOM element is not provided, Angular tries to find one on a page\n * using the `selector` of the component that is being bootstrapped\n * (first matched element is used).\n *\n * ### Example\n *\n * Generally, we define the component to bootstrap in the `bootstrap` array of `NgModule`,\n * but it requires us to know the component while writing the application code.\n *\n * Imagine a situation where we have to wait for an API call to decide about the component to\n * bootstrap. We can use the `ngDoBootstrap` hook of the `NgModule` and call this method to\n * dynamically bootstrap a component.\n *\n * {@example core/ts/platform/platform.ts region='componentSelector'}\n *\n * Optionally, a component can be mounted onto a DOM element that does not match the\n * selector of the bootstrapped component.\n *\n * In the following example, we are providing a CSS selector to match the target element.\n *\n * {@example core/ts/platform/platform.ts region='cssSelector'}\n *\n * While in this example, we are providing reference to a DOM node.\n *\n * {@example core/ts/platform/platform.ts region='domNode'}\n */\n bootstrap<C>(componentOrFactory: ComponentFactory<C>|Type<C>, rootSelectorOrNode?: string|any):\n ComponentRef<C> {\n if (!this._initStatus.done) {\n throw new Error(\n 'Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.');\n }\n let componentFactory: ComponentFactory<C>;\n if (componentOrFactory instanceof ComponentFactory) {\n componentFactory = componentOrFactory;\n } else {\n componentFactory =\n this._componentFactoryResolver.resolveComponentFactory(componentOrFactory)!;\n }\n this.componentTypes.push(componentFactory.componentType);\n\n // Create a factory associated with the current module if it's not bound to some other\n const ngModule =\n isBoundToModule(componentFactory) ? undefined : this._injector.get(NgModuleRef);\n const selectorOrNode = rootSelectorOrNode || componentFactory.selector;\n const compRef = componentFactory.create(Injector.NULL, [], selectorOrNode, ngModule);\n const nativeElement = compRef.location.nativeElement;\n const testability = compRef.injector.get(Testability, null);\n const testabilityRegistry = testability && compRef.injector.get(TestabilityRegistry);\n if (testability && testabilityRegistry) {\n testabilityRegistry.registerApplication(nativeElement, testability);\n }\n\n compRef.onDestroy(() => {\n this.detachView(compRef.hostView);\n remove(this.components, compRef);\n if (testabilityRegistry) {\n testabilityRegistry.unregisterApplication(nativeElement);\n }\n });\n\n this._loadComponent(compRef);\n // Note that we have still left the `isDevMode()` condition in order to avoid\n // creating a breaking change for projects that still use the View Engine.\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && isDevMode()) {\n const _console = this._injector.get(Console);\n _console.log(\n `Angular is running in development mode. Call enableProdMode() to enable production mode.`);\n }\n return compRef;\n }\n\n /**\n * Invoke this method to explicitly process change detection and its side-effects.\n *\n * In development mode, `tick()` also performs a second change detection cycle to ensure that no\n * further changes are detected. If additional changes are picked up during this second cycle,\n * bindings in the app have side-effects that cannot be resolved in a single change detection\n * pass.\n * In this case, Angular throws an error, since an Angular application can only have one change\n * detection pass during which all change detection must complete.\n */\n tick(): void {\n if (this._runningTick) {\n throw new Error('ApplicationRef.tick is called recursively');\n }\n\n try {\n this._runningTick = true;\n for (let view of this._views) {\n view.detectChanges();\n }\n // Note that we have still left the `isDevMode()` condition in order to avoid\n // creating a breaking change for projects that still use the View Engine.\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && isDevMode()) {\n for (let view of this._views) {\n view.checkNoChanges();\n }\n }\n } catch (e) {\n // Attention: Don't rethrow as it could cancel subscriptions to Observables!\n this._zone.runOutsideAngular(() => this._exceptionHandler.handleError(e));\n } finally {\n this._runningTick = false;\n }\n }\n\n /**\n * Attaches a view so that it will be dirty checked.\n * The view will be automatically detached when it is destroyed.\n * This will throw if the view is already attached to a ViewContainer.\n */\n attachView(viewRef: ViewRef): void {\n const view = (viewRef as InternalViewRef);\n this._views.push(view);\n view.attachToAppRef(this);\n }\n\n /**\n * Detaches a view from dirty checking again.\n */\n detachView(viewRef: ViewRef): void {\n const view = (viewRef as InternalViewRef);\n remove(this._views, view);\n view.detachFromAppRef();\n }\n\n private _loadComponent(componentRef: ComponentRef<any>): void {\n this.attachView(componentRef.hostView);\n this.tick();\n this.components.push(componentRef);\n // Get the listeners lazily to prevent DI cycles.\n const listeners =\n this._injector.get(APP_BOOTSTRAP_LISTENER, []).concat(this._bootstrapListeners);\n listeners.forEach((listener) => listener(componentRef));\n }\n\n /** @internal */\n ngOnDestroy() {\n this._views.slice().forEach((view) => view.destroy());\n this._onMicrotaskEmptySubscription.unsubscribe();\n }\n\n /**\n * Returns the number of attached views.\n */\n get viewCount() {\n return this._views.length;\n }\n}\n\nfunction remove<T>(list: T[], el: T): void {\n const index = list.indexOf(el);\n if (index > -1) {\n list.splice(index, 1);\n }\n}\n\nfunction _lastDefined<T>(args: T[]): T|undefined {\n for (let i = args.length - 1; i >= 0; i--) {\n if (args[i] !== undefined) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _mergeArrays(parts: any[][]): any[] {\n const result: any[] = [];\n parts.forEach((part) => part && result.push(...part));\n return result;\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// Public API for Zone\nexport {NgZone, NoopNgZone as ɵNoopNgZone} from './zone/ng_zone';\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// Public API for render\nexport {Renderer2, RendererFactory2} from './render/api';\nexport {RendererStyleFlags2, RendererType2} from './render/api_flags';\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 {NgModuleType} from '../metadata/ng_module_def';\nimport {NgModuleFactory as R3NgModuleFactory} from '../render3/ng_module_ref';\n\nimport {NgModuleFactory} from './ng_module_factory';\nimport {getRegisteredNgModuleType} from './ng_module_factory_registration';\n\n\n/**\n * Used to load ng module factories.\n *\n * @publicApi\n * @deprecated the `string` form of `loadChildren` is deprecated, and `NgModuleFactoryLoader` is\n * part of its implementation. See `LoadChildren` for more details.\n */\nexport abstract class NgModuleFactoryLoader {\n abstract load(path: string): Promise<NgModuleFactory<any>>;\n}\n\nexport function getModuleFactory__PRE_R3__(id: string): NgModuleFactory<any> {\n const factory = getRegisteredNgModuleType(id) as NgModuleFactory<any>| null;\n if (!factory) throw noModuleError(id);\n return factory;\n}\n\nexport function getModuleFactory__POST_R3__(id: string): NgModuleFactory<any> {\n const type = getRegisteredNgModuleType(id) as NgModuleType | null;\n if (!type) throw noModuleError(id);\n return new R3NgModuleFactory(type);\n}\n\n/**\n * Returns the NgModuleFactory with the given id, if it exists and has been loaded.\n * Factories for modules that do not specify an `id` cannot be retrieved. Throws if the module\n * cannot be found.\n * @publicApi\n */\nexport const getModuleFactory: (id: string) => NgModuleFactory<any> = getModuleFactory__PRE_R3__;\n\nfunction noModuleError(\n id: string,\n ): Error {\n return new Error(`No module with ID ${id} loaded`);\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\nimport {Injectable, Optional} from '../di';\nimport {ivyEnabled} from '../ivy_switch';\n\nimport {Compiler} from './compiler';\nimport {NgModuleFactory} from './ng_module_factory';\nimport {NgModuleFactoryLoader} from './ng_module_factory_loader';\n\nconst _SEPARATOR = '#';\n\nconst FACTORY_CLASS_SUFFIX = 'NgFactory';\ndeclare var System: any;\n\n/**\n * Configuration for SystemJsNgModuleLoader.\n * token.\n *\n * @publicApi\n * @deprecated the `string` form of `loadChildren` is deprecated, and `SystemJsNgModuleLoaderConfig`\n * is part of its implementation. See `LoadChildren` for more details.\n */\nexport abstract class SystemJsNgModuleLoaderConfig {\n /**\n * Prefix to add when computing the name of the factory module for a given module name.\n */\n // TODO(issue/24571): remove '!'.\n factoryPathPrefix!: string;\n\n /**\n * Suffix to add when computing the name of the factory module for a given module name.\n */\n // TODO(issue/24571): remove '!'.\n factoryPathSuffix!: string;\n}\n\nconst DEFAULT_CONFIG: SystemJsNgModuleLoaderConfig = {\n factoryPathPrefix: '',\n factoryPathSuffix: '.ngfactory',\n};\n\n/**\n * NgModuleFactoryLoader that uses SystemJS to load NgModuleFactory\n * @publicApi\n * @deprecated the `string` form of `loadChildren` is deprecated, and `SystemJsNgModuleLoader` is\n * part of its implementation. See `LoadChildren` for more details.\n */\n@Injectable()\nexport class SystemJsNgModuleLoader implements NgModuleFactoryLoader {\n private _config: SystemJsNgModuleLoaderConfig;\n\n constructor(private _compiler: Compiler, @Optional() config?: SystemJsNgModuleLoaderConfig) {\n this._config = config || DEFAULT_CONFIG;\n }\n\n load(path: string): Promise<NgModuleFactory<any>> {\n const legacyOfflineMode = !ivyEnabled && this._compiler instanceof Compiler;\n return legacyOfflineMode ? this.loadFactory(path) : this.loadAndCompile(path);\n }\n\n private loadAndCompile(path: string): Promise<NgModuleFactory<any>> {\n let [module, exportName] = path.split(_SEPARATOR);\n if (exportName === undefined) {\n exportName = 'default';\n }\n\n return System.import(module)\n .then((module: any) => module[exportName])\n .then((type: any) => checkNotEmpty(type, module, exportName))\n .then((type: any) => this._compiler.compileModuleAsync(type));\n }\n\n private loadFactory(path: string): Promise<NgModuleFactory<any>> {\n let [module, exportName] = path.split(_SEPARATOR);\n let factoryClassSuffix = FACTORY_CLASS_SUFFIX;\n if (exportName === undefined) {\n exportName = 'default';\n factoryClassSuffix = '';\n }\n\n return System.import(this._config.factoryPathPrefix + module + this._config.factoryPathSuffix)\n .then((module: any) => module[exportName + factoryClassSuffix])\n .then((factory: any) => checkNotEmpty(factory, module, exportName));\n }\n}\n\nfunction checkNotEmpty(value: any, modulePath: string, exportName: string): any {\n if (!value) {\n throw new Error(`Cannot find '${exportName}' in '${modulePath}'`);\n }\n return value;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ChangeDetectorRef} from '../change_detection/change_detector_ref';\n\n/**\n * Represents an Angular [view](guide/glossary#view \"Definition\").\n *\n * @see {@link ChangeDetectorRef#usage-notes Change detection usage}\n *\n * @publicApi\n */\nexport abstract class ViewRef extends ChangeDetectorRef {\n /**\n * Destroys this view and all of the data structures associated with it.\n */\n abstract destroy(): void;\n\n /**\n * Reports whether this view has been destroyed.\n * @returns True after the `destroy()` method has been called, false otherwise.\n */\n abstract get destroyed(): boolean;\n\n /**\n * A lifecycle hook that provides additional developer-defined cleanup\n * functionality for views.\n * @param callback A handler function that cleans up developer-defined data\n * associated with a view. Called when the `destroy()` method is invoked.\n */\n abstract onDestroy(callback: Function): any /** TODO #9100 */;\n}\n\n/**\n * Represents an Angular [view](guide/glossary#view) in a view container.\n * An [embedded view](guide/glossary#view-tree) can be referenced from a component\n * other than the hosting component whose template defines it, or it can be defined\n * independently by a `TemplateRef`.\n *\n * Properties of elements in a view can change, but the structure (number and order) of elements in\n * a view cannot. Change the structure of elements by inserting, moving, or\n * removing nested views in a view container.\n *\n * @see `ViewContainerRef`\n *\n * @usageNotes\n *\n * The following template breaks down into two separate `TemplateRef` instances,\n * an outer one and an inner one.\n *\n * ```\n * Count: {{items.length}}\n * <ul>\n * <li *ngFor=\"let item of items\">{{item}}</li>\n * </ul>\n * ```\n *\n * This is the outer `TemplateRef`:\n *\n * ```\n * Count: {{items.length}}\n * <ul>\n * <ng-template ngFor let-item [ngForOf]=\"items\"></ng-template>\n * </ul>\n * ```\n *\n * This is the inner `TemplateRef`:\n *\n * ```\n * <li>{{item}}</li>\n * ```\n *\n * The outer and inner `TemplateRef` instances are assembled into views as follows:\n *\n * ```\n * <!-- ViewRef: outer-0 -->\n * Count: 2\n * <ul>\n * <ng-template view-container-ref></ng-template>\n * <!-- ViewRef: inner-1 --><li>first</li><!-- /ViewRef: inner-1 -->\n * <!-- ViewRef: inner-2 --><li>second</li><!-- /ViewRef: inner-2 -->\n * </ul>\n * <!-- /ViewRef: outer-0 -->\n * ```\n * @publicApi\n */\nexport abstract class EmbeddedViewRef<C> extends ViewRef {\n /**\n * The context for this view, inherited from the anchor element.\n */\n abstract context: C;\n\n /**\n * The root nodes for this embedded view.\n */\n abstract get rootNodes(): any[];\n}\n\nexport interface InternalViewRef extends ViewRef {\n detachFromAppRef(): void;\n attachToAppRef(appRef: ViewRefTracker): void;\n}\n\n/**\n * Interface for tracking root `ViewRef`s in `ApplicationRef`.\n *\n * NOTE: Importing `ApplicationRef` here directly creates circular dependency, which is why we have\n * a subset of the `ApplicationRef` interface `ViewRefTracker` here.\n */\nexport interface ViewRefTracker {\n detachView(viewRef: ViewRef): void;\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// Public API for compiler\nexport {Compiler, COMPILER_OPTIONS, CompilerFactory, CompilerOptions, ModuleWithComponentFactories} from './linker/compiler';\nexport {ComponentFactory, ComponentRef} from './linker/component_factory';\nexport {ComponentFactoryResolver} from './linker/component_factory_resolver';\nexport {ElementRef} from './linker/element_ref';\nexport {NgModuleFactory, NgModuleRef} from './linker/ng_module_factory';\nexport {getModuleFactory, NgModuleFactoryLoader} from './linker/ng_module_factory_loader';\nexport {QueryList} from './linker/query_list';\nexport {SystemJsNgModuleLoader, SystemJsNgModuleLoaderConfig} from './linker/system_js_ng_module_factory_loader';\nexport {TemplateRef} from './linker/template_ref';\nexport {ViewContainerRef} from './linker/view_container_ref';\nexport {EmbeddedViewRef, ViewRef} from './linker/view_ref';\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 '../di/injector';\nimport {assertTNodeForLView} from '../render3/assert';\nimport {getLContext} from '../render3/context_discovery';\nimport {CONTAINER_HEADER_OFFSET, LContainer, NATIVE} from '../render3/interfaces/container';\nimport {TElementNode, TNode, TNodeFlags, TNodeType} from '../render3/interfaces/node';\nimport {isComponentHost, isLContainer} from '../render3/interfaces/type_checks';\nimport {DECLARATION_COMPONENT_VIEW, LView, PARENT, T_HOST, TData, TVIEW} from '../render3/interfaces/view';\nimport {getComponent, getContext, getInjectionTokens, getInjector, getListeners, getLocalRefs, getOwningComponent} from '../render3/util/discovery_utils';\nimport {INTERPOLATION_DELIMITER} from '../render3/util/misc_utils';\nimport {renderStringify} from '../render3/util/stringify_utils';\nimport {getComponentLViewByIndex, getNativeByTNodeOrNull} from '../render3/util/view_utils';\nimport {assertDomNode} from '../util/assert';\nimport {DebugContext} from '../view/types';\n\n\n/**\n * @publicApi\n */\nexport class DebugEventListener {\n constructor(public name: string, public callback: Function) {}\n}\n\n/**\n * @publicApi\n */\nexport interface DebugNode {\n /**\n * The callbacks attached to the component's @Output properties and/or the element's event\n * properties.\n */\n readonly listeners: DebugEventListener[];\n\n /**\n * The `DebugElement` parent. Will be `null` if this is the root element.\n */\n readonly parent: DebugElement|null;\n\n /**\n * The underlying DOM node.\n */\n readonly nativeNode: any;\n\n /**\n * The host dependency injector. For example, the root element's component instance injector.\n */\n readonly injector: Injector;\n\n /**\n * The element's own component instance, if it has one.\n */\n readonly componentInstance: any;\n\n /**\n * An object that provides parent context for this element. Often an ancestor component instance\n * that governs this element.\n *\n * When an element is repeated within *ngFor, the context is an `NgForOf` whose `$implicit`\n * property is the value of the row instance value. For example, the `hero` in `*ngFor=\"let hero\n * of heroes\"`.\n */\n readonly context: any;\n\n /**\n * Dictionary of objects associated with template local variables (e.g. #foo), keyed by the local\n * variable name.\n */\n readonly references: {[key: string]: any};\n\n /**\n * This component's injector lookup tokens. Includes the component itself plus the tokens that the\n * component lists in its providers metadata.\n */\n readonly providerTokens: any[];\n}\nexport class DebugNode__PRE_R3__ {\n readonly listeners: DebugEventListener[] = [];\n readonly parent: DebugElement|null = null;\n readonly nativeNode: any;\n private readonly _debugContext: DebugContext;\n\n constructor(nativeNode: any, parent: DebugNode|null, _debugContext: DebugContext) {\n this._debugContext = _debugContext;\n this.nativeNode = nativeNode;\n if (parent && parent instanceof DebugElement__PRE_R3__) {\n parent.addChild(this);\n }\n }\n\n get injector(): Injector {\n return this._debugContext.injector;\n }\n\n get componentInstance(): any {\n return this._debugContext.component;\n }\n\n get context(): any {\n return this._debugContext.context;\n }\n\n get references(): {[key: string]: any} {\n return this._debugContext.references;\n }\n\n get providerTokens(): any[] {\n return this._debugContext.providerTokens;\n }\n}\n\n/**\n * @publicApi\n *\n * @see [Component testing scenarios](guide/testing-components-scenarios)\n * @see [Basics of testing components](guide/testing-components-basics)\n * @see [Testing utility APIs](guide/testing-utility-apis)\n */\nexport interface DebugElement extends DebugNode {\n /**\n * The element tag name, if it is an element.\n */\n readonly name: string;\n\n /**\n * A map of property names to property values for an element.\n *\n * This map includes:\n * - Regular property bindings (e.g. `[id]=\"id\"`)\n * - Host property bindings (e.g. `host: { '[id]': \"id\" }`)\n * - Interpolated property bindings (e.g. `id=\"{{ value }}\")\n *\n * It does not include:\n * - input property bindings (e.g. `[myCustomInput]=\"value\"`)\n * - attribute bindings (e.g. `[attr.role]=\"menu\"`)\n */\n readonly properties: {[key: string]: any};\n\n /**\n * A map of attribute names to attribute values for an element.\n */\n readonly attributes: {[key: string]: string|null};\n\n /**\n * A map containing the class names on the element as keys.\n *\n * This map is derived from the `className` property of the DOM element.\n *\n * Note: The values of this object will always be `true`. The class key will not appear in the KV\n * object if it does not exist on the element.\n *\n * @see [Element.className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className)\n */\n readonly classes: {[key: string]: boolean};\n\n /**\n * The inline styles of the DOM element.\n *\n * Will be `null` if there is no `style` property on the underlying DOM element.\n *\n * @see [ElementCSSInlineStyle](https://developer.mozilla.org/en-US/docs/Web/API/ElementCSSInlineStyle/style)\n */\n readonly styles: {[key: string]: string|null};\n\n /**\n * The `childNodes` of the DOM element as a `DebugNode` array.\n *\n * @see [Node.childNodes](https://developer.mozilla.org/en-US/docs/Web/API/Node/childNodes)\n */\n readonly childNodes: DebugNode[];\n\n /**\n * The underlying DOM element at the root of the component.\n */\n readonly nativeElement: any;\n\n /**\n * The immediate `DebugElement` children. Walk the tree by descending through `children`.\n */\n readonly children: DebugElement[];\n\n /**\n * @returns the first `DebugElement` that matches the predicate at any depth in the subtree.\n */\n query(predicate: Predicate<DebugElement>): DebugElement;\n\n /**\n * @returns All `DebugElement` matches for the predicate at any depth in the subtree.\n */\n queryAll(predicate: Predicate<DebugElement>): DebugElement[];\n\n /**\n * @returns All `DebugNode` matches for the predicate at any depth in the subtree.\n */\n queryAllNodes(predicate: Predicate<DebugNode>): DebugNode[];\n\n /**\n * Triggers the event by its name if there is a corresponding listener in the element's\n * `listeners` collection.\n *\n * If the event lacks a listener or there's some other problem, consider\n * calling `nativeElement.dispatchEvent(eventObject)`.\n *\n * @param eventName The name of the event to trigger\n * @param eventObj The _event object_ expected by the handler\n *\n * @see [Testing components scenarios](guide/testing-components-scenarios#trigger-event-handler)\n */\n triggerEventHandler(eventName: string, eventObj: any): void;\n}\nexport class DebugElement__PRE_R3__ extends DebugNode__PRE_R3__ implements DebugElement {\n readonly name!: string;\n readonly properties: {[key: string]: any} = {};\n readonly attributes: {[key: string]: string|null} = {};\n readonly classes: {[key: string]: boolean} = {};\n readonly styles: {[key: string]: string|null} = {};\n readonly childNodes: DebugNode[] = [];\n readonly nativeElement: any;\n\n constructor(nativeNode: any, parent: any, _debugContext: DebugContext) {\n super(nativeNode, parent, _debugContext);\n this.nativeElement = nativeNode;\n }\n\n addChild(child: DebugNode) {\n if (child) {\n this.childNodes.push(child);\n (child as {parent: DebugNode}).parent = this;\n }\n }\n\n removeChild(child: DebugNode) {\n const childIndex = this.childNodes.indexOf(child);\n if (childIndex !== -1) {\n (child as {parent: DebugNode | null}).parent = null;\n this.childNodes.splice(childIndex, 1);\n }\n }\n\n insertChildrenAfter(child: DebugNode, newChildren: DebugNode[]) {\n const siblingIndex = this.childNodes.indexOf(child);\n if (siblingIndex !== -1) {\n this.childNodes.splice(siblingIndex + 1, 0, ...newChildren);\n newChildren.forEach(c => {\n if (c.parent) {\n (c.parent as DebugElement__PRE_R3__).removeChild(c);\n }\n (child as {parent: DebugNode}).parent = this;\n });\n }\n }\n\n insertBefore(refChild: DebugNode, newChild: DebugNode): void {\n const refIndex = this.childNodes.indexOf(refChild);\n if (refIndex === -1) {\n this.addChild(newChild);\n } else {\n if (newChild.parent) {\n (newChild.parent as DebugElement__PRE_R3__).removeChild(newChild);\n }\n (newChild as {parent: DebugNode}).parent = this;\n this.childNodes.splice(refIndex, 0, newChild);\n }\n }\n\n query(predicate: Predicate<DebugElement>): DebugElement {\n const results = this.queryAll(predicate);\n return results[0] || null;\n }\n\n queryAll(predicate: Predicate<DebugElement>): DebugElement[] {\n const matches: DebugElement[] = [];\n _queryElementChildren(this, predicate, matches);\n return matches;\n }\n\n queryAllNodes(predicate: Predicate<DebugNode>): DebugNode[] {\n const matches: DebugNode[] = [];\n _queryNodeChildren(this, predicate, matches);\n return matches;\n }\n\n get children(): DebugElement[] {\n return this.childNodes //\n .filter((node) => node instanceof DebugElement__PRE_R3__) as DebugElement[];\n }\n\n triggerEventHandler(eventName: string, eventObj: any) {\n this.listeners.forEach((listener) => {\n if (listener.name == eventName) {\n listener.callback(eventObj);\n }\n });\n }\n}\n\n/**\n * @publicApi\n */\nexport function asNativeElements(debugEls: DebugElement[]): any {\n return debugEls.map((el) => el.nativeElement);\n}\n\nfunction _queryElementChildren(\n element: DebugElement, predicate: Predicate<DebugElement>, matches: DebugElement[]) {\n element.childNodes.forEach(node => {\n if (node instanceof DebugElement__PRE_R3__) {\n if (predicate(node)) {\n matches.push(node);\n }\n _queryElementChildren(node, predicate, matches);\n }\n });\n}\n\nfunction _queryNodeChildren(\n parentNode: DebugNode, predicate: Predicate<DebugNode>, matches: DebugNode[]) {\n if (parentNode instanceof DebugElement__PRE_R3__) {\n parentNode.childNodes.forEach(node => {\n if (predicate(node)) {\n matches.push(node);\n }\n if (node instanceof DebugElement__PRE_R3__) {\n _queryNodeChildren(node, predicate, matches);\n }\n });\n }\n}\n\nclass DebugNode__POST_R3__ implements DebugNode {\n readonly nativeNode: Node;\n\n constructor(nativeNode: Node) {\n this.nativeNode = nativeNode;\n }\n\n get parent(): DebugElement|null {\n const parent = this.nativeNode.parentNode as Element;\n return parent ? new DebugElement__POST_R3__(parent) : null;\n }\n\n get injector(): Injector {\n return getInjector(this.nativeNode);\n }\n\n get componentInstance(): any {\n const nativeElement = this.nativeNode;\n return nativeElement &&\n (getComponent(nativeElement as Element) || getOwningComponent(nativeElement));\n }\n get context(): any {\n return getComponent(this.nativeNode as Element) || getContext(this.nativeNode as Element);\n }\n\n get listeners(): DebugEventListener[] {\n return getListeners(this.nativeNode as Element).filter(listener => listener.type === 'dom');\n }\n\n get references(): {[key: string]: any;} {\n return getLocalRefs(this.nativeNode);\n }\n\n get providerTokens(): any[] {\n return getInjectionTokens(this.nativeNode as Element);\n }\n}\n\nclass DebugElement__POST_R3__ extends DebugNode__POST_R3__ implements DebugElement {\n constructor(nativeNode: Element) {\n ngDevMode && assertDomNode(nativeNode);\n super(nativeNode);\n }\n\n get nativeElement(): Element|null {\n return this.nativeNode.nodeType == Node.ELEMENT_NODE ? this.nativeNode as Element : null;\n }\n\n get name(): string {\n const context = getLContext(this.nativeNode);\n if (context !== null) {\n const lView = context.lView;\n const tData = lView[TVIEW].data;\n const tNode = tData[context.nodeIndex] as TNode;\n return tNode.value!;\n } else {\n return this.nativeNode.nodeName;\n }\n }\n\n /**\n * Gets a map of property names to property values for an element.\n *\n * This map includes:\n * - Regular property bindings (e.g. `[id]=\"id\"`)\n * - Host property bindings (e.g. `host: { '[id]': \"id\" }`)\n * - Interpolated property bindings (e.g. `id=\"{{ value }}\")\n *\n * It does not include:\n * - input property bindings (e.g. `[myCustomInput]=\"value\"`)\n * - attribute bindings (e.g. `[attr.role]=\"menu\"`)\n */\n get properties(): {[key: string]: any;} {\n const context = getLContext(this.nativeNode);\n if (context === null) {\n return {};\n }\n\n const lView = context.lView;\n const tData = lView[TVIEW].data;\n const tNode = tData[context.nodeIndex] as TNode;\n\n const properties: {[key: string]: string} = {};\n // Collect properties from the DOM.\n copyDomProperties(this.nativeElement, properties);\n // Collect properties from the bindings. This is needed for animation renderer which has\n // synthetic properties which don't get reflected into the DOM.\n collectPropertyBindings(properties, tNode, lView, tData);\n return properties;\n }\n\n get attributes(): {[key: string]: string|null;} {\n const attributes: {[key: string]: string|null;} = {};\n const element = this.nativeElement;\n\n if (!element) {\n return attributes;\n }\n\n const context = getLContext(element);\n if (context === null) {\n return {};\n }\n\n const lView = context.lView;\n const tNodeAttrs = (lView[TVIEW].data[context.nodeIndex] as TNode).attrs;\n const lowercaseTNodeAttrs: string[] = [];\n\n // For debug nodes we take the element's attribute directly from the DOM since it allows us\n // to account for ones that weren't set via bindings (e.g. ViewEngine keeps track of the ones\n // that are set through `Renderer2`). The problem is that the browser will lowercase all names,\n // however since we have the attributes already on the TNode, we can preserve the case by going\n // through them once, adding them to the `attributes` map and putting their lower-cased name\n // into an array. Afterwards when we're going through the native DOM attributes, we can check\n // whether we haven't run into an attribute already through the TNode.\n if (tNodeAttrs) {\n let i = 0;\n while (i < tNodeAttrs.length) {\n const attrName = tNodeAttrs[i];\n\n // Stop as soon as we hit a marker. We only care about the regular attributes. Everything\n // else will be handled below when we read the final attributes off the DOM.\n if (typeof attrName !== 'string') break;\n\n const attrValue = tNodeAttrs[i + 1];\n attributes[attrName] = attrValue as string;\n lowercaseTNodeAttrs.push(attrName.toLowerCase());\n\n i += 2;\n }\n }\n\n const eAttrs = element.attributes;\n for (let i = 0; i < eAttrs.length; i++) {\n const attr = eAttrs[i];\n const lowercaseName = attr.name.toLowerCase();\n\n // Make sure that we don't assign the same attribute both in its\n // case-sensitive form and the lower-cased one from the browser.\n if (lowercaseTNodeAttrs.indexOf(lowercaseName) === -1) {\n // Save the lowercase name to align the behavior between browsers.\n // IE preserves the case, while all other browser convert it to lower case.\n attributes[lowercaseName] = attr.value;\n }\n }\n\n return attributes;\n }\n\n get styles(): {[key: string]: string|null} {\n if (this.nativeElement && (this.nativeElement as HTMLElement).style) {\n return (this.nativeElement as HTMLElement).style as {[key: string]: any};\n }\n return {};\n }\n\n get classes(): {[key: string]: boolean;} {\n const result: {[key: string]: boolean;} = {};\n const element = this.nativeElement as HTMLElement | SVGElement;\n\n // SVG elements return an `SVGAnimatedString` instead of a plain string for the `className`.\n const className = element.className as string | SVGAnimatedString;\n const classes = className && typeof className !== 'string' ? className.baseVal.split(' ') :\n className.split(' ');\n\n classes.forEach((value: string) => result[value] = true);\n\n return result;\n }\n\n get childNodes(): DebugNode[] {\n const childNodes = this.nativeNode.childNodes;\n const children: DebugNode[] = [];\n for (let i = 0; i < childNodes.length; i++) {\n const element = childNodes[i];\n children.push(getDebugNode__POST_R3__(element));\n }\n return children;\n }\n\n get children(): DebugElement[] {\n const nativeElement = this.nativeElement;\n if (!nativeElement) return [];\n const childNodes = nativeElement.children;\n const children: DebugElement[] = [];\n for (let i = 0; i < childNodes.length; i++) {\n const element = childNodes[i];\n children.push(getDebugNode__POST_R3__(element));\n }\n return children;\n }\n\n query(predicate: Predicate<DebugElement>): DebugElement {\n const results = this.queryAll(predicate);\n return results[0] || null;\n }\n\n queryAll(predicate: Predicate<DebugElement>): DebugElement[] {\n const matches: DebugElement[] = [];\n _queryAllR3(this, predicate, matches, true);\n return matches;\n }\n\n queryAllNodes(predicate: Predicate<DebugNode>): DebugNode[] {\n const matches: DebugNode[] = [];\n _queryAllR3(this, predicate, matches, false);\n return matches;\n }\n\n triggerEventHandler(eventName: string, eventObj: any): void {\n const node = this.nativeNode as any;\n const invokedListeners: Function[] = [];\n\n this.listeners.forEach(listener => {\n if (listener.name === eventName) {\n const callback = listener.callback;\n callback.call(node, eventObj);\n invokedListeners.push(callback);\n }\n });\n\n // We need to check whether `eventListeners` exists, because it's something\n // that Zone.js only adds to `EventTarget` in browser environments.\n if (typeof node.eventListeners === 'function') {\n // Note that in Ivy we wrap event listeners with a call to `event.preventDefault` in some\n // cases. We use '__ngUnwrap__' as a special token that gives us access to the actual event\n // listener.\n node.eventListeners(eventName).forEach((listener: Function) => {\n // In order to ensure that we can detect the special __ngUnwrap__ token described above, we\n // use `toString` on the listener and see if it contains the token. We use this approach to\n // ensure that it still worked with compiled code since it cannot remove or rename string\n // literals. We also considered using a special function name (i.e. if(listener.name ===\n // special)) but that was more cumbersome and we were also concerned the compiled code could\n // strip the name, turning the condition in to (\"\" === \"\") and always returning true.\n if (listener.toString().indexOf('__ngUnwrap__') !== -1) {\n const unwrappedListener = listener('__ngUnwrap__');\n return invokedListeners.indexOf(unwrappedListener) === -1 &&\n unwrappedListener.call(node, eventObj);\n }\n });\n }\n }\n}\n\nfunction copyDomProperties(element: Element|null, properties: {[name: string]: string}): void {\n if (element) {\n // Skip own properties (as those are patched)\n let obj = Object.getPrototypeOf(element);\n const NodePrototype: any = Node.prototype;\n while (obj !== null && obj !== NodePrototype) {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n for (let key in descriptors) {\n if (!key.startsWith('__') && !key.startsWith('on')) {\n // don't include properties starting with `__` and `on`.\n // `__` are patched values which should not be included.\n // `on` are listeners which also should not be included.\n const value = (element as any)[key];\n if (isPrimitiveValue(value)) {\n properties[key] = value;\n }\n }\n }\n obj = Object.getPrototypeOf(obj);\n }\n }\n}\n\nfunction isPrimitiveValue(value: any): boolean {\n return typeof value === 'string' || typeof value === 'boolean' || typeof value === 'number' ||\n value === null;\n}\n\n/**\n * Walk the TNode tree to find matches for the predicate.\n *\n * @param parentElement the element from which the walk is started\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n */\nfunction _queryAllR3(\n parentElement: DebugElement, predicate: Predicate<DebugElement>, matches: DebugElement[],\n elementsOnly: true): void;\nfunction _queryAllR3(\n parentElement: DebugElement, predicate: Predicate<DebugNode>, matches: DebugNode[],\n elementsOnly: false): void;\nfunction _queryAllR3(\n parentElement: DebugElement, predicate: Predicate<DebugElement>|Predicate<DebugNode>,\n matches: DebugElement[]|DebugNode[], elementsOnly: boolean) {\n const context = getLContext(parentElement.nativeNode);\n if (context !== null) {\n const parentTNode = context.lView[TVIEW].data[context.nodeIndex] as TNode;\n _queryNodeChildrenR3(\n parentTNode, context.lView, predicate, matches, elementsOnly, parentElement.nativeNode);\n } else {\n // If the context is null, then `parentElement` was either created with Renderer2 or native DOM\n // APIs.\n _queryNativeNodeDescendants(parentElement.nativeNode, predicate, matches, elementsOnly);\n }\n}\n\n/**\n * Recursively match the current TNode against the predicate, and goes on with the next ones.\n *\n * @param tNode the current TNode\n * @param lView the LView of this TNode\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n * @param rootNativeNode the root native node on which predicate should not be matched\n */\nfunction _queryNodeChildrenR3(\n tNode: TNode, lView: LView, predicate: Predicate<DebugElement>|Predicate<DebugNode>,\n matches: DebugElement[]|DebugNode[], elementsOnly: boolean, rootNativeNode: any) {\n ngDevMode && assertTNodeForLView(tNode, lView);\n const nativeNode = getNativeByTNodeOrNull(tNode, lView);\n // For each type of TNode, specific logic is executed.\n if (tNode.type & (TNodeType.AnyRNode | TNodeType.ElementContainer)) {\n // Case 1: the TNode is an element\n // The native node has to be checked.\n _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode);\n if (isComponentHost(tNode)) {\n // If the element is the host of a component, then all nodes in its view have to be processed.\n // Note: the component's content (tNode.child) will be processed from the insertion points.\n const componentView = getComponentLViewByIndex(tNode.index, lView);\n if (componentView && componentView[TVIEW].firstChild) {\n _queryNodeChildrenR3(\n componentView[TVIEW].firstChild!, componentView, predicate, matches, elementsOnly,\n rootNativeNode);\n }\n } else {\n if (tNode.child) {\n // Otherwise, its children have to be processed.\n _queryNodeChildrenR3(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);\n }\n\n // We also have to query the DOM directly in order to catch elements inserted through\n // Renderer2. Note that this is __not__ optimal, because we're walking similar trees multiple\n // times. ViewEngine could do it more efficiently, because all the insertions go through\n // Renderer2, however that's not the case in Ivy. This approach is being used because:\n // 1. Matching the ViewEngine behavior would mean potentially introducing a depedency\n // from `Renderer2` to Ivy which could bring Ivy code into ViewEngine.\n // 2. We would have to make `Renderer3` \"know\" about debug nodes.\n // 3. It allows us to capture nodes that were inserted directly via the DOM.\n nativeNode && _queryNativeNodeDescendants(nativeNode, predicate, matches, elementsOnly);\n }\n // In all cases, if a dynamic container exists for this node, each view inside it has to be\n // processed.\n const nodeOrContainer = lView[tNode.index];\n if (isLContainer(nodeOrContainer)) {\n _queryNodeChildrenInContainerR3(\n nodeOrContainer, predicate, matches, elementsOnly, rootNativeNode);\n }\n } else if (tNode.type & TNodeType.Container) {\n // Case 2: the TNode is a container\n // The native node has to be checked.\n const lContainer = lView[tNode.index];\n _addQueryMatchR3(lContainer[NATIVE], predicate, matches, elementsOnly, rootNativeNode);\n // Each view inside the container has to be processed.\n _queryNodeChildrenInContainerR3(lContainer, predicate, matches, elementsOnly, rootNativeNode);\n } else if (tNode.type & TNodeType.Projection) {\n // Case 3: the TNode is a projection insertion point (i.e. a <ng-content>).\n // The nodes projected at this location all need to be processed.\n const componentView = lView![DECLARATION_COMPONENT_VIEW];\n const componentHost = componentView[T_HOST] as TElementNode;\n const head: TNode|null =\n (componentHost.projection as (TNode | null)[])[tNode.projection as number];\n\n if (Array.isArray(head)) {\n for (let nativeNode of head) {\n _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode);\n }\n } else if (head) {\n const nextLView = componentView[PARENT]! as LView;\n const nextTNode = nextLView[TVIEW].data[head.index] as TNode;\n _queryNodeChildrenR3(nextTNode, nextLView, predicate, matches, elementsOnly, rootNativeNode);\n }\n } else if (tNode.child) {\n // Case 4: the TNode is a view.\n _queryNodeChildrenR3(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);\n }\n\n // We don't want to go to the next sibling of the root node.\n if (rootNativeNode !== nativeNode) {\n // To determine the next node to be processed, we need to use the next or the projectionNext\n // link, depending on whether the current node has been projected.\n const nextTNode = (tNode.flags & TNodeFlags.isProjected) ? tNode.projectionNext : tNode.next;\n if (nextTNode) {\n _queryNodeChildrenR3(nextTNode, lView, predicate, matches, elementsOnly, rootNativeNode);\n }\n }\n}\n\n/**\n * Process all TNodes in a given container.\n *\n * @param lContainer the container to be processed\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n * @param rootNativeNode the root native node on which predicate should not be matched\n */\nfunction _queryNodeChildrenInContainerR3(\n lContainer: LContainer, predicate: Predicate<DebugElement>|Predicate<DebugNode>,\n matches: DebugElement[]|DebugNode[], elementsOnly: boolean, rootNativeNode: any) {\n for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n const childView = lContainer[i] as LView;\n const firstChild = childView[TVIEW].firstChild;\n if (firstChild) {\n _queryNodeChildrenR3(firstChild, childView, predicate, matches, elementsOnly, rootNativeNode);\n }\n }\n}\n\n/**\n * Match the current native node against the predicate.\n *\n * @param nativeNode the current native node\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n * @param rootNativeNode the root native node on which predicate should not be matched\n */\nfunction _addQueryMatchR3(\n nativeNode: any, predicate: Predicate<DebugElement>|Predicate<DebugNode>,\n matches: DebugElement[]|DebugNode[], elementsOnly: boolean, rootNativeNode: any) {\n if (rootNativeNode !== nativeNode) {\n const debugNode = getDebugNode(nativeNode);\n if (!debugNode) {\n return;\n }\n // Type of the \"predicate and \"matches\" array are set based on the value of\n // the \"elementsOnly\" parameter. TypeScript is not able to properly infer these\n // types with generics, so we manually cast the parameters accordingly.\n if (elementsOnly && debugNode instanceof DebugElement__POST_R3__ && predicate(debugNode) &&\n matches.indexOf(debugNode) === -1) {\n matches.push(debugNode);\n } else if (\n !elementsOnly && (predicate as Predicate<DebugNode>)(debugNode) &&\n (matches as DebugNode[]).indexOf(debugNode) === -1) {\n (matches as DebugNode[]).push(debugNode);\n }\n }\n}\n\n/**\n * Match all the descendants of a DOM node against a predicate.\n *\n * @param nativeNode the current native node\n * @param predicate the predicate to match\n * @param matches the list where matches are stored\n * @param elementsOnly whether only elements should be searched\n */\nfunction _queryNativeNodeDescendants(\n parentNode: any, predicate: Predicate<DebugElement>|Predicate<DebugNode>,\n matches: DebugElement[]|DebugNode[], elementsOnly: boolean) {\n const nodes = parentNode.childNodes;\n const length = nodes.length;\n\n for (let i = 0; i < length; i++) {\n const node = nodes[i];\n const debugNode = getDebugNode(node);\n\n if (debugNode) {\n if (elementsOnly && debugNode instanceof DebugElement__POST_R3__ && predicate(debugNode) &&\n matches.indexOf(debugNode) === -1) {\n matches.push(debugNode);\n } else if (\n !elementsOnly && (predicate as Predicate<DebugNode>)(debugNode) &&\n (matches as DebugNode[]).indexOf(debugNode) === -1) {\n (matches as DebugNode[]).push(debugNode);\n }\n\n _queryNativeNodeDescendants(node, predicate, matches, elementsOnly);\n }\n }\n}\n\n/**\n * Iterates through the property bindings for a given node and generates\n * a map of property names to values. This map only contains property bindings\n * defined in templates, not in host bindings.\n */\nfunction collectPropertyBindings(\n properties: {[key: string]: string}, tNode: TNode, lView: LView, tData: TData): void {\n let bindingIndexes = tNode.propertyBindings;\n\n if (bindingIndexes !== null) {\n for (let i = 0; i < bindingIndexes.length; i++) {\n const bindingIndex = bindingIndexes[i];\n const propMetadata = tData[bindingIndex] as string;\n const metadataParts = propMetadata.split(INTERPOLATION_DELIMITER);\n const propertyName = metadataParts[0];\n if (metadataParts.length > 1) {\n let value = metadataParts[1];\n for (let j = 1; j < metadataParts.length - 1; j++) {\n value += renderStringify(lView[bindingIndex + j - 1]) + metadataParts[j + 1];\n }\n properties[propertyName] = value;\n } else {\n properties[propertyName] = lView[bindingIndex];\n }\n }\n }\n}\n\n\n// Need to keep the nodes in a global Map so that multiple angular apps are supported.\nconst _nativeNodeToDebugNode = new Map<any, DebugNode>();\n\nfunction getDebugNode__PRE_R3__(nativeNode: any): DebugNode|null {\n return _nativeNodeToDebugNode.get(nativeNode) || null;\n}\n\nconst NG_DEBUG_PROPERTY = '__ng_debug__';\n\nexport function getDebugNode__POST_R3__(nativeNode: Element): DebugElement__POST_R3__;\nexport function getDebugNode__POST_R3__(nativeNode: Node): DebugNode__POST_R3__;\nexport function getDebugNode__POST_R3__(nativeNode: null): null;\nexport function getDebugNode__POST_R3__(nativeNode: any): DebugNode|null {\n if (nativeNode instanceof Node) {\n if (!(nativeNode.hasOwnProperty(NG_DEBUG_PROPERTY))) {\n (nativeNode as any)[NG_DEBUG_PROPERTY] = nativeNode.nodeType == Node.ELEMENT_NODE ?\n new DebugElement__POST_R3__(nativeNode as Element) :\n new DebugNode__POST_R3__(nativeNode);\n }\n return (nativeNode as any)[NG_DEBUG_PROPERTY];\n }\n return null;\n}\n\n/**\n * @publicApi\n */\nexport const getDebugNode: (nativeNode: any) => DebugNode | null = getDebugNode__PRE_R3__;\n\n\nexport function getDebugNodeR2__PRE_R3__(nativeNode: any): DebugNode|null {\n return getDebugNode__PRE_R3__(nativeNode);\n}\n\nexport function getDebugNodeR2__POST_R3__(_nativeNode: any): DebugNode|null {\n return null;\n}\n\nexport const getDebugNodeR2: (nativeNode: any) => DebugNode | null = getDebugNodeR2__PRE_R3__;\n\n\nexport function getAllDebugNodes(): DebugNode[] {\n return Array.from(_nativeNodeToDebugNode.values());\n}\n\nexport function indexDebugNode(node: DebugNode) {\n _nativeNodeToDebugNode.set(node.nativeNode, node);\n}\n\nexport function removeDebugNodeFromIndex(node: DebugNode) {\n _nativeNodeToDebugNode.delete(node.nativeNode);\n}\n\n/**\n * A boolean-valued function over a value, possibly including context information\n * regarding that value's position in an array.\n *\n * @publicApi\n */\nexport interface Predicate<T> {\n (value: T): boolean;\n}\n\n/**\n * @publicApi\n */\nexport const DebugNode: {new (...args: any[]): DebugNode} = DebugNode__PRE_R3__;\n\n/**\n * @publicApi\n */\nexport const DebugElement: {new (...args: any[]): DebugElement} = DebugElement__PRE_R3__;\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 * Change detection enables data binding in Angular.\n */\n\nexport {ChangeDetectionStrategy, ChangeDetectorRef, DefaultIterableDiffer, IterableChangeRecord, IterableChanges, IterableDiffer, IterableDifferFactory, IterableDiffers, KeyValueChangeRecord, KeyValueChanges, KeyValueDiffer, KeyValueDifferFactory, KeyValueDiffers, NgIterable, PipeTransform, SimpleChange, SimpleChanges, TrackByFunction, WrappedValue} from './change_detection/change_detection';\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 {createPlatformFactory, PlatformRef} from './application_ref';\nimport {PLATFORM_ID} from './application_tokens';\nimport {Console} from './console';\nimport {Injector, StaticProvider} from './di';\nimport {TestabilityRegistry} from './testability/testability';\n\nconst _CORE_PLATFORM_PROVIDERS: StaticProvider[] = [\n // Set a default platform name for platforms that don't set it explicitly.\n {provide: PLATFORM_ID, useValue: 'unknown'},\n {provide: PlatformRef, deps: [Injector]},\n {provide: TestabilityRegistry, deps: []},\n {provide: Console, deps: []},\n];\n\n/**\n * This platform has to be included in any other platform\n *\n * @publicApi\n */\nexport const platformCore = createPlatformFactory(null, 'core', _CORE_PLATFORM_PROVIDERS);\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {APP_INITIALIZER, ApplicationInitStatus} from './application_init';\nimport {ApplicationRef} from './application_ref';\nimport {APP_ID_RANDOM_PROVIDER} from './application_tokens';\nimport {defaultIterableDiffers, defaultKeyValueDiffers, IterableDiffers, KeyValueDiffers} from './change_detection/change_detection';\nimport {Injector, StaticProvider} from './di';\nimport {Inject, Optional, SkipSelf} from './di/metadata';\nimport {ErrorHandler} from './error_handler';\nimport {DEFAULT_LOCALE_ID, USD_CURRENCY_CODE} from './i18n/localization';\nimport {DEFAULT_CURRENCY_CODE, LOCALE_ID} from './i18n/tokens';\nimport {ivyEnabled} from './ivy_switch';\nimport {ComponentFactoryResolver} from './linker';\nimport {Compiler} from './linker/compiler';\nimport {NgModule} from './metadata';\nimport {SCHEDULER} from './render3/component_ref';\nimport {setLocaleId} from './render3/i18n/i18n_locale_id';\nimport {NgZone} from './zone';\n\ndeclare const $localize: {locale?: string};\n\nexport function _iterableDiffersFactory() {\n return defaultIterableDiffers;\n}\n\nexport function _keyValueDiffersFactory() {\n return defaultKeyValueDiffers;\n}\n\nexport function _localeFactory(locale?: string): string {\n locale = locale || getGlobalLocale();\n if (ivyEnabled) {\n setLocaleId(locale);\n }\n return locale;\n}\n\n/**\n * Work out the locale from the potential global properties.\n *\n * * Closure Compiler: use `goog.getLocale()`.\n * * Ivy enabled: use `$localize.locale`\n */\nexport function getGlobalLocale(): string {\n if (typeof ngI18nClosureMode !== 'undefined' && ngI18nClosureMode &&\n typeof goog !== 'undefined' && goog.getLocale() !== 'en') {\n // * The default `goog.getLocale()` value is `en`, while Angular used `en-US`.\n // * In order to preserve backwards compatibility, we use Angular default value over\n // Closure Compiler's one.\n return goog.getLocale();\n } else {\n // KEEP `typeof $localize !== 'undefined' && $localize.locale` IN SYNC WITH THE LOCALIZE\n // COMPILE-TIME INLINER.\n //\n // * During compile time inlining of translations the expression will be replaced\n // with a string literal that is the current locale. Other forms of this expression are not\n // guaranteed to be replaced.\n //\n // * During runtime translation evaluation, the developer is required to set `$localize.locale`\n // if required, or just to provide their own `LOCALE_ID` provider.\n return (ivyEnabled && typeof $localize !== 'undefined' && $localize.locale) ||\n DEFAULT_LOCALE_ID;\n }\n}\n\n/**\n * A built-in [dependency injection token](guide/glossary#di-token)\n * that is used to configure the root injector for bootstrapping.\n */\nexport const APPLICATION_MODULE_PROVIDERS: StaticProvider[] = [\n {\n provide: ApplicationRef,\n useClass: ApplicationRef,\n deps: [NgZone, Injector, ErrorHandler, ComponentFactoryResolver, ApplicationInitStatus]\n },\n {provide: SCHEDULER, deps: [NgZone], useFactory: zoneSchedulerFactory},\n {\n provide: ApplicationInitStatus,\n useClass: ApplicationInitStatus,\n deps: [[new Optional(), APP_INITIALIZER]]\n },\n {provide: Compiler, useClass: Compiler, deps: []},\n APP_ID_RANDOM_PROVIDER,\n {provide: IterableDiffers, useFactory: _iterableDiffersFactory, deps: []},\n {provide: KeyValueDiffers, useFactory: _keyValueDiffersFactory, deps: []},\n {\n provide: LOCALE_ID,\n useFactory: _localeFactory,\n deps: [[new Inject(LOCALE_ID), new Optional(), new SkipSelf()]]\n },\n {provide: DEFAULT_CURRENCY_CODE, useValue: USD_CURRENCY_CODE},\n];\n\n/**\n * Schedule work at next available slot.\n *\n * In Ivy this is just `requestAnimationFrame`. For compatibility reasons when bootstrapped\n * using `platformRef.bootstrap` we need to use `NgZone.onStable` as the scheduling mechanism.\n * This overrides the scheduling mechanism in Ivy to `NgZone.onStable`.\n *\n * @param ngZone NgZone to use for scheduling.\n */\nexport function zoneSchedulerFactory(ngZone: NgZone): (fn: () => void) => void {\n let queue: (() => void)[] = [];\n ngZone.onStable.subscribe(() => {\n while (queue.length) {\n queue.pop()!();\n }\n });\n return function(fn: () => void) {\n queue.push(fn);\n };\n}\n\n/**\n * Configures the root injector for an app with\n * providers of `@angular/core` dependencies that `ApplicationRef` needs\n * to bootstrap components.\n *\n * Re-exported by `BrowserModule`, which is included automatically in the root\n * `AppModule` when you create a new app with the CLI `new` command.\n *\n * @publicApi\n */\n@NgModule({providers: APPLICATION_MODULE_PROVIDERS})\nexport class ApplicationModule {\n // Inject ApplicationRef to make it eager...\n constructor(appRef: ApplicationRef) {}\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 {ViewEncapsulation} from '../metadata/view';\nimport {RendererType2} from '../render/api_flags';\nimport {SecurityContext} from '../sanitization/security';\n\nimport {asElementData, BindingDef, BindingFlags, ElementData, ElementHandleEventFn, NodeDef, NodeFlags, OutputDef, OutputType, QueryValueType, ViewData, ViewDefinitionFactory} from './types';\nimport {calcBindingFlags, checkAndUpdateBinding, dispatchEvent, elementEventFullName, getParentRenderElement, NOOP, resolveDefinition, resolveRendererType2, splitMatchedQueriesDsl, splitNamespace} from './util';\n\nexport function anchorDef(\n flags: NodeFlags, matchedQueriesDsl: null|[string | number, QueryValueType][],\n ngContentIndex: null|number, childCount: number, handleEvent?: null|ElementHandleEventFn,\n templateFactory?: ViewDefinitionFactory): NodeDef {\n flags |= NodeFlags.TypeElement;\n const {matchedQueries, references, matchedQueryIds} = splitMatchedQueriesDsl(matchedQueriesDsl);\n const template = templateFactory ? resolveDefinition(templateFactory) : null;\n\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n flags,\n checkIndex: -1,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n matchedQueries,\n matchedQueryIds,\n references,\n ngContentIndex,\n childCount,\n bindings: [],\n bindingFlags: 0,\n outputs: [],\n element: {\n ns: null,\n name: null,\n attrs: null,\n template,\n componentProvider: null,\n componentView: null,\n componentRendererType: null,\n publicProviders: null,\n allProviders: null,\n handleEvent: handleEvent || NOOP\n },\n provider: null,\n text: null,\n query: null,\n ngContent: null\n };\n}\n\nexport function elementDef(\n checkIndex: number, flags: NodeFlags,\n matchedQueriesDsl: null|[string | number, QueryValueType][], ngContentIndex: null|number,\n childCount: number, namespaceAndName: string|null, fixedAttrs: null|[string, string][] = [],\n bindings?: null|[BindingFlags, string, string | SecurityContext | null][],\n outputs?: null|([string, string])[], handleEvent?: null|ElementHandleEventFn,\n componentView?: null|ViewDefinitionFactory,\n componentRendererType?: RendererType2|null): NodeDef {\n if (!handleEvent) {\n handleEvent = NOOP;\n }\n const {matchedQueries, references, matchedQueryIds} = splitMatchedQueriesDsl(matchedQueriesDsl);\n let ns: string = null!;\n let name: string = null!;\n if (namespaceAndName) {\n [ns, name] = splitNamespace(namespaceAndName);\n }\n bindings = bindings || [];\n const bindingDefs: BindingDef[] = [];\n for (let i = 0; i < bindings.length; i++) {\n const [bindingFlags, namespaceAndName, suffixOrSecurityContext] = bindings[i];\n\n const [ns, name] = splitNamespace(namespaceAndName);\n let securityContext: SecurityContext = undefined!;\n let suffix: string = undefined!;\n switch (bindingFlags & BindingFlags.Types) {\n case BindingFlags.TypeElementStyle:\n suffix = <string>suffixOrSecurityContext;\n break;\n case BindingFlags.TypeElementAttribute:\n case BindingFlags.TypeProperty:\n securityContext = <SecurityContext>suffixOrSecurityContext;\n break;\n }\n bindingDefs[i] =\n {flags: bindingFlags, ns, name, nonMinifiedName: name, securityContext, suffix};\n }\n outputs = outputs || [];\n const outputDefs: OutputDef[] = [];\n for (let i = 0; i < outputs.length; i++) {\n const [target, eventName] = outputs[i];\n outputDefs[i] =\n {type: OutputType.ElementOutput, target: <any>target, eventName, propName: null};\n }\n fixedAttrs = fixedAttrs || [];\n const attrs = <[string, string, string][]>fixedAttrs.map(([namespaceAndName, value]) => {\n const [ns, name] = splitNamespace(namespaceAndName);\n return [ns, name, value];\n });\n componentRendererType = resolveRendererType2(componentRendererType);\n if (componentView) {\n flags |= NodeFlags.ComponentView;\n }\n flags |= NodeFlags.TypeElement;\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n checkIndex,\n flags,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n matchedQueries,\n matchedQueryIds,\n references,\n ngContentIndex,\n childCount,\n bindings: bindingDefs,\n bindingFlags: calcBindingFlags(bindingDefs),\n outputs: outputDefs,\n element: {\n ns,\n name,\n attrs,\n template: null,\n // will bet set by the view definition\n componentProvider: null,\n componentView: componentView || null,\n componentRendererType: componentRendererType,\n publicProviders: null,\n allProviders: null,\n handleEvent: handleEvent || NOOP,\n },\n provider: null,\n text: null,\n query: null,\n ngContent: null\n };\n}\n\nexport function createElement(view: ViewData, renderHost: any, def: NodeDef): ElementData {\n const elDef = def.element!;\n const rootSelectorOrNode = view.root.selectorOrNode;\n const renderer = view.renderer;\n let el: any;\n if (view.parent || !rootSelectorOrNode) {\n if (elDef.name) {\n el = renderer.createElement(elDef.name, elDef.ns);\n } else {\n el = renderer.createComment('');\n }\n const parentEl = getParentRenderElement(view, renderHost, def);\n if (parentEl) {\n renderer.appendChild(parentEl, el);\n }\n } else {\n // when using native Shadow DOM, do not clear the root element contents to allow slot projection\n const preserveContent =\n (!!elDef.componentRendererType &&\n elDef.componentRendererType.encapsulation === ViewEncapsulation.ShadowDom);\n el = renderer.selectRootElement(rootSelectorOrNode, preserveContent);\n }\n if (elDef.attrs) {\n for (let i = 0; i < elDef.attrs.length; i++) {\n const [ns, name, value] = elDef.attrs[i];\n renderer.setAttribute(el, name, value, ns);\n }\n }\n return el;\n}\n\nexport function listenToElementOutputs(view: ViewData, compView: ViewData, def: NodeDef, el: any) {\n for (let i = 0; i < def.outputs.length; i++) {\n const output = def.outputs[i];\n const handleEventClosure = renderEventHandlerClosure(\n view, def.nodeIndex, elementEventFullName(output.target, output.eventName));\n let listenTarget: 'window'|'document'|'body'|'component'|null = output.target;\n let listenerView = view;\n if (output.target === 'component') {\n listenTarget = null;\n listenerView = compView;\n }\n const disposable =\n <any>listenerView.renderer.listen(listenTarget || el, output.eventName, handleEventClosure);\n view.disposables![def.outputIndex + i] = disposable;\n }\n}\n\nfunction renderEventHandlerClosure(view: ViewData, index: number, eventName: string) {\n return (event: any) => dispatchEvent(view, index, eventName, event);\n}\n\n\nexport function checkAndUpdateElementInline(\n view: ViewData, def: NodeDef, v0: any, v1: any, v2: any, v3: any, v4: any, v5: any, v6: any,\n v7: any, v8: any, v9: any): boolean {\n const bindLen = def.bindings.length;\n let changed = false;\n if (bindLen > 0 && checkAndUpdateElementValue(view, def, 0, v0)) changed = true;\n if (bindLen > 1 && checkAndUpdateElementValue(view, def, 1, v1)) changed = true;\n if (bindLen > 2 && checkAndUpdateElementValue(view, def, 2, v2)) changed = true;\n if (bindLen > 3 && checkAndUpdateElementValue(view, def, 3, v3)) changed = true;\n if (bindLen > 4 && checkAndUpdateElementValue(view, def, 4, v4)) changed = true;\n if (bindLen > 5 && checkAndUpdateElementValue(view, def, 5, v5)) changed = true;\n if (bindLen > 6 && checkAndUpdateElementValue(view, def, 6, v6)) changed = true;\n if (bindLen > 7 && checkAndUpdateElementValue(view, def, 7, v7)) changed = true;\n if (bindLen > 8 && checkAndUpdateElementValue(view, def, 8, v8)) changed = true;\n if (bindLen > 9 && checkAndUpdateElementValue(view, def, 9, v9)) changed = true;\n return changed;\n}\n\nexport function checkAndUpdateElementDynamic(view: ViewData, def: NodeDef, values: any[]): boolean {\n let changed = false;\n for (let i = 0; i < values.length; i++) {\n if (checkAndUpdateElementValue(view, def, i, values[i])) changed = true;\n }\n return changed;\n}\n\nfunction checkAndUpdateElementValue(view: ViewData, def: NodeDef, bindingIdx: number, value: any) {\n if (!checkAndUpdateBinding(view, def, bindingIdx, value)) {\n return false;\n }\n const binding = def.bindings[bindingIdx];\n const elData = asElementData(view, def.nodeIndex);\n const renderNode = elData.renderElement;\n const name = binding.name!;\n switch (binding.flags & BindingFlags.Types) {\n case BindingFlags.TypeElementAttribute:\n setElementAttribute(view, binding, renderNode, binding.ns, name, value);\n break;\n case BindingFlags.TypeElementClass:\n setElementClass(view, renderNode, name, value);\n break;\n case BindingFlags.TypeElementStyle:\n setElementStyle(view, binding, renderNode, name, value);\n break;\n case BindingFlags.TypeProperty:\n const bindView = (def.flags & NodeFlags.ComponentView &&\n binding.flags & BindingFlags.SyntheticHostProperty) ?\n elData.componentView :\n view;\n setElementProperty(bindView, binding, renderNode, name, value);\n break;\n }\n return true;\n}\n\nfunction setElementAttribute(\n view: ViewData, binding: BindingDef, renderNode: any, ns: string|null, name: string,\n value: any) {\n const securityContext = binding.securityContext;\n let renderValue = securityContext ? view.root.sanitizer.sanitize(securityContext, value) : value;\n renderValue = renderValue != null ? renderValue.toString() : null;\n const renderer = view.renderer;\n if (value != null) {\n renderer.setAttribute(renderNode, name, renderValue, ns);\n } else {\n renderer.removeAttribute(renderNode, name, ns);\n }\n}\n\nfunction setElementClass(view: ViewData, renderNode: any, name: string, value: boolean) {\n const renderer = view.renderer;\n if (value) {\n renderer.addClass(renderNode, name);\n } else {\n renderer.removeClass(renderNode, name);\n }\n}\n\nfunction setElementStyle(\n view: ViewData, binding: BindingDef, renderNode: any, name: string, value: any) {\n let renderValue: string|null =\n view.root.sanitizer.sanitize(SecurityContext.STYLE, value as {} | string);\n if (renderValue != null) {\n renderValue = renderValue.toString();\n const unit = binding.suffix;\n if (unit != null) {\n renderValue = renderValue + unit;\n }\n } else {\n renderValue = null;\n }\n const renderer = view.renderer;\n if (renderValue != null) {\n renderer.setStyle(renderNode, name, renderValue);\n } else {\n renderer.removeStyle(renderNode, name);\n }\n}\n\nfunction setElementProperty(\n view: ViewData, binding: BindingDef, renderNode: any, name: string, value: any) {\n const securityContext = binding.securityContext;\n let renderValue = securityContext ? view.root.sanitizer.sanitize(securityContext, value) : value;\n view.renderer.setProperty(renderNode, name, renderValue);\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, unwrapElementRef} from '../linker/element_ref';\nimport {QueryList} from '../linker/query_list';\n\nimport {asElementData, asProviderData, asQueryList, NodeDef, NodeFlags, QueryBindingDef, QueryBindingType, QueryDef, QueryValueType, ViewData} from './types';\nimport {declaredViewContainer, filterQueryId, isEmbeddedView} from './util';\n\nexport function queryDef(\n flags: NodeFlags, id: number, bindings: {[propName: string]: QueryBindingType}): NodeDef {\n let bindingDefs: QueryBindingDef[] = [];\n for (let propName in bindings) {\n const bindingType = bindings[propName];\n bindingDefs.push({propName, bindingType});\n }\n\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n // TODO(vicb): check\n checkIndex: -1,\n flags,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n ngContentIndex: -1,\n matchedQueries: {},\n matchedQueryIds: 0,\n references: {},\n childCount: 0,\n bindings: [],\n bindingFlags: 0,\n outputs: [],\n element: null,\n provider: null,\n text: null,\n query: {id, filterId: filterQueryId(id), bindings: bindingDefs},\n ngContent: null\n };\n}\n\nexport function createQuery(emitDistinctChangesOnly: boolean): QueryList<any> {\n return new QueryList(emitDistinctChangesOnly);\n}\n\nexport function dirtyParentQueries(view: ViewData) {\n const queryIds = view.def.nodeMatchedQueries;\n while (view.parent && isEmbeddedView(view)) {\n let tplDef = view.parentNodeDef!;\n view = view.parent;\n // content queries\n const end = tplDef.nodeIndex + tplDef.childCount;\n for (let i = 0; i <= end; i++) {\n const nodeDef = view.def.nodes[i];\n if ((nodeDef.flags & NodeFlags.TypeContentQuery) &&\n (nodeDef.flags & NodeFlags.DynamicQuery) &&\n (nodeDef.query!.filterId & queryIds) === nodeDef.query!.filterId) {\n asQueryList(view, i).setDirty();\n }\n if ((nodeDef.flags & NodeFlags.TypeElement && i + nodeDef.childCount < tplDef.nodeIndex) ||\n !(nodeDef.childFlags & NodeFlags.TypeContentQuery) ||\n !(nodeDef.childFlags & NodeFlags.DynamicQuery)) {\n // skip elements that don't contain the template element or no query.\n i += nodeDef.childCount;\n }\n }\n }\n\n // view queries\n if (view.def.nodeFlags & NodeFlags.TypeViewQuery) {\n for (let i = 0; i < view.def.nodes.length; i++) {\n const nodeDef = view.def.nodes[i];\n if ((nodeDef.flags & NodeFlags.TypeViewQuery) && (nodeDef.flags & NodeFlags.DynamicQuery)) {\n asQueryList(view, i).setDirty();\n }\n // only visit the root nodes\n i += nodeDef.childCount;\n }\n }\n}\n\nexport function checkAndUpdateQuery(view: ViewData, nodeDef: NodeDef) {\n const queryList = asQueryList(view, nodeDef.nodeIndex);\n if (!queryList.dirty) {\n return;\n }\n let directiveInstance: any;\n let newValues: any[] = undefined!;\n if (nodeDef.flags & NodeFlags.TypeContentQuery) {\n const elementDef = nodeDef.parent!.parent!;\n newValues = calcQueryValues(\n view, elementDef.nodeIndex, elementDef.nodeIndex + elementDef.childCount, nodeDef.query!,\n []);\n directiveInstance = asProviderData(view, nodeDef.parent!.nodeIndex).instance;\n } else if (nodeDef.flags & NodeFlags.TypeViewQuery) {\n newValues = calcQueryValues(view, 0, view.def.nodes.length - 1, nodeDef.query!, []);\n directiveInstance = view.component;\n }\n queryList.reset(newValues, unwrapElementRef);\n const bindings = nodeDef.query!.bindings;\n let notify = false;\n for (let i = 0; i < bindings.length; i++) {\n const binding = bindings[i];\n let boundValue: any;\n switch (binding.bindingType) {\n case QueryBindingType.First:\n boundValue = queryList.first;\n break;\n case QueryBindingType.All:\n boundValue = queryList;\n notify = true;\n break;\n }\n directiveInstance[binding.propName] = boundValue;\n }\n if (notify) {\n queryList.notifyOnChanges();\n }\n}\n\nfunction calcQueryValues(\n view: ViewData, startIndex: number, endIndex: number, queryDef: QueryDef,\n values: any[]): any[] {\n for (let i = startIndex; i <= endIndex; i++) {\n const nodeDef = view.def.nodes[i];\n const valueType = nodeDef.matchedQueries[queryDef.id];\n if (valueType != null) {\n values.push(getQueryValue(view, nodeDef, valueType));\n }\n if (nodeDef.flags & NodeFlags.TypeElement && nodeDef.element!.template &&\n (nodeDef.element!.template !.nodeMatchedQueries & queryDef.filterId) ===\n queryDef.filterId) {\n const elementData = asElementData(view, i);\n // check embedded views that were attached at the place of their template,\n // but process child nodes first if some match the query (see issue #16568)\n if ((nodeDef.childMatchedQueries & queryDef.filterId) === queryDef.filterId) {\n calcQueryValues(view, i + 1, i + nodeDef.childCount, queryDef, values);\n i += nodeDef.childCount;\n }\n if (nodeDef.flags & NodeFlags.EmbeddedViews) {\n const embeddedViews = elementData.viewContainer!._embeddedViews;\n for (let k = 0; k < embeddedViews.length; k++) {\n const embeddedView = embeddedViews[k];\n const dvc = declaredViewContainer(embeddedView);\n if (dvc && dvc === elementData) {\n calcQueryValues(embeddedView, 0, embeddedView.def.nodes.length - 1, queryDef, values);\n }\n }\n }\n const projectedViews = elementData.template._projectedViews;\n if (projectedViews) {\n for (let k = 0; k < projectedViews.length; k++) {\n const projectedView = projectedViews[k];\n calcQueryValues(projectedView, 0, projectedView.def.nodes.length - 1, queryDef, values);\n }\n }\n }\n if ((nodeDef.childMatchedQueries & queryDef.filterId) !== queryDef.filterId) {\n // if no child matches the query, skip the children.\n i += nodeDef.childCount;\n }\n }\n return values;\n}\n\nexport function getQueryValue(\n view: ViewData, nodeDef: NodeDef, queryValueType: QueryValueType): any {\n if (queryValueType != null) {\n // a match\n switch (queryValueType) {\n case QueryValueType.RenderElement:\n return asElementData(view, nodeDef.nodeIndex).renderElement;\n case QueryValueType.ElementRef:\n return new ElementRef(asElementData(view, nodeDef.nodeIndex).renderElement);\n case QueryValueType.TemplateRef:\n return asElementData(view, nodeDef.nodeIndex).template;\n case QueryValueType.ViewContainerRef:\n return asElementData(view, nodeDef.nodeIndex).viewContainer;\n case QueryValueType.Provider:\n return asProviderData(view, nodeDef.nodeIndex).instance;\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 {NodeDef, NodeFlags, ViewData} from './types';\nimport {getParentRenderElement, RenderNodeAction, visitProjectedRenderNodes} from './util';\n\nexport function ngContentDef(ngContentIndex: null|number, index: number): NodeDef {\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n checkIndex: -1,\n flags: NodeFlags.TypeNgContent,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n matchedQueries: {},\n matchedQueryIds: 0,\n references: {},\n ngContentIndex,\n childCount: 0,\n bindings: [],\n bindingFlags: 0,\n outputs: [],\n element: null,\n provider: null,\n text: null,\n query: null,\n ngContent: {index}\n };\n}\n\nexport function appendNgContent(view: ViewData, renderHost: any, def: NodeDef) {\n const parentEl = getParentRenderElement(view, renderHost, def);\n if (!parentEl) {\n // Nothing to do if there is no parent element.\n return;\n }\n const ngContentIndex = def.ngContent!.index;\n visitProjectedRenderNodes(\n view, ngContentIndex, RenderNodeAction.AppendChild, parentEl, null, undefined);\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 {newArray} from '../util/array_utils';\n\nimport {asPureExpressionData, BindingDef, BindingFlags, NodeDef, NodeFlags, PureExpressionData, ViewData} from './types';\nimport {calcBindingFlags, checkAndUpdateBinding} from './util';\n\nexport function purePipeDef(checkIndex: number, argCount: number): NodeDef {\n // argCount + 1 to include the pipe as first arg\n return _pureExpressionDef(NodeFlags.TypePurePipe, checkIndex, newArray(argCount + 1));\n}\n\nexport function pureArrayDef(checkIndex: number, argCount: number): NodeDef {\n return _pureExpressionDef(NodeFlags.TypePureArray, checkIndex, newArray(argCount));\n}\n\nexport function pureObjectDef(checkIndex: number, propToIndex: {[p: string]: number}): NodeDef {\n const keys = Object.keys(propToIndex);\n const nbKeys = keys.length;\n const propertyNames = [];\n for (let i = 0; i < nbKeys; i++) {\n const key = keys[i];\n const index = propToIndex[key];\n propertyNames.push(key);\n }\n\n return _pureExpressionDef(NodeFlags.TypePureObject, checkIndex, propertyNames);\n}\n\nfunction _pureExpressionDef(\n flags: NodeFlags, checkIndex: number, propertyNames: string[]): NodeDef {\n const bindings: BindingDef[] = [];\n for (let i = 0; i < propertyNames.length; i++) {\n const prop = propertyNames[i];\n bindings.push({\n flags: BindingFlags.TypeProperty,\n name: prop,\n ns: null,\n nonMinifiedName: prop,\n securityContext: null,\n suffix: null\n });\n }\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n checkIndex,\n flags,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n matchedQueries: {},\n matchedQueryIds: 0,\n references: {},\n ngContentIndex: -1,\n childCount: 0,\n bindings,\n bindingFlags: calcBindingFlags(bindings),\n outputs: [],\n element: null,\n provider: null,\n text: null,\n query: null,\n ngContent: null\n };\n}\n\nexport function createPureExpression(view: ViewData, def: NodeDef): PureExpressionData {\n return {value: undefined};\n}\n\nexport function checkAndUpdatePureExpressionInline(\n view: ViewData, def: NodeDef, v0: any, v1: any, v2: any, v3: any, v4: any, v5: any, v6: any,\n v7: any, v8: any, v9: any): boolean {\n const bindings = def.bindings;\n let changed = false;\n const bindLen = bindings.length;\n if (bindLen > 0 && checkAndUpdateBinding(view, def, 0, v0)) changed = true;\n if (bindLen > 1 && checkAndUpdateBinding(view, def, 1, v1)) changed = true;\n if (bindLen > 2 && checkAndUpdateBinding(view, def, 2, v2)) changed = true;\n if (bindLen > 3 && checkAndUpdateBinding(view, def, 3, v3)) changed = true;\n if (bindLen > 4 && checkAndUpdateBinding(view, def, 4, v4)) changed = true;\n if (bindLen > 5 && checkAndUpdateBinding(view, def, 5, v5)) changed = true;\n if (bindLen > 6 && checkAndUpdateBinding(view, def, 6, v6)) changed = true;\n if (bindLen > 7 && checkAndUpdateBinding(view, def, 7, v7)) changed = true;\n if (bindLen > 8 && checkAndUpdateBinding(view, def, 8, v8)) changed = true;\n if (bindLen > 9 && checkAndUpdateBinding(view, def, 9, v9)) changed = true;\n\n if (changed) {\n const data = asPureExpressionData(view, def.nodeIndex);\n let value: any;\n switch (def.flags & NodeFlags.Types) {\n case NodeFlags.TypePureArray:\n value = [];\n if (bindLen > 0) value.push(v0);\n if (bindLen > 1) value.push(v1);\n if (bindLen > 2) value.push(v2);\n if (bindLen > 3) value.push(v3);\n if (bindLen > 4) value.push(v4);\n if (bindLen > 5) value.push(v5);\n if (bindLen > 6) value.push(v6);\n if (bindLen > 7) value.push(v7);\n if (bindLen > 8) value.push(v8);\n if (bindLen > 9) value.push(v9);\n break;\n case NodeFlags.TypePureObject:\n value = {};\n if (bindLen > 0) value[bindings[0].name!] = v0;\n if (bindLen > 1) value[bindings[1].name!] = v1;\n if (bindLen > 2) value[bindings[2].name!] = v2;\n if (bindLen > 3) value[bindings[3].name!] = v3;\n if (bindLen > 4) value[bindings[4].name!] = v4;\n if (bindLen > 5) value[bindings[5].name!] = v5;\n if (bindLen > 6) value[bindings[6].name!] = v6;\n if (bindLen > 7) value[bindings[7].name!] = v7;\n if (bindLen > 8) value[bindings[8].name!] = v8;\n if (bindLen > 9) value[bindings[9].name!] = v9;\n break;\n case NodeFlags.TypePurePipe:\n const pipe = v0;\n switch (bindLen) {\n case 1:\n value = pipe.transform(v0);\n break;\n case 2:\n value = pipe.transform(v1);\n break;\n case 3:\n value = pipe.transform(v1, v2);\n break;\n case 4:\n value = pipe.transform(v1, v2, v3);\n break;\n case 5:\n value = pipe.transform(v1, v2, v3, v4);\n break;\n case 6:\n value = pipe.transform(v1, v2, v3, v4, v5);\n break;\n case 7:\n value = pipe.transform(v1, v2, v3, v4, v5, v6);\n break;\n case 8:\n value = pipe.transform(v1, v2, v3, v4, v5, v6, v7);\n break;\n case 9:\n value = pipe.transform(v1, v2, v3, v4, v5, v6, v7, v8);\n break;\n case 10:\n value = pipe.transform(v1, v2, v3, v4, v5, v6, v7, v8, v9);\n break;\n }\n break;\n }\n data.value = value;\n }\n return changed;\n}\n\nexport function checkAndUpdatePureExpressionDynamic(\n view: ViewData, def: NodeDef, values: any[]): boolean {\n const bindings = def.bindings;\n let changed = false;\n for (let i = 0; i < values.length; i++) {\n // Note: We need to loop over all values, so that\n // the old values are updates as well!\n if (checkAndUpdateBinding(view, def, i, values[i])) {\n changed = true;\n }\n }\n if (changed) {\n const data = asPureExpressionData(view, def.nodeIndex);\n let value: any;\n switch (def.flags & NodeFlags.Types) {\n case NodeFlags.TypePureArray:\n value = values;\n break;\n case NodeFlags.TypePureObject:\n value = {};\n for (let i = 0; i < values.length; i++) {\n value[bindings[i].name!] = values[i];\n }\n break;\n case NodeFlags.TypePurePipe:\n const pipe = values[0];\n const params = values.slice(1);\n value = (<any>pipe.transform)(...params);\n break;\n }\n data.value = value;\n }\n return changed;\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 {asTextData, BindingDef, BindingFlags, NodeDef, NodeFlags, TextData, ViewData} from './types';\nimport {checkAndUpdateBinding, getParentRenderElement} from './util';\n\nexport function textDef(\n checkIndex: number, ngContentIndex: number|null, staticText: string[]): NodeDef {\n const bindings: BindingDef[] = [];\n for (let i = 1; i < staticText.length; i++) {\n bindings[i - 1] = {\n flags: BindingFlags.TypeProperty,\n name: null,\n ns: null,\n nonMinifiedName: null,\n securityContext: null,\n suffix: staticText[i],\n };\n }\n\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n checkIndex,\n flags: NodeFlags.TypeText,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n matchedQueries: {},\n matchedQueryIds: 0,\n references: {},\n ngContentIndex,\n childCount: 0,\n bindings,\n bindingFlags: BindingFlags.TypeProperty,\n outputs: [],\n element: null,\n provider: null,\n text: {prefix: staticText[0]},\n query: null,\n ngContent: null,\n };\n}\n\nexport function createText(view: ViewData, renderHost: any, def: NodeDef): TextData {\n let renderNode: any;\n const renderer = view.renderer;\n renderNode = renderer.createText(def.text!.prefix);\n const parentEl = getParentRenderElement(view, renderHost, def);\n if (parentEl) {\n renderer.appendChild(parentEl, renderNode);\n }\n return {renderText: renderNode};\n}\n\nexport function checkAndUpdateTextInline(\n view: ViewData, def: NodeDef, v0: any, v1: any, v2: any, v3: any, v4: any, v5: any, v6: any,\n v7: any, v8: any, v9: any): boolean {\n let changed = false;\n const bindings = def.bindings;\n const bindLen = bindings.length;\n if (bindLen > 0 && checkAndUpdateBinding(view, def, 0, v0)) changed = true;\n if (bindLen > 1 && checkAndUpdateBinding(view, def, 1, v1)) changed = true;\n if (bindLen > 2 && checkAndUpdateBinding(view, def, 2, v2)) changed = true;\n if (bindLen > 3 && checkAndUpdateBinding(view, def, 3, v3)) changed = true;\n if (bindLen > 4 && checkAndUpdateBinding(view, def, 4, v4)) changed = true;\n if (bindLen > 5 && checkAndUpdateBinding(view, def, 5, v5)) changed = true;\n if (bindLen > 6 && checkAndUpdateBinding(view, def, 6, v6)) changed = true;\n if (bindLen > 7 && checkAndUpdateBinding(view, def, 7, v7)) changed = true;\n if (bindLen > 8 && checkAndUpdateBinding(view, def, 8, v8)) changed = true;\n if (bindLen > 9 && checkAndUpdateBinding(view, def, 9, v9)) changed = true;\n\n if (changed) {\n let value = def.text!.prefix;\n if (bindLen > 0) value += _addInterpolationPart(v0, bindings[0]);\n if (bindLen > 1) value += _addInterpolationPart(v1, bindings[1]);\n if (bindLen > 2) value += _addInterpolationPart(v2, bindings[2]);\n if (bindLen > 3) value += _addInterpolationPart(v3, bindings[3]);\n if (bindLen > 4) value += _addInterpolationPart(v4, bindings[4]);\n if (bindLen > 5) value += _addInterpolationPart(v5, bindings[5]);\n if (bindLen > 6) value += _addInterpolationPart(v6, bindings[6]);\n if (bindLen > 7) value += _addInterpolationPart(v7, bindings[7]);\n if (bindLen > 8) value += _addInterpolationPart(v8, bindings[8]);\n if (bindLen > 9) value += _addInterpolationPart(v9, bindings[9]);\n const renderNode = asTextData(view, def.nodeIndex).renderText;\n view.renderer.setValue(renderNode, value);\n }\n return changed;\n}\n\nexport function checkAndUpdateTextDynamic(view: ViewData, def: NodeDef, values: any[]): boolean {\n const bindings = def.bindings;\n let changed = false;\n for (let i = 0; i < values.length; i++) {\n // Note: We need to loop over all values, so that\n // the old values are updates as well!\n if (checkAndUpdateBinding(view, def, i, values[i])) {\n changed = true;\n }\n }\n if (changed) {\n let value = '';\n for (let i = 0; i < values.length; i++) {\n value = value + _addInterpolationPart(values[i], bindings[i]);\n }\n value = def.text!.prefix + value;\n const renderNode = asTextData(view, def.nodeIndex).renderText;\n view.renderer.setValue(renderNode, value);\n }\n return changed;\n}\n\nfunction _addInterpolationPart(value: any, binding: BindingDef): string {\n const valueStr = value != null ? value.toString() : '';\n return valueStr + binding.suffix;\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 {Renderer2} from '../render/api';\n\nimport {checkAndUpdateElementDynamic, checkAndUpdateElementInline, createElement, listenToElementOutputs} from './element';\nimport {expressionChangedAfterItHasBeenCheckedError} from './errors';\nimport {appendNgContent} from './ng_content';\nimport {callLifecycleHooksChildrenFirst, checkAndUpdateDirectiveDynamic, checkAndUpdateDirectiveInline, createDirectiveInstance, createPipeInstance, createProviderInstance} from './provider';\nimport {checkAndUpdatePureExpressionDynamic, checkAndUpdatePureExpressionInline, createPureExpression} from './pure_expression';\nimport {checkAndUpdateQuery, createQuery} from './query';\nimport {createTemplateData, createViewContainerData} from './refs';\nimport {checkAndUpdateTextDynamic, checkAndUpdateTextInline, createText} from './text';\nimport {ArgumentType, asElementData, asQueryList, asTextData, CheckType, ElementData, NodeData, NodeDef, NodeFlags, ProviderData, RootData, Services, shiftInitState, ViewData, ViewDefinition, ViewFlags, ViewHandleEventFn, ViewState, ViewUpdateFn} from './types';\nimport {checkBindingNoChanges, isComponentView, markParentViewsForCheckProjectedViews, NOOP, resolveDefinition, tokenKey} from './util';\nimport {detachProjectedView} from './view_attach';\n\nexport function viewDef(\n flags: ViewFlags, nodes: NodeDef[], updateDirectives?: null|ViewUpdateFn,\n updateRenderer?: null|ViewUpdateFn): ViewDefinition {\n // clone nodes and set auto calculated values\n let viewBindingCount = 0;\n let viewDisposableCount = 0;\n let viewNodeFlags = 0;\n let viewRootNodeFlags = 0;\n let viewMatchedQueries = 0;\n let currentParent: NodeDef|null = null;\n let currentRenderParent: NodeDef|null = null;\n let currentElementHasPublicProviders = false;\n let currentElementHasPrivateProviders = false;\n let lastRenderRootNode: NodeDef|null = null;\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n node.nodeIndex = i;\n node.parent = currentParent;\n node.bindingIndex = viewBindingCount;\n node.outputIndex = viewDisposableCount;\n node.renderParent = currentRenderParent;\n\n viewNodeFlags |= node.flags;\n viewMatchedQueries |= node.matchedQueryIds;\n\n if (node.element) {\n const elDef = node.element;\n elDef.publicProviders =\n currentParent ? currentParent.element!.publicProviders : Object.create(null);\n elDef.allProviders = elDef.publicProviders;\n // Note: We assume that all providers of an element are before any child element!\n currentElementHasPublicProviders = false;\n currentElementHasPrivateProviders = false;\n\n if (node.element.template) {\n viewMatchedQueries |= node.element.template.nodeMatchedQueries;\n }\n }\n validateNode(currentParent, node, nodes.length);\n\n\n viewBindingCount += node.bindings.length;\n viewDisposableCount += node.outputs.length;\n\n if (!currentRenderParent && (node.flags & NodeFlags.CatRenderNode)) {\n lastRenderRootNode = node;\n }\n\n if (node.flags & NodeFlags.CatProvider) {\n if (!currentElementHasPublicProviders) {\n currentElementHasPublicProviders = true;\n // Use prototypical inheritance to not get O(n^2) complexity...\n currentParent!.element!.publicProviders =\n Object.create(currentParent!.element!.publicProviders);\n currentParent!.element!.allProviders = currentParent!.element!.publicProviders;\n }\n const isPrivateService = (node.flags & NodeFlags.PrivateProvider) !== 0;\n const isComponent = (node.flags & NodeFlags.Component) !== 0;\n if (!isPrivateService || isComponent) {\n currentParent!.element!.publicProviders![tokenKey(node.provider!.token)] = node;\n } else {\n if (!currentElementHasPrivateProviders) {\n currentElementHasPrivateProviders = true;\n // Use prototypical inheritance to not get O(n^2) complexity...\n currentParent!.element!.allProviders =\n Object.create(currentParent!.element!.publicProviders);\n }\n currentParent!.element!.allProviders![tokenKey(node.provider!.token)] = node;\n }\n if (isComponent) {\n currentParent!.element!.componentProvider = node;\n }\n }\n\n if (currentParent) {\n currentParent.childFlags |= node.flags;\n currentParent.directChildFlags |= node.flags;\n currentParent.childMatchedQueries |= node.matchedQueryIds;\n if (node.element && node.element.template) {\n currentParent.childMatchedQueries |= node.element.template.nodeMatchedQueries;\n }\n } else {\n viewRootNodeFlags |= node.flags;\n }\n\n if (node.childCount > 0) {\n currentParent = node;\n\n if (!isNgContainer(node)) {\n currentRenderParent = node;\n }\n } else {\n // When the current node has no children, check if it is the last children of its parent.\n // When it is, propagate the flags up.\n // The loop is required because an element could be the last transitive children of several\n // elements. We loop to either the root or the highest opened element (= with remaining\n // children)\n while (currentParent && i === currentParent.nodeIndex + currentParent.childCount) {\n const newParent: NodeDef|null = currentParent.parent;\n if (newParent) {\n newParent.childFlags |= currentParent.childFlags;\n newParent.childMatchedQueries |= currentParent.childMatchedQueries;\n }\n currentParent = newParent;\n // We also need to update the render parent & account for ng-container\n if (currentParent && isNgContainer(currentParent)) {\n currentRenderParent = currentParent.renderParent;\n } else {\n currentRenderParent = currentParent;\n }\n }\n }\n }\n\n const handleEvent: ViewHandleEventFn = (view, nodeIndex, eventName, event) =>\n nodes[nodeIndex].element!.handleEvent!(view, eventName, event);\n\n return {\n // Will be filled later...\n factory: null,\n nodeFlags: viewNodeFlags,\n rootNodeFlags: viewRootNodeFlags,\n nodeMatchedQueries: viewMatchedQueries,\n flags,\n nodes: nodes,\n updateDirectives: updateDirectives || NOOP,\n updateRenderer: updateRenderer || NOOP,\n handleEvent,\n bindingCount: viewBindingCount,\n outputCount: viewDisposableCount,\n lastRenderRootNode\n };\n}\n\nfunction isNgContainer(node: NodeDef): boolean {\n return (node.flags & NodeFlags.TypeElement) !== 0 && node.element!.name === null;\n}\n\nfunction validateNode(parent: NodeDef|null, node: NodeDef, nodeCount: number) {\n const template = node.element && node.element.template;\n if (template) {\n if (!template.lastRenderRootNode) {\n throw new Error(`Illegal State: Embedded templates without nodes are not allowed!`);\n }\n if (template.lastRenderRootNode &&\n template.lastRenderRootNode.flags & NodeFlags.EmbeddedViews) {\n throw new Error(\n `Illegal State: Last root node of a template can't have embedded views, at index ${\n node.nodeIndex}!`);\n }\n }\n if (node.flags & NodeFlags.CatProvider) {\n const parentFlags = parent ? parent.flags : 0;\n if ((parentFlags & NodeFlags.TypeElement) === 0) {\n throw new Error(\n `Illegal State: StaticProvider/Directive nodes need to be children of elements or anchors, at index ${\n node.nodeIndex}!`);\n }\n }\n if (node.query) {\n if (node.flags & NodeFlags.TypeContentQuery &&\n (!parent || (parent.flags & NodeFlags.TypeDirective) === 0)) {\n throw new Error(\n `Illegal State: Content Query nodes need to be children of directives, at index ${\n node.nodeIndex}!`);\n }\n if (node.flags & NodeFlags.TypeViewQuery && parent) {\n throw new Error(`Illegal State: View Query nodes have to be top level nodes, at index ${\n node.nodeIndex}!`);\n }\n }\n if (node.childCount) {\n const parentEnd = parent ? parent.nodeIndex + parent.childCount : nodeCount - 1;\n if (node.nodeIndex <= parentEnd && node.nodeIndex + node.childCount > parentEnd) {\n throw new Error(\n `Illegal State: childCount of node leads outside of parent, at index ${node.nodeIndex}!`);\n }\n }\n}\n\nexport function createEmbeddedView(\n parent: ViewData, anchorDef: NodeDef, viewDef: ViewDefinition, context?: any): ViewData {\n // embedded views are seen as siblings to the anchor, so we need\n // to get the parent of the anchor and use it as parentIndex.\n const view = createView(parent.root, parent.renderer, parent, anchorDef, viewDef);\n initView(view, parent.component, context);\n createViewNodes(view);\n return view;\n}\n\nexport function createRootView(root: RootData, def: ViewDefinition, context?: any): ViewData {\n const view = createView(root, root.renderer, null, null, def);\n initView(view, context, context);\n createViewNodes(view);\n return view;\n}\n\nexport function createComponentView(\n parentView: ViewData, nodeDef: NodeDef, viewDef: ViewDefinition, hostElement: any): ViewData {\n const rendererType = nodeDef.element!.componentRendererType;\n let compRenderer: Renderer2;\n if (!rendererType) {\n compRenderer = parentView.root.renderer;\n } else {\n compRenderer = parentView.root.rendererFactory.createRenderer(hostElement, rendererType);\n }\n return createView(\n parentView.root, compRenderer, parentView, nodeDef.element!.componentProvider, viewDef);\n}\n\nfunction createView(\n root: RootData, renderer: Renderer2, parent: ViewData|null, parentNodeDef: NodeDef|null,\n def: ViewDefinition): ViewData {\n const nodes: NodeData[] = new Array(def.nodes.length);\n const disposables = def.outputCount ? new Array(def.outputCount) : null;\n const view: ViewData = {\n def,\n parent,\n viewContainerParent: null,\n parentNodeDef,\n context: null,\n component: null,\n nodes,\n state: ViewState.CatInit,\n root,\n renderer,\n oldValues: new Array(def.bindingCount),\n disposables,\n initIndex: -1\n };\n return view;\n}\n\nfunction initView(view: ViewData, component: any, context: any) {\n view.component = component;\n view.context = context;\n}\n\nfunction createViewNodes(view: ViewData) {\n let renderHost: any;\n if (isComponentView(view)) {\n const hostDef = view.parentNodeDef;\n renderHost = asElementData(view.parent!, hostDef!.parent!.nodeIndex).renderElement;\n }\n const def = view.def;\n const nodes = view.nodes;\n for (let i = 0; i < def.nodes.length; i++) {\n const nodeDef = def.nodes[i];\n Services.setCurrentNode(view, i);\n let nodeData: any;\n switch (nodeDef.flags & NodeFlags.Types) {\n case NodeFlags.TypeElement:\n const el = createElement(view, renderHost, nodeDef) as any;\n let componentView: ViewData = undefined!;\n if (nodeDef.flags & NodeFlags.ComponentView) {\n const compViewDef = resolveDefinition(nodeDef.element!.componentView!);\n componentView = Services.createComponentView(view, nodeDef, compViewDef, el);\n }\n listenToElementOutputs(view, componentView, nodeDef, el);\n nodeData = <ElementData>{\n renderElement: el,\n componentView,\n viewContainer: null,\n template: nodeDef.element!.template ? createTemplateData(view, nodeDef) : undefined\n };\n if (nodeDef.flags & NodeFlags.EmbeddedViews) {\n nodeData.viewContainer = createViewContainerData(view, nodeDef, nodeData);\n }\n break;\n case NodeFlags.TypeText:\n nodeData = createText(view, renderHost, nodeDef) as any;\n break;\n case NodeFlags.TypeClassProvider:\n case NodeFlags.TypeFactoryProvider:\n case NodeFlags.TypeUseExistingProvider:\n case NodeFlags.TypeValueProvider: {\n nodeData = nodes[i];\n if (!nodeData && !(nodeDef.flags & NodeFlags.LazyProvider)) {\n const instance = createProviderInstance(view, nodeDef);\n nodeData = <ProviderData>{instance};\n }\n break;\n }\n case NodeFlags.TypePipe: {\n const instance = createPipeInstance(view, nodeDef);\n nodeData = <ProviderData>{instance};\n break;\n }\n case NodeFlags.TypeDirective: {\n nodeData = nodes[i];\n if (!nodeData) {\n const instance = createDirectiveInstance(view, nodeDef);\n nodeData = <ProviderData>{instance};\n }\n if (nodeDef.flags & NodeFlags.Component) {\n const compView = asElementData(view, nodeDef.parent!.nodeIndex).componentView;\n initView(compView, nodeData.instance, nodeData.instance);\n }\n break;\n }\n case NodeFlags.TypePureArray:\n case NodeFlags.TypePureObject:\n case NodeFlags.TypePurePipe:\n nodeData = createPureExpression(view, nodeDef) as any;\n break;\n case NodeFlags.TypeContentQuery:\n case NodeFlags.TypeViewQuery:\n nodeData = createQuery(\n (nodeDef.flags & NodeFlags.EmitDistinctChangesOnly) ===\n NodeFlags.EmitDistinctChangesOnly) as any;\n break;\n case NodeFlags.TypeNgContent:\n appendNgContent(view, renderHost, nodeDef);\n // no runtime data needed for NgContent...\n nodeData = undefined;\n break;\n }\n nodes[i] = nodeData;\n }\n // Create the ViewData.nodes of component views after we created everything else,\n // so that e.g. ng-content works\n execComponentViewsAction(view, ViewAction.CreateViewNodes);\n\n // fill static content and view queries\n execQueriesAction(\n view, NodeFlags.TypeContentQuery | NodeFlags.TypeViewQuery, NodeFlags.StaticQuery,\n CheckType.CheckAndUpdate);\n}\n\nexport function checkNoChangesView(view: ViewData) {\n markProjectedViewsForCheck(view);\n Services.updateDirectives(view, CheckType.CheckNoChanges);\n execEmbeddedViewsAction(view, ViewAction.CheckNoChanges);\n Services.updateRenderer(view, CheckType.CheckNoChanges);\n execComponentViewsAction(view, ViewAction.CheckNoChanges);\n // Note: We don't check queries for changes as we didn't do this in v2.x.\n // TODO(tbosch): investigate if we can enable the check again in v5.x with a nicer error message.\n view.state &= ~(ViewState.CheckProjectedViews | ViewState.CheckProjectedView);\n}\n\nexport function checkAndUpdateView(view: ViewData) {\n if (view.state & ViewState.BeforeFirstCheck) {\n view.state &= ~ViewState.BeforeFirstCheck;\n view.state |= ViewState.FirstCheck;\n } else {\n view.state &= ~ViewState.FirstCheck;\n }\n shiftInitState(view, ViewState.InitState_BeforeInit, ViewState.InitState_CallingOnInit);\n markProjectedViewsForCheck(view);\n Services.updateDirectives(view, CheckType.CheckAndUpdate);\n execEmbeddedViewsAction(view, ViewAction.CheckAndUpdate);\n execQueriesAction(\n view, NodeFlags.TypeContentQuery, NodeFlags.DynamicQuery, CheckType.CheckAndUpdate);\n let callInit = shiftInitState(\n view, ViewState.InitState_CallingOnInit, ViewState.InitState_CallingAfterContentInit);\n callLifecycleHooksChildrenFirst(\n view, NodeFlags.AfterContentChecked | (callInit ? NodeFlags.AfterContentInit : 0));\n\n Services.updateRenderer(view, CheckType.CheckAndUpdate);\n\n execComponentViewsAction(view, ViewAction.CheckAndUpdate);\n execQueriesAction(\n view, NodeFlags.TypeViewQuery, NodeFlags.DynamicQuery, CheckType.CheckAndUpdate);\n callInit = shiftInitState(\n view, ViewState.InitState_CallingAfterContentInit, ViewState.InitState_CallingAfterViewInit);\n callLifecycleHooksChildrenFirst(\n view, NodeFlags.AfterViewChecked | (callInit ? NodeFlags.AfterViewInit : 0));\n\n if (view.def.flags & ViewFlags.OnPush) {\n view.state &= ~ViewState.ChecksEnabled;\n }\n view.state &= ~(ViewState.CheckProjectedViews | ViewState.CheckProjectedView);\n shiftInitState(view, ViewState.InitState_CallingAfterViewInit, ViewState.InitState_AfterInit);\n}\n\nexport function checkAndUpdateNode(\n view: ViewData, nodeDef: NodeDef, argStyle: ArgumentType, v0?: any, v1?: any, v2?: any,\n v3?: any, v4?: any, v5?: any, v6?: any, v7?: any, v8?: any, v9?: any): boolean {\n if (argStyle === ArgumentType.Inline) {\n return checkAndUpdateNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n } else {\n return checkAndUpdateNodeDynamic(view, nodeDef, v0);\n }\n}\n\nfunction markProjectedViewsForCheck(view: ViewData) {\n const def = view.def;\n if (!(def.nodeFlags & NodeFlags.ProjectedTemplate)) {\n return;\n }\n for (let i = 0; i < def.nodes.length; i++) {\n const nodeDef = def.nodes[i];\n if (nodeDef.flags & NodeFlags.ProjectedTemplate) {\n const projectedViews = asElementData(view, i).template._projectedViews;\n if (projectedViews) {\n for (let i = 0; i < projectedViews.length; i++) {\n const projectedView = projectedViews[i];\n projectedView.state |= ViewState.CheckProjectedView;\n markParentViewsForCheckProjectedViews(projectedView, view);\n }\n }\n } else if ((nodeDef.childFlags & NodeFlags.ProjectedTemplate) === 0) {\n // a parent with leafs\n // no child is a component,\n // then skip the children\n i += nodeDef.childCount;\n }\n }\n}\n\nfunction checkAndUpdateNodeInline(\n view: ViewData, nodeDef: NodeDef, v0?: any, v1?: any, v2?: any, v3?: any, v4?: any, v5?: any,\n v6?: any, v7?: any, v8?: any, v9?: any): boolean {\n switch (nodeDef.flags & NodeFlags.Types) {\n case NodeFlags.TypeElement:\n return checkAndUpdateElementInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n case NodeFlags.TypeText:\n return checkAndUpdateTextInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n case NodeFlags.TypeDirective:\n return checkAndUpdateDirectiveInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n case NodeFlags.TypePureArray:\n case NodeFlags.TypePureObject:\n case NodeFlags.TypePurePipe:\n return checkAndUpdatePureExpressionInline(\n view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n default:\n throw 'unreachable';\n }\n}\n\nfunction checkAndUpdateNodeDynamic(view: ViewData, nodeDef: NodeDef, values: any[]): boolean {\n switch (nodeDef.flags & NodeFlags.Types) {\n case NodeFlags.TypeElement:\n return checkAndUpdateElementDynamic(view, nodeDef, values);\n case NodeFlags.TypeText:\n return checkAndUpdateTextDynamic(view, nodeDef, values);\n case NodeFlags.TypeDirective:\n return checkAndUpdateDirectiveDynamic(view, nodeDef, values);\n case NodeFlags.TypePureArray:\n case NodeFlags.TypePureObject:\n case NodeFlags.TypePurePipe:\n return checkAndUpdatePureExpressionDynamic(view, nodeDef, values);\n default:\n throw 'unreachable';\n }\n}\n\nexport function checkNoChangesNode(\n view: ViewData, nodeDef: NodeDef, argStyle: ArgumentType, v0?: any, v1?: any, v2?: any,\n v3?: any, v4?: any, v5?: any, v6?: any, v7?: any, v8?: any, v9?: any): any {\n if (argStyle === ArgumentType.Inline) {\n checkNoChangesNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n } else {\n checkNoChangesNodeDynamic(view, nodeDef, v0);\n }\n // Returning false is ok here as we would have thrown in case of a change.\n return false;\n}\n\nfunction checkNoChangesNodeInline(\n view: ViewData, nodeDef: NodeDef, v0: any, v1: any, v2: any, v3: any, v4: any, v5: any, v6: any,\n v7: any, v8: any, v9: any): void {\n const bindLen = nodeDef.bindings.length;\n if (bindLen > 0) checkBindingNoChanges(view, nodeDef, 0, v0);\n if (bindLen > 1) checkBindingNoChanges(view, nodeDef, 1, v1);\n if (bindLen > 2) checkBindingNoChanges(view, nodeDef, 2, v2);\n if (bindLen > 3) checkBindingNoChanges(view, nodeDef, 3, v3);\n if (bindLen > 4) checkBindingNoChanges(view, nodeDef, 4, v4);\n if (bindLen > 5) checkBindingNoChanges(view, nodeDef, 5, v5);\n if (bindLen > 6) checkBindingNoChanges(view, nodeDef, 6, v6);\n if (bindLen > 7) checkBindingNoChanges(view, nodeDef, 7, v7);\n if (bindLen > 8) checkBindingNoChanges(view, nodeDef, 8, v8);\n if (bindLen > 9) checkBindingNoChanges(view, nodeDef, 9, v9);\n}\n\nfunction checkNoChangesNodeDynamic(view: ViewData, nodeDef: NodeDef, values: any[]): void {\n for (let i = 0; i < values.length; i++) {\n checkBindingNoChanges(view, nodeDef, i, values[i]);\n }\n}\n\n/**\n * Workaround https://github.com/angular/tsickle/issues/497\n * @suppress {misplacedTypeAnnotation}\n */\nfunction checkNoChangesQuery(view: ViewData, nodeDef: NodeDef) {\n const queryList = asQueryList(view, nodeDef.nodeIndex);\n if (queryList.dirty) {\n throw expressionChangedAfterItHasBeenCheckedError(\n Services.createDebugContext(view, nodeDef.nodeIndex),\n `Query ${nodeDef.query!.id} not dirty`, `Query ${nodeDef.query!.id} dirty`,\n (view.state & ViewState.BeforeFirstCheck) !== 0);\n }\n}\n\nexport function destroyView(view: ViewData) {\n if (view.state & ViewState.Destroyed) {\n return;\n }\n execEmbeddedViewsAction(view, ViewAction.Destroy);\n execComponentViewsAction(view, ViewAction.Destroy);\n callLifecycleHooksChildrenFirst(view, NodeFlags.OnDestroy);\n if (view.disposables) {\n for (let i = 0; i < view.disposables.length; i++) {\n view.disposables[i]();\n }\n }\n detachProjectedView(view);\n if (view.renderer.destroyNode) {\n destroyViewNodes(view);\n }\n if (isComponentView(view)) {\n view.renderer.destroy();\n }\n view.state |= ViewState.Destroyed;\n}\n\nfunction destroyViewNodes(view: ViewData) {\n const len = view.def.nodes.length;\n for (let i = 0; i < len; i++) {\n const def = view.def.nodes[i];\n if (def.flags & NodeFlags.TypeElement) {\n view.renderer.destroyNode!(asElementData(view, i).renderElement);\n } else if (def.flags & NodeFlags.TypeText) {\n view.renderer.destroyNode!(asTextData(view, i).renderText);\n } else if (def.flags & NodeFlags.TypeContentQuery || def.flags & NodeFlags.TypeViewQuery) {\n asQueryList(view, i).destroy();\n }\n }\n}\n\nenum ViewAction {\n CreateViewNodes,\n CheckNoChanges,\n CheckNoChangesProjectedViews,\n CheckAndUpdate,\n CheckAndUpdateProjectedViews,\n Destroy\n}\n\nfunction execComponentViewsAction(view: ViewData, action: ViewAction) {\n const def = view.def;\n if (!(def.nodeFlags & NodeFlags.ComponentView)) {\n return;\n }\n for (let i = 0; i < def.nodes.length; i++) {\n const nodeDef = def.nodes[i];\n if (nodeDef.flags & NodeFlags.ComponentView) {\n // a leaf\n callViewAction(asElementData(view, i).componentView, action);\n } else if ((nodeDef.childFlags & NodeFlags.ComponentView) === 0) {\n // a parent with leafs\n // no child is a component,\n // then skip the children\n i += nodeDef.childCount;\n }\n }\n}\n\nfunction execEmbeddedViewsAction(view: ViewData, action: ViewAction) {\n const def = view.def;\n if (!(def.nodeFlags & NodeFlags.EmbeddedViews)) {\n return;\n }\n for (let i = 0; i < def.nodes.length; i++) {\n const nodeDef = def.nodes[i];\n if (nodeDef.flags & NodeFlags.EmbeddedViews) {\n // a leaf\n const embeddedViews = asElementData(view, i).viewContainer!._embeddedViews;\n for (let k = 0; k < embeddedViews.length; k++) {\n callViewAction(embeddedViews[k], action);\n }\n } else if ((nodeDef.childFlags & NodeFlags.EmbeddedViews) === 0) {\n // a parent with leafs\n // no child is a component,\n // then skip the children\n i += nodeDef.childCount;\n }\n }\n}\n\nfunction callViewAction(view: ViewData, action: ViewAction) {\n const viewState = view.state;\n switch (action) {\n case ViewAction.CheckNoChanges:\n if ((viewState & ViewState.Destroyed) === 0) {\n if ((viewState & ViewState.CatDetectChanges) === ViewState.CatDetectChanges) {\n checkNoChangesView(view);\n } else if (viewState & ViewState.CheckProjectedViews) {\n execProjectedViewsAction(view, ViewAction.CheckNoChangesProjectedViews);\n }\n }\n break;\n case ViewAction.CheckNoChangesProjectedViews:\n if ((viewState & ViewState.Destroyed) === 0) {\n if (viewState & ViewState.CheckProjectedView) {\n checkNoChangesView(view);\n } else if (viewState & ViewState.CheckProjectedViews) {\n execProjectedViewsAction(view, action);\n }\n }\n break;\n case ViewAction.CheckAndUpdate:\n if ((viewState & ViewState.Destroyed) === 0) {\n if ((viewState & ViewState.CatDetectChanges) === ViewState.CatDetectChanges) {\n checkAndUpdateView(view);\n } else if (viewState & ViewState.CheckProjectedViews) {\n execProjectedViewsAction(view, ViewAction.CheckAndUpdateProjectedViews);\n }\n }\n break;\n case ViewAction.CheckAndUpdateProjectedViews:\n if ((viewState & ViewState.Destroyed) === 0) {\n if (viewState & ViewState.CheckProjectedView) {\n checkAndUpdateView(view);\n } else if (viewState & ViewState.CheckProjectedViews) {\n execProjectedViewsAction(view, action);\n }\n }\n break;\n case ViewAction.Destroy:\n // Note: destroyView recurses over all views,\n // so we don't need to special case projected views here.\n destroyView(view);\n break;\n case ViewAction.CreateViewNodes:\n createViewNodes(view);\n break;\n }\n}\n\nfunction execProjectedViewsAction(view: ViewData, action: ViewAction) {\n execEmbeddedViewsAction(view, action);\n execComponentViewsAction(view, action);\n}\n\nfunction execQueriesAction(\n view: ViewData, queryFlags: NodeFlags, staticDynamicQueryFlag: NodeFlags,\n checkType: CheckType) {\n if (!(view.def.nodeFlags & queryFlags) || !(view.def.nodeFlags & staticDynamicQueryFlag)) {\n return;\n }\n const nodeCount = view.def.nodes.length;\n for (let i = 0; i < nodeCount; i++) {\n const nodeDef = view.def.nodes[i];\n if ((nodeDef.flags & queryFlags) && (nodeDef.flags & staticDynamicQueryFlag)) {\n Services.setCurrentNode(view, nodeDef.nodeIndex);\n switch (checkType) {\n case CheckType.CheckAndUpdate:\n checkAndUpdateQuery(view, nodeDef);\n break;\n case CheckType.CheckNoChanges:\n checkNoChangesQuery(view, nodeDef);\n break;\n }\n }\n if (!(nodeDef.childFlags & queryFlags) || !(nodeDef.childFlags & staticDynamicQueryFlag)) {\n // no child has a matching query\n // then skip the children\n i += nodeDef.childCount;\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 {DebugElement__PRE_R3__, DebugEventListener, DebugNode__PRE_R3__, getDebugNode, indexDebugNode, removeDebugNodeFromIndex} from '../debug/debug_node';\nimport {Injector, resolveForwardRef} from '../di';\nimport {getInjectableDef, InjectableType, ɵɵInjectableDeclaration} from '../di/interface/defs';\nimport {ErrorHandler} from '../error_handler';\nimport {Type} from '../interface/type';\nimport {ComponentFactory} from '../linker/component_factory';\nimport {NgModuleRef} from '../linker/ng_module_factory';\nimport {Renderer2, RendererFactory2} from '../render/api';\nimport {RendererStyleFlags2, RendererType2} from '../render/api_flags';\nimport {Sanitizer} from '../sanitization/sanitizer';\nimport {escapeCommentText} from '../util/dom';\nimport {isDevMode} from '../util/is_dev_mode';\nimport {normalizeDebugBindingName, normalizeDebugBindingValue} from '../util/ng_reflect';\n\nimport {isViewDebugError, viewDestroyedError, viewWrappedDebugError} from './errors';\nimport {resolveDep} from './provider';\nimport {dirtyParentQueries, getQueryValue} from './query';\nimport {createInjector, createNgModuleRef, getComponentViewDefinitionFactory} from './refs';\nimport {ArgumentType, asElementData, asPureExpressionData, BindingFlags, CheckType, DebugContext, ElementData, NgModuleDefinition, NodeDef, NodeFlags, NodeLogger, ProviderOverride, RootData, Services, ViewData, ViewDefinition, ViewState} from './types';\nimport {isComponentView, NOOP, renderNode, resolveDefinition, splitDepsDsl, tokenKey, viewParentEl} from './util';\nimport {checkAndUpdateNode, checkAndUpdateView, checkNoChangesNode, checkNoChangesView, createComponentView, createEmbeddedView, createRootView, destroyView} from './view';\n\n\nlet initialized = false;\n\nexport function initServicesIfNeeded() {\n if (initialized) {\n return;\n }\n initialized = true;\n const services = isDevMode() ? createDebugServices() : createProdServices();\n Services.setCurrentNode = services.setCurrentNode;\n Services.createRootView = services.createRootView;\n Services.createEmbeddedView = services.createEmbeddedView;\n Services.createComponentView = services.createComponentView;\n Services.createNgModuleRef = services.createNgModuleRef;\n Services.overrideProvider = services.overrideProvider;\n Services.overrideComponentView = services.overrideComponentView;\n Services.clearOverrides = services.clearOverrides;\n Services.checkAndUpdateView = services.checkAndUpdateView;\n Services.checkNoChangesView = services.checkNoChangesView;\n Services.destroyView = services.destroyView;\n Services.resolveDep = resolveDep;\n Services.createDebugContext = services.createDebugContext;\n Services.handleEvent = services.handleEvent;\n Services.updateDirectives = services.updateDirectives;\n Services.updateRenderer = services.updateRenderer;\n Services.dirtyParentQueries = dirtyParentQueries;\n}\n\nfunction createProdServices() {\n return {\n setCurrentNode: () => {},\n createRootView: createProdRootView,\n createEmbeddedView: createEmbeddedView,\n createComponentView: createComponentView,\n createNgModuleRef: createNgModuleRef,\n overrideProvider: NOOP,\n overrideComponentView: NOOP,\n clearOverrides: NOOP,\n checkAndUpdateView: checkAndUpdateView,\n checkNoChangesView: checkNoChangesView,\n destroyView: destroyView,\n createDebugContext: (view: ViewData, nodeIndex: number) => new DebugContext_(view, nodeIndex),\n handleEvent: (view: ViewData, nodeIndex: number, eventName: string, event: any) =>\n view.def.handleEvent(view, nodeIndex, eventName, event),\n updateDirectives: (view: ViewData, checkType: CheckType) => view.def.updateDirectives(\n checkType === CheckType.CheckAndUpdate ? prodCheckAndUpdateNode : prodCheckNoChangesNode,\n view),\n updateRenderer: (view: ViewData, checkType: CheckType) => view.def.updateRenderer(\n checkType === CheckType.CheckAndUpdate ? prodCheckAndUpdateNode : prodCheckNoChangesNode,\n view),\n };\n}\n\nfunction createDebugServices() {\n return {\n setCurrentNode: debugSetCurrentNode,\n createRootView: debugCreateRootView,\n createEmbeddedView: debugCreateEmbeddedView,\n createComponentView: debugCreateComponentView,\n createNgModuleRef: debugCreateNgModuleRef,\n overrideProvider: debugOverrideProvider,\n overrideComponentView: debugOverrideComponentView,\n clearOverrides: debugClearOverrides,\n checkAndUpdateView: debugCheckAndUpdateView,\n checkNoChangesView: debugCheckNoChangesView,\n destroyView: debugDestroyView,\n createDebugContext: (view: ViewData, nodeIndex: number) => new DebugContext_(view, nodeIndex),\n handleEvent: debugHandleEvent,\n updateDirectives: debugUpdateDirectives,\n updateRenderer: debugUpdateRenderer,\n };\n}\n\nfunction createProdRootView(\n elInjector: Injector, projectableNodes: any[][], rootSelectorOrNode: string|any,\n def: ViewDefinition, ngModule: NgModuleRef<any>, context?: any): ViewData {\n const rendererFactory: RendererFactory2 = ngModule.injector.get(RendererFactory2);\n return createRootView(\n createRootData(elInjector, ngModule, rendererFactory, projectableNodes, rootSelectorOrNode),\n def, context);\n}\n\nfunction debugCreateRootView(\n elInjector: Injector, projectableNodes: any[][], rootSelectorOrNode: string|any,\n def: ViewDefinition, ngModule: NgModuleRef<any>, context?: any): ViewData {\n const rendererFactory: RendererFactory2 = ngModule.injector.get(RendererFactory2);\n const root = createRootData(\n elInjector, ngModule, new DebugRendererFactory2(rendererFactory), projectableNodes,\n rootSelectorOrNode);\n const defWithOverride = applyProviderOverridesToView(def);\n return callWithDebugContext(\n DebugAction.create, createRootView, null, [root, defWithOverride, context]);\n}\n\nfunction createRootData(\n elInjector: Injector, ngModule: NgModuleRef<any>, rendererFactory: RendererFactory2,\n projectableNodes: any[][], rootSelectorOrNode: any): RootData {\n const sanitizer = ngModule.injector.get(Sanitizer);\n const errorHandler = ngModule.injector.get(ErrorHandler);\n const renderer = rendererFactory.createRenderer(null, null);\n return {\n ngModule,\n injector: elInjector,\n projectableNodes,\n selectorOrNode: rootSelectorOrNode,\n sanitizer,\n rendererFactory,\n renderer,\n errorHandler\n };\n}\n\nfunction debugCreateEmbeddedView(\n parentView: ViewData, anchorDef: NodeDef, viewDef: ViewDefinition, context?: any): ViewData {\n const defWithOverride = applyProviderOverridesToView(viewDef);\n return callWithDebugContext(\n DebugAction.create, createEmbeddedView, null,\n [parentView, anchorDef, defWithOverride, context]);\n}\n\nfunction debugCreateComponentView(\n parentView: ViewData, nodeDef: NodeDef, viewDef: ViewDefinition, hostElement: any): ViewData {\n const overrideComponentView =\n viewDefOverrides.get(nodeDef.element!.componentProvider!.provider!.token);\n if (overrideComponentView) {\n viewDef = overrideComponentView;\n } else {\n viewDef = applyProviderOverridesToView(viewDef);\n }\n return callWithDebugContext(\n DebugAction.create, createComponentView, null, [parentView, nodeDef, viewDef, hostElement]);\n}\n\nfunction debugCreateNgModuleRef(\n moduleType: Type<any>, parentInjector: Injector, bootstrapComponents: Type<any>[],\n def: NgModuleDefinition): NgModuleRef<any> {\n const defWithOverride = applyProviderOverridesToNgModule(def);\n return createNgModuleRef(moduleType, parentInjector, bootstrapComponents, defWithOverride);\n}\n\nconst providerOverrides = new Map<any, ProviderOverride>();\nconst providerOverridesWithScope = new Map<InjectableType<any>, ProviderOverride>();\nconst viewDefOverrides = new Map<any, ViewDefinition>();\n\nfunction debugOverrideProvider(override: ProviderOverride) {\n providerOverrides.set(override.token, override);\n let injectableDef: ɵɵInjectableDeclaration<any>|null;\n if (typeof override.token === 'function' && (injectableDef = getInjectableDef(override.token)) &&\n typeof injectableDef.providedIn === 'function') {\n providerOverridesWithScope.set(override.token as InjectableType<any>, override);\n }\n}\n\nfunction debugOverrideComponentView(comp: any, compFactory: ComponentFactory<any>) {\n const hostViewDef = resolveDefinition(getComponentViewDefinitionFactory(compFactory));\n const compViewDef = resolveDefinition(hostViewDef.nodes[0].element!.componentView!);\n viewDefOverrides.set(comp, compViewDef);\n}\n\nfunction debugClearOverrides() {\n providerOverrides.clear();\n providerOverridesWithScope.clear();\n viewDefOverrides.clear();\n}\n\n// Notes about the algorithm:\n// 1) Locate the providers of an element and check if one of them was overwritten\n// 2) Change the providers of that element\n//\n// We only create new data structures if we need to, to keep perf impact\n// reasonable.\nfunction applyProviderOverridesToView(def: ViewDefinition): ViewDefinition {\n if (providerOverrides.size === 0) {\n return def;\n }\n const elementIndicesWithOverwrittenProviders = findElementIndicesWithOverwrittenProviders(def);\n if (elementIndicesWithOverwrittenProviders.length === 0) {\n return def;\n }\n // clone the whole view definition,\n // as it maintains references between the nodes that are hard to update.\n def = def.factory!(() => NOOP);\n for (let i = 0; i < elementIndicesWithOverwrittenProviders.length; i++) {\n applyProviderOverridesToElement(def, elementIndicesWithOverwrittenProviders[i]);\n }\n return def;\n\n function findElementIndicesWithOverwrittenProviders(def: ViewDefinition): number[] {\n const elIndicesWithOverwrittenProviders: number[] = [];\n let lastElementDef: NodeDef|null = null;\n for (let i = 0; i < def.nodes.length; i++) {\n const nodeDef = def.nodes[i];\n if (nodeDef.flags & NodeFlags.TypeElement) {\n lastElementDef = nodeDef;\n }\n if (lastElementDef && nodeDef.flags & NodeFlags.CatProviderNoDirective &&\n providerOverrides.has(nodeDef.provider!.token)) {\n elIndicesWithOverwrittenProviders.push(lastElementDef!.nodeIndex);\n lastElementDef = null;\n }\n }\n return elIndicesWithOverwrittenProviders;\n }\n\n function applyProviderOverridesToElement(viewDef: ViewDefinition, elIndex: number) {\n for (let i = elIndex + 1; i < viewDef.nodes.length; i++) {\n const nodeDef = viewDef.nodes[i];\n if (nodeDef.flags & NodeFlags.TypeElement) {\n // stop at the next element\n return;\n }\n if (nodeDef.flags & NodeFlags.CatProviderNoDirective) {\n const provider = nodeDef.provider!;\n const override = providerOverrides.get(provider.token);\n if (override) {\n nodeDef.flags = (nodeDef.flags & ~NodeFlags.CatProviderNoDirective) | override.flags;\n provider.deps = splitDepsDsl(override.deps);\n provider.value = override.value;\n }\n }\n }\n }\n}\n\n// Notes about the algorithm:\n// We only create new data structures if we need to, to keep perf impact\n// reasonable.\nfunction applyProviderOverridesToNgModule(def: NgModuleDefinition): NgModuleDefinition {\n const {hasOverrides, hasDeprecatedOverrides} = calcHasOverrides(def);\n if (!hasOverrides) {\n return def;\n }\n // clone the whole view definition,\n // as it maintains references between the nodes that are hard to update.\n def = def.factory!(() => NOOP);\n applyProviderOverrides(def);\n return def;\n\n function calcHasOverrides(def: NgModuleDefinition):\n {hasOverrides: boolean, hasDeprecatedOverrides: boolean} {\n let hasOverrides = false;\n let hasDeprecatedOverrides = false;\n if (providerOverrides.size === 0) {\n return {hasOverrides, hasDeprecatedOverrides};\n }\n def.providers.forEach(node => {\n const override = providerOverrides.get(node.token);\n if ((node.flags & NodeFlags.CatProviderNoDirective) && override) {\n hasOverrides = true;\n hasDeprecatedOverrides = hasDeprecatedOverrides || override.deprecatedBehavior;\n }\n });\n def.modules.forEach(module => {\n providerOverridesWithScope.forEach((override, token) => {\n if (resolveForwardRef(getInjectableDef(token)!.providedIn) === module) {\n hasOverrides = true;\n hasDeprecatedOverrides = hasDeprecatedOverrides || override.deprecatedBehavior;\n }\n });\n });\n return {hasOverrides, hasDeprecatedOverrides};\n }\n\n function applyProviderOverrides(def: NgModuleDefinition) {\n for (let i = 0; i < def.providers.length; i++) {\n const provider = def.providers[i];\n if (hasDeprecatedOverrides) {\n // We had a bug where me made\n // all providers lazy. Keep this logic behind a flag\n // for migrating existing users.\n provider.flags |= NodeFlags.LazyProvider;\n }\n const override = providerOverrides.get(provider.token);\n if (override) {\n provider.flags = (provider.flags & ~NodeFlags.CatProviderNoDirective) | override.flags;\n provider.deps = splitDepsDsl(override.deps);\n provider.value = override.value;\n }\n }\n if (providerOverridesWithScope.size > 0) {\n let moduleSet = new Set<any>(def.modules);\n providerOverridesWithScope.forEach((override, token) => {\n if (moduleSet.has(resolveForwardRef(getInjectableDef(token)!.providedIn))) {\n let provider = {\n token: token,\n flags:\n override.flags | (hasDeprecatedOverrides ? NodeFlags.LazyProvider : NodeFlags.None),\n deps: splitDepsDsl(override.deps),\n value: override.value,\n index: def.providers.length,\n };\n def.providers.push(provider);\n def.providersByKey[tokenKey(token)] = provider;\n }\n });\n }\n }\n}\n\nfunction prodCheckAndUpdateNode(\n view: ViewData, checkIndex: number, argStyle: ArgumentType, v0?: any, v1?: any, v2?: any,\n v3?: any, v4?: any, v5?: any, v6?: any, v7?: any, v8?: any, v9?: any): any {\n const nodeDef = view.def.nodes[checkIndex];\n checkAndUpdateNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n return (nodeDef.flags & NodeFlags.CatPureExpression) ?\n asPureExpressionData(view, checkIndex).value :\n undefined;\n}\n\nfunction prodCheckNoChangesNode(\n view: ViewData, checkIndex: number, argStyle: ArgumentType, v0?: any, v1?: any, v2?: any,\n v3?: any, v4?: any, v5?: any, v6?: any, v7?: any, v8?: any, v9?: any): any {\n const nodeDef = view.def.nodes[checkIndex];\n checkNoChangesNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n return (nodeDef.flags & NodeFlags.CatPureExpression) ?\n asPureExpressionData(view, checkIndex).value :\n undefined;\n}\n\nfunction debugCheckAndUpdateView(view: ViewData) {\n return callWithDebugContext(DebugAction.detectChanges, checkAndUpdateView, null, [view]);\n}\n\nfunction debugCheckNoChangesView(view: ViewData) {\n return callWithDebugContext(DebugAction.checkNoChanges, checkNoChangesView, null, [view]);\n}\n\nfunction debugDestroyView(view: ViewData) {\n return callWithDebugContext(DebugAction.destroy, destroyView, null, [view]);\n}\n\nenum DebugAction {\n create,\n detectChanges,\n checkNoChanges,\n destroy,\n handleEvent\n}\n\nlet _currentAction: DebugAction;\nlet _currentView: ViewData;\nlet _currentNodeIndex: number|null;\n\nfunction debugSetCurrentNode(view: ViewData, nodeIndex: number|null) {\n _currentView = view;\n _currentNodeIndex = nodeIndex;\n}\n\nfunction debugHandleEvent(view: ViewData, nodeIndex: number, eventName: string, event: any) {\n debugSetCurrentNode(view, nodeIndex);\n return callWithDebugContext(\n DebugAction.handleEvent, view.def.handleEvent, null, [view, nodeIndex, eventName, event]);\n}\n\nfunction debugUpdateDirectives(view: ViewData, checkType: CheckType) {\n if (view.state & ViewState.Destroyed) {\n throw viewDestroyedError(DebugAction[_currentAction]);\n }\n debugSetCurrentNode(view, nextDirectiveWithBinding(view, 0));\n return view.def.updateDirectives(debugCheckDirectivesFn, view);\n\n function debugCheckDirectivesFn(\n view: ViewData, nodeIndex: number, argStyle: ArgumentType, ...values: any[]) {\n const nodeDef = view.def.nodes[nodeIndex];\n if (checkType === CheckType.CheckAndUpdate) {\n debugCheckAndUpdateNode(view, nodeDef, argStyle, values);\n } else {\n debugCheckNoChangesNode(view, nodeDef, argStyle, values);\n }\n if (nodeDef.flags & NodeFlags.TypeDirective) {\n debugSetCurrentNode(view, nextDirectiveWithBinding(view, nodeIndex));\n }\n return (nodeDef.flags & NodeFlags.CatPureExpression) ?\n asPureExpressionData(view, nodeDef.nodeIndex).value :\n undefined;\n }\n}\n\nfunction debugUpdateRenderer(view: ViewData, checkType: CheckType) {\n if (view.state & ViewState.Destroyed) {\n throw viewDestroyedError(DebugAction[_currentAction]);\n }\n debugSetCurrentNode(view, nextRenderNodeWithBinding(view, 0));\n return view.def.updateRenderer(debugCheckRenderNodeFn, view);\n\n function debugCheckRenderNodeFn(\n view: ViewData, nodeIndex: number, argStyle: ArgumentType, ...values: any[]) {\n const nodeDef = view.def.nodes[nodeIndex];\n if (checkType === CheckType.CheckAndUpdate) {\n debugCheckAndUpdateNode(view, nodeDef, argStyle, values);\n } else {\n debugCheckNoChangesNode(view, nodeDef, argStyle, values);\n }\n if (nodeDef.flags & NodeFlags.CatRenderNode) {\n debugSetCurrentNode(view, nextRenderNodeWithBinding(view, nodeIndex));\n }\n return (nodeDef.flags & NodeFlags.CatPureExpression) ?\n asPureExpressionData(view, nodeDef.nodeIndex).value :\n undefined;\n }\n}\n\nfunction debugCheckAndUpdateNode(\n view: ViewData, nodeDef: NodeDef, argStyle: ArgumentType, givenValues: any[]): void {\n const changed = (<any>checkAndUpdateNode)(view, nodeDef, argStyle, ...givenValues);\n if (changed) {\n const values = argStyle === ArgumentType.Dynamic ? givenValues[0] : givenValues;\n if (nodeDef.flags & NodeFlags.TypeDirective) {\n const bindingValues: {[key: string]: string} = {};\n for (let i = 0; i < nodeDef.bindings.length; i++) {\n const binding = nodeDef.bindings[i];\n const value = values[i];\n if (binding.flags & BindingFlags.TypeProperty) {\n bindingValues[normalizeDebugBindingName(binding.nonMinifiedName!)] =\n normalizeDebugBindingValue(value);\n }\n }\n const elDef = nodeDef.parent!;\n const el = asElementData(view, elDef.nodeIndex).renderElement;\n if (!elDef.element!.name) {\n // a comment.\n view.renderer.setValue(\n el, escapeCommentText(`bindings=${JSON.stringify(bindingValues, null, 2)}`));\n } else {\n // a regular element.\n for (let attr in bindingValues) {\n const value = bindingValues[attr];\n if (value != null) {\n view.renderer.setAttribute(el, attr, value);\n } else {\n view.renderer.removeAttribute(el, attr);\n }\n }\n }\n }\n }\n}\n\nfunction debugCheckNoChangesNode(\n view: ViewData, nodeDef: NodeDef, argStyle: ArgumentType, values: any[]): void {\n (<any>checkNoChangesNode)(view, nodeDef, argStyle, ...values);\n}\n\nfunction nextDirectiveWithBinding(view: ViewData, nodeIndex: number): number|null {\n for (let i = nodeIndex; i < view.def.nodes.length; i++) {\n const nodeDef = view.def.nodes[i];\n if (nodeDef.flags & NodeFlags.TypeDirective && nodeDef.bindings && nodeDef.bindings.length) {\n return i;\n }\n }\n return null;\n}\n\nfunction nextRenderNodeWithBinding(view: ViewData, nodeIndex: number): number|null {\n for (let i = nodeIndex; i < view.def.nodes.length; i++) {\n const nodeDef = view.def.nodes[i];\n if ((nodeDef.flags & NodeFlags.CatRenderNode) && nodeDef.bindings && nodeDef.bindings.length) {\n return i;\n }\n }\n return null;\n}\n\nclass DebugContext_ implements DebugContext {\n private nodeDef: NodeDef;\n private elView: ViewData;\n private elDef: NodeDef;\n\n constructor(public view: ViewData, public nodeIndex: number|null) {\n if (nodeIndex == null) {\n this.nodeIndex = nodeIndex = 0;\n }\n this.nodeDef = view.def.nodes[nodeIndex];\n let elDef = this.nodeDef;\n let elView = view;\n while (elDef && (elDef.flags & NodeFlags.TypeElement) === 0) {\n elDef = elDef.parent!;\n }\n if (!elDef) {\n while (!elDef && elView) {\n elDef = viewParentEl(elView)!;\n elView = elView.parent!;\n }\n }\n this.elDef = elDef;\n this.elView = elView;\n }\n\n private get elOrCompView() {\n // Has to be done lazily as we use the DebugContext also during creation of elements...\n return asElementData(this.elView, this.elDef.nodeIndex).componentView || this.view;\n }\n\n get injector(): Injector {\n return createInjector(this.elView, this.elDef);\n }\n\n get component(): any {\n return this.elOrCompView.component;\n }\n\n get context(): any {\n return this.elOrCompView.context;\n }\n\n get providerTokens(): any[] {\n const tokens: any[] = [];\n if (this.elDef) {\n for (let i = this.elDef.nodeIndex + 1; i <= this.elDef.nodeIndex + this.elDef.childCount;\n i++) {\n const childDef = this.elView.def.nodes[i];\n if (childDef.flags & NodeFlags.CatProvider) {\n tokens.push(childDef.provider!.token);\n }\n i += childDef.childCount;\n }\n }\n return tokens;\n }\n\n get references(): {[key: string]: any} {\n const references: {[key: string]: any} = {};\n if (this.elDef) {\n collectReferences(this.elView, this.elDef, references);\n\n for (let i = this.elDef.nodeIndex + 1; i <= this.elDef.nodeIndex + this.elDef.childCount;\n i++) {\n const childDef = this.elView.def.nodes[i];\n if (childDef.flags & NodeFlags.CatProvider) {\n collectReferences(this.elView, childDef, references);\n }\n i += childDef.childCount;\n }\n }\n return references;\n }\n\n get componentRenderElement() {\n const elData = findHostElement(this.elOrCompView);\n return elData ? elData.renderElement : undefined;\n }\n\n get renderNode(): any {\n return this.nodeDef.flags & NodeFlags.TypeText ? renderNode(this.view, this.nodeDef) :\n renderNode(this.elView, this.elDef);\n }\n\n logError(console: Console, ...values: any[]) {\n let logViewDef: ViewDefinition;\n let logNodeIndex: number;\n if (this.nodeDef.flags & NodeFlags.TypeText) {\n logViewDef = this.view.def;\n logNodeIndex = this.nodeDef.nodeIndex;\n } else {\n logViewDef = this.elView.def;\n logNodeIndex = this.elDef.nodeIndex;\n }\n // Note: we only generate a log function for text and element nodes\n // to make the generated code as small as possible.\n const renderNodeIndex = getRenderNodeIndex(logViewDef, logNodeIndex);\n let currRenderNodeIndex = -1;\n let nodeLogger: NodeLogger = () => {\n currRenderNodeIndex++;\n if (currRenderNodeIndex === renderNodeIndex) {\n return console.error.bind(console, ...values);\n } else {\n return NOOP;\n }\n };\n logViewDef.factory!(nodeLogger);\n if (currRenderNodeIndex < renderNodeIndex) {\n console.error('Illegal state: the ViewDefinitionFactory did not call the logger!');\n (<any>console.error)(...values);\n }\n }\n}\n\nfunction getRenderNodeIndex(viewDef: ViewDefinition, nodeIndex: number): number {\n let renderNodeIndex = -1;\n for (let i = 0; i <= nodeIndex; i++) {\n const nodeDef = viewDef.nodes[i];\n if (nodeDef.flags & NodeFlags.CatRenderNode) {\n renderNodeIndex++;\n }\n }\n return renderNodeIndex;\n}\n\nfunction findHostElement(view: ViewData): ElementData|null {\n while (view && !isComponentView(view)) {\n view = view.parent!;\n }\n if (view.parent) {\n return asElementData(view.parent, viewParentEl(view)!.nodeIndex);\n }\n return null;\n}\n\nfunction collectReferences(view: ViewData, nodeDef: NodeDef, references: {[key: string]: any}) {\n for (let refName in nodeDef.references) {\n references[refName] = getQueryValue(view, nodeDef, nodeDef.references[refName]);\n }\n}\n\nfunction callWithDebugContext(action: DebugAction, fn: any, self: any, args: any[]) {\n const oldAction = _currentAction;\n const oldView = _currentView;\n const oldNodeIndex = _currentNodeIndex;\n try {\n _currentAction = action;\n const result = fn.apply(self, args);\n _currentView = oldView;\n _currentNodeIndex = oldNodeIndex;\n _currentAction = oldAction;\n return result;\n } catch (e) {\n if (isViewDebugError(e) || !_currentView) {\n throw e;\n }\n throw viewWrappedDebugError(e, getCurrentDebugContext()!);\n }\n}\n\nexport function getCurrentDebugContext(): DebugContext|null {\n return _currentView ? new DebugContext_(_currentView, _currentNodeIndex) : null;\n}\n\nexport class DebugRendererFactory2 implements RendererFactory2 {\n constructor(private delegate: RendererFactory2) {}\n\n createRenderer(element: any, renderData: RendererType2|null): Renderer2 {\n return new DebugRenderer2(this.delegate.createRenderer(element, renderData));\n }\n\n begin() {\n if (this.delegate.begin) {\n this.delegate.begin();\n }\n }\n end() {\n if (this.delegate.end) {\n this.delegate.end();\n }\n }\n\n whenRenderingDone(): Promise<any> {\n if (this.delegate.whenRenderingDone) {\n return this.delegate.whenRenderingDone();\n }\n return Promise.resolve(null);\n }\n}\n\nexport class DebugRenderer2 implements Renderer2 {\n readonly data: {[key: string]: any};\n\n private createDebugContext(nativeElement: any) {\n return this.debugContextFactory(nativeElement);\n }\n\n /**\n * Factory function used to create a `DebugContext` when a node is created.\n *\n * The `DebugContext` allows to retrieve information about the nodes that are useful in tests.\n *\n * The factory is configurable so that the `DebugRenderer2` could instantiate either a View Engine\n * or a Render context.\n */\n debugContextFactory: (nativeElement?: any) => DebugContext | null = getCurrentDebugContext;\n\n constructor(private delegate: Renderer2) {\n this.data = this.delegate.data;\n }\n\n destroyNode(node: any) {\n const debugNode = getDebugNode(node);\n\n if (debugNode) {\n removeDebugNodeFromIndex(debugNode);\n if (debugNode instanceof DebugNode__PRE_R3__) {\n debugNode.listeners.length = 0;\n }\n }\n\n if (this.delegate.destroyNode) {\n this.delegate.destroyNode(node);\n }\n }\n\n destroy() {\n this.delegate.destroy();\n }\n\n createElement(name: string, namespace?: string): any {\n const el = this.delegate.createElement(name, namespace);\n const debugCtx = this.createDebugContext(el);\n if (debugCtx) {\n const debugEl = new DebugElement__PRE_R3__(el, null, debugCtx);\n (debugEl as {name: string}).name = name;\n indexDebugNode(debugEl);\n }\n return el;\n }\n\n createComment(value: string): any {\n const comment = this.delegate.createComment(escapeCommentText(value));\n const debugCtx = this.createDebugContext(comment);\n if (debugCtx) {\n indexDebugNode(new DebugNode__PRE_R3__(comment, null, debugCtx));\n }\n return comment;\n }\n\n createText(value: string): any {\n const text = this.delegate.createText(value);\n const debugCtx = this.createDebugContext(text);\n if (debugCtx) {\n indexDebugNode(new DebugNode__PRE_R3__(text, null, debugCtx));\n }\n return text;\n }\n\n appendChild(parent: any, newChild: any): void {\n const debugEl = getDebugNode(parent);\n const debugChildEl = getDebugNode(newChild);\n if (debugEl && debugChildEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.addChild(debugChildEl);\n }\n this.delegate.appendChild(parent, newChild);\n }\n\n insertBefore(parent: any, newChild: any, refChild: any, isMove?: boolean): void {\n const debugEl = getDebugNode(parent);\n const debugChildEl = getDebugNode(newChild);\n const debugRefEl = getDebugNode(refChild)!;\n if (debugEl && debugChildEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.insertBefore(debugRefEl, debugChildEl);\n }\n\n this.delegate.insertBefore(parent, newChild, refChild, isMove);\n }\n\n removeChild(parent: any, oldChild: any): void {\n const debugEl = getDebugNode(parent);\n const debugChildEl = getDebugNode(oldChild);\n if (debugEl && debugChildEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.removeChild(debugChildEl);\n }\n this.delegate.removeChild(parent, oldChild);\n }\n\n selectRootElement(selectorOrNode: string|any, preserveContent?: boolean): any {\n const el = this.delegate.selectRootElement(selectorOrNode, preserveContent);\n const debugCtx = getCurrentDebugContext();\n if (debugCtx) {\n indexDebugNode(new DebugElement__PRE_R3__(el, null, debugCtx));\n }\n return el;\n }\n\n setAttribute(el: any, name: string, value: string, namespace?: string): void {\n const debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n const fullName = namespace ? namespace + ':' + name : name;\n debugEl.attributes[fullName] = value;\n }\n this.delegate.setAttribute(el, name, value, namespace);\n }\n\n removeAttribute(el: any, name: string, namespace?: string): void {\n const debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n const fullName = namespace ? namespace + ':' + name : name;\n debugEl.attributes[fullName] = null;\n }\n this.delegate.removeAttribute(el, name, namespace);\n }\n\n addClass(el: any, name: string): void {\n const debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.classes[name] = true;\n }\n this.delegate.addClass(el, name);\n }\n\n removeClass(el: any, name: string): void {\n const debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.classes[name] = false;\n }\n this.delegate.removeClass(el, name);\n }\n\n setStyle(el: any, style: string, value: any, flags: RendererStyleFlags2): void {\n const debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.styles[style] = value;\n }\n this.delegate.setStyle(el, style, value, flags);\n }\n\n removeStyle(el: any, style: string, flags: RendererStyleFlags2): void {\n const debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.styles[style] = null;\n }\n this.delegate.removeStyle(el, style, flags);\n }\n\n setProperty(el: any, name: string, value: any): void {\n const debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.properties[name] = value;\n }\n this.delegate.setProperty(el, name, value);\n }\n\n listen(\n target: 'document'|'windows'|'body'|any, eventName: string,\n callback: (event: any) => boolean): () => void {\n if (typeof target !== 'string') {\n const debugEl = getDebugNode(target);\n if (debugEl) {\n debugEl.listeners.push(new DebugEventListener(eventName, callback));\n }\n }\n\n return this.delegate.listen(target, eventName, callback);\n }\n\n parentNode(node: any): any {\n return this.delegate.parentNode(node);\n }\n nextSibling(node: any): any {\n return this.delegate.nextSibling(node);\n }\n setValue(node: any, value: string): void {\n return this.delegate.setValue(node, 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 {Injector} from '../di/injector';\nimport {Type} from '../interface/type';\nimport {ComponentFactory} from '../linker/component_factory';\nimport {NgModuleFactory, NgModuleRef} from '../linker/ng_module_factory';\n\nimport {initServicesIfNeeded} from './services';\nimport {NgModuleDefinition, NgModuleDefinitionFactory, NgModuleProviderDef, ProviderOverride, Services, ViewDefinition} from './types';\nimport {resolveDefinition} from './util';\n\nexport function overrideProvider(override: ProviderOverride) {\n initServicesIfNeeded();\n return Services.overrideProvider(override);\n}\n\nexport function overrideComponentView(comp: Type<any>, componentFactory: ComponentFactory<any>) {\n initServicesIfNeeded();\n return Services.overrideComponentView(comp, componentFactory);\n}\n\nexport function clearOverrides() {\n initServicesIfNeeded();\n return Services.clearOverrides();\n}\n\n// Attention: this function is called as top level function.\n// Putting any logic in here will destroy closure tree shaking!\nexport function createNgModuleFactory(\n ngModuleType: Type<any>, bootstrapComponents: Type<any>[],\n defFactory: NgModuleDefinitionFactory): NgModuleFactory<any> {\n return new NgModuleFactory_(ngModuleType, bootstrapComponents, defFactory);\n}\n\nfunction cloneNgModuleDefinition(def: NgModuleDefinition): NgModuleDefinition {\n const providers = Array.from(def.providers);\n const modules = Array.from(def.modules);\n const providersByKey: {[tokenKey: string]: NgModuleProviderDef} = {};\n for (const key in def.providersByKey) {\n providersByKey[key] = def.providersByKey[key];\n }\n\n return {\n factory: def.factory,\n scope: def.scope,\n providers,\n modules,\n providersByKey,\n };\n}\n\nclass NgModuleFactory_ extends NgModuleFactory<any> {\n constructor(\n public readonly moduleType: Type<any>, private _bootstrapComponents: Type<any>[],\n private _ngModuleDefFactory: NgModuleDefinitionFactory) {\n // Attention: this ctor is called as top level function.\n // Putting any logic in here will destroy closure tree shaking!\n super();\n }\n\n override create(parentInjector: Injector|null): NgModuleRef<any> {\n initServicesIfNeeded();\n // Clone the NgModuleDefinition so that any tree shakeable provider definition\n // added to this instance of the NgModuleRef doesn't affect the cached copy.\n // See https://github.com/angular/angular/issues/25018.\n const def = cloneNgModuleDefinition(resolveDefinition(this._ngModuleDefFactory));\n return Services.createNgModuleRef(\n this.moduleType, parentInjector || Injector.NULL, this._bootstrapComponents, def);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport {EMPTY_ARRAY} from '../util/empty';\nexport {anchorDef, elementDef} from './element';\nexport {clearOverrides, createNgModuleFactory, overrideComponentView, overrideProvider} from './entrypoint';\nexport {ngContentDef} from './ng_content';\nexport {moduleDef, moduleProvideDef} from './ng_module';\nexport {directiveDef, pipeDef, providerDef} from './provider';\nexport {pureArrayDef, pureObjectDef, purePipeDef} from './pure_expression';\nexport {queryDef} from './query';\nexport {createComponentFactory, getComponentViewDefinitionFactory, nodeValue, ViewRef_} from './refs';\nexport {initServicesIfNeeded} from './services';\nexport {textDef} from './text';\nexport {createRendererType2, elementEventFullName, EMPTY_MAP, inlineInterpolate, interpolate, rootRenderNodes, tokenKey, unwrapValue} from './util';\nexport {viewDef} from './view';\nexport {attachEmbeddedView, detachEmbeddedView, moveEmbeddedView} from './view_attach';\n\nexport * from './types';\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 {ALLOW_MULTIPLE_PLATFORMS as ɵALLOW_MULTIPLE_PLATFORMS} from './application_ref';\nexport {APP_ID_RANDOM_PROVIDER as ɵAPP_ID_RANDOM_PROVIDER} from './application_tokens';\nexport {defaultIterableDiffers as ɵdefaultIterableDiffers, defaultKeyValueDiffers as ɵdefaultKeyValueDiffers} from './change_detection/change_detection';\nexport {devModeEqual as ɵdevModeEqual, isListLikeIterable as ɵisListLikeIterable} from './change_detection/change_detection_util';\nexport {ChangeDetectorStatus as ɵChangeDetectorStatus, isDefaultChangeDetectionStrategy as ɵisDefaultChangeDetectionStrategy} from './change_detection/constants';\nexport {Console as ɵConsole} from './console';\nexport {getDebugNodeR2 as ɵgetDebugNodeR2} from './debug/debug_node';\nexport {inject, setCurrentInjector as ɵsetCurrentInjector, ɵɵinject} from './di/injector_compatibility';\nexport {getInjectableDef as ɵgetInjectableDef, ɵɵInjectableDeclaration, ɵɵInjectorDef} from './di/interface/defs';\nexport {INJECTOR_SCOPE as ɵINJECTOR_SCOPE} from './di/scope';\nexport {CurrencyIndex as ɵCurrencyIndex, ExtraLocaleDataIndex as ɵExtraLocaleDataIndex, findLocaleData as ɵfindLocaleData, getLocaleCurrencyCode as ɵgetLocaleCurrencyCode, getLocalePluralCase as ɵgetLocalePluralCase, LocaleDataIndex as ɵLocaleDataIndex, registerLocaleData as ɵregisterLocaleData, unregisterAllLocaleData as ɵunregisterLocaleData} from './i18n/locale_data_api';\nexport {DEFAULT_LOCALE_ID as ɵDEFAULT_LOCALE_ID} from './i18n/localization';\nexport {ivyEnabled as ɵivyEnabled} from './ivy_switch';\nexport {ComponentFactory as ɵComponentFactory} from './linker/component_factory';\nexport {CodegenComponentFactoryResolver as ɵCodegenComponentFactoryResolver} from './linker/component_factory_resolver';\nexport {clearResolutionOfComponentResourcesQueue as ɵclearResolutionOfComponentResourcesQueue, resolveComponentResources as ɵresolveComponentResources} from './metadata/resource_loading';\nexport {ReflectionCapabilities as ɵReflectionCapabilities} from './reflection/reflection_capabilities';\nexport {GetterFn as ɵGetterFn, MethodFn as ɵMethodFn, SetterFn as ɵSetterFn} from './reflection/types';\nexport {RuntimeError as ɵRuntimeError, RuntimeErrorCode as ɵRuntimeErrorCode} from './render3/error_code';\nexport {allowSanitizationBypassAndThrow as ɵallowSanitizationBypassAndThrow, BypassType as ɵBypassType, getSanitizationBypassType as ɵgetSanitizationBypassType, SafeHtml as ɵSafeHtml, SafeResourceUrl as ɵSafeResourceUrl, SafeScript as ɵSafeScript, SafeStyle as ɵSafeStyle, SafeUrl as ɵSafeUrl, SafeValue as ɵSafeValue, unwrapSafeValue as ɵunwrapSafeValue} from './sanitization/bypass';\nexport {_sanitizeHtml as ɵ_sanitizeHtml} from './sanitization/html_sanitizer';\nexport {_sanitizeUrl as ɵ_sanitizeUrl} from './sanitization/url_sanitizer';\nexport {makeDecorator as ɵmakeDecorator} from './util/decorators';\nexport {global as ɵglobal} from './util/global';\nexport {isObservable as ɵisObservable, isPromise as ɵisPromise, isSubscribable as ɵisSubscribable} from './util/lang';\nexport {stringify as ɵstringify} from './util/stringify';\nexport {clearOverrides as ɵclearOverrides, initServicesIfNeeded as ɵinitServicesIfNeeded, overrideComponentView as ɵoverrideComponentView, overrideProvider as ɵoverrideProvider} from './view/index';\nexport {NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR} from './view/provider';\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 {FactoryTarget, getCompilerFacade, JitCompilerUsage, R3DeclareComponentFacade, R3DeclareDirectiveFacade, R3DeclareFactoryFacade, R3DeclareInjectableFacade, R3DeclareInjectorFacade, R3DeclareNgModuleFacade, R3DeclarePipeFacade} from '../../compiler/compiler_facade';\nimport {Type} from '../../interface/type';\nimport {setClassMetadata} from '../metadata';\nimport {angularCoreEnv} from './environment';\n\n/**\n * Compiles a partial directive declaration object into a full directive definition object.\n *\n * @codeGenApi\n */\nexport function ɵɵngDeclareDirective(decl: R3DeclareDirectiveFacade): unknown {\n const compiler = getCompilerFacade(\n {usage: JitCompilerUsage.PartialDeclaration, kind: 'directive', type: decl.type});\n return compiler.compileDirectiveDeclaration(\n angularCoreEnv, `ng:///${decl.type.name}/ɵfac.js`, decl);\n}\n\n/**\n * Evaluates the class metadata declaration.\n *\n * @codeGenApi\n */\nexport function ɵɵngDeclareClassMetadata(decl: {\n type: Type<any>; decorators: any[];\n ctorParameters?: () => any[];\n propDecorators?: {[field: string]: any};\n}): void {\n setClassMetadata(\n decl.type, decl.decorators, decl.ctorParameters ?? null, decl.propDecorators ?? null);\n}\n\n/**\n * Compiles a partial component declaration object into a full component definition object.\n *\n * @codeGenApi\n */\nexport function ɵɵngDeclareComponent(decl: R3DeclareComponentFacade): unknown {\n const compiler = getCompilerFacade(\n {usage: JitCompilerUsage.PartialDeclaration, kind: 'component', type: decl.type});\n return compiler.compileComponentDeclaration(\n angularCoreEnv, `ng:///${decl.type.name}/ɵcmp.js`, decl);\n}\n\n/**\n * Compiles a partial pipe declaration object into a full pipe definition object.\n *\n * @codeGenApi\n */\nexport function ɵɵngDeclareFactory(decl: R3DeclareFactoryFacade): unknown {\n const compiler = getCompilerFacade({\n usage: JitCompilerUsage.PartialDeclaration,\n kind: getFactoryKind(decl.target),\n type: decl.type\n });\n return compiler.compileFactoryDeclaration(\n angularCoreEnv, `ng:///${decl.type.name}/ɵfac.js`, decl);\n}\n\nfunction getFactoryKind(target: FactoryTarget) {\n switch (target) {\n case FactoryTarget.Directive:\n return 'directive';\n case FactoryTarget.Component:\n return 'component';\n case FactoryTarget.Injectable:\n return 'injectable';\n case FactoryTarget.Pipe:\n return 'pipe';\n case FactoryTarget.NgModule:\n return 'NgModule';\n }\n}\n\n/**\n * Compiles a partial injectable declaration object into a full injectable definition object.\n *\n * @codeGenApi\n */\nexport function ɵɵngDeclareInjectable(decl: R3DeclareInjectableFacade): unknown {\n const compiler = getCompilerFacade(\n {usage: JitCompilerUsage.PartialDeclaration, kind: 'injectable', type: decl.type});\n return compiler.compileInjectableDeclaration(\n angularCoreEnv, `ng:///${decl.type.name}/ɵprov.js`, decl);\n}\n\n/**\n * These enums are used in the partial factory declaration calls.\n */\nexport {FactoryTarget} from '../../compiler/compiler_facade';\n\n/**\n * Compiles a partial injector declaration object into a full injector definition object.\n *\n * @codeGenApi\n */\nexport function ɵɵngDeclareInjector(decl: R3DeclareInjectorFacade): unknown {\n const compiler = getCompilerFacade(\n {usage: JitCompilerUsage.PartialDeclaration, kind: 'NgModule', type: decl.type});\n return compiler.compileInjectorDeclaration(\n angularCoreEnv, `ng:///${decl.type.name}/ɵinj.js`, decl);\n}\n\n/**\n * Compiles a partial NgModule declaration object into a full NgModule definition object.\n *\n * @codeGenApi\n */\nexport function ɵɵngDeclareNgModule(decl: R3DeclareNgModuleFacade): unknown {\n const compiler = getCompilerFacade(\n {usage: JitCompilerUsage.PartialDeclaration, kind: 'NgModule', type: decl.type});\n return compiler.compileNgModuleDeclaration(\n angularCoreEnv, `ng:///${decl.type.name}/ɵmod.js`, decl);\n}\n\n/**\n * Compiles a partial pipe declaration object into a full pipe definition object.\n *\n * @codeGenApi\n */\nexport function ɵɵngDeclarePipe(decl: R3DeclarePipeFacade): unknown {\n const compiler = getCompilerFacade(\n {usage: JitCompilerUsage.PartialDeclaration, kind: 'pipe', type: decl.type});\n return compiler.compilePipeDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵpipe.js`, decl);\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// clang-format off\n// we reexport these symbols just so that they are retained during the dead code elimination\n// performed by rollup while it's creating fesm files.\n//\n// no code actually imports these symbols from the @angular/core entry point\nexport {\n compileNgModuleFactory__POST_R3__ as ɵcompileNgModuleFactory__POST_R3__,\n isBoundToModule__POST_R3__ as ɵisBoundToModule__POST_R3__\n} from './application_ref';\nexport {\n SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__ as ɵSWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__,\n} from './change_detection/change_detector_ref';\nexport {\n getDebugNode__POST_R3__ as ɵgetDebugNode__POST_R3__,\n} from './debug/debug_node';\nexport {\n SWITCH_COMPILE_INJECTABLE__POST_R3__ as ɵSWITCH_COMPILE_INJECTABLE__POST_R3__,\n} from './di/injectable';\nexport {INJECTOR_IMPL__POST_R3__ as ɵINJECTOR_IMPL__POST_R3__} from './di/injector';\nexport {\n NG_INJ_DEF as ɵNG_INJ_DEF,\n NG_PROV_DEF as ɵNG_PROV_DEF,\n} from './di/interface/defs';\nexport {CREATE_ATTRIBUTE_DECORATOR__POST_R3__ as ɵCREATE_ATTRIBUTE_DECORATOR__POST_R3__} from './di/metadata_attr';\nexport {createInjector as ɵcreateInjector} from './di/r3_injector';\nexport {\n SWITCH_IVY_ENABLED__POST_R3__ as ɵSWITCH_IVY_ENABLED__POST_R3__,\n} from './ivy_switch';\nexport {\n Compiler_compileModuleAndAllComponentsAsync__POST_R3__ as ɵCompiler_compileModuleAndAllComponentsAsync__POST_R3__,\n Compiler_compileModuleAndAllComponentsSync__POST_R3__ as ɵCompiler_compileModuleAndAllComponentsSync__POST_R3__,\n Compiler_compileModuleAsync__POST_R3__ as ɵCompiler_compileModuleAsync__POST_R3__,\n Compiler_compileModuleSync__POST_R3__ as ɵCompiler_compileModuleSync__POST_R3__,\n} from './linker/compiler';\nexport {\n SWITCH_ELEMENT_REF_FACTORY__POST_R3__ as ɵSWITCH_ELEMENT_REF_FACTORY__POST_R3__,\n} from './linker/element_ref';\nexport { getModuleFactory__POST_R3__ as ɵgetModuleFactory__POST_R3__ } from './linker/ng_module_factory_loader';\nexport { registerNgModuleType as ɵregisterNgModuleType } from './linker/ng_module_factory_registration';\nexport {\n SWITCH_TEMPLATE_REF_FACTORY__POST_R3__ as ɵSWITCH_TEMPLATE_REF_FACTORY__POST_R3__,\n} from './linker/template_ref';\nexport {\n SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__ as ɵSWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__,\n} from './linker/view_container_ref';\nexport {\n SWITCH_COMPILE_COMPONENT__POST_R3__ as ɵSWITCH_COMPILE_COMPONENT__POST_R3__,\n SWITCH_COMPILE_DIRECTIVE__POST_R3__ as ɵSWITCH_COMPILE_DIRECTIVE__POST_R3__,\n SWITCH_COMPILE_PIPE__POST_R3__ as ɵSWITCH_COMPILE_PIPE__POST_R3__,\n} from './metadata/directives';\nexport {\n SWITCH_COMPILE_NGMODULE__POST_R3__ as ɵSWITCH_COMPILE_NGMODULE__POST_R3__,\n} from './metadata/ng_module';\nexport {\n NgModuleDef as ɵNgModuleDef,\n NgModuleTransitiveScopes as ɵNgModuleTransitiveScopes,\n} from './metadata/ng_module_def';\nexport {\n SWITCH_RENDERER2_FACTORY__POST_R3__ as ɵSWITCH_RENDERER2_FACTORY__POST_R3__,\n} from './render/api';\nexport {\n getLContext as ɵgetLContext\n} from './render3/context_discovery';\nexport {\n NG_COMP_DEF as ɵNG_COMP_DEF,\n NG_DIR_DEF as ɵNG_DIR_DEF,\n NG_ELEMENT_ID as ɵNG_ELEMENT_ID,\n NG_MOD_DEF as ɵNG_MOD_DEF,\n NG_PIPE_DEF as ɵNG_PIPE_DEF,\n} from './render3/fields';\nexport {\n AttributeMarker as ɵAttributeMarker,\n ComponentDef as ɵComponentDef,\n ComponentFactory as ɵRender3ComponentFactory,\n ComponentRef as ɵRender3ComponentRef,\n ComponentType as ɵComponentType,\n CssSelectorList as ɵCssSelectorList,\n detectChanges as ɵdetectChanges,\n DirectiveDef as ɵDirectiveDef,\n DirectiveType as ɵDirectiveType,\n getDirectives as ɵgetDirectives,\n getHostElement as ɵgetHostElement,\n LifecycleHooksFeature as ɵLifecycleHooksFeature,\n markDirty as ɵmarkDirty,\n NgModuleFactory as ɵNgModuleFactory,\n NgModuleRef as ɵRender3NgModuleRef,\n NgModuleType as ɵNgModuleType,\n NO_CHANGE as ɵNO_CHANGE,\n PipeDef as ɵPipeDef,\n renderComponent as ɵrenderComponent,\n RenderFlags as ɵRenderFlags,\n setClassMetadata as ɵsetClassMetadata,\n setLocaleId as ɵsetLocaleId,\n store as ɵstore,\n whenRendered as ɵwhenRendered,\n ɵɵadvance,\n ɵɵattribute,\n ɵɵattributeInterpolate1,\n ɵɵattributeInterpolate2,\n ɵɵattributeInterpolate3,\n ɵɵattributeInterpolate4,\n ɵɵattributeInterpolate5,\n ɵɵattributeInterpolate6,\n ɵɵattributeInterpolate7,\n ɵɵattributeInterpolate8,\n ɵɵattributeInterpolateV,\n ɵɵclassMap,\n ɵɵclassMapInterpolate1,\n ɵɵclassMapInterpolate2,\n ɵɵclassMapInterpolate3,\n ɵɵclassMapInterpolate4,\n ɵɵclassMapInterpolate5,\n ɵɵclassMapInterpolate6,\n ɵɵclassMapInterpolate7,\n ɵɵclassMapInterpolate8,\n ɵɵclassMapInterpolateV,\n ɵɵclassProp,\n ɵɵComponentDeclaration,\n ɵɵcontentQuery,\n ɵɵCopyDefinitionFeature,\n ɵɵdefineComponent,\n ɵɵdefineDirective,\n ɵɵdefineNgModule,\n ɵɵdefinePipe,\n ɵɵDirectiveDeclaration,\n ɵɵdirectiveInject,\n ɵɵdisableBindings,\n ɵɵelement,\n ɵɵelementContainer,\n ɵɵelementContainerEnd,\n ɵɵelementContainerStart,\n ɵɵelementEnd,\n ɵɵelementStart,\n ɵɵenableBindings,\n ɵɵFactoryDeclaration,\n ɵɵgetCurrentView,\n ɵɵgetInheritedFactory,\n ɵɵhostProperty,\n ɵɵi18n,\n ɵɵi18nApply,\n ɵɵi18nAttributes,\n ɵɵi18nEnd,\n ɵɵi18nExp,\n ɵɵi18nPostprocess,\n ɵɵi18nStart,\n ɵɵInheritDefinitionFeature,\n ɵɵinjectAttribute,\n ɵɵInjectorDeclaration,\n ɵɵinvalidFactory,\n ɵɵlistener,\n ɵɵloadQuery,\n ɵɵnamespaceHTML,\n ɵɵnamespaceMathML,\n ɵɵnamespaceSVG,\n ɵɵnextContext,\n ɵɵNgModuleDeclaration,\n ɵɵNgOnChangesFeature,\n ɵɵpipe,\n ɵɵpipeBind1,\n ɵɵpipeBind2,\n ɵɵpipeBind3,\n ɵɵpipeBind4,\n ɵɵpipeBindV,\n ɵɵPipeDeclaration,\n ɵɵprojection,\n ɵɵprojectionDef,\n ɵɵproperty,\n ɵɵpropertyInterpolate,\n ɵɵpropertyInterpolate1,\n ɵɵpropertyInterpolate2,\n ɵɵpropertyInterpolate3,\n ɵɵpropertyInterpolate4,\n ɵɵpropertyInterpolate5,\n ɵɵpropertyInterpolate6,\n ɵɵpropertyInterpolate7,\n ɵɵpropertyInterpolate8,\n ɵɵpropertyInterpolateV,\n ɵɵProvidersFeature,\n ɵɵpureFunction0,\n ɵɵpureFunction1,\n ɵɵpureFunction2,\n ɵɵpureFunction3,\n ɵɵpureFunction4,\n ɵɵpureFunction5,\n ɵɵpureFunction6,\n ɵɵpureFunction7,\n ɵɵpureFunction8,\n ɵɵpureFunctionV,\n ɵɵqueryRefresh,\n ɵɵreference,\n ɵɵresolveBody,\n ɵɵresolveDocument,\n ɵɵresolveWindow,\n ɵɵrestoreView,\n\n ɵɵsetComponentScope,\n ɵɵsetNgModuleScope,\n ɵɵstyleMap,\n ɵɵstyleMapInterpolate1,\n ɵɵstyleMapInterpolate2,\n ɵɵstyleMapInterpolate3,\n ɵɵstyleMapInterpolate4,\n ɵɵstyleMapInterpolate5,\n ɵɵstyleMapInterpolate6,\n ɵɵstyleMapInterpolate7,\n ɵɵstyleMapInterpolate8,\n ɵɵstyleMapInterpolateV,\n ɵɵstyleProp,\n ɵɵstylePropInterpolate1,\n ɵɵstylePropInterpolate2,\n ɵɵstylePropInterpolate3,\n ɵɵstylePropInterpolate4,\n ɵɵstylePropInterpolate5,\n ɵɵstylePropInterpolate6,\n ɵɵstylePropInterpolate7,\n ɵɵstylePropInterpolate8,\n ɵɵstylePropInterpolateV,\n ɵɵsyntheticHostListener,\n ɵɵsyntheticHostProperty,\n ɵɵtemplate,\n ɵɵtemplateRefExtractor,\n ɵɵtext,\n ɵɵtextInterpolate,\n ɵɵtextInterpolate1,\n ɵɵtextInterpolate2,\n ɵɵtextInterpolate3,\n ɵɵtextInterpolate4,\n ɵɵtextInterpolate5,\n ɵɵtextInterpolate6,\n ɵɵtextInterpolate7,\n ɵɵtextInterpolate8,\n ɵɵtextInterpolateV,\n ɵɵviewQuery,\n} from './render3/index';\nexport {\n LContext as ɵLContext,\n} from './render3/interfaces/context';\nexport {\n setDocument as ɵsetDocument\n} from './render3/interfaces/document';\nexport {\n Player as ɵPlayer,\n PlayerFactory as ɵPlayerFactory,\n PlayerHandler as ɵPlayerHandler,\n PlayState as ɵPlayState,\n} from './render3/interfaces/player';\nexport {\n compileComponent as ɵcompileComponent,\n compileDirective as ɵcompileDirective,\n} from './render3/jit/directive';\nexport {\n resetJitOptions as ɵresetJitOptions,\n} from './render3/jit/jit_options';\nexport {\n compileNgModule as ɵcompileNgModule,\n compileNgModuleDefs as ɵcompileNgModuleDefs,\n flushModuleScopingQueueAsMuchAsPossible as ɵflushModuleScopingQueueAsMuchAsPossible,\n patchComponentDefWithScope as ɵpatchComponentDefWithScope,\n resetCompiledComponents as ɵresetCompiledComponents,\n transitiveScopesFor as ɵtransitiveScopesFor,\n} from './render3/jit/module';\nexport {\n FactoryTarget as ɵɵFactoryTarget,\n ɵɵngDeclareClassMetadata,\n ɵɵngDeclareComponent,\n ɵɵngDeclareDirective,\n ɵɵngDeclareFactory,\n ɵɵngDeclareInjectable,\n ɵɵngDeclareInjector,\n ɵɵngDeclareNgModule,\n ɵɵngDeclarePipe,\n} from './render3/jit/partial';\nexport {\n compilePipe as ɵcompilePipe,\n} from './render3/jit/pipe';\nexport { Profiler as ɵProfiler, ProfilerEvent as ɵProfilerEvent } from './render3/profiler';\nexport {\n publishDefaultGlobalUtils as ɵpublishDefaultGlobalUtils\n,\n publishGlobalUtil as ɵpublishGlobalUtil} from './render3/util/global_utils';\nexport {\n bypassSanitizationTrustHtml as ɵbypassSanitizationTrustHtml,\n bypassSanitizationTrustResourceUrl as ɵbypassSanitizationTrustResourceUrl,\n bypassSanitizationTrustScript as ɵbypassSanitizationTrustScript,\n bypassSanitizationTrustStyle as ɵbypassSanitizationTrustStyle,\n bypassSanitizationTrustUrl as ɵbypassSanitizationTrustUrl,\n} from './sanitization/bypass';\nexport {\n ɵɵsanitizeHtml,\n ɵɵsanitizeResourceUrl,\n ɵɵsanitizeScript,\n ɵɵsanitizeStyle,\n ɵɵsanitizeUrl,\n ɵɵsanitizeUrlOrResourceUrl,\n ɵɵtrustConstantHtml,\n ɵɵtrustConstantResourceUrl,\n} from './sanitization/sanitization';\nexport {\n noSideEffects as ɵnoSideEffects,\n} from './util/closure';\n\n// clang-format on\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 {CodegenComponentFactoryResolver as ɵCodegenComponentFactoryResolver} from './linker/component_factory_resolver';\nexport {registerModuleFactory as ɵregisterModuleFactory} from './linker/ng_module_factory_registration';\nexport {anchorDef as ɵand, ArgumentType as ɵArgumentType, BindingFlags as ɵBindingFlags, createComponentFactory as ɵccf, createNgModuleFactory as ɵcmf, createRendererType2 as ɵcrt, DepFlags as ɵDepFlags, directiveDef as ɵdid, elementDef as ɵeld, EMPTY_ARRAY as ɵEMPTY_ARRAY, EMPTY_MAP as ɵEMPTY_MAP, getComponentViewDefinitionFactory as ɵgetComponentViewDefinitionFactory, inlineInterpolate as ɵinlineInterpolate, interpolate as ɵinterpolate, moduleDef as ɵmod, moduleProvideDef as ɵmpd, ngContentDef as ɵncd, NodeFlags as ɵNodeFlags, nodeValue as ɵnov, pipeDef as ɵpid, providerDef as ɵprd, pureArrayDef as ɵpad, pureObjectDef as ɵpod, purePipeDef as ɵppd, QueryBindingType as ɵQueryBindingType, queryDef as ɵqud, QueryValueType as ɵQueryValueType, textDef as ɵted, unwrapValue as ɵunv, viewDef as ɵvid, ViewDefinition as ɵViewDefinition, ViewFlags as ɵViewFlags} from './view/index';\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 from which you should import all public core APIs.\n */\nexport * from './metadata';\nexport * from './version';\nexport {TypeDecorator} from './util/decorators';\nexport * from './di';\nexport {createPlatform, assertPlatform, destroyPlatform, getPlatform, PlatformRef, ApplicationRef, createPlatformFactory, NgProbeToken} from './application_ref';\nexport {enableProdMode, isDevMode} from './util/is_dev_mode';\nexport {APP_ID, PACKAGE_ROOT_URL, PLATFORM_INITIALIZER, PLATFORM_ID, APP_BOOTSTRAP_LISTENER} from './application_tokens';\nexport {APP_INITIALIZER, ApplicationInitStatus} from './application_init';\nexport * from './zone';\nexport * from './render';\nexport * from './linker';\nexport {DebugElement, DebugEventListener, DebugNode, asNativeElements, getDebugNode, Predicate} from './debug/debug_node';\nexport {GetTestability, Testability, TestabilityRegistry, setTestabilityGetter} from './testability/testability';\nexport * from './change_detection';\nexport * from './platform_core_providers';\nexport {TRANSLATIONS, TRANSLATIONS_FORMAT, LOCALE_ID, DEFAULT_CURRENCY_CODE, MissingTranslationStrategy} from './i18n/tokens';\nexport {ApplicationModule} from './application_module';\nexport {AbstractType, Type} from './interface/type';\nexport {EventEmitter} from './event_emitter';\nexport {ErrorHandler} from './error_handler';\nexport * from './core_private_export';\nexport * from './core_render3_private_export';\nexport {SecurityContext} from './sanitization/security';\nexport {Sanitizer} from './sanitization/sanitizer';\nexport * from './codegen_private_exports';\n\nimport {global} from './util/global';\nif (typeof ngDevMode !== 'undefined' && ngDevMode) {\n // This helper is to give a reasonable error message to people upgrading to v9 that have not yet\n // installed `@angular/localize` in their app.\n // tslint:disable-next-line: no-toplevel-property-access\n global.$localize = global.$localize || function() {\n throw new Error(\n 'It looks like your application or one of its dependencies is using i18n.\\n' +\n 'Angular 9 introduced a global `$localize()` function that needs to be loaded.\\n' +\n 'Please run `ng add @angular/localize` from the Angular CLI.\\n' +\n '(For non-CLI projects, add `import \\'@angular/localize/init\\';` to your `polyfills.ts` file.\\n' +\n 'For server-side rendering applications add the import to your `main.server.ts` file.)');\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.\n */\nexport * from './src/core';\n\n// This file only reexports content of the `src` folder. Keep it that way.\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/* This file is not used to build this module. It is only used during editing\n * by the TypeScript language service and during build for verification. `ngc`\n * replaces this file with production index.ts when it rewrites private symbol\n * names.\n */\n\nexport * from './public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {APPLICATION_MODULE_PROVIDERS as ɵangular_packages_core_core_z,_iterableDiffersFactory as ɵangular_packages_core_core_w,_keyValueDiffersFactory as ɵangular_packages_core_core_x,_localeFactory as ɵangular_packages_core_core_y,zoneSchedulerFactory as ɵangular_packages_core_core_ba} from './src/application_module';\nexport {_appIdRandomProviderFactory as ɵangular_packages_core_core_g} from './src/application_tokens';\nexport {injectChangeDetectorRef as ɵangular_packages_core_core_r} from './src/change_detection/change_detector_ref';\nexport {DefaultIterableDifferFactory as ɵangular_packages_core_core_s} from './src/change_detection/differs/default_iterable_differ';\nexport {DefaultKeyValueDifferFactory as ɵangular_packages_core_core_t} from './src/change_detection/differs/default_keyvalue_differ';\nexport {defaultIterableDiffersFactory as ɵangular_packages_core_core_u} from './src/change_detection/differs/iterable_differs';\nexport {defaultKeyValueDiffersFactory as ɵangular_packages_core_core_v} from './src/change_detection/differs/keyvalue_differs';\nexport {DebugElement__PRE_R3__ as ɵangular_packages_core_core_p,DebugNode__PRE_R3__ as ɵangular_packages_core_core_o,getDebugNodeR2__PRE_R3__ as ɵangular_packages_core_core_q} from './src/debug/debug_node';\nexport {isForwardRef as ɵangular_packages_core_core_a} from './src/di/forward_ref';\nexport {getInjectImplementation as ɵangular_packages_core_core_bx} from './src/di/inject_switch';\nexport {attachInjectFlag as ɵangular_packages_core_core_c,injectInjectorOnly as ɵangular_packages_core_core_b} from './src/di/injector_compatibility';\nexport {InjectorMarkers as ɵangular_packages_core_core_by} from './src/di/injector_marker';\nexport {DecoratorFlags as ɵangular_packages_core_core_bt,InternalInjectFlags as ɵangular_packages_core_core_bu} from './src/di/interface/injector';\nexport {NullInjector as ɵangular_packages_core_core_bw} from './src/di/null_injector';\nexport {ReflectiveInjector_ as ɵangular_packages_core_core_d} from './src/di/reflective_injector';\nexport {ReflectiveDependency as ɵangular_packages_core_core_e,resolveReflectiveProviders as ɵangular_packages_core_core_f} from './src/di/reflective_provider';\nexport {USD_CURRENCY_CODE as ɵangular_packages_core_core_bb} from './src/i18n/localization';\nexport {createElementRef as ɵangular_packages_core_core_j,injectElementRef as ɵangular_packages_core_core_i} from './src/linker/element_ref';\nexport {getModuleFactory__PRE_R3__ as ɵangular_packages_core_core_k} from './src/linker/ng_module_factory_loader';\nexport {createTemplateRef as ɵangular_packages_core_core_m,injectTemplateRef as ɵangular_packages_core_core_l} from './src/linker/template_ref';\nexport {injectViewContainerRef as ɵangular_packages_core_core_n} from './src/linker/view_container_ref';\nexport {injectRenderer2 as ɵangular_packages_core_core_h} from './src/render/api';\nexport {SCHEDULER as ɵangular_packages_core_core_bf} from './src/render3/component_ref';\nexport {injectAttributeImpl as ɵangular_packages_core_core_bg} from './src/render3/di';\nexport {NgOnChangesFeatureImpl as ɵangular_packages_core_core_be} from './src/render3/features/ng_onchanges_feature';\nexport {i18nPostprocess as ɵangular_packages_core_core_cc} from './src/render3/i18n/i18n_postprocess';\nexport {TElementNode as ɵangular_packages_core_core_bk} from './src/render3/interfaces/node';\nexport {LView as ɵangular_packages_core_core_ca} from './src/render3/interfaces/view';\nexport {pureFunction1Internal as ɵangular_packages_core_core_bl,pureFunction2Internal as ɵangular_packages_core_core_bm,pureFunction3Internal as ɵangular_packages_core_core_bn,pureFunction4Internal as ɵangular_packages_core_core_bo,pureFunctionVInternal as ɵangular_packages_core_core_bp} from './src/render3/pure_function';\nexport {getBindingRoot as ɵangular_packages_core_core_bi,getLView as ɵangular_packages_core_core_bh,nextContextImpl as ɵangular_packages_core_core_bj} from './src/render3/state';\nexport {getRootContext as ɵangular_packages_core_core_cb} from './src/render3/util/view_traversal_utils';\nexport {getNativeByTNode as ɵangular_packages_core_core_bz} from './src/render3/util/view_utils';\nexport {getUrlSanitizer as ɵangular_packages_core_core_bq} from './src/sanitization/sanitization';\nexport {makeParamDecorator as ɵangular_packages_core_core_bs,makePropDecorator as ɵangular_packages_core_core_br} from './src/util/decorators';\nexport {getClosureSafeProperty as ɵangular_packages_core_core_bv} from './src/util/property';\nexport {_def as ɵangular_packages_core_core_bc} from './src/view/provider';\nexport {DebugContext as ɵangular_packages_core_core_bd} from './src/view/types';"],"names":["InjectFlags","ChangeDetectionStrategy","ChangeDetectorStatus","ViewEncapsulation","global","unusedValueExportToPlacateAjd","FactoryTarget","policy","getPolicy","SecurityContext","RendererStyleFlags2","unused1","unused2","unused3","unused4","unused5","unusedValueToPlacateAjd","INJECTOR","CIRCULAR","NO_NEW_LINE","NULL_INJECTOR","renderComponent","USE_VALUE","render3CompileInjectable","LocaleDataIndex","resolveProvider","getComponent","R3_ViewRef","R3ViewRef","_renderCompCount","renderDetachView","createInjector","InjectorRefTokenKey","INJECTORRefTokenKey","_createProviderInstance","ComponentFactory","viewEngine_ComponentFactoryResolver","getNamespace","ComponentRef","viewEngine_ComponentFactory","ComponentFactoryResolver","viewEngine_ComponentRef","viewEngine_NgModuleRef","NgModuleRef","viewEngine_NgModuleFactory","getPipeDef","unwrapValue","Subscription","Subject","ViewEngine_TemplateRef","ViewEngine_ElementRef","r3.ɵɵattribute","r3.ɵɵattributeInterpolate1","r3.ɵɵattributeInterpolate2","r3.ɵɵattributeInterpolate3","r3.ɵɵattributeInterpolate4","r3.ɵɵattributeInterpolate5","r3.ɵɵattributeInterpolate6","r3.ɵɵattributeInterpolate7","r3.ɵɵattributeInterpolate8","r3.ɵɵattributeInterpolateV","r3.ɵɵdefineComponent","r3.ɵɵdefineDirective","r3.ɵɵdefineNgModule","r3.ɵɵdefinePipe","r3.ɵɵdirectiveInject","r3.ɵɵgetInheritedFactory","r3.ɵɵinjectAttribute","r3.ɵɵinvalidFactory","r3.ɵɵtemplateRefExtractor","r3.ɵɵNgOnChangesFeature","r3.ɵɵProvidersFeature","r3.ɵɵCopyDefinitionFeature","r3.ɵɵInheritDefinitionFeature","r3.ɵɵnextContext","r3.ɵɵnamespaceHTML","r3.ɵɵnamespaceMathML","r3.ɵɵnamespaceSVG","r3.ɵɵenableBindings","r3.ɵɵdisableBindings","r3.ɵɵelementStart","r3.ɵɵelementEnd","r3.ɵɵelement","r3.ɵɵelementContainerStart","r3.ɵɵelementContainerEnd","r3.ɵɵelementContainer","r3.ɵɵpureFunction0","r3.ɵɵpureFunction1","r3.ɵɵpureFunction2","r3.ɵɵpureFunction3","r3.ɵɵpureFunction4","r3.ɵɵpureFunction5","r3.ɵɵpureFunction6","r3.ɵɵpureFunction7","r3.ɵɵpureFunction8","r3.ɵɵpureFunctionV","r3.ɵɵgetCurrentView","r3.ɵɵrestoreView","r3.ɵɵlistener","r3.ɵɵprojection","r3.ɵɵsyntheticHostProperty","r3.ɵɵsyntheticHostListener","r3.ɵɵpipeBind1","r3.ɵɵpipeBind2","r3.ɵɵpipeBind3","r3.ɵɵpipeBind4","r3.ɵɵpipeBindV","r3.ɵɵprojectionDef","r3.ɵɵhostProperty","r3.ɵɵproperty","r3.ɵɵpropertyInterpolate","r3.ɵɵpropertyInterpolate1","r3.ɵɵpropertyInterpolate2","r3.ɵɵpropertyInterpolate3","r3.ɵɵpropertyInterpolate4","r3.ɵɵpropertyInterpolate5","r3.ɵɵpropertyInterpolate6","r3.ɵɵpropertyInterpolate7","r3.ɵɵpropertyInterpolate8","r3.ɵɵpropertyInterpolateV","r3.ɵɵpipe","r3.ɵɵqueryRefresh","r3.ɵɵviewQuery","r3.ɵɵloadQuery","r3.ɵɵcontentQuery","r3.ɵɵreference","r3.ɵɵclassMap","r3.ɵɵclassMapInterpolate1","r3.ɵɵclassMapInterpolate2","r3.ɵɵclassMapInterpolate3","r3.ɵɵclassMapInterpolate4","r3.ɵɵclassMapInterpolate5","r3.ɵɵclassMapInterpolate6","r3.ɵɵclassMapInterpolate7","r3.ɵɵclassMapInterpolate8","r3.ɵɵclassMapInterpolateV","r3.ɵɵstyleMap","r3.ɵɵstyleMapInterpolate1","r3.ɵɵstyleMapInterpolate2","r3.ɵɵstyleMapInterpolate3","r3.ɵɵstyleMapInterpolate4","r3.ɵɵstyleMapInterpolate5","r3.ɵɵstyleMapInterpolate6","r3.ɵɵstyleMapInterpolate7","r3.ɵɵstyleMapInterpolate8","r3.ɵɵstyleMapInterpolateV","r3.ɵɵstyleProp","r3.ɵɵstylePropInterpolate1","r3.ɵɵstylePropInterpolate2","r3.ɵɵstylePropInterpolate3","r3.ɵɵstylePropInterpolate4","r3.ɵɵstylePropInterpolate5","r3.ɵɵstylePropInterpolate6","r3.ɵɵstylePropInterpolate7","r3.ɵɵstylePropInterpolate8","r3.ɵɵstylePropInterpolateV","r3.ɵɵclassProp","r3.ɵɵadvance","r3.ɵɵtemplate","r3.ɵɵtext","r3.ɵɵtextInterpolate","r3.ɵɵtextInterpolate1","r3.ɵɵtextInterpolate2","r3.ɵɵtextInterpolate3","r3.ɵɵtextInterpolate4","r3.ɵɵtextInterpolate5","r3.ɵɵtextInterpolate6","r3.ɵɵtextInterpolate7","r3.ɵɵtextInterpolate8","r3.ɵɵtextInterpolateV","r3.ɵɵi18n","r3.ɵɵi18nAttributes","r3.ɵɵi18nExp","r3.ɵɵi18nStart","r3.ɵɵi18nEnd","r3.ɵɵi18nApply","r3.ɵɵi18nPostprocess","r3.ɵɵresolveWindow","r3.ɵɵresolveDocument","r3.ɵɵresolveBody","r3.ɵɵsetComponentScope","r3.ɵɵsetNgModuleScope","sanitization.ɵɵsanitizeHtml","sanitization.ɵɵsanitizeStyle","sanitization.ɵɵsanitizeResourceUrl","sanitization.ɵɵsanitizeScript","sanitization.ɵɵsanitizeUrl","sanitization.ɵɵsanitizeUrlOrResourceUrl","sanitization.ɵɵtrustConstantHtml","sanitization.ɵɵtrustConstantResourceUrl","getDirectiveMetadata","render3CompileComponent","render3CompileDirective","render3CompilePipe","render3CompileNgModule","LOCALE_ID","MissingTranslationStrategy","NgModuleFactoryR3","ComponentFactoryR3","R3NgModuleFactory","_publishDefaultGlobalUtils","publishDefaultGlobalUtils","Observable","merge","share","ViewRef","getDebugNode","setElementAttribute"],"mappings":";;;;;;;;;;;;IAAA;;;;;;;aAQgB,sBAAsB,CAAI,wBAA2B;QACnE,KAAK,IAAI,GAAG,IAAI,wBAAwB,EAAE;YACxC,IAAI,wBA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