{"ast":null,"code":"import _get from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/get\";\nimport _getPrototypeOf from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/getPrototypeOf\";\nimport _assertThisInitialized from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _slicedToArray from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/slicedToArray\";\nimport _defineProperty from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/defineProperty\";\nimport _toArray from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/toArray\";\nimport _createForOfIteratorHelper from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper\";\nimport _toConsumableArray from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/toConsumableArray\";\nimport _construct from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/construct\";\nimport _createClass2 from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/createClass\";\nimport _classCallCheck from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/classCallCheck\";\nimport _inherits from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/createSuper\";\nimport _wrapNativeSuper from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper\";\n\n/**\n * @license Angular v12.2.16\n * (c) 2010-2021 Google LLC. https://angular.io/\n * License: MIT\n */\nimport { Subject, Subscription, Observable, merge as merge$1 } from 'rxjs';\nimport { share } from 'rxjs/operators';\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nfunction getClosureSafeProperty(objWithPropertyToExtract) {\n  for (var key in objWithPropertyToExtract) {\n    if (objWithPropertyToExtract[key] === getClosureSafeProperty) {\n      return key;\n    }\n  }\n\n  throw Error('Could not find renamed property on target object.');\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 */\n\n\nfunction fillProperties(target, source) {\n  for (var 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\n\nfunction stringify(token) {\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 \"\".concat(token.overriddenName);\n  }\n\n  if (token.name) {\n    return \"\".concat(token.name);\n  }\n\n  var res = token.toString();\n\n  if (res == null) {\n    return '' + res;\n  }\n\n  var newLineIndex = res.indexOf('\\n');\n  return newLineIndex === -1 ? res : res.substring(0, newLineIndex);\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 */\n\n\nfunction concatStringsWithSpace(before, after) {\n  return before == null || before === '' ? after === null ? '' : after : 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\n\nvar __forward_ref__ = /*@__PURE__*/getClosureSafeProperty({\n  __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 */\n\n\nfunction forwardRef(forwardRefFn) {\n  forwardRefFn.__forward_ref__ = forwardRef;\n\n  forwardRefFn.toString = function () {\n    return stringify(this());\n  };\n\n  return forwardRefFn;\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 */\n\n\nfunction resolveForwardRef(type) {\n  return isForwardRef(type) ? type() : type;\n}\n/** Checks whether a function is wrapped by a `forwardRef`. */\n\n\nfunction isForwardRef(fn) {\n  return typeof fn === 'function' && fn.hasOwnProperty(__forward_ref__) && fn.__forward_ref__ === forwardRef;\n}\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 */\n\n\nvar 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\nvar RuntimeError = /*#__PURE__*/function (_Error) {\n  _inherits(RuntimeError, _Error);\n\n  var _super = _createSuper(RuntimeError);\n\n  function RuntimeError(code, message) {\n    var _this;\n\n    _classCallCheck(this, RuntimeError);\n\n    _this = _super.call(this, formatRuntimeError(code, message));\n    _this.code = code;\n    return _this;\n  }\n\n  return _createClass2(RuntimeError);\n}( /*#__PURE__*/_wrapNativeSuper(Error)); // 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\n/* tslint:disable:no-toplevel-property-access */\n\n\nvar RUNTIME_ERRORS_WITH_GUIDES = /*@__PURE__*/new Set([\"100\"\n/* EXPRESSION_CHANGED_AFTER_CHECKED */\n, \"200\"\n/* CYCLIC_DI_DEPENDENCY */\n, \"201\"\n/* PROVIDER_NOT_FOUND */\n, \"300\"\n/* MULTIPLE_COMPONENTS_MATCH */\n, \"301\"\n/* EXPORT_NOT_FOUND */\n, \"302\"\n/* PIPE_NOT_FOUND */\n]);\n/* tslint:enable:no-toplevel-property-access */\n\n/** Called to format a runtime error */\n\nfunction formatRuntimeError(code, message) {\n  var fullCode = code ? \"NG0\".concat(code, \": \") : '';\n  var errorMessage = \"\".concat(fullCode).concat(message); // 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\n  if (ngDevMode && RUNTIME_ERRORS_WITH_GUIDES.has(code)) {\n    errorMessage = \"\".concat(errorMessage, \". Find more at \").concat(ERROR_DETAILS_PAGE_BASE_URL, \"/NG0\").concat(code);\n  }\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 */\n\n\nfunction renderStringify(value) {\n  if (typeof value === 'string') return value;\n  if (value == null) return ''; // 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\n  return String(value);\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 */\n\n\nfunction stringifyForError(value) {\n  if (typeof value === 'function') return value.name || value.toString();\n\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/** Called when directives inject each other (creating a circular dependency) */\n\n\nfunction throwCyclicDependencyError(token, path) {\n  var depPath = path ? \". Dependency path: \".concat(path.join(' > '), \" > \").concat(token) : '';\n  throw new RuntimeError(\"200\"\n  /* CYCLIC_DI_DEPENDENCY */\n  , \"Circular dependency in DI detected for \".concat(token).concat(depPath));\n}\n\nfunction throwMixedMultiProviderError() {\n  throw new Error(\"Cannot mix multi providers and regular providers\");\n}\n\nfunction throwInvalidProviderError(ngModuleType, providers, provider) {\n  var ngModuleDetail = '';\n\n  if (ngModuleType && providers) {\n    var providerDetail = providers.map(function (v) {\n      return v == provider ? '?' + provider + '?' : '...';\n    });\n    ngModuleDetail = \" - only instances of Provider and Type are allowed, got: [\".concat(providerDetail.join(', '), \"]\");\n  }\n\n  throw new Error(\"Invalid provider for the NgModule '\".concat(stringify(ngModuleType), \"'\") + ngModuleDetail);\n}\n/** Throws an error when a token is not found in DI. */\n\n\nfunction throwProviderNotFoundError(token, injectorName) {\n  var injectorDetails = injectorName ? \" in \".concat(injectorName) : '';\n  throw new RuntimeError(\"201\"\n  /* PROVIDER_NOT_FOUND */\n  , \"No provider for \".concat(stringifyForError(token), \" found\").concat(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\nfunction assertNumber(actual, msg) {\n  if (!(typeof actual === 'number')) {\n    throwError(msg, typeof actual, 'number', '===');\n  }\n}\n\nfunction assertNumberInRange(actual, minInclusive, maxInclusive) {\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\nfunction assertString(actual, msg) {\n  if (!(typeof actual === 'string')) {\n    throwError(msg, actual === null ? 'null' : typeof actual, 'string', '===');\n  }\n}\n\nfunction assertFunction(actual, msg) {\n  if (!(typeof actual === 'function')) {\n    throwError(msg, actual === null ? 'null' : typeof actual, 'function', '===');\n  }\n}\n\nfunction assertEqual(actual, expected, msg) {\n  if (!(actual == expected)) {\n    throwError(msg, actual, expected, '==');\n  }\n}\n\nfunction assertNotEqual(actual, expected, msg) {\n  if (!(actual != expected)) {\n    throwError(msg, actual, expected, '!=');\n  }\n}\n\nfunction assertSame(actual, expected, msg) {\n  if (!(actual === expected)) {\n    throwError(msg, actual, expected, '===');\n  }\n}\n\nfunction assertNotSame(actual, expected, msg) {\n  if (!(actual !== expected)) {\n    throwError(msg, actual, expected, '!==');\n  }\n}\n\nfunction assertLessThan(actual, expected, msg) {\n  if (!(actual < expected)) {\n    throwError(msg, actual, expected, '<');\n  }\n}\n\nfunction assertLessThanOrEqual(actual, expected, msg) {\n  if (!(actual <= expected)) {\n    throwError(msg, actual, expected, '<=');\n  }\n}\n\nfunction assertGreaterThan(actual, expected, msg) {\n  if (!(actual > expected)) {\n    throwError(msg, actual, expected, '>');\n  }\n}\n\nfunction assertGreaterThanOrEqual(actual, expected, msg) {\n  if (!(actual >= expected)) {\n    throwError(msg, actual, expected, '>=');\n  }\n}\n\nfunction assertNotDefined(actual, msg) {\n  if (actual != null) {\n    throwError(msg, actual, null, '==');\n  }\n}\n\nfunction assertDefined(actual, msg) {\n  if (actual == null) {\n    throwError(msg, actual, null, '!=');\n  }\n}\n\nfunction throwError(msg, actual, expected, comparison) {\n  throw new Error(\"ASSERTION ERROR: \".concat(msg) + (comparison == null ? '' : \" [Expected=> \".concat(expected, \" \").concat(comparison, \" \").concat(actual, \" <=Actual]\")));\n}\n\nfunction assertDomNode(node) {\n  // If we're in a worker, `Node` will not be defined.\n  if (!(typeof Node !== 'undefined' && node instanceof Node) && !(typeof node === 'object' && node != null && node.constructor.name === 'WebWorkerRenderNode')) {\n    throwError(\"The provided value must be an instance of a DOM Node but got \".concat(stringify(node)));\n  }\n}\n\nfunction assertIndexInRange(arr, index) {\n  assertDefined(arr, 'Array must be defined.');\n  var maxLen = arr.length;\n\n  if (index < 0 || index >= maxLen) {\n    throwError(\"Index expected to be less than \".concat(maxLen, \" but got \").concat(index));\n  }\n}\n\nfunction assertOneOf(value) {\n  for (var _len = arguments.length, validValues = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n    validValues[_key - 1] = arguments[_key];\n  }\n\n  if (validValues.indexOf(value) !== -1) return true;\n  throwError(\"Expected value to be one of \".concat(JSON.stringify(validValues), \" but was \").concat(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\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 */\n\n\nfunction ɵɵdefineInjectable(opts) {\n  return {\n    token: opts.token,\n    providedIn: opts.providedIn || null,\n    factory: opts.factory,\n    value: undefined\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 */\n\n\nvar defineInjectable = ɵɵdefineInjectable;\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 */\n\nfunction ɵɵdefineInjector(options) {\n  return {\n    providers: options.providers || [],\n    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 */\n\n\nfunction getInjectableDef(type) {\n  return getOwnDefinition(type, NG_PROV_DEF) || getOwnDefinition(type, NG_INJECTABLE_DEF);\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 */\n\n\nfunction getOwnDefinition(type, field) {\n  return type.hasOwnProperty(field) ? type[field] : null;\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 */\n\n\nfunction getInheritedInjectableDef(type) {\n  var def = type && (type[NG_PROV_DEF] || type[NG_INJECTABLE_DEF]);\n\n  if (def) {\n    var typeName = getTypeName(type); // TODO(FW-1307): Re-add ngDevMode when closure can handle it\n    // ngDevMode &&\n\n    console.warn(\"DEPRECATED: DI is instantiating a token \\\"\".concat(typeName, \"\\\" that inherits its @Injectable decorator but does not provide one itself.\\n\") + \"This will become an error in a future version of Angular. Please add @Injectable() to the \\\"\".concat(typeName, \"\\\" class.\"));\n    return def;\n  } else {\n    return null;\n  }\n}\n/** Gets the name of a type, accounting for some cross-browser differences. */\n\n\nfunction getTypeName(type) {\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  var match = ('' + type).match(/^function\\s*([^\\s(]+)/);\n  return match === null ? '' : match[1];\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 */\n\n\nfunction getInjectorDef(type) {\n  return type && (type.hasOwnProperty(NG_INJ_DEF) || type.hasOwnProperty(NG_INJECTOR_DEF)) ? type[NG_INJ_DEF] : null;\n}\n\nvar NG_PROV_DEF = /*@__PURE__*/getClosureSafeProperty({\n  ɵprov: getClosureSafeProperty\n});\nvar NG_INJ_DEF = /*@__PURE__*/getClosureSafeProperty({\n  ɵinj: getClosureSafeProperty\n}); // We need to keep these around so we can read off old defs if new defs are unavailable\n\nvar NG_INJECTABLE_DEF = /*@__PURE__*/getClosureSafeProperty({\n  ngInjectableDef: getClosureSafeProperty\n});\nvar NG_INJECTOR_DEF = /*@__PURE__*/getClosureSafeProperty({\n  ngInjectorDef: getClosureSafeProperty\n});\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Injection flags for DI.\n *\n * @publicApi\n */\n\nvar InjectFlags = /*@__PURE__*/function (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  InjectFlags[InjectFlags[\"Default\"] = 0] = \"Default\";\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\n  InjectFlags[InjectFlags[\"Host\"] = 1] = \"Host\";\n  /** Don't ascend to ancestors of the node requesting injection. */\n\n  InjectFlags[InjectFlags[\"Self\"] = 2] = \"Self\";\n  /** Skip the node that is requesting injection. */\n\n  InjectFlags[InjectFlags[\"SkipSelf\"] = 4] = \"SkipSelf\";\n  /** Inject `defaultValue` instead if token not found. */\n\n  InjectFlags[InjectFlags[\"Optional\"] = 8] = \"Optional\";\n  return InjectFlags;\n}({});\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * 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 */\n\n\nvar _injectImplementation;\n\nfunction getInjectImplementation() {\n  return _injectImplementation;\n}\n/**\n * Sets the current inject implementation.\n */\n\n\nfunction setInjectImplementation(impl) {\n  var previous = _injectImplementation;\n  _injectImplementation = impl;\n  return previous;\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 */\n\n\nfunction injectRootLimpMode(token, notFoundValue, flags) {\n  var injectableDef = getInjectableDef(token);\n\n  if (injectableDef && injectableDef.providedIn == 'root') {\n    return injectableDef.value === undefined ? injectableDef.value = injectableDef.factory() : injectableDef.value;\n  }\n\n  if (flags & InjectFlags.Optional) return null;\n  if (notFoundValue !== undefined) return notFoundValue;\n  throwProviderNotFoundError(stringify(token), 'Injector');\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 */\n\n\nfunction assertInjectImplementationNotEqual(fn) {\n  ngDevMode && 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 */\n\n\nfunction noSideEffects(fn) {\n  return {\n    toString: fn\n  }.toString();\n}\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 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 */\n\n\nvar ChangeDetectionStrategy = /*@__PURE__*/function (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  ChangeDetectionStrategy[ChangeDetectionStrategy[\"OnPush\"] = 0] = \"OnPush\";\n  /**\n   * Use the default `CheckAlways` strategy, in which change detection is automatic until\n   * explicitly deactivated.\n   */\n\n  ChangeDetectionStrategy[ChangeDetectionStrategy[\"Default\"] = 1] = \"Default\";\n  return ChangeDetectionStrategy;\n}({});\n/**\n * Defines the possible states of the default change detector.\n * @see `ChangeDetectorRef`\n */\n\n\nvar ChangeDetectorStatus = /*@__PURE__*/function (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  ChangeDetectorStatus[ChangeDetectorStatus[\"CheckOnce\"] = 0] = \"CheckOnce\";\n  /**\n   * A state in which change detection is skipped until the change detector mode\n   * becomes `CheckOnce`.\n   */\n\n  ChangeDetectorStatus[ChangeDetectorStatus[\"Checked\"] = 1] = \"Checked\";\n  /**\n   * A state in which change detection continues automatically until explicitly\n   * deactivated.\n   */\n\n  ChangeDetectorStatus[ChangeDetectorStatus[\"CheckAlways\"] = 2] = \"CheckAlways\";\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\n  ChangeDetectorStatus[ChangeDetectorStatus[\"Detached\"] = 3] = \"Detached\";\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\n  ChangeDetectorStatus[ChangeDetectorStatus[\"Errored\"] = 4] = \"Errored\";\n  /**\n   * Indicates that the change detector has been destroyed.\n   */\n\n  ChangeDetectorStatus[ChangeDetectorStatus[\"Destroyed\"] = 5] = \"Destroyed\";\n  return ChangeDetectorStatus;\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 */\n\n\nfunction isDefaultChangeDetectionStrategy(changeDetectionStrategy) {\n  return changeDetectionStrategy == null || 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 */\n\n\nvar ViewEncapsulation = /*@__PURE__*/function (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  ViewEncapsulation[ViewEncapsulation[\"Emulated\"] = 0] = \"Emulated\"; // 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\n  ViewEncapsulation[ViewEncapsulation[\"None\"] = 2] = \"None\";\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\n  ViewEncapsulation[ViewEncapsulation[\"ShadowDom\"] = 3] = \"ShadowDom\";\n  return ViewEncapsulation;\n}({});\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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\nvar __globalThis = typeof globalThis !== 'undefined' && globalThis;\n\nvar __window = typeof window !== 'undefined' && window;\n\nvar __self = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope && self;\n\nvar __global = typeof global !== 'undefined' && global; // 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.\n\n\nvar _global = __globalThis || __global || __window || __self;\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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\nfunction ngDevModeResetPerfCounters() {\n  var locationString = typeof location !== 'undefined' ? location.toString() : '';\n  var newCounters = {\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  }; // Make sure to refer to ngDevMode as ['ngDevMode'] for closure.\n\n  var allowNgDevModeTrue = locationString.indexOf('ngDevMode=false') === -1;\n  _global['ngDevMode'] = allowNgDevModeTrue && newCounters;\n  return newCounters;\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 */\n\n\nfunction initNgDevMode() {\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\n    return typeof ngDevMode !== 'undefined' && !!ngDevMode;\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\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\n\nvar EMPTY_OBJ = {};\nvar EMPTY_ARRAY = []; // freezing the values prevents any code from accidentally inserting new values in\n\nif ((typeof ngDevMode === 'undefined' || ngDevMode) && /*@__PURE__*/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\n  /*@__PURE__*/\n  Object.freeze(EMPTY_OBJ); // tslint:disable-next-line:no-toplevel-property-access\n\n  /*@__PURE__*/\n\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\n\nvar NG_COMP_DEF = /*@__PURE__*/getClosureSafeProperty({\n  ɵcmp: getClosureSafeProperty\n});\nvar NG_DIR_DEF = /*@__PURE__*/getClosureSafeProperty({\n  ɵdir: getClosureSafeProperty\n});\nvar NG_PIPE_DEF = /*@__PURE__*/getClosureSafeProperty({\n  ɵpipe: getClosureSafeProperty\n});\nvar NG_MOD_DEF = /*@__PURE__*/getClosureSafeProperty({\n  ɵmod: getClosureSafeProperty\n});\nvar NG_LOC_ID_DEF = /*@__PURE__*/getClosureSafeProperty({\n  ɵloc: getClosureSafeProperty\n});\nvar NG_FACTORY_DEF = /*@__PURE__*/getClosureSafeProperty({\n  ɵ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.\n\nvar NG_ELEMENT_ID = /*@__PURE__*/getClosureSafeProperty({\n  __NG_ELEMENT_ID__: getClosureSafeProperty\n});\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nvar _renderCompCount = 0;\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 */\n\nfunction ɵɵdefineComponent(componentDefinition) {\n  return noSideEffects(function () {\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    var type = componentDefinition.type;\n    var declaredInputs = {};\n    var def = {\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,\n      outputs: null,\n      exportAs: componentDefinition.exportAs || null,\n      onPush: componentDefinition.changeDetection === ChangeDetectionStrategy.OnPush,\n      directiveDefs: null,\n      pipeDefs: null,\n      selectors: componentDefinition.selectors || EMPTY_ARRAY,\n      viewQuery: componentDefinition.viewQuery || null,\n      features: componentDefinition.features || 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    var directiveTypes = componentDefinition.directives;\n    var feature = componentDefinition.features;\n    var pipeTypes = componentDefinition.pipes;\n    def.id += _renderCompCount++;\n    def.inputs = invertObject(componentDefinition.inputs, declaredInputs), def.outputs = invertObject(componentDefinition.outputs), feature && feature.forEach(function (fn) {\n      return fn(def);\n    });\n    def.directiveDefs = directiveTypes ? function () {\n      return (typeof directiveTypes === 'function' ? directiveTypes() : directiveTypes).map(extractDirectiveDef);\n    } : null;\n    def.pipeDefs = pipeTypes ? function () {\n      return (typeof pipeTypes === 'function' ? pipeTypes() : pipeTypes).map(extractPipeDef);\n    } : null;\n    return def;\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 */\n\n\nfunction ɵɵsetComponentScope(type, directives, pipes) {\n  var def = type.ɵcmp;\n\n  def.directiveDefs = function () {\n    return directives.map(extractDirectiveDef);\n  };\n\n  def.pipeDefs = function () {\n    return pipes.map(extractPipeDef);\n  };\n}\n\nfunction extractDirectiveDef(type) {\n  var def = getComponentDef(type) || getDirectiveDef(type);\n\n  if (ngDevMode && !def) {\n    throw new Error(\"'\".concat(type.name, \"' is neither 'ComponentType' or 'DirectiveType'.\"));\n  }\n\n  return def;\n}\n\nfunction extractPipeDef(type) {\n  var def = getPipeDef(type);\n\n  if (ngDevMode && !def) {\n    throw new Error(\"'\".concat(type.name, \"' is not a 'PipeType'.\"));\n  }\n\n  return def;\n}\n\nvar autoRegisterModuleById = {};\n/**\n * @codeGenApi\n */\n\nfunction ɵɵdefineNgModule(def) {\n  return noSideEffects(function () {\n    var res = {\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\n    if (def.id != null) {\n      autoRegisterModuleById[def.id] = def.type;\n    }\n\n    return res;\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 */\n\n\nfunction ɵɵsetNgModuleScope(type, scope) {\n  return noSideEffects(function () {\n    var 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 * 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\r\n */\n\n\nfunction invertObject(obj, secondary) {\n  if (obj == null) return EMPTY_OBJ;\n  var newLookup = {};\n\n  for (var minifiedKey in obj) {\n    if (obj.hasOwnProperty(minifiedKey)) {\n      var publicName = obj[minifiedKey];\n      var declaredName = publicName;\n\n      if (Array.isArray(publicName)) {\n        declaredName = publicName[1];\n        publicName = publicName[0];\n      }\n\n      newLookup[publicName] = minifiedKey;\n\n      if (secondary) {\n        secondary[publicName] = declaredName;\n      }\n    }\n  }\n\n  return newLookup;\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 */\n\n\nvar ɵɵdefineDirective = ɵɵdefineComponent;\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 */\n\nfunction ɵɵdefinePipe(pipeDef) {\n  return {\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 * 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\n\nfunction getComponentDef(type) {\n  return type[NG_COMP_DEF] || null;\n}\n\nfunction getDirectiveDef(type) {\n  return type[NG_DIR_DEF] || null;\n}\n\nfunction getPipeDef(type) {\n  return type[NG_PIPE_DEF] || null;\n}\n\nfunction getNgModuleDef(type, throwNotFound) {\n  var ngModuleDef = type[NG_MOD_DEF] || null;\n\n  if (!ngModuleDef && throwNotFound === true) {\n    throw new Error(\"Type \".concat(stringify(type), \" does not have '\\u0275mod' property.\"));\n  }\n\n  return ngModuleDef;\n}\n\nfunction getNgLocaleIdDef(type) {\n  return type[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// 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.\n\n\nvar HOST = 0;\nvar TVIEW = 1;\nvar FLAGS = 2;\nvar PARENT = 3;\nvar NEXT = 4;\nvar TRANSPLANTED_VIEWS_TO_REFRESH = 5;\nvar T_HOST = 6;\nvar CLEANUP = 7;\nvar CONTEXT = 8;\nvar INJECTOR = 9;\nvar RENDERER_FACTORY = 10;\nvar RENDERER = 11;\nvar SANITIZER = 12;\nvar CHILD_HEAD = 13;\nvar CHILD_TAIL = 14; // FIXME(misko): Investigate if the three declarations aren't all same thing.\n\nvar DECLARATION_VIEW = 15;\nvar DECLARATION_COMPONENT_VIEW = 16;\nvar DECLARATION_LCONTAINER = 17;\nvar PREORDER_HOOK_FLAGS = 18;\nvar 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 */\n\nvar HEADER_OFFSET = 20;\n/**\n * Converts `TViewType` into human readable text.\n * Make sure this matches with `TViewType`\n */\n\nvar TViewTypeAsString = ['Root', 'Component', 'Embedded' // 2\n]; // Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\n\nvar 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/**\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 */\n\nvar TYPE = 1;\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 */\n\nvar HAS_TRANSPLANTED_VIEWS = 2; // 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// T_HOST is index 6\n// We already have this constants in LView, we don't need to re-create it.\n\nvar NATIVE = 7;\nvar VIEW_REFS = 8;\nvar MOVED_VIEWS = 9;\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 */\n\nvar CONTAINER_HEADER_OFFSET = 10; // Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\n\nvar unusedValueExportToPlacateAjd$1 = 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/**\n * True if `value` is `LView`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\n\nfunction isLView(value) {\n  return Array.isArray(value) && typeof value[TYPE] === 'object';\n}\n/**\n * True if `value` is `LContainer`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\n\n\nfunction isLContainer(value) {\n  return Array.isArray(value) && value[TYPE] === true;\n}\n\nfunction isContentQueryHost(tNode) {\n  return (tNode.flags & 8\n  /* hasContentQuery */\n  ) !== 0;\n}\n\nfunction isComponentHost(tNode) {\n  return (tNode.flags & 2\n  /* isComponentHost */\n  ) === 2\n  /* isComponentHost */\n  ;\n}\n\nfunction isDirectiveHost(tNode) {\n  return (tNode.flags & 1\n  /* isDirectiveHost */\n  ) === 1\n  /* isDirectiveHost */\n  ;\n}\n\nfunction isComponentDef(def) {\n  return def.template !== null;\n}\n\nfunction isRootView(target) {\n  return (target[FLAGS] & 512\n  /* IsRoot */\n  ) !== 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// [Assert functions do not constraint type when they are guarded by a truthy\n// expression.](https://github.com/microsoft/TypeScript/issues/37295)\n\n\nfunction assertTNodeForLView(tNode, lView) {\n  assertTNodeForTView(tNode, lView[TVIEW]);\n}\n\nfunction assertTNodeForTView(tNode, tView) {\n  assertTNode(tNode);\n  tNode.hasOwnProperty('tView_') && assertEqual(tNode.tView_, tView, 'This TNode does not belong to this TView.');\n}\n\nfunction assertTNode(tNode) {\n  assertDefined(tNode, 'TNode must be defined');\n\n  if (!(tNode && typeof tNode === 'object' && tNode.hasOwnProperty('directiveStylingLast'))) {\n    throwError('Not of type TNode, got: ' + tNode);\n  }\n}\n\nfunction assertTIcu(tIcu) {\n  assertDefined(tIcu, 'Expected TIcu to be defined');\n\n  if (!(typeof tIcu.currentCaseLViewIndex === 'number')) {\n    throwError('Object is not of TIcu type.');\n  }\n}\n\nfunction assertComponentType(actual) {\n  var msg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'Type passed in is not ComponentType, it does not have \\'ɵcmp\\' property.';\n\n  if (!getComponentDef(actual)) {\n    throwError(msg);\n  }\n}\n\nfunction assertNgModuleType(actual) {\n  var msg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'Type passed in is not NgModuleType, it does not have \\'ɵmod\\' property.';\n\n  if (!getNgModuleDef(actual)) {\n    throwError(msg);\n  }\n}\n\nfunction assertCurrentTNodeIsParent(isParent) {\n  assertEqual(isParent, true, 'currentTNode should be a parent');\n}\n\nfunction assertHasParent(tNode) {\n  assertDefined(tNode, 'currentTNode should exist!');\n  assertDefined(tNode.parent, 'currentTNode should have a parent');\n}\n\nfunction assertDataNext(lView, index, arr) {\n  if (arr == null) arr = lView;\n  assertEqual(arr.length, index, \"index \".concat(index, \" expected to be at the end of arr (length \").concat(arr.length, \")\"));\n}\n\nfunction assertLContainer(value) {\n  assertDefined(value, 'LContainer must be defined');\n  assertEqual(isLContainer(value), true, 'Expecting LContainer');\n}\n\nfunction assertLViewOrUndefined(value) {\n  value && assertEqual(isLView(value), true, 'Expecting LView or undefined or null');\n}\n\nfunction assertLView(value) {\n  assertDefined(value, 'LView must be defined');\n  assertEqual(isLView(value), true, 'Expecting LView');\n}\n\nfunction assertFirstCreatePass(tView, errMessage) {\n  assertEqual(tView.firstCreatePass, true, errMessage || 'Should only be called in first create pass.');\n}\n\nfunction assertFirstUpdatePass(tView, errMessage) {\n  assertEqual(tView.firstUpdatePass, true, errMessage || 'Should only be called in first update pass.');\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 */\n\n\nfunction assertDirectiveDef(obj) {\n  if (obj.type === undefined || obj.selectors == undefined || obj.inputs === undefined) {\n    throwError(\"Expected a DirectiveDef/ComponentDef and this object does not seem to have the expected shape.\");\n  }\n}\n\nfunction assertIndexInDeclRange(lView, index) {\n  var tView = lView[1];\n  assertBetween(HEADER_OFFSET, tView.bindingStartIndex, index);\n}\n\nfunction assertIndexInVarsRange(lView, index) {\n  var tView = lView[1];\n  assertBetween(tView.bindingStartIndex, tView.expandoStartIndex, index);\n}\n\nfunction assertIndexInExpandoRange(lView, index) {\n  var tView = lView[1];\n  assertBetween(tView.expandoStartIndex, lView.length, index);\n}\n\nfunction assertBetween(lower, upper, index) {\n  if (!(lower <= index && index < upper)) {\n    throwError(\"Index out of range (expecting \".concat(lower, \" <= \").concat(index, \" < \").concat(upper, \")\"));\n  }\n}\n\nfunction assertProjectionSlots(lView, errMessage) {\n  assertDefined(lView[DECLARATION_COMPONENT_VIEW], 'Component views should exist.');\n  assertDefined(lView[DECLARATION_COMPONENT_VIEW][T_HOST].projection, errMessage || 'Components with projection nodes (<ng-content>) must have projection slots defined.');\n}\n\nfunction assertParentView(lView, errMessage) {\n  assertDefined(lView, errMessage || 'Component views should always have a parent view (component\\'s host view)');\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 */\n\n\nfunction assertNodeInjector(lView, injectorIndex) {\n  assertIndexInExpandoRange(lView, injectorIndex);\n  assertIndexInExpandoRange(lView, injectorIndex + 8\n  /* PARENT */\n  );\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(lView[injectorIndex + 8\n  /* 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\n\nfunction getFactoryDef(type, throwNotFound) {\n  var hasFactoryDef = type.hasOwnProperty(NG_FACTORY_DEF);\n\n  if (!hasFactoryDef && throwNotFound === true && ngDevMode) {\n    throw new Error(\"Type \".concat(stringify(type), \" does not have '\\u0275fac' property.\"));\n  }\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 */\n\n\nvar SimpleChange = /*#__PURE__*/function () {\n  function SimpleChange(previousValue, currentValue, firstChange) {\n    _classCallCheck(this, SimpleChange);\n\n    this.previousValue = previousValue;\n    this.currentValue = currentValue;\n    this.firstChange = firstChange;\n  }\n  /**\n   * Check whether the new value is the first value assigned.\n   */\n\n\n  _createClass2(SimpleChange, [{\n    key: \"isFirstChange\",\n    value: function isFirstChange() {\n      return this.firstChange;\n    }\n  }]);\n\n  return 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\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 */\n\n\nfunction ɵɵNgOnChangesFeature() {\n  return NgOnChangesFeatureImpl;\n}\n\nfunction NgOnChangesFeatureImpl(definition) {\n  if (definition.type.prototype.ngOnChanges) {\n    definition.setInput = ngOnChangesSetInput;\n  }\n\n  return rememberChangeHistoryAndInvokeOnChangesHook;\n} // This option ensures that the ngOnChanges lifecycle hook will be inherited\n// from superclasses (in InheritDefinitionFeature).\n\n/** @nocollapse */\n// tslint:disable-next-line:no-toplevel-property-access\n\n\nɵɵNgOnChangesFeature.ngInherit = true;\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 */\n\nfunction rememberChangeHistoryAndInvokeOnChangesHook() {\n  var simpleChangesStore = getSimpleChangesStore(this);\n  var current = simpleChangesStore === null || simpleChangesStore === void 0 ? void 0 : simpleChangesStore.current;\n\n  if (current) {\n    var previous = simpleChangesStore.previous;\n\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 (var key in current) {\n        previous[key] = current[key];\n      }\n    }\n\n    simpleChangesStore.current = null;\n    this.ngOnChanges(current);\n  }\n}\n\nfunction ngOnChangesSetInput(instance, value, publicName, privateName) {\n  var simpleChangesStore = getSimpleChangesStore(instance) || setSimpleChangesStore(instance, {\n    previous: EMPTY_OBJ,\n    current: null\n  });\n  var current = simpleChangesStore.current || (simpleChangesStore.current = {});\n  var previous = simpleChangesStore.previous;\n  var declaredName = this.declaredInputs[publicName];\n  var previousChange = previous[declaredName];\n  current[declaredName] = new SimpleChange(previousChange && previousChange.currentValue, value, previous === EMPTY_OBJ);\n  instance[privateName] = value;\n}\n\nvar SIMPLE_CHANGES_STORE = '__ngSimpleChanges__';\n\nfunction getSimpleChangesStore(instance) {\n  return instance[SIMPLE_CHANGES_STORE] || null;\n}\n\nfunction setSimpleChangesStore(instance, store) {\n  return instance[SIMPLE_CHANGES_STORE] = store;\n}\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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\nvar profilerCallback = null;\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 */\n\nvar setProfiler = function setProfiler(profiler) {\n  profilerCallback = profiler;\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 */\n\n\nvar profiler = function profiler(event, instance, hookOrListener) {\n  if (profilerCallback != null\n  /* both `null` and `undefined` */\n  ) {\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\n\nvar SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\nvar 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 */\n\nvar DOCUMENT = undefined;\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 */\n\nfunction setDocument(document) {\n  DOCUMENT = document;\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 */\n\n\nfunction getDocument() {\n  if (DOCUMENT !== undefined) {\n    return DOCUMENT;\n  } else if (typeof document !== 'undefined') {\n    return document;\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\n\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// TODO: cleanup once the code is merged in angular/angular\n\n\nvar RendererStyleFlags3 = /*@__PURE__*/function (RendererStyleFlags3) {\n  RendererStyleFlags3[RendererStyleFlags3[\"Important\"] = 1] = \"Important\";\n  RendererStyleFlags3[RendererStyleFlags3[\"DashCase\"] = 2] = \"DashCase\";\n  return RendererStyleFlags3;\n}({});\n/** Returns whether the `renderer` is a `ProceduralRenderer3` */\n\n\nfunction isProceduralRenderer(renderer) {\n  return !!renderer.listen;\n}\n\nvar ɵ0 = function ɵ0(hostElement, rendererType) {\n  return getDocument();\n};\n\nvar domRendererFactory3 = {\n  createRenderer: ɵ0\n}; // Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\n\nvar unusedValueExportToPlacateAjd$2 = 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/**\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 */\n\nfunction unwrapRNode(value) {\n  while (Array.isArray(value)) {\n    value = value[HOST];\n  }\n\n  return value;\n}\n/**\n * Returns `LView` or `null` if not found.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\n\n\nfunction unwrapLView(value) {\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;\n    value = value[HOST];\n  }\n\n  return null;\n}\n/**\n * Returns `LContainer` or `null` if not found.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\n\n\nfunction unwrapLContainer(value) {\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;\n    value = value[HOST];\n  }\n\n  return null;\n}\n/**\n * Retrieves an element value from the provided `viewData`, by unwrapping\n * from any containers, component views, or style contexts.\n */\n\n\nfunction getNativeByIndex(index, lView) {\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 * 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 */\n\n\nfunction getNativeByTNode(tNode, lView) {\n  ngDevMode && assertTNodeForLView(tNode, lView);\n  ngDevMode && assertIndexInRange(lView, tNode.index);\n  var node = unwrapRNode(lView[tNode.index]);\n  ngDevMode && !isProceduralRenderer(lView[RENDERER]) && assertDomNode(node);\n  return node;\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 */\n\n\nfunction getNativeByTNodeOrNull(tNode, lView) {\n  var index = tNode === null ? -1 : tNode.index;\n\n  if (index !== -1) {\n    ngDevMode && assertTNodeForLView(tNode, lView);\n    var node = unwrapRNode(lView[index]);\n    ngDevMode && node !== null && !isProceduralRenderer(lView[RENDERER]) && assertDomNode(node);\n    return node;\n  }\n\n  return null;\n} // fixme(misko): The return Type should be `TNode|null`\n\n\nfunction getTNode(tView, index) {\n  ngDevMode && assertGreaterThan(index, -1, 'wrong index for TNode');\n  ngDevMode && assertLessThan(index, tView.data.length, 'wrong index for TNode');\n  var tNode = tView.data[index];\n  ngDevMode && tNode !== null && assertTNode(tNode);\n  return tNode;\n}\n/** Retrieves a value from any `LView` or `TData`. */\n\n\nfunction load(view, index) {\n  ngDevMode && assertIndexInRange(view, index);\n  return view[index];\n}\n\nfunction getComponentLViewByIndex(nodeIndex, hostView) {\n  // Could be an LView or an LContainer. If LContainer, unwrap to find LView.\n  ngDevMode && assertIndexInRange(hostView, nodeIndex);\n  var slotValue = hostView[nodeIndex];\n  var lView = isLView(slotValue) ? slotValue : slotValue[HOST];\n  return lView;\n}\n/** Checks whether a given view is in creation mode */\n\n\nfunction isCreationMode(view) {\n  return (view[FLAGS] & 4\n  /* CreationMode */\n  ) === 4\n  /* 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 */\n\n\nfunction viewAttachedToChangeDetector(view) {\n  return (view[FLAGS] & 128\n  /* Attached */\n  ) === 128\n  /* Attached */\n  ;\n}\n/** Returns a boolean for whether the view is attached to a container. */\n\n\nfunction viewAttachedToContainer(view) {\n  return isLContainer(view[PARENT]);\n}\n\nfunction getConstant(consts, index) {\n  if (index === null || index === undefined) return null;\n  ngDevMode && assertIndexInRange(consts, index);\n  return consts[index];\n}\n/**\n * Resets the pre-order hook flags of the view.\n * @param lView the LView on which the flags are reset\n */\n\n\nfunction resetPreOrderHookFlags(lView) {\n  lView[PREORDER_HOOK_FLAGS] = 0;\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 */\n\n\nfunction updateTransplantedViewCount(lContainer, amount) {\n  lContainer[TRANSPLANTED_VIEWS_TO_REFRESH] += amount;\n  var viewOrContainer = lContainer;\n  var parent = lContainer[PARENT];\n\n  while (parent !== null && (amount === 1 && viewOrContainer[TRANSPLANTED_VIEWS_TO_REFRESH] === 1 || 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\n\nvar instructionState = {\n  lFrame: /*@__PURE__*/createLFrame(null),\n  bindingsEnabled: true,\n  isInCheckNoChangesMode: false\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 */\n\nfunction specOnlyIsInstructionStateEmpty() {\n  return instructionState.lFrame.parent === null;\n}\n\nfunction getElementDepthCount() {\n  return instructionState.lFrame.elementDepthCount;\n}\n\nfunction increaseElementDepthCount() {\n  instructionState.lFrame.elementDepthCount++;\n}\n\nfunction decreaseElementDepthCount() {\n  instructionState.lFrame.elementDepthCount--;\n}\n\nfunction getBindingsEnabled() {\n  return instructionState.bindingsEnabled;\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 */\n\n\nfunction ɵɵenableBindings() {\n  instructionState.bindingsEnabled = true;\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 */\n\n\nfunction ɵɵdisableBindings() {\n  instructionState.bindingsEnabled = false;\n}\n/**\n * Return the current `LView`.\n */\n\n\nfunction getLView() {\n  return instructionState.lFrame.lView;\n}\n/**\n * Return the current `TView`.\n */\n\n\nfunction getTView() {\n  return instructionState.lFrame.tView;\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 */\n\n\nfunction ɵɵrestoreView(viewToRestore) {\n  instructionState.lFrame.contextLView = viewToRestore;\n  return viewToRestore[CONTEXT];\n}\n\nfunction getCurrentTNode() {\n  var currentTNode = getCurrentTNodePlaceholderOk();\n\n  while (currentTNode !== null && currentTNode.type === 64\n  /* Placeholder */\n  ) {\n    currentTNode = currentTNode.parent;\n  }\n\n  return currentTNode;\n}\n\nfunction getCurrentTNodePlaceholderOk() {\n  return instructionState.lFrame.currentTNode;\n}\n\nfunction getCurrentParentTNode() {\n  var lFrame = instructionState.lFrame;\n  var currentTNode = lFrame.currentTNode;\n  return lFrame.isParent ? currentTNode : currentTNode.parent;\n}\n\nfunction setCurrentTNode(tNode, isParent) {\n  ngDevMode && tNode && assertTNodeForTView(tNode, instructionState.lFrame.tView);\n  var lFrame = instructionState.lFrame;\n  lFrame.currentTNode = tNode;\n  lFrame.isParent = isParent;\n}\n\nfunction isCurrentTNodeParent() {\n  return instructionState.lFrame.isParent;\n}\n\nfunction setCurrentTNodeAsNotParent() {\n  instructionState.lFrame.isParent = false;\n}\n\nfunction setCurrentTNodeAsParent() {\n  instructionState.lFrame.isParent = true;\n}\n\nfunction getContextLView() {\n  return instructionState.lFrame.contextLView;\n}\n\nfunction isInCheckNoChangesMode() {\n  // TODO(misko): remove this from the LView since it is ngDevMode=true mode only.\n  return instructionState.isInCheckNoChangesMode;\n}\n\nfunction setIsInCheckNoChangesMode(mode) {\n  instructionState.isInCheckNoChangesMode = mode;\n} // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n\n\nfunction getBindingRoot() {\n  var lFrame = instructionState.lFrame;\n  var index = lFrame.bindingRootIndex;\n\n  if (index === -1) {\n    index = lFrame.bindingRootIndex = lFrame.tView.bindingStartIndex;\n  }\n\n  return index;\n}\n\nfunction getBindingIndex() {\n  return instructionState.lFrame.bindingIndex;\n}\n\nfunction setBindingIndex(value) {\n  return instructionState.lFrame.bindingIndex = value;\n}\n\nfunction nextBindingIndex() {\n  return instructionState.lFrame.bindingIndex++;\n}\n\nfunction incrementBindingIndex(count) {\n  var lFrame = instructionState.lFrame;\n  var index = lFrame.bindingIndex;\n  lFrame.bindingIndex = lFrame.bindingIndex + count;\n  return index;\n}\n\nfunction isInI18nBlock() {\n  return instructionState.lFrame.inI18n;\n}\n\nfunction setInI18nBlock(isInI18nBlock) {\n  instructionState.lFrame.inI18n = isInI18nBlock;\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 */\n\n\nfunction setBindingRootForHostBindings(bindingRootIndex, currentDirectiveIndex) {\n  var lFrame = instructionState.lFrame;\n  lFrame.bindingIndex = lFrame.bindingRootIndex = bindingRootIndex;\n  setCurrentDirectiveIndex(currentDirectiveIndex);\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 */\n\n\nfunction getCurrentDirectiveIndex() {\n  return instructionState.lFrame.currentDirectiveIndex;\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 */\n\n\nfunction setCurrentDirectiveIndex(currentDirectiveIndex) {\n  instructionState.lFrame.currentDirectiveIndex = currentDirectiveIndex;\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 */\n\n\nfunction getCurrentDirectiveDef(tData) {\n  var currentDirectiveIndex = instructionState.lFrame.currentDirectiveIndex;\n  return currentDirectiveIndex === -1 ? null : tData[currentDirectiveIndex];\n}\n\nfunction getCurrentQueryIndex() {\n  return instructionState.lFrame.currentQueryIndex;\n}\n\nfunction setCurrentQueryIndex(value) {\n  instructionState.lFrame.currentQueryIndex = value;\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 */\n\n\nfunction getDeclarationTNode(lView) {\n  var tView = lView[TVIEW]; // Return the declaration parent for embedded views\n\n  if (tView.type === 2\n  /* Embedded */\n  ) {\n    ngDevMode && assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');\n    return tView.declTNode;\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\n\n  if (tView.type === 1\n  /* Component */\n  ) {\n    return lView[T_HOST];\n  } // Remaining TNode type is `TViewType.Root` which doesn't have a parent TNode.\n\n\n  return null;\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 */\n\n\nfunction enterDI(lView, tNode, flags) {\n  ngDevMode && assertLViewOrUndefined(lView);\n\n  if (flags & InjectFlags.SkipSelf) {\n    ngDevMode && assertTNodeForTView(tNode, lView[TVIEW]);\n    var parentTNode = tNode;\n    var parentLView = lView;\n\n    while (true) {\n      ngDevMode && assertDefined(parentTNode, 'Parent TNode should be defined');\n      parentTNode = parentTNode.parent;\n\n      if (parentTNode === null && !(flags & InjectFlags.Host)) {\n        parentTNode = getDeclarationTNode(parentLView);\n        if (parentTNode === null) break; // 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\n        ngDevMode && assertDefined(parentLView, 'Parent LView should be defined');\n        parentLView = parentLView[DECLARATION_VIEW]; // 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\n        if (parentTNode.type & (2\n        /* Element */\n        | 8\n        /* ElementContainer */\n        )) {\n          break;\n        }\n      } else {\n        break;\n      }\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  var lFrame = instructionState.lFrame = allocLFrame();\n  lFrame.currentTNode = tNode;\n  lFrame.lView = lView;\n  return true;\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 */\n\n\nfunction enterView(newView) {\n  ngDevMode && assertNotEqual(newView[0], newView[1], '????');\n  ngDevMode && assertLViewOrUndefined(newView);\n  var newLFrame = allocLFrame();\n\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\n  var 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 * Allocates next free LFrame. This function tries to reuse the `LFrame`s to lower memory pressure.\n */\n\n\nfunction allocLFrame() {\n  var currentLFrame = instructionState.lFrame;\n  var childLFrame = currentLFrame === null ? null : currentLFrame.child;\n  var newLFrame = childLFrame === null ? createLFrame(currentLFrame) : childLFrame;\n  return newLFrame;\n}\n\nfunction createLFrame(parent) {\n  var 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\n  return lFrame;\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 */\n\n\nfunction leaveViewLight() {\n  var oldLFrame = instructionState.lFrame;\n  instructionState.lFrame = oldLFrame.parent;\n  oldLFrame.currentTNode = null;\n  oldLFrame.lView = null;\n  return oldLFrame;\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 */\n\n\nvar leaveDI = leaveViewLight;\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 */\n\nfunction leaveView() {\n  var 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\nfunction nextContextImpl(level) {\n  var contextLView = instructionState.lFrame.contextLView = walkUpViews(level, instructionState.lFrame.contextLView);\n  return contextLView[CONTEXT];\n}\n\nfunction walkUpViews(nestingLevel, currentView) {\n  while (nestingLevel > 0) {\n    ngDevMode && assertDefined(currentView[DECLARATION_VIEW], 'Declaration view should be defined if nesting level is greater than 0.');\n    currentView = currentView[DECLARATION_VIEW];\n    nestingLevel--;\n  }\n\n  return currentView;\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 */\n\n\nfunction getSelectedIndex() {\n  return instructionState.lFrame.selectedIndex;\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 */\n\n\nfunction setSelectedIndex(index) {\n  ngDevMode && index !== -1 && assertGreaterThanOrEqual(index, HEADER_OFFSET, 'Index must be past HEADER_OFFSET (or -1).');\n  ngDevMode && assertLessThan(index, instructionState.lFrame.lView.length, 'Can\\'t set index passed end of LView');\n  instructionState.lFrame.selectedIndex = index;\n}\n/**\n * Gets the `tNode` that represents currently selected element.\n */\n\n\nfunction getSelectedTNode() {\n  var lFrame = instructionState.lFrame;\n  return getTNode(lFrame.tView, lFrame.selectedIndex);\n}\n/**\n * Sets the namespace used to create elements to `'http://www.w3.org/2000/svg'` in global state.\n *\n * @codeGenApi\n */\n\n\nfunction ɵɵnamespaceSVG() {\n  instructionState.lFrame.currentNamespace = SVG_NAMESPACE;\n}\n/**\n * Sets the namespace used to create elements to `'http://www.w3.org/1998/MathML/'` in global state.\n *\n * @codeGenApi\n */\n\n\nfunction ɵɵnamespaceMathML() {\n  instructionState.lFrame.currentNamespace = MATH_ML_NAMESPACE;\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 */\n\n\nfunction ɵɵnamespaceHTML() {\n  namespaceHTMLInternal();\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\n\nfunction namespaceHTMLInternal() {\n  instructionState.lFrame.currentNamespace = null;\n}\n\nfunction getNamespace() {\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\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 */\n\n\nfunction registerPreOrderHooks(directiveIndex, directiveDef, tView) {\n  ngDevMode && assertFirstCreatePass(tView);\n  var _directiveDef$type$pr = directiveDef.type.prototype,\n      ngOnChanges = _directiveDef$type$pr.ngOnChanges,\n      ngOnInit = _directiveDef$type$pr.ngOnInit,\n      ngDoCheck = _directiveDef$type$pr.ngDoCheck;\n\n  if (ngOnChanges) {\n    var wrappedOnChanges = NgOnChangesFeatureImpl(directiveDef);\n    (tView.preOrderHooks || (tView.preOrderHooks = [])).push(directiveIndex, wrappedOnChanges);\n    (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).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 * 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 */\n\n\nfunction registerPostOrderHooks(tView, tNode) {\n  ngDevMode && assertFirstCreatePass(tView); // 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\n  for (var i = tNode.directiveStart, end = tNode.directiveEnd; i < end; i++) {\n    var _directiveDef = tView.data[i];\n    ngDevMode && assertDefined(_directiveDef, 'Expecting DirectiveDef');\n    var lifecycleHooks = _directiveDef.type.prototype;\n    var ngAfterContentInit = lifecycleHooks.ngAfterContentInit,\n        ngAfterContentChecked = lifecycleHooks.ngAfterContentChecked,\n        ngAfterViewInit = lifecycleHooks.ngAfterViewInit,\n        ngAfterViewChecked = lifecycleHooks.ngAfterViewChecked,\n        ngOnDestroy = lifecycleHooks.ngOnDestroy;\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 * 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 * 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 */\n\n\nfunction executeCheckHooks(lView, hooks, nodeIndex) {\n  callHooks(lView, hooks, 3\n  /* InitPhaseCompleted */\n  , nodeIndex);\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 */\n\n\nfunction executeInitAndCheckHooks(lView, hooks, initPhase, nodeIndex) {\n  ngDevMode && assertNotEqual(initPhase, 3\n  /* InitPhaseCompleted */\n  , 'Init pre-order hooks should not be called more than once');\n\n  if ((lView[FLAGS] & 3\n  /* InitPhaseStateMask */\n  ) === initPhase) {\n    callHooks(lView, hooks, initPhase, nodeIndex);\n  }\n}\n\nfunction incrementInitPhaseFlags(lView, initPhase) {\n  ngDevMode && assertNotEqual(initPhase, 3\n  /* InitPhaseCompleted */\n  , 'Init hooks phase should not be incremented after all init hooks have been run.');\n  var flags = lView[FLAGS];\n\n  if ((flags & 3\n  /* InitPhaseStateMask */\n  ) === initPhase) {\n    flags &= 2047\n    /* IndexWithinInitPhaseReset */\n    ;\n    flags += 1\n    /* InitPhaseStateIncrementer */\n    ;\n    lView[FLAGS] = flags;\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 */\n\n\nfunction callHooks(currentView, arr, initPhase, currentNodeIndex) {\n  ngDevMode && assertEqual(isInCheckNoChangesMode(), false, 'Hooks should never be run when in check no changes mode.');\n  var startIndex = currentNodeIndex !== undefined ? currentView[PREORDER_HOOK_FLAGS] & 65535\n  /* IndexOfTheNextPreOrderHookMaskMask */\n  : 0;\n  var nodeIndexLimit = currentNodeIndex != null ? currentNodeIndex : -1;\n  var max = arr.length - 1; // Stop the loop at length - 1, because we look for the hook at i + 1\n\n  var lastNodeIndexFound = 0;\n\n  for (var i = startIndex; i < max; i++) {\n    var hook = arr[i + 1];\n\n    if (typeof hook === 'number') {\n      lastNodeIndexFound = arr[i];\n\n      if (currentNodeIndex != null && lastNodeIndexFound >= currentNodeIndex) {\n        break;\n      }\n    } else {\n      var isInitHook = arr[i] < 0;\n      if (isInitHook) currentView[PREORDER_HOOK_FLAGS] += 65536\n      /* NumberOfInitHooksCalledIncrementer */\n      ;\n\n      if (lastNodeIndexFound < nodeIndexLimit || nodeIndexLimit == -1) {\n        callHook(currentView, initPhase, arr, i);\n        currentView[PREORDER_HOOK_FLAGS] = (currentView[PREORDER_HOOK_FLAGS] & 4294901760\n        /* NumberOfInitHooksCalledMask */\n        ) + i + 2;\n      }\n\n      i++;\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 */\n\n\nfunction callHook(currentView, initPhase, arr, i) {\n  var isInitHook = arr[i] < 0;\n  var hook = arr[i + 1];\n  var directiveIndex = isInitHook ? -arr[i] : arr[i];\n  var directive = currentView[directiveIndex];\n\n  if (isInitHook) {\n    var indexWithintInitPhase = currentView[FLAGS] >> 11\n    /* IndexWithinInitPhaseShift */\n    ; // The init phase state must be always checked here as it may have been recursively updated.\n\n    if (indexWithintInitPhase < currentView[PREORDER_HOOK_FLAGS] >> 16\n    /* NumberOfInitHooksCalledShift */\n    && (currentView[FLAGS] & 3\n    /* InitPhaseStateMask */\n    ) === initPhase) {\n      currentView[FLAGS] += 2048\n      /* IndexWithinInitPhaseIncrementer */\n      ;\n      profiler(4\n      /* LifecycleHookStart */\n      , directive, hook);\n\n      try {\n        hook.call(directive);\n      } finally {\n        profiler(5\n        /* LifecycleHookEnd */\n        , directive, hook);\n      }\n    }\n  } else {\n    profiler(4\n    /* LifecycleHookStart */\n    , directive, hook);\n\n    try {\n      hook.call(directive);\n    } finally {\n      profiler(5\n      /* LifecycleHookEnd */\n      , 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\n\nvar NO_PARENT_INJECTOR = -1;\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 */\n\nvar NodeInjectorFactory = /*#__PURE__*/_createClass2(function NodeInjectorFactory(\n/**\n * Factory to invoke in order to create a new instance.\n */\nfactory,\n/**\n * Set to `true` if the token is declared in `viewProviders` (or if it is component).\n */\nisViewProvider, injectImplementation) {\n  _classCallCheck(this, NodeInjectorFactory);\n\n  this.factory = factory;\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\n  this.resolving = false;\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\nfunction isFactory(obj) {\n  return obj instanceof NodeInjectorFactory;\n} // Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\n\n\nvar unusedValueExportToPlacateAjd$3 = 1;\n/**\n * Converts `TNodeType` into human readable text.\n * Make sure this matches with `TNodeType`\n */\n\nfunction toTNodeTypeAsString(tNodeType) {\n  var text = '';\n  tNodeType & 1\n  /* Text */\n  && (text += '|Text');\n  tNodeType & 2\n  /* Element */\n  && (text += '|Element');\n  tNodeType & 4\n  /* Container */\n  && (text += '|Container');\n  tNodeType & 8\n  /* ElementContainer */\n  && (text += '|ElementContainer');\n  tNodeType & 16\n  /* Projection */\n  && (text += '|Projection');\n  tNodeType & 32\n  /* Icu */\n  && (text += '|IcuContainer');\n  tNodeType & 64\n  /* Placeholder */\n  && (text += '|Placeholder');\n  return text.length > 0 ? text.substring(1) : text;\n} // Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\n\n\nvar unusedValueExportToPlacateAjd$4 = 1;\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 */\n\nfunction hasClassInput(tNode) {\n  return (tNode.flags & 16\n  /* hasClassInput */\n  ) !== 0;\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 */\n\n\nfunction hasStyleInput(tNode) {\n  return (tNode.flags & 32\n  /* hasStyleInput */\n  ) !== 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\n\nfunction assertTNodeType(tNode, expectedTypes, message) {\n  assertDefined(tNode, 'should be called with a TNode');\n\n  if ((tNode.type & expectedTypes) === 0) {\n    throwError(message || \"Expected [\".concat(toTNodeTypeAsString(expectedTypes), \"] but got \").concat(toTNodeTypeAsString(tNode.type), \".\"));\n  }\n}\n\nfunction assertPureTNodeType(type) {\n  if (!(type === 2\n  /* Element */\n  || //\n  type === 1\n  /* Text */\n  || //\n  type === 4\n  /* Container */\n  || //\n  type === 8\n  /* ElementContainer */\n  || //\n  type === 32\n  /* Icu */\n  || //\n  type === 16\n  /* Projection */\n  || //\n  type === 64\n  /* Placeholder */\n  )) {\n    throwError(\"Expected TNodeType to have only a single type selected, but got \".concat(toTNodeTypeAsString(type), \".\"));\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 */\n\n\nfunction setUpAttributes(renderer, native, attrs) {\n  var isProc = isProceduralRenderer(renderer);\n  var i = 0;\n\n  while (i < attrs.length) {\n    var value = attrs[i];\n\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 !== 0\n      /* NamespaceURI */\n      ) {\n        break;\n      } // we just landed on the marker value ... therefore\n      // we should skip to the next entry\n\n\n      i++;\n      var namespaceURI = attrs[i++];\n      var attrName = attrs[i++];\n      var attrVal = attrs[i++];\n      ngDevMode && ngDevMode.rendererSetAttribute++;\n      isProc ? renderer.setAttribute(native, attrName, attrVal, namespaceURI) : native.setAttributeNS(namespaceURI, attrName, attrVal);\n    } else {\n      // attrName is string;\n      var _attrName = value;\n      var _attrVal = attrs[++i]; // Standard attributes\n\n      ngDevMode && ngDevMode.rendererSetAttribute++;\n\n      if (isAnimationProp(_attrName)) {\n        if (isProc) {\n          renderer.setProperty(native, _attrName, _attrVal);\n        }\n      } else {\n        isProc ? renderer.setAttribute(native, _attrName, _attrVal) : native.setAttribute(_attrName, _attrVal);\n      }\n\n      i++;\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\n\n  return i;\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 */\n\n\nfunction isNameOnlyAttributeMarker(marker) {\n  return marker === 3\n  /* Bindings */\n  || marker === 4\n  /* Template */\n  || marker === 6\n  /* I18n */\n  ;\n}\n\nfunction isAnimationProp(name) {\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) === 64\n  /* 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 */\n\n\nfunction mergeHostAttrs(dst, src) {\n  if (src === null || src.length === 0) {// 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    var srcMarker = -1\n    /* ImplicitAttributes */\n    ;\n\n    for (var i = 0; i < src.length; i++) {\n      var item = src[i];\n\n      if (typeof item === 'number') {\n        srcMarker = item;\n      } else {\n        if (srcMarker === 0\n        /* NamespaceURI */\n        ) {// Case where we need to consume `key1`, `key2`, `value` items.\n        } else if (srcMarker === -1\n        /* ImplicitAttributes */\n        || srcMarker === 2\n        /* Styles */\n        ) {\n          // Case where we have to consume `key1` and `value` only.\n          mergeHostAttribute(dst, srcMarker, item, null, src[++i]);\n        } else {\n          // Case where we have to consume `key1` only.\n          mergeHostAttribute(dst, srcMarker, item, null, null);\n        }\n      }\n    }\n  }\n\n  return dst;\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 */\n\n\nfunction mergeHostAttribute(dst, marker, key1, key2, value) {\n  var i = 0; // Assume that new markers will be inserted at the end.\n\n  var markerInsertPosition = dst.length; // scan until correct type.\n\n  if (marker === -1\n  /* ImplicitAttributes */\n  ) {\n    markerInsertPosition = -1;\n  } else {\n    while (i < dst.length) {\n      var dstValue = dst[i++];\n\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  } // search until you find place of insertion\n\n\n  while (i < dst.length) {\n    var item = dst[i];\n\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\n        return;\n      } else if (key2 === dst[i + 1]) {\n        dst[i + 2] = value;\n        return;\n      }\n    } // Increment counter.\n\n\n    i++;\n    if (key2 !== null) i++;\n    if (value !== null) i++;\n  } // insert at location.\n\n\n  if (markerInsertPosition !== -1) {\n    dst.splice(markerInsertPosition, 0, marker);\n    i = markerInsertPosition + 1;\n  }\n\n  dst.splice(i++, 0, key1);\n\n  if (key2 !== null) {\n    dst.splice(i++, 0, key2);\n  }\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/// Parent Injector Utils ///////////////////////////////////////////////////////////////\n\n\nfunction hasParentInjector(parentLocation) {\n  return parentLocation !== NO_PARENT_INJECTOR;\n}\n\nfunction getParentInjectorIndex(parentLocation) {\n  ngDevMode && assertNumber(parentLocation, 'Number expected');\n  ngDevMode && assertNotEqual(parentLocation, -1, 'Not a valid state.');\n  var parentInjectorIndex = parentLocation & 32767\n  /* InjectorIndexMask */\n  ;\n  ngDevMode && assertGreaterThan(parentInjectorIndex, HEADER_OFFSET, 'Parent injector must be pointing past HEADER_OFFSET.');\n  return parentLocation & 32767\n  /* InjectorIndexMask */\n  ;\n}\n\nfunction getParentInjectorViewOffset(parentLocation) {\n  return parentLocation >> 16\n  /* 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 */\n\n\nfunction getParentInjectorView(location, startView) {\n  var viewOffset = getParentInjectorViewOffset(location);\n  var parentView = startView; // 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\n  while (viewOffset > 0) {\n    parentView = parentView[DECLARATION_VIEW];\n    viewOffset--;\n  }\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\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 */\n\n\nvar includeViewProviders = true;\n\nfunction setIncludeViewProviders(v) {\n  var oldValue = includeViewProviders;\n  includeViewProviders = v;\n  return oldValue;\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 */\n\n\nvar BLOOM_SIZE = 256;\nvar BLOOM_MASK = BLOOM_SIZE - 1;\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 */\n\nvar BLOOM_BUCKET_BITS = 5;\n/** Counter used to generate unique IDs for directives. */\n\nvar nextNgElementId = 0;\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 */\n\nfunction bloomAdd(injectorIndex, tView, type) {\n  ngDevMode && assertEqual(tView.firstCreatePass, true, 'expected firstCreatePass to be true');\n  var id;\n\n  if (typeof type === 'string') {\n    id = type.charCodeAt(0) || 0;\n  } else if (type.hasOwnProperty(NG_ELEMENT_ID)) {\n    id = type[NG_ELEMENT_ID];\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\n\n  if (id == null) {\n    id = type[NG_ELEMENT_ID] = nextNgElementId++;\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\n\n  var bloomHash = id & BLOOM_MASK; // 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\n  var mask = 1 << bloomHash; // 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\n  tView.data[injectorIndex + (bloomHash >> BLOOM_BUCKET_BITS)] |= mask;\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 */\n\n\nfunction getOrCreateNodeInjectorForNode(tNode, lView) {\n  var existingInjectorIndex = getInjectorIndex(tNode, lView);\n\n  if (existingInjectorIndex !== -1) {\n    return existingInjectorIndex;\n  }\n\n  var tView = lView[TVIEW];\n\n  if (tView.firstCreatePass) {\n    tNode.injectorIndex = lView.length;\n    insertBloom(tView.data, tNode); // foundation for node bloom\n\n    insertBloom(lView, null); // foundation for cumulative bloom\n\n    insertBloom(tView.blueprint, null);\n  }\n\n  var parentLoc = getParentInjectorLocation(tNode, lView);\n  var injectorIndex = tNode.injectorIndex; // 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\n  if (hasParentInjector(parentLoc)) {\n    var parentIndex = getParentInjectorIndex(parentLoc);\n    var parentLView = getParentInjectorView(parentLoc, lView);\n    var parentData = parentLView[TVIEW].data; // 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\n    for (var i = 0; i < 8\n    /* BLOOM_SIZE */\n    ; i++) {\n      lView[injectorIndex + i] = parentLView[parentIndex + i] | parentData[parentIndex + i];\n    }\n  }\n\n  lView[injectorIndex + 8\n  /* PARENT */\n  ] = parentLoc;\n  return injectorIndex;\n}\n\nfunction insertBloom(arr, footer) {\n  arr.push(0, 0, 0, 0, 0, 0, 0, 0, footer);\n}\n\nfunction getInjectorIndex(tNode, lView) {\n  if (tNode.injectorIndex === -1 || // 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 || // 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 + 8\n  /* PARENT */\n  ] === null) {\n    return -1;\n  } else {\n    ngDevMode && assertIndexInRange(lView, tNode.injectorIndex);\n    return tNode.injectorIndex;\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 */\n\n\nfunction getParentInjectorLocation(tNode, lView) {\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; // ViewOffset is 0\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\n\n  var declarationViewOffset = 0;\n  var parentTNode = null;\n  var lViewCursor = lView; // 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\n  while (lViewCursor !== null) {\n    // First determine the `parentTNode` location. The parent pointer differs based on `TView.type`.\n    var tView = lViewCursor[TVIEW];\n    var tViewType = tView.type;\n\n    if (tViewType === 2\n    /* Embedded */\n    ) {\n      ngDevMode && assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');\n      parentTNode = tView.declTNode;\n    } else if (tViewType === 1\n    /* Component */\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      parentTNode = lViewCursor[T_HOST];\n    } else {\n      ngDevMode && assertEqual(tView.type, 0\n      /* Root */\n      , 'Root type expected');\n      parentTNode = null;\n    }\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]); // Every iteration of the loop requires that we go to the declared parent.\n\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 | declarationViewOffset << 16\n      /* ViewOffsetShift */\n      ;\n    }\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 */\n\n\nfunction diPublicInInjector(injectorIndex, tView, token) {\n  bloomAdd(injectorIndex, tView, token);\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 */\n\n\nfunction injectAttributeImpl(tNode, attrNameToInject) {\n  ngDevMode && assertTNodeType(tNode, 12\n  /* AnyContainer */\n  | 3\n  /* AnyRNode */\n  );\n  ngDevMode && assertDefined(tNode, 'expecting tNode');\n\n  if (attrNameToInject === 'class') {\n    return tNode.classes;\n  }\n\n  if (attrNameToInject === 'style') {\n    return tNode.styles;\n  }\n\n  var attrs = tNode.attrs;\n\n  if (attrs) {\n    var attrsLength = attrs.length;\n    var i = 0;\n\n    while (i < attrsLength) {\n      var value = attrs[i]; // If we hit a `Bindings` or `Template` marker then we are done.\n\n      if (isNameOnlyAttributeMarker(value)) break; // Skip namespaced attributes\n\n      if (value === 0\n      /* NamespaceURI */\n      ) {\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\n        while (i < attrsLength && typeof attrs[i] === 'string') {\n          i++;\n        }\n      } else if (value === attrNameToInject) {\n        return attrs[i + 1];\n      } else {\n        i = i + 2;\n      }\n    }\n  }\n\n  return null;\n}\n\nfunction notFoundValueOrThrow(notFoundValue, token, flags) {\n  if (flags & InjectFlags.Optional) {\n    return notFoundValue;\n  } else {\n    throwProviderNotFoundError(token, 'NodeInjector');\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 */\n\n\nfunction lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue) {\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    var moduleInjector = lView[INJECTOR]; // 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\n    var previousInjectImplementation = setInjectImplementation(undefined);\n\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\n  return notFoundValueOrThrow(notFoundValue, token, flags);\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 */\n\n\nfunction getOrCreateInjectable(tNode, lView, token) {\n  var flags = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : InjectFlags.Default;\n  var notFoundValue = arguments.length > 4 ? arguments[4] : undefined;\n\n  if (tNode !== null) {\n    var bloomHash = bloomHashBitOrFactory(token); // 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\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 ? notFoundValueOrThrow(notFoundValue, token, flags) : lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);\n      }\n\n      try {\n        var value = bloomHash(flags);\n\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      var previousTView = null;\n      var injectorIndex = getInjectorIndex(tNode, lView);\n      var parentLocation = NO_PARENT_INJECTOR;\n      var hostTElementNode = flags & InjectFlags.Host ? lView[DECLARATION_COMPONENT_VIEW][T_HOST] : null; // If we should skip this injector, or if there is no injector on this node, start by\n      // searching the parent injector.\n\n      if (injectorIndex === -1 || flags & InjectFlags.SkipSelf) {\n        parentLocation = injectorIndex === -1 ? getParentInjectorLocation(tNode, lView) : lView[injectorIndex + 8\n        /* PARENT */\n        ];\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      } // Traverse up the injector tree until we find a potential match or until we know there\n      // *isn't* a match.\n\n\n      while (injectorIndex !== -1) {\n        ngDevMode && assertNodeInjector(lView, injectorIndex); // Check the current injector. If it matches, see if it contains token.\n\n        var tView = lView[TVIEW];\n        ngDevMode && assertTNodeForLView(tView.data[injectorIndex + 8\n        /* TNODE */\n        ], lView);\n\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          var instance = searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode);\n\n          if (instance !== NOT_FOUND) {\n            return instance;\n          }\n        }\n\n        parentLocation = lView[injectorIndex + 8\n        /* PARENT */\n        ];\n\n        if (parentLocation !== NO_PARENT_INJECTOR && shouldSearchParent(flags, lView[TVIEW].data[injectorIndex + 8\n        /* TNODE */\n        ] === hostTElementNode) && 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(lView, token, flags, notFoundValue);\n}\n\nvar NOT_FOUND = {};\n\nfunction createNodeInjector() {\n  return new NodeInjector(getCurrentTNode(), getLView());\n}\n\nfunction searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode) {\n  var currentTView = lView[TVIEW];\n  var tNode = currentTView.data[injectorIndex + 8\n  /* TNODE */\n  ]; // First, we need to determine if view providers can be accessed by the starting element.\n  // There are two possibilities\n\n  var canAccessViewProviders = previousTView == null ? // 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 : // 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 & 3\n  /* AnyRNode */\n  ) !== 0; // This special case happens when there is a @host on the inject and when we are searching\n  // on the host element node.\n\n  var isHostSpecialCase = flags & InjectFlags.Host && hostTElementNode === tNode;\n  var injectableIdx = locateDirectiveOrProvider(tNode, currentTView, token, canAccessViewProviders, isHostSpecialCase);\n\n  if (injectableIdx !== null) {\n    return getNodeInjectable(lView, currentTView, injectableIdx, tNode);\n  } else {\n    return NOT_FOUND;\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 */\n\n\nfunction locateDirectiveOrProvider(tNode, tView, token, canAccessViewProviders, isHostSpecialCase) {\n  var nodeProviderIndexes = tNode.providerIndexes;\n  var tInjectables = tView.data;\n  var injectablesStart = nodeProviderIndexes & 1048575\n  /* ProvidersStartIndexMask */\n  ;\n  var directivesStart = tNode.directiveStart;\n  var directiveEnd = tNode.directiveEnd;\n  var cptViewProvidersCount = nodeProviderIndexes >> 20\n  /* CptViewProvidersCountShift */\n  ;\n  var startingIndex = canAccessViewProviders ? injectablesStart : injectablesStart + cptViewProvidersCount; // When the host special case applies, only the viewProviders and the component are visible\n\n  var endIndex = isHostSpecialCase ? injectablesStart + cptViewProvidersCount : directiveEnd;\n\n  for (var i = startingIndex; i < endIndex; i++) {\n    var providerTokenOrDef = tInjectables[i];\n\n    if (i < directivesStart && token === providerTokenOrDef || i >= directivesStart && providerTokenOrDef.type === token) {\n      return i;\n    }\n  }\n\n  if (isHostSpecialCase) {\n    var dirDef = tInjectables[directivesStart];\n\n    if (dirDef && isComponentDef(dirDef) && dirDef.type === token) {\n      return directivesStart;\n    }\n  }\n\n  return null;\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 */\n\n\nfunction getNodeInjectable(lView, tView, index, tNode) {\n  var value = lView[index];\n  var tData = tView.data;\n\n  if (isFactory(value)) {\n    var factory = value;\n\n    if (factory.resolving) {\n      throwCyclicDependencyError(stringifyForError(tData[index]));\n    }\n\n    var previousIncludeViewProviders = setIncludeViewProviders(factory.canSeeViewProviders);\n    factory.resolving = true;\n    var previousInjectImplementation = factory.injectImpl ? setInjectImplementation(factory.injectImpl) : null;\n    var success = enterDI(lView, tNode, InjectFlags.Default);\n    ngDevMode && assertEqual(success, true, 'Because flags do not contain \\`SkipSelf\\' we expect this to always succeed.');\n\n    try {\n      value = lView[index] = factory.factory(undefined, tData, lView, tNode); // 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\n      if (tView.firstCreatePass && index >= tNode.directiveStart) {\n        ngDevMode && assertDirectiveDef(tData[index]);\n        registerPreOrderHooks(index, tData[index], tView);\n      }\n    } finally {\n      previousInjectImplementation !== null && setInjectImplementation(previousInjectImplementation);\n      setIncludeViewProviders(previousIncludeViewProviders);\n      factory.resolving = false;\n      leaveDI();\n    }\n  }\n\n  return value;\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 */\n\n\nfunction bloomHashBitOrFactory(token) {\n  ngDevMode && assertDefined(token, 'token must be defined');\n\n  if (typeof token === 'string') {\n    return token.charCodeAt(0) || 0;\n  }\n\n  var tokenId = // First check with `hasOwnProperty` so we don't get an inherited ID.\n  token.hasOwnProperty(NG_ELEMENT_ID) ? token[NG_ELEMENT_ID] : undefined; // Negative token IDs are used for special objects such as `Injector`\n\n  if (typeof tokenId === 'number') {\n    if (tokenId >= 0) {\n      return tokenId & BLOOM_MASK;\n    } else {\n      ngDevMode && assertEqual(tokenId, -1\n      /* Injector */\n      , 'Expecting to get Special Injector Id');\n      return createNodeInjector;\n    }\n  } else {\n    return tokenId;\n  }\n}\n\nfunction bloomHasToken(bloomHash, injectorIndex, injectorView) {\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  var mask = 1 << bloomHash; // 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\n  var value = injectorView[injectorIndex + (bloomHash >> BLOOM_BUCKET_BITS)]; // If the bloom filter value has the bit corresponding to the directive's bloomBit flipped on,\n  // this injector is a potential match.\n\n  return !!(value & mask);\n}\n/** Returns true if flags prevent parent injector from being searched for tokens */\n\n\nfunction shouldSearchParent(flags, isFirstHostTNode) {\n  return !(flags & InjectFlags.Self) && !(flags & InjectFlags.Host && isFirstHostTNode);\n}\n\nvar NodeInjector = /*#__PURE__*/function () {\n  function NodeInjector(_tNode, _lView) {\n    _classCallCheck(this, NodeInjector);\n\n    this._tNode = _tNode;\n    this._lView = _lView;\n  }\n\n  _createClass2(NodeInjector, [{\n    key: \"get\",\n    value: function get(token, notFoundValue, flags) {\n      return getOrCreateInjectable(this._tNode, this._lView, token, flags, notFoundValue);\n    }\n  }]);\n\n  return NodeInjector;\n}();\n/**\n * @codeGenApi\n */\n\n\nfunction ɵɵgetInheritedFactory(type) {\n  return noSideEffects(function () {\n    var ownConstructor = type.prototype.constructor;\n    var ownFactory = ownConstructor[NG_FACTORY_DEF] || getFactoryOf(ownConstructor);\n    var objectPrototype = Object.prototype;\n    var parent = Object.getPrototypeOf(type.prototype).constructor; // Go up the prototype until we hit `Object`.\n\n    while (parent && parent !== objectPrototype) {\n      var factory = parent[NG_FACTORY_DEF] || getFactoryOf(parent); // 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\n      if (factory && factory !== ownFactory) {\n        return factory;\n      }\n\n      parent = Object.getPrototypeOf(parent);\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\n\n    return function (t) {\n      return new t();\n    };\n  });\n}\n\nfunction getFactoryOf(type) {\n  if (isForwardRef(type)) {\n    return function () {\n      var factory = getFactoryOf(resolveForwardRef(type));\n      return factory && factory();\n    };\n  }\n\n  return getFactoryDef(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 * Facade for the attribute injection from DI.\n *\n * @codeGenApi\n */\n\n\nfunction ɵɵinjectAttribute(attrNameToInject) {\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\n\nvar ANNOTATIONS = '__annotations__';\nvar PARAMETERS = '__parameters__';\nvar PROP_METADATA = '__prop__metadata__';\n/**\n * @suppress {globalThis}\n */\n\nfunction makeDecorator(name, props, parentClass, additionalProcessing, typeFn) {\n  return noSideEffects(function () {\n    var metaCtor = makeMetadataCtor(props);\n\n    function DecoratorFactory() {\n      for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n        args[_key2] = arguments[_key2];\n      }\n\n      if (this instanceof DecoratorFactory) {\n        metaCtor.call.apply(metaCtor, [this].concat(args));\n        return this;\n      }\n\n      var annotationInstance = _construct(DecoratorFactory, args);\n\n      return function TypeDecorator(cls) {\n        if (typeFn) typeFn.apply(void 0, [cls].concat(args)); // Use of Object.defineProperty is important since it creates non-enumerable property which\n        // prevents the property is copied during subclassing.\n\n        var annotations = cls.hasOwnProperty(ANNOTATIONS) ? cls[ANNOTATIONS] : Object.defineProperty(cls, ANNOTATIONS, {\n          value: []\n        })[ANNOTATIONS];\n        annotations.push(annotationInstance);\n        if (additionalProcessing) additionalProcessing(cls);\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.annotationCls = DecoratorFactory;\n    return DecoratorFactory;\n  });\n}\n\nfunction makeMetadataCtor(props) {\n  return function ctor() {\n    if (props) {\n      var values = props.apply(void 0, arguments);\n\n      for (var propName in values) {\n        this[propName] = values[propName];\n      }\n    }\n  };\n}\n\nfunction makeParamDecorator(name, props, parentClass) {\n  return noSideEffects(function () {\n    var metaCtor = makeMetadataCtor(props);\n\n    function ParamDecoratorFactory() {\n      for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n        args[_key3] = arguments[_key3];\n      }\n\n      if (this instanceof ParamDecoratorFactory) {\n        metaCtor.apply(this, args);\n        return this;\n      }\n\n      var annotationInstance = _construct(ParamDecoratorFactory, args);\n\n      ParamDecorator.annotation = annotationInstance;\n      return ParamDecorator;\n\n      function ParamDecorator(cls, unusedKey, index) {\n        // Use of Object.defineProperty is important since it creates non-enumerable property which\n        // prevents the property is copied during subclassing.\n        var parameters = cls.hasOwnProperty(PARAMETERS) ? cls[PARAMETERS] : Object.defineProperty(cls, PARAMETERS, {\n          value: []\n        })[PARAMETERS]; // there might be gaps if some in between parameters do not have annotations.\n        // we pad with nulls.\n\n        while (parameters.length <= index) {\n          parameters.push(null);\n        }\n\n        (parameters[index] = parameters[index] || []).push(annotationInstance);\n        return cls;\n      }\n    }\n\n    if (parentClass) {\n      ParamDecoratorFactory.prototype = Object.create(parentClass.prototype);\n    }\n\n    ParamDecoratorFactory.prototype.ngMetadataName = name;\n    ParamDecoratorFactory.annotationCls = ParamDecoratorFactory;\n    return ParamDecoratorFactory;\n  });\n}\n\nfunction makePropDecorator(name, props, parentClass, additionalProcessing) {\n  return noSideEffects(function () {\n    var metaCtor = makeMetadataCtor(props);\n\n    function PropDecoratorFactory() {\n      for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n        args[_key4] = arguments[_key4];\n      }\n\n      if (this instanceof PropDecoratorFactory) {\n        metaCtor.apply(this, args);\n        return this;\n      }\n\n      var decoratorInstance = _construct(PropDecoratorFactory, args);\n\n      function PropDecorator(target, name) {\n        var constructor = target.constructor; // Use of Object.defineProperty is important because it creates a non-enumerable property\n        // which prevents the property from being copied during subclassing.\n\n        var meta = constructor.hasOwnProperty(PROP_METADATA) ? constructor[PROP_METADATA] : Object.defineProperty(constructor, PROP_METADATA, {\n          value: {}\n        })[PROP_METADATA];\n        meta[name] = meta.hasOwnProperty(name) && meta[name] || [];\n        meta[name].unshift(decoratorInstance);\n        if (additionalProcessing) additionalProcessing.apply(void 0, [target, name].concat(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    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\n\nfunction CREATE_ATTRIBUTE_DECORATOR__PRE_R3__() {\n  return makeParamDecorator('Attribute', function (attributeName) {\n    return {\n      attributeName: attributeName\n    };\n  });\n}\n\nfunction CREATE_ATTRIBUTE_DECORATOR__POST_R3__() {\n  return makeParamDecorator('Attribute', function (attributeName) {\n    return {\n      attributeName: attributeName,\n      __NG_ELEMENT_ID__: function __NG_ELEMENT_ID__() {\n        return ɵɵinjectAttribute(attributeName);\n      }\n    };\n  });\n}\n\nvar CREATE_ATTRIBUTE_DECORATOR_IMPL = CREATE_ATTRIBUTE_DECORATOR__POST_R3__;\n/**\n * Attribute decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\n\nvar Attribute = /*@__PURE__*/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\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 */\n\nvar InjectionToken = /*#__PURE__*/function () {\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  function InjectionToken(_desc, options) {\n    _classCallCheck(this, InjectionToken);\n\n    this._desc = _desc;\n    /** @internal */\n\n    this.ngMetadataName = 'InjectionToken';\n    this.ɵprov = undefined;\n\n    if (typeof options == 'number') {\n      (typeof ngDevMode === 'undefined' || ngDevMode) && assertLessThan(options, 0, 'Only negative numbers are supported here'); // This is a special hack to assign __NG_ELEMENT_ID__ to this instance.\n      // See `InjectorMarkers`\n\n      this.__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  _createClass2(InjectionToken, [{\n    key: \"toString\",\n    value: function toString() {\n      return \"InjectionToken \".concat(this._desc);\n    }\n  }]);\n\n  return 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\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 */\n\n\nvar ANALYZE_FOR_ENTRY_COMPONENTS = /*@__PURE__*/new InjectionToken('AnalyzeForEntryComponents'); // Stores the default value of `emitDistinctChangesOnly` when the `emitDistinctChangesOnly` is not\n// explicitly set.\n\nvar emitDistinctChangesOnlyDefaultValue = true;\n/**\n * Base class for query metadata.\n *\n * @see `ContentChildren`.\n * @see `ContentChild`.\n * @see `ViewChildren`.\n * @see `ViewChild`.\n *\n * @publicApi\n */\n\nvar Query = /*#__PURE__*/_createClass2(function Query() {\n  _classCallCheck(this, Query);\n});\n\nvar ɵ0$1 = function ɵ0$1(selector) {\n  var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  return Object.assign({\n    selector: selector,\n    first: false,\n    isViewQuery: false,\n    descendants: false,\n    emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue\n  }, data);\n};\n/**\n * ContentChildren decorator and metadata.\n *\n *\n * @Annotation\n * @publicApi\n */\n\n\nvar ContentChildren = /*@__PURE__*/makePropDecorator('ContentChildren', ɵ0$1, Query);\n\nvar ɵ1 = function ɵ1(selector) {\n  var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  return Object.assign({\n    selector: selector,\n    first: true,\n    isViewQuery: false,\n    descendants: true\n  }, data);\n};\n/**\n * ContentChild decorator and metadata.\n *\n *\n * @Annotation\n *\n * @publicApi\n */\n\n\nvar ContentChild = /*@__PURE__*/makePropDecorator('ContentChild', ɵ1, Query);\n\nvar ɵ2 = function ɵ2(selector) {\n  var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  return Object.assign({\n    selector: selector,\n    first: false,\n    isViewQuery: true,\n    descendants: true,\n    emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue\n  }, data);\n};\n/**\n * ViewChildren decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\n\n\nvar ViewChildren = /*@__PURE__*/makePropDecorator('ViewChildren', ɵ2, Query);\n\nvar ɵ3 = function ɵ3(selector, data) {\n  return Object.assign({\n    selector: selector,\n    first: true,\n    isViewQuery: true,\n    descendants: true\n  }, data);\n};\n/**\n * ViewChild decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\n\n\nvar ViewChild = /*@__PURE__*/makePropDecorator('ViewChild', ɵ3, 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\nvar FactoryTarget = /*@__PURE__*/function (FactoryTarget) {\n  FactoryTarget[FactoryTarget[\"Directive\"] = 0] = \"Directive\";\n  FactoryTarget[FactoryTarget[\"Component\"] = 1] = \"Component\";\n  FactoryTarget[FactoryTarget[\"Injectable\"] = 2] = \"Injectable\";\n  FactoryTarget[FactoryTarget[\"Pipe\"] = 3] = \"Pipe\";\n  FactoryTarget[FactoryTarget[\"NgModule\"] = 4] = \"NgModule\";\n  return FactoryTarget;\n}({});\n\nvar ViewEncapsulation$1 = /*@__PURE__*/function (ViewEncapsulation) {\n  ViewEncapsulation[ViewEncapsulation[\"Emulated\"] = 0] = \"Emulated\"; // Historically the 1 value was for `Native` encapsulation which has been removed as of v11.\n\n  ViewEncapsulation[ViewEncapsulation[\"None\"] = 2] = \"None\";\n  ViewEncapsulation[ViewEncapsulation[\"ShadowDom\"] = 3] = \"ShadowDom\";\n  return ViewEncapsulation;\n}({});\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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\nfunction getCompilerFacade(request) {\n  var globalNg = _global['ng'];\n\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 \".concat(request.kind), request.type);\n    var message = \"The \".concat(request.kind, \" '\").concat(request.type.name, \"' needs to be compiled using the JIT compiler, but '@angular/compiler' is not available.\\n\\n\");\n\n    if (request.usage === 1\n    /* PartialDeclaration */\n    ) {\n      message += \"The \".concat(request.kind, \" is part of a library that has been partially compiled.\\n\");\n      message += \"However, the Angular Linker has not processed the library such that JIT compilation is used as fallback.\\n\";\n      message += '\\n';\n      message += \"Ideally, the library is processed using the Angular Linker to become fully AOT compiled.\\n\";\n    } else {\n      message += \"JIT compilation is discouraged for production use-cases! Consider using AOT mode instead.\\n\";\n    }\n\n    message += \"Alternatively, the JIT compiler should be loaded by bootstrapping using '@angular/platform-browser-dynamic' or '@angular/platform-server',\\n\";\n    message += \"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 */\n\n\nvar Type = Function;\n\nfunction isType(v) {\n  return typeof v === 'function';\n}\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * 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 */\n\n\nfunction addAllToArray(items, arr) {\n  for (var i = 0; i < items.length; i++) {\n    arr.push(items[i]);\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 */\n\n\nfunction arrayEquals(a, b, identityAccessor) {\n  if (a.length !== b.length) return false;\n\n  for (var i = 0; i < a.length; i++) {\n    var valueA = a[i];\n    var valueB = b[i];\n\n    if (identityAccessor) {\n      valueA = identityAccessor(valueA);\n      valueB = identityAccessor(valueB);\n    }\n\n    if (valueB !== valueA) {\n      return false;\n    }\n  }\n\n  return true;\n}\n/**\n * Flattens an array.\n */\n\n\nfunction flatten(list, dst) {\n  if (dst === undefined) dst = list;\n\n  for (var i = 0; i < list.length; i++) {\n    var item = list[i];\n\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\n      flatten(item, dst);\n    } else if (dst !== list) {\n      dst.push(item);\n    }\n  }\n\n  return dst;\n}\n\nfunction deepForEach(input, fn) {\n  input.forEach(function (value) {\n    return Array.isArray(value) ? deepForEach(value, fn) : fn(value);\n  });\n}\n\nfunction addToArray(arr, index, value) {\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\nfunction removeFromArray(arr, index) {\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\nfunction newArray(size, value) {\n  var list = [];\n\n  for (var i = 0; i < size; i++) {\n    list.push(value);\n  }\n\n  return list;\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 */\n\n\nfunction arraySplice(array, index, count) {\n  var length = array.length - count;\n\n  while (index < length) {\n    array[index] = array[index + count];\n    index++;\n  }\n\n  while (count--) {\n    array.pop(); // shrink the array\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 */\n\n\nfunction arrayInsert(array, index, value) {\n  ngDevMode && assertLessThanOrEqual(index, array.length, 'Can\\'t insert past array end.');\n  var end = array.length;\n\n  while (end > index) {\n    var previousEnd = end - 1;\n    array[end] = array[previousEnd];\n    end = previousEnd;\n  }\n\n  array[index] = value;\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 */\n\n\nfunction arrayInsert2(array, index, value1, value2) {\n  ngDevMode && assertLessThanOrEqual(index, array.length, 'Can\\'t insert past array end.');\n  var end = array.length;\n\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\n    while (end > index) {\n      var previousEnd = end - 2;\n      array[end] = array[previousEnd];\n      end--;\n    }\n\n    array[index] = value1;\n    array[index + 1] = value2;\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 */\n\n\nfunction arrayInsertSorted(array, value) {\n  var index = arrayIndexOfSorted(array, value);\n\n  if (index < 0) {\n    // if we did not find it insert it.\n    index = ~index;\n    arrayInsert(array, index, value);\n  }\n\n  return index;\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 */\n\n\nfunction arrayRemoveSorted(array, value) {\n  var index = arrayIndexOfSorted(array, value);\n\n  if (index >= 0) {\n    arraySplice(array, index, 1);\n  }\n\n  return index;\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 */\n\n\nfunction arrayIndexOfSorted(array, value) {\n  return _arrayIndexOfSorted(array, value, 0);\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 */\n\n\nfunction keyValueArraySet(keyValueArray, key, value) {\n  var index = keyValueArrayIndexOf(keyValueArray, key);\n\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\n  return index;\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 */\n\n\nfunction keyValueArrayGet(keyValueArray, key) {\n  var index = keyValueArrayIndexOf(keyValueArray, key);\n\n  if (index >= 0) {\n    // if we found it retrieve it.\n    return keyValueArray[index | 1];\n  }\n\n  return undefined;\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 */\n\n\nfunction keyValueArrayIndexOf(keyValueArray, key) {\n  return _arrayIndexOfSorted(keyValueArray, key, 1);\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 */\n\n\nfunction keyValueArrayDelete(keyValueArray, key) {\n  var index = keyValueArrayIndexOf(keyValueArray, key);\n\n  if (index >= 0) {\n    // if we found it remove it.\n    arraySplice(keyValueArray, index, 2);\n  }\n\n  return index;\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 */\n\n\nfunction _arrayIndexOfSorted(array, value, shift) {\n  ngDevMode && assertEqual(Array.isArray(array), true, 'Expecting an array');\n  var start = 0;\n  var end = array.length >> shift;\n\n  while (end !== start) {\n    var middle = start + (end - start >> 1); // find the middle.\n\n    var current = array[middle << shift];\n\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\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\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 */\n\n\nvar ES5_DELEGATE_CTOR = /^function\\s+\\S+\\(\\)\\s*{[\\s\\S]+\\.apply\\(this,\\s*(arguments|(?:[^()]+\\(\\[\\],)?[^()]+\\(arguments\\))\\)/;\n/** Regular expression that detects ES2015 classes which extend from other classes. */\n\nvar 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 */\n\nvar ES2015_INHERITED_CLASS_WITH_CTOR = /^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 */\n\nvar ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{[\\s\\S]*constructor\\s*\\(\\)\\s*{\\s*super\\(\\.\\.\\.arguments\\)/;\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 */\n\nfunction isDelegateCtor(typeStr) {\n  return ES5_DELEGATE_CTOR.test(typeStr) || ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR.test(typeStr) || ES2015_INHERITED_CLASS.test(typeStr) && !ES2015_INHERITED_CLASS_WITH_CTOR.test(typeStr);\n}\n\nvar ReflectionCapabilities = /*#__PURE__*/function () {\n  function ReflectionCapabilities(reflect) {\n    _classCallCheck(this, ReflectionCapabilities);\n\n    this._reflect = reflect || _global['Reflect'];\n  }\n\n  _createClass2(ReflectionCapabilities, [{\n    key: \"isReflectionEnabled\",\n    value: function isReflectionEnabled() {\n      return true;\n    }\n  }, {\n    key: \"factory\",\n    value: function factory(t) {\n      return function () {\n        for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n          args[_key5] = arguments[_key5];\n        }\n\n        return _construct(t, args);\n      };\n    }\n    /** @internal */\n\n  }, {\n    key: \"_zipTypesAndAnnotations\",\n    value: function _zipTypesAndAnnotations(paramTypes, paramAnnotations) {\n      var result;\n\n      if (typeof paramTypes === 'undefined') {\n        result = newArray(paramAnnotations.length);\n      } else {\n        result = newArray(paramTypes.length);\n      }\n\n      for (var 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\n        if (paramAnnotations && paramAnnotations[i] != null) {\n          result[i] = result[i].concat(paramAnnotations[i]);\n        }\n      }\n\n      return result;\n    }\n  }, {\n    key: \"_ownParameters\",\n    value: function _ownParameters(type, parentCtor) {\n      var typeStr = type.toString(); // 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\n      if (isDelegateCtor(typeStr)) {\n        return null;\n      } // Prefer the direct API.\n\n\n      if (type.parameters && type.parameters !== parentCtor.parameters) {\n        return type.parameters;\n      } // API of tsickle for lowering decorators to properties on the class.\n\n\n      var tsickleCtorParams = type.ctorParameters;\n\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        var ctorParameters = typeof tsickleCtorParams === 'function' ? tsickleCtorParams() : tsickleCtorParams;\n\n        var _paramTypes = ctorParameters.map(function (ctorParam) {\n          return ctorParam && ctorParam.type;\n        });\n\n        var _paramAnnotations = ctorParameters.map(function (ctorParam) {\n          return ctorParam && convertTsickleDecoratorIntoMetadata(ctorParam.decorators);\n        });\n\n        return this._zipTypesAndAnnotations(_paramTypes, _paramAnnotations);\n      } // API for metadata created by invoking the decorators.\n\n\n      var paramAnnotations = type.hasOwnProperty(PARAMETERS) && type[PARAMETERS];\n\n      var paramTypes = this._reflect && this._reflect.getOwnMetadata && this._reflect.getOwnMetadata('design:paramtypes', type);\n\n      if (paramTypes || paramAnnotations) {\n        return this._zipTypesAndAnnotations(paramTypes, paramAnnotations);\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\n\n      return newArray(type.length);\n    }\n  }, {\n    key: \"parameters\",\n    value: function parameters(type) {\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\n      var parentCtor = getParentCtor(type);\n\n      var parameters = this._ownParameters(type, parentCtor);\n\n      if (!parameters && parentCtor !== Object) {\n        parameters = this.parameters(parentCtor);\n      }\n\n      return parameters || [];\n    }\n  }, {\n    key: \"_ownAnnotations\",\n    value: function _ownAnnotations(typeOrFunc, parentCtor) {\n      // Prefer the direct API.\n      if (typeOrFunc.annotations && typeOrFunc.annotations !== parentCtor.annotations) {\n        var annotations = typeOrFunc.annotations;\n\n        if (typeof annotations === 'function' && annotations.annotations) {\n          annotations = annotations.annotations;\n        }\n\n        return annotations;\n      } // API of tsickle for lowering decorators to properties on the class.\n\n\n      if (typeOrFunc.decorators && typeOrFunc.decorators !== parentCtor.decorators) {\n        return convertTsickleDecoratorIntoMetadata(typeOrFunc.decorators);\n      } // API for metadata created by invoking the decorators.\n\n\n      if (typeOrFunc.hasOwnProperty(ANNOTATIONS)) {\n        return typeOrFunc[ANNOTATIONS];\n      }\n\n      return null;\n    }\n  }, {\n    key: \"annotations\",\n    value: function annotations(typeOrFunc) {\n      if (!isType(typeOrFunc)) {\n        return [];\n      }\n\n      var parentCtor = getParentCtor(typeOrFunc);\n      var ownAnnotations = this._ownAnnotations(typeOrFunc, parentCtor) || [];\n      var parentAnnotations = parentCtor !== Object ? this.annotations(parentCtor) : [];\n      return parentAnnotations.concat(ownAnnotations);\n    }\n  }, {\n    key: \"_ownPropMetadata\",\n    value: function _ownPropMetadata(typeOrFunc, parentCtor) {\n      // Prefer the direct API.\n      if (typeOrFunc.propMetadata && typeOrFunc.propMetadata !== parentCtor.propMetadata) {\n        var propMetadata = typeOrFunc.propMetadata;\n\n        if (typeof propMetadata === 'function' && propMetadata.propMetadata) {\n          propMetadata = propMetadata.propMetadata;\n        }\n\n        return propMetadata;\n      } // API of tsickle for lowering decorators to properties on the class.\n\n\n      if (typeOrFunc.propDecorators && typeOrFunc.propDecorators !== parentCtor.propDecorators) {\n        var propDecorators = typeOrFunc.propDecorators;\n        var _propMetadata = {};\n        Object.keys(propDecorators).forEach(function (prop) {\n          _propMetadata[prop] = convertTsickleDecoratorIntoMetadata(propDecorators[prop]);\n        });\n        return _propMetadata;\n      } // API for metadata created by invoking the decorators.\n\n\n      if (typeOrFunc.hasOwnProperty(PROP_METADATA)) {\n        return typeOrFunc[PROP_METADATA];\n      }\n\n      return null;\n    }\n  }, {\n    key: \"propMetadata\",\n    value: function propMetadata(typeOrFunc) {\n      if (!isType(typeOrFunc)) {\n        return {};\n      }\n\n      var parentCtor = getParentCtor(typeOrFunc);\n      var propMetadata = {};\n\n      if (parentCtor !== Object) {\n        var parentPropMetadata = this.propMetadata(parentCtor);\n        Object.keys(parentPropMetadata).forEach(function (propName) {\n          propMetadata[propName] = parentPropMetadata[propName];\n        });\n      }\n\n      var ownPropMetadata = this._ownPropMetadata(typeOrFunc, parentCtor);\n\n      if (ownPropMetadata) {\n        Object.keys(ownPropMetadata).forEach(function (propName) {\n          var decorators = [];\n\n          if (propMetadata.hasOwnProperty(propName)) {\n            decorators.push.apply(decorators, _toConsumableArray(propMetadata[propName]));\n          }\n\n          decorators.push.apply(decorators, _toConsumableArray(ownPropMetadata[propName]));\n          propMetadata[propName] = decorators;\n        });\n      }\n\n      return propMetadata;\n    }\n  }, {\n    key: \"ownPropMetadata\",\n    value: function ownPropMetadata(typeOrFunc) {\n      if (!isType(typeOrFunc)) {\n        return {};\n      }\n\n      return this._ownPropMetadata(typeOrFunc, getParentCtor(typeOrFunc)) || {};\n    }\n  }, {\n    key: \"hasLifecycleHook\",\n    value: function hasLifecycleHook(type, lcProperty) {\n      return type instanceof Type && lcProperty in type.prototype;\n    }\n  }, {\n    key: \"guards\",\n    value: function guards(type) {\n      return {};\n    }\n  }, {\n    key: \"getter\",\n    value: function getter(name) {\n      return new Function('o', 'return o.' + name + ';');\n    }\n  }, {\n    key: \"setter\",\n    value: function setter(name) {\n      return new Function('o', 'v', 'return o.' + name + ' = v;');\n    }\n  }, {\n    key: \"method\",\n    value: function method(name) {\n      var functionBody = \"if (!o.\".concat(name, \") throw new Error('\\\"\").concat(name, \"\\\" is undefined');\\n        return o.\").concat(name, \".apply(o, args);\");\n      return new Function('o', 'args', functionBody);\n    } // There is not a concept of import uri in Js, but this is useful in developing Dart applications.\n\n  }, {\n    key: \"importUri\",\n    value: function importUri(type) {\n      // StaticSymbol\n      if (typeof type === 'object' && type['filePath']) {\n        return type['filePath'];\n      } // Runtime type\n\n\n      return \"./\".concat(stringify(type));\n    }\n  }, {\n    key: \"resourceUri\",\n    value: function resourceUri(type) {\n      return \"./\".concat(stringify(type));\n    }\n  }, {\n    key: \"resolveIdentifier\",\n    value: function resolveIdentifier(name, moduleUrl, members, runtime) {\n      return runtime;\n    }\n  }, {\n    key: \"resolveEnum\",\n    value: function resolveEnum(enumIdentifier, name) {\n      return enumIdentifier[name];\n    }\n  }]);\n\n  return ReflectionCapabilities;\n}();\n\nfunction convertTsickleDecoratorIntoMetadata(decoratorInvocations) {\n  if (!decoratorInvocations) {\n    return [];\n  }\n\n  return decoratorInvocations.map(function (decoratorInvocation) {\n    var decoratorType = decoratorInvocation.type;\n    var annotationCls = decoratorType.annotationCls;\n    var annotationArgs = decoratorInvocation.args ? decoratorInvocation.args : [];\n    return _construct(annotationCls, _toConsumableArray(annotationArgs));\n  });\n}\n\nfunction getParentCtor(ctor) {\n  var parentProto = ctor.prototype ? Object.getPrototypeOf(ctor.prototype) : null;\n  var parentCtor = parentProto ? parentProto.constructor : null; // Note: We always use `Object` as the null value\n  // to simplify checking later on.\n\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\n\nvar _THROW_IF_NOT_FOUND = {};\nvar THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;\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 */\n\nvar DI_DECORATOR_FLAG = '__NG_DI_FLAG__';\nvar NG_TEMP_TOKEN_PATH = 'ngTempTokenPath';\nvar NG_TOKEN_PATH = 'ngTokenPath';\nvar NEW_LINE = /\\n/gm;\nvar NO_NEW_LINE = 'ɵ';\nvar SOURCE = '__source';\nvar ɵ0$2 = getClosureSafeProperty;\nvar USE_VALUE = /*@__PURE__*/getClosureSafeProperty({\n  provide: String,\n  useValue: ɵ0$2\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 */\n\nvar _currentInjector = undefined;\n\nfunction setCurrentInjector(injector) {\n  var former = _currentInjector;\n  _currentInjector = injector;\n  return former;\n}\n\nfunction injectInjectorOnly(token) {\n  var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : InjectFlags.Default;\n\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\nfunction ɵɵinject(token) {\n  var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : InjectFlags.Default;\n  return (getInjectImplementation() || injectInjectorOnly)(resolveForwardRef(token), flags);\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 */\n\n\nfunction ɵɵinvalidFactoryDep(index) {\n  var msg = ngDevMode ? \"This constructor is not compatible with Angular Dependency Injection because its dependency at index \".concat(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 \").concat(index, \" is correct and 2) the correct Angular decorators are defined for this class and its ancestors.\") : 'invalid';\n  throw new Error(msg);\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 */\n\n\nvar inject = ɵɵinject;\n\nfunction injectArgs(types) {\n  var args = [];\n\n  for (var i = 0; i < types.length; i++) {\n    var arg = resolveForwardRef(types[i]);\n\n    if (Array.isArray(arg)) {\n      if (arg.length === 0) {\n        throw new Error('Arguments array must have arguments.');\n      }\n\n      var type = undefined;\n      var flags = InjectFlags.Default;\n\n      for (var j = 0; j < arg.length; j++) {\n        var meta = arg[j];\n        var flag = getInjectFlag(meta);\n\n        if (typeof flag === 'number') {\n          // Special case when we handle @Inject decorator.\n          if (flag === -1\n          /* Inject */\n          ) {\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\n  return args;\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 */\n\n\nfunction attachInjectFlag(decorator, flag) {\n  decorator[DI_DECORATOR_FLAG] = flag;\n  decorator.prototype[DI_DECORATOR_FLAG] = flag;\n  return decorator;\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 */\n\n\nfunction getInjectFlag(token) {\n  return token[DI_DECORATOR_FLAG];\n}\n\nfunction catchInjectorError(e, token, injectorErrorName, source) {\n  var tokenPath = e[NG_TEMP_TOKEN_PATH];\n\n  if (token[SOURCE]) {\n    tokenPath.unshift(token[SOURCE]);\n  }\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\nfunction formatError(text, obj, injectorErrorName) {\n  var source = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n  text = text && text.charAt(0) === '\\n' && text.charAt(1) == NO_NEW_LINE ? text.substr(2) : text;\n  var context = stringify(obj);\n\n  if (Array.isArray(obj)) {\n    context = obj.map(stringify).join(' -> ');\n  } else if (typeof obj === 'object') {\n    var parts = [];\n\n    for (var key in obj) {\n      if (obj.hasOwnProperty(key)) {\n        var value = obj[key];\n        parts.push(key + ':' + (typeof value === 'string' ? JSON.stringify(value) : stringify(value)));\n      }\n    }\n\n    context = \"{\".concat(parts.join(', '), \"}\");\n  }\n\n  return \"\".concat(injectorErrorName).concat(source ? '(' + source + ')' : '', \"[\").concat(context, \"]: \").concat(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\n\nvar ɵ0$3 = function ɵ0$3(token) {\n  return {\n    token: token\n  };\n};\n/**\n * Inject decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\n\n\nvar Inject = /*@__PURE__*/attachInjectFlag( // Disable tslint because `DecoratorFlags` is a const enum which gets inlined.\n// tslint:disable-next-line: no-toplevel-property-access\n\n/*@__PURE__*/\nmakeParamDecorator('Inject', ɵ0$3), -1\n/* Inject */\n);\n/**\n * Optional decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\n\nvar Optional = // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n// tslint:disable-next-line: no-toplevel-property-access\n\n/*@__PURE__*/\nattachInjectFlag( /*@__PURE__*/makeParamDecorator('Optional'), 8\n/* Optional */\n);\n/**\n * Self decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\n\nvar Self = // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n// tslint:disable-next-line: no-toplevel-property-access\n\n/*@__PURE__*/\nattachInjectFlag( /*@__PURE__*/makeParamDecorator('Self'), 2\n/* Self */\n);\n/**\n * `SkipSelf` decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\n\nvar SkipSelf = // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n// tslint:disable-next-line: no-toplevel-property-access\n\n/*@__PURE__*/\nattachInjectFlag( /*@__PURE__*/makeParamDecorator('SkipSelf'), 4\n/* SkipSelf */\n);\n/**\n * Host decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\n\nvar Host = // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n// tslint:disable-next-line: no-toplevel-property-access\n\n/*@__PURE__*/\nattachInjectFlag( /*@__PURE__*/makeParamDecorator('Host'), 1\n/* Host */\n);\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nvar _reflect = null;\n\nfunction getReflect() {\n  return _reflect = _reflect || new ReflectionCapabilities();\n}\n\nfunction reflectDependencies(type) {\n  return convertDependencies(getReflect().parameters(type));\n}\n\nfunction convertDependencies(deps) {\n  return deps.map(function (dep) {\n    return reflectDependency(dep);\n  });\n}\n\nfunction reflectDependency(dep) {\n  var meta = {\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 (var j = 0; j < dep.length; j++) {\n      var param = dep[j];\n\n      if (param === undefined) {\n        // param may be undefined if type of dep is not set by ngtsc\n        continue;\n      }\n\n      var 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\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\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\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 */\n\n\nfunction resolveComponentResources(resourceResolver) {\n  // Store all promises which are fetching the resources.\n  var componentResolved = []; // Cache so that we don't fetch the same resource more than once.\n\n  var urlMap = new Map();\n\n  function cachedResourceResolve(url) {\n    var promise = urlMap.get(url);\n\n    if (!promise) {\n      var resp = resourceResolver(url);\n      urlMap.set(url, promise = resp.then(unwrapResponse));\n    }\n\n    return promise;\n  }\n\n  componentResourceResolutionQueue.forEach(function (component, type) {\n    var promises = [];\n\n    if (component.templateUrl) {\n      promises.push(cachedResourceResolve(component.templateUrl).then(function (template) {\n        component.template = template;\n      }));\n    }\n\n    var styleUrls = component.styleUrls;\n    var styles = component.styles || (component.styles = []);\n    var styleOffset = component.styles.length;\n    styleUrls && styleUrls.forEach(function (styleUrl, index) {\n      styles.push(''); // pre-allocate array.\n\n      promises.push(cachedResourceResolve(styleUrl).then(function (style) {\n        styles[styleOffset + index] = style;\n        styleUrls.splice(styleUrls.indexOf(styleUrl), 1);\n\n        if (styleUrls.length == 0) {\n          component.styleUrls = undefined;\n        }\n      }));\n    });\n    var fullyResolved = Promise.all(promises).then(function () {\n      return componentDefResolved(type);\n    });\n    componentResolved.push(fullyResolved);\n  });\n  clearResolutionOfComponentResourcesQueue();\n  return Promise.all(componentResolved).then(function () {\n    return undefined;\n  });\n}\n\nvar componentResourceResolutionQueue = /*@__PURE__*/new Map(); // Track when existing ɵcmp for a Type is waiting on resources.\n\nvar componentDefPendingResolution = /*@__PURE__*/new Set();\n\nfunction maybeQueueResolutionOfComponentResources(type, metadata) {\n  if (componentNeedsResolution(metadata)) {\n    componentResourceResolutionQueue.set(type, metadata);\n    componentDefPendingResolution.add(type);\n  }\n}\n\nfunction isComponentDefPendingResolution(type) {\n  return componentDefPendingResolution.has(type);\n}\n\nfunction componentNeedsResolution(component) {\n  return !!(component.templateUrl && !component.hasOwnProperty('template') || component.styleUrls && component.styleUrls.length);\n}\n\nfunction clearResolutionOfComponentResourcesQueue() {\n  var old = componentResourceResolutionQueue;\n  componentResourceResolutionQueue = new Map();\n  return old;\n}\n\nfunction restoreComponentResolutionQueue(queue) {\n  componentDefPendingResolution.clear();\n  queue.forEach(function (_, type) {\n    return componentDefPendingResolution.add(type);\n  });\n  componentResourceResolutionQueue = queue;\n}\n\nfunction isComponentResourceResolutionQueueEmpty() {\n  return componentResourceResolutionQueue.size === 0;\n}\n\nfunction unwrapResponse(response) {\n  return typeof response == 'string' ? response : response.text();\n}\n\nfunction componentDefResolved(type) {\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 * 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 */\n\n\nvar policy;\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 */\n\nfunction getPolicy() {\n  if (policy === undefined) {\n    policy = null;\n\n    if (_global.trustedTypes) {\n      try {\n        policy = _global.trustedTypes.createPolicy('angular', {\n          createHTML: function createHTML(s) {\n            return s;\n          },\n          createScript: function createScript(s) {\n            return s;\n          },\n          createScriptURL: function createScriptURL(s) {\n            return s;\n          }\n        });\n      } catch (_a) {// 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\n  return policy;\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 */\n\n\nfunction trustedHTMLFromString(html) {\n  var _a;\n\n  return ((_a = getPolicy()) === null || _a === void 0 ? void 0 : _a.createHTML(html)) || html;\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 */\n\n\nfunction trustedScriptFromString(script) {\n  var _a;\n\n  return ((_a = getPolicy()) === null || _a === void 0 ? void 0 : _a.createScript(script)) || script;\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 */\n\n\nfunction trustedScriptURLFromString(url) {\n  var _a;\n\n  return ((_a = getPolicy()) === null || _a === void 0 ? void 0 : _a.createScriptURL(url)) || url;\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 */\n\n\nfunction newTrustedFunctionForDev() {\n  if (typeof ngDevMode === 'undefined') {\n    throw new Error('newTrustedFunctionForDev should never be called in production');\n  }\n\n  for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n    args[_key6] = arguments[_key6];\n  }\n\n  if (!_global.trustedTypes) {\n    // In environments that don't support Trusted Types, fall back to the most\n    // straightforward implementation:\n    return _construct(Function, args);\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\n\n  var fnArgs = args.slice(0, -1).join(',');\n  var fnBody = args[args.length - 1];\n  var body = \"(function anonymous(\".concat(fnArgs, \"\\n) { \").concat(fnBody, \"\\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\n  var fn = _global['eval'](trustedScriptFromString(body));\n\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 _construct(Function, args);\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\n\n  fn.toString = function () {\n    return body;\n  }; // 2. When calling the resulting function, `this` should refer to `global`\n\n\n  return fn.bind(_global); // 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 * 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 */\n\n\nvar policy$1;\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 */\n\nfunction getPolicy$1() {\n  if (policy$1 === undefined) {\n    policy$1 = null;\n\n    if (_global.trustedTypes) {\n      try {\n        policy$1 = _global.trustedTypes.createPolicy('angular#unsafe-bypass', {\n          createHTML: function createHTML(s) {\n            return s;\n          },\n          createScript: function createScript(s) {\n            return s;\n          },\n          createScriptURL: function createScriptURL(s) {\n            return s;\n          }\n        });\n      } catch (_a) {// 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\n  return policy$1;\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 */\n\n\nfunction trustedHTMLFromStringBypass(html) {\n  var _a;\n\n  return ((_a = getPolicy$1()) === null || _a === void 0 ? void 0 : _a.createHTML(html)) || html;\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 */\n\n\nfunction trustedScriptFromStringBypass(script) {\n  var _a;\n\n  return ((_a = getPolicy$1()) === null || _a === void 0 ? void 0 : _a.createScript(script)) || script;\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 */\n\n\nfunction trustedScriptURLFromStringBypass(url) {\n  var _a;\n\n  return ((_a = getPolicy$1()) === null || _a === void 0 ? void 0 : _a.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\nvar SafeValueImpl = /*#__PURE__*/function () {\n  function SafeValueImpl(changingThisBreaksApplicationSecurity) {\n    _classCallCheck(this, SafeValueImpl);\n\n    this.changingThisBreaksApplicationSecurity = changingThisBreaksApplicationSecurity;\n  }\n\n  _createClass2(SafeValueImpl, [{\n    key: \"toString\",\n    value: function toString() {\n      return \"SafeValue must use [property]=binding: \".concat(this.changingThisBreaksApplicationSecurity) + \" (see https://g.co/ng/security#xss)\";\n    }\n  }]);\n\n  return SafeValueImpl;\n}();\n\nvar SafeHtmlImpl = /*#__PURE__*/function (_SafeValueImpl) {\n  _inherits(SafeHtmlImpl, _SafeValueImpl);\n\n  var _super2 = _createSuper(SafeHtmlImpl);\n\n  function SafeHtmlImpl() {\n    _classCallCheck(this, SafeHtmlImpl);\n\n    return _super2.apply(this, arguments);\n  }\n\n  _createClass2(SafeHtmlImpl, [{\n    key: \"getTypeName\",\n    value: function getTypeName() {\n      return \"HTML\"\n      /* Html */\n      ;\n    }\n  }]);\n\n  return SafeHtmlImpl;\n}(SafeValueImpl);\n\nvar SafeStyleImpl = /*#__PURE__*/function (_SafeValueImpl2) {\n  _inherits(SafeStyleImpl, _SafeValueImpl2);\n\n  var _super3 = _createSuper(SafeStyleImpl);\n\n  function SafeStyleImpl() {\n    _classCallCheck(this, SafeStyleImpl);\n\n    return _super3.apply(this, arguments);\n  }\n\n  _createClass2(SafeStyleImpl, [{\n    key: \"getTypeName\",\n    value: function getTypeName() {\n      return \"Style\"\n      /* Style */\n      ;\n    }\n  }]);\n\n  return SafeStyleImpl;\n}(SafeValueImpl);\n\nvar SafeScriptImpl = /*#__PURE__*/function (_SafeValueImpl3) {\n  _inherits(SafeScriptImpl, _SafeValueImpl3);\n\n  var _super4 = _createSuper(SafeScriptImpl);\n\n  function SafeScriptImpl() {\n    _classCallCheck(this, SafeScriptImpl);\n\n    return _super4.apply(this, arguments);\n  }\n\n  _createClass2(SafeScriptImpl, [{\n    key: \"getTypeName\",\n    value: function getTypeName() {\n      return \"Script\"\n      /* Script */\n      ;\n    }\n  }]);\n\n  return SafeScriptImpl;\n}(SafeValueImpl);\n\nvar SafeUrlImpl = /*#__PURE__*/function (_SafeValueImpl4) {\n  _inherits(SafeUrlImpl, _SafeValueImpl4);\n\n  var _super5 = _createSuper(SafeUrlImpl);\n\n  function SafeUrlImpl() {\n    _classCallCheck(this, SafeUrlImpl);\n\n    return _super5.apply(this, arguments);\n  }\n\n  _createClass2(SafeUrlImpl, [{\n    key: \"getTypeName\",\n    value: function getTypeName() {\n      return \"URL\"\n      /* Url */\n      ;\n    }\n  }]);\n\n  return SafeUrlImpl;\n}(SafeValueImpl);\n\nvar SafeResourceUrlImpl = /*#__PURE__*/function (_SafeValueImpl5) {\n  _inherits(SafeResourceUrlImpl, _SafeValueImpl5);\n\n  var _super6 = _createSuper(SafeResourceUrlImpl);\n\n  function SafeResourceUrlImpl() {\n    _classCallCheck(this, SafeResourceUrlImpl);\n\n    return _super6.apply(this, arguments);\n  }\n\n  _createClass2(SafeResourceUrlImpl, [{\n    key: \"getTypeName\",\n    value: function getTypeName() {\n      return \"ResourceURL\"\n      /* ResourceUrl */\n      ;\n    }\n  }]);\n\n  return SafeResourceUrlImpl;\n}(SafeValueImpl);\n\nfunction unwrapSafeValue(value) {\n  return value instanceof SafeValueImpl ? value.changingThisBreaksApplicationSecurity : value;\n}\n\nfunction allowSanitizationBypassAndThrow(value, type) {\n  var actualType = getSanitizationBypassType(value);\n\n  if (actualType != null && actualType !== type) {\n    // Allow ResourceURLs in URL contexts, they are strictly more trusted.\n    if (actualType === \"ResourceURL\"\n    /* ResourceUrl */\n    && type === \"URL\"\n    /* Url */\n    ) return true;\n    throw new Error(\"Required a safe \".concat(type, \", got a \").concat(actualType, \" (see https://g.co/ng/security#xss)\"));\n  }\n\n  return actualType === type;\n}\n\nfunction getSanitizationBypassType(value) {\n  return value instanceof SafeValueImpl && value.getTypeName() || null;\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 */\n\n\nfunction bypassSanitizationTrustHtml(trustedHtml) {\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 */\n\n\nfunction bypassSanitizationTrustStyle(trustedStyle) {\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 */\n\n\nfunction bypassSanitizationTrustScript(trustedScript) {\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 */\n\n\nfunction bypassSanitizationTrustUrl(trustedUrl) {\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 */\n\n\nfunction bypassSanitizationTrustResourceUrl(trustedResourceUrl) {\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\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 */\n\n\nfunction getInertBodyHelper(defaultDoc) {\n  var inertDocumentHelper = new InertDocumentHelper(defaultDoc);\n  return isDOMParserAvailable() ? new DOMParserHelper(inertDocumentHelper) : inertDocumentHelper;\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 */\n\n\nvar DOMParserHelper = /*#__PURE__*/function () {\n  function DOMParserHelper(inertDocumentHelper) {\n    _classCallCheck(this, DOMParserHelper);\n\n    this.inertDocumentHelper = inertDocumentHelper;\n  }\n\n  _createClass2(DOMParserHelper, [{\n    key: \"getInertBodyElement\",\n    value: function getInertBodyElement(html) {\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\n      try {\n        var body = new window.DOMParser().parseFromString(trustedHTMLFromString(html), 'text/html').body;\n\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\n        body.removeChild(body.firstChild);\n        return body;\n      } catch (_a) {\n        return null;\n      }\n    }\n  }]);\n\n  return DOMParserHelper;\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 */\n\n\nvar InertDocumentHelper = /*#__PURE__*/function () {\n  function InertDocumentHelper(defaultDoc) {\n    _classCallCheck(this, InertDocumentHelper);\n\n    this.defaultDoc = defaultDoc;\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      var inertHtml = this.inertDocument.createElement('html');\n      this.inertDocument.appendChild(inertHtml);\n      var inertBodyElement = this.inertDocument.createElement('body');\n      inertHtml.appendChild(inertBodyElement);\n    }\n  }\n\n  _createClass2(InertDocumentHelper, [{\n    key: \"getInertBodyElement\",\n    value: function getInertBodyElement(html) {\n      // Prefer using <template> element if supported.\n      var templateEl = this.inertDocument.createElement('template');\n\n      if ('content' in templateEl) {\n        templateEl.innerHTML = trustedHTMLFromString(html);\n        return templateEl;\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\n\n      var inertBody = this.inertDocument.createElement('body');\n      inertBody.innerHTML = trustedHTMLFromString(html); // Support: IE 11 only\n      // strip custom-namespaced attributes on IE<=11\n\n      if (this.defaultDoc.documentMode) {\n        this.stripCustomNsAttrs(inertBody);\n      }\n\n      return inertBody;\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\n  }, {\n    key: \"stripCustomNsAttrs\",\n    value: function stripCustomNsAttrs(el) {\n      var elAttrs = el.attributes; // loop backwards so that we can support removals.\n\n      for (var i = elAttrs.length - 1; 0 < i; i--) {\n        var attrib = elAttrs.item(i);\n        var attrName = attrib.name;\n\n        if (attrName === 'xmlns:ns1' || attrName.indexOf('ns1:') === 0) {\n          el.removeAttribute(attrName);\n        }\n      }\n\n      var childNode = el.firstChild;\n\n      while (childNode) {\n        if (childNode.nodeType === Node.ELEMENT_NODE) this.stripCustomNsAttrs(childNode);\n        childNode = childNode.nextSibling;\n      }\n    }\n  }]);\n\n  return InertDocumentHelper;\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 */\n\n\nfunction isDOMParserAvailable() {\n  try {\n    return !!new window.DOMParser().parseFromString(trustedHTMLFromString(''), 'text/html');\n  } catch (_a) {\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 * 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. \"h&#116;tp\" for \"http\".\n * It also disallows HTML entities in the first path part of a relative path,\n * e.g. \"foo&lt;bar/baz\".  Our existing escaping functions should not produce\n * that. More importantly, it disallows masking of a colon,\n * e.g. \"javascript&#58;...\".\n *\n * This regular expression was taken from the Closure sanitization library.\n */\n\n\nvar SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi;\n/* A pattern that matches safe srcset values */\n\nvar SAFE_SRCSET_PATTERN = /^(?:(?:https?|file):|[^&:/?#]*(?:[/?#]|$))/gi;\n/** A pattern that matches safe data URLs. Only matches image, video and audio types. */\n\nvar DATA_URL_PATTERN = /^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\nfunction _sanitizeUrl(url) {\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 \".concat(url, \" (see https://g.co/ng/security#xss)\"));\n  }\n\n  return 'unsafe:' + url;\n}\n\nfunction sanitizeSrcset(srcset) {\n  srcset = String(srcset);\n  return srcset.split(',').map(function (srcset) {\n    return _sanitizeUrl(srcset.trim());\n  }).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\n\nfunction tagSet(tags) {\n  var res = {};\n\n  var _iterator = _createForOfIteratorHelper(tags.split(',')),\n      _step;\n\n  try {\n    for (_iterator.s(); !(_step = _iterator.n()).done;) {\n      var t = _step.value;\n      res[t] = true;\n    }\n  } catch (err) {\n    _iterator.e(err);\n  } finally {\n    _iterator.f();\n  }\n\n  return res;\n}\n\nfunction merge() {\n  var res = {};\n\n  for (var _len7 = arguments.length, sets = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {\n    sets[_key7] = arguments[_key7];\n  }\n\n  for (var _i = 0, _sets = sets; _i < _sets.length; _i++) {\n    var s = _sets[_i];\n\n    for (var v in s) {\n      if (s.hasOwnProperty(v)) res[v] = true;\n    }\n  }\n\n  return res;\n} // Good source of info about elements and attributes\n// https://html.spec.whatwg.org/#semantics\n// https://simon.html5.org/html-elements\n// Safe Void Elements - HTML5\n// https://html.spec.whatwg.org/#void-elements\n\n\nvar VOID_ELEMENTS = /*@__PURE__*/tagSet('area,br,col,hr,img,wbr'); // Elements that you can, intentionally, leave open (and which close themselves)\n// https://html.spec.whatwg.org/#optional-tags\n\nvar OPTIONAL_END_TAG_BLOCK_ELEMENTS = /*@__PURE__*/tagSet('colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr');\nvar OPTIONAL_END_TAG_INLINE_ELEMENTS = /*@__PURE__*/tagSet('rp,rt');\nvar OPTIONAL_END_TAG_ELEMENTS = /*@__PURE__*/merge(OPTIONAL_END_TAG_INLINE_ELEMENTS, OPTIONAL_END_TAG_BLOCK_ELEMENTS); // Safe Block Elements - HTML5\n\nvar BLOCK_ELEMENTS = /*@__PURE__*/merge(OPTIONAL_END_TAG_BLOCK_ELEMENTS, /*@__PURE__*/tagSet('address,article,' + 'aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,' + 'h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul')); // Inline Elements - HTML5\n\nvar INLINE_ELEMENTS = /*@__PURE__*/merge(OPTIONAL_END_TAG_INLINE_ELEMENTS, /*@__PURE__*/tagSet('a,abbr,acronym,audio,b,' + 'bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,' + 'samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video'));\nvar VALID_ELEMENTS = /*@__PURE__*/merge(VOID_ELEMENTS, BLOCK_ELEMENTS, INLINE_ELEMENTS, OPTIONAL_END_TAG_ELEMENTS); // Attributes that have href and hence need to be sanitized\n\nvar URI_ATTRS = /*@__PURE__*/tagSet('background,cite,href,itemtype,longdesc,poster,src,xlink:href'); // Attributes that have special href set hence need to be sanitized\n\nvar SRCSET_ATTRS = /*@__PURE__*/tagSet('srcset');\nvar HTML_ATTRS = /*@__PURE__*/tagSet('abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,' + 'compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,' + 'ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,' + 'scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,' + 'valign,value,vspace,width'); // Accessibility attributes as per WAI-ARIA 1.1 (W3C Working Draft 14 December 2018)\n\nvar ARIA_ATTRS = /*@__PURE__*/tagSet('aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,' + 'aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,' + 'aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,' + 'aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,' + 'aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,' + 'aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,' + 'aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext'); // 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// 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\nvar VALID_ATTRS = /*@__PURE__*/merge(URI_ATTRS, SRCSET_ATTRS, HTML_ATTRS, ARIA_ATTRS); // 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.\n\nvar SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS = /*@__PURE__*/tagSet('script,style,template');\n/**\n * SanitizingHtmlSerializer serializes a DOM fragment, stripping out any unsafe elements and unsafe\n * attributes.\n */\n\nvar SanitizingHtmlSerializer = /*#__PURE__*/function () {\n  function SanitizingHtmlSerializer() {\n    _classCallCheck(this, SanitizingHtmlSerializer);\n\n    // Explicitly track if something was stripped, to avoid accidentally warning of sanitization just\n    // because characters were re-encoded.\n    this.sanitizedSomething = false;\n    this.buf = [];\n  }\n\n  _createClass2(SanitizingHtmlSerializer, [{\n    key: \"sanitizeChildren\",\n    value: function sanitizeChildren(el) {\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      var current = el.firstChild;\n      var traverseContent = true;\n\n      while (current) {\n        if (current.nodeType === Node.ELEMENT_NODE) {\n          traverseContent = this.startElement(current);\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\n        if (traverseContent && current.firstChild) {\n          current = current.firstChild;\n          continue;\n        }\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);\n          }\n\n          var 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\n      return this.buf.join('');\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\n  }, {\n    key: \"startElement\",\n    value: function startElement(element) {\n      var tagName = element.nodeName.toLowerCase();\n\n      if (!VALID_ELEMENTS.hasOwnProperty(tagName)) {\n        this.sanitizedSomething = true;\n        return !SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS.hasOwnProperty(tagName);\n      }\n\n      this.buf.push('<');\n      this.buf.push(tagName);\n      var elAttrs = element.attributes;\n\n      for (var i = 0; i < elAttrs.length; i++) {\n        var elAttr = elAttrs.item(i);\n        var attrName = elAttr.name;\n        var lower = attrName.toLowerCase();\n\n        if (!VALID_ATTRS.hasOwnProperty(lower)) {\n          this.sanitizedSomething = true;\n          continue;\n        }\n\n        var value = elAttr.value; // TODO(martinprobst): Special case image URIs for data:image/...\n\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\n      this.buf.push('>');\n      return true;\n    }\n  }, {\n    key: \"endElement\",\n    value: function endElement(current) {\n      var tagName = current.nodeName.toLowerCase();\n\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    key: \"chars\",\n    value: function chars(_chars) {\n      this.buf.push(encodeEntities(_chars));\n    }\n  }, {\n    key: \"checkClobberedElement\",\n    value: function checkClobberedElement(node, nextNode) {\n      if (nextNode && (node.compareDocumentPosition(nextNode) & Node.DOCUMENT_POSITION_CONTAINED_BY) === Node.DOCUMENT_POSITION_CONTAINED_BY) {\n        throw new Error(\"Failed to sanitize html because the element is clobbered: \".concat(node.outerHTML));\n      }\n\n      return nextNode;\n    }\n  }]);\n\n  return SanitizingHtmlSerializer;\n}(); // Regular Expressions for parsing tags and attributes\n\n\nvar SURROGATE_PAIR_REGEXP = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g; // ! to ~ is the ASCII range.\n\nvar NON_ALPHANUMERIC_REGEXP = /([^\\#-~ |!])/g;\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 */\n\nfunction encodeEntities(value) {\n  return value.replace(/&/g, '&amp;').replace(SURROGATE_PAIR_REGEXP, function (match) {\n    var hi = match.charCodeAt(0);\n    var low = match.charCodeAt(1);\n    return '&#' + ((hi - 0xD800) * 0x400 + (low - 0xDC00) + 0x10000) + ';';\n  }).replace(NON_ALPHANUMERIC_REGEXP, function (match) {\n    return '&#' + match.charCodeAt(0) + ';';\n  }).replace(/</g, '&lt;').replace(/>/g, '&gt;');\n}\n\nvar inertBodyHelper;\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 */\n\nfunction _sanitizeHtml(defaultDoc, unsafeHtmlInput) {\n  var inertBodyElement = null;\n\n  try {\n    inertBodyHelper = inertBodyHelper || getInertBodyHelper(defaultDoc); // Make sure unsafeHtml is actually a string (TypeScript types are not enforced at runtime).\n\n    var unsafeHtml = unsafeHtmlInput ? String(unsafeHtmlInput) : '';\n    inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml); // 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\n    var mXSSAttempts = 5;\n    var parsedHtml = unsafeHtml;\n\n    do {\n      if (mXSSAttempts === 0) {\n        throw new Error('Failed to sanitize html because the input is unstable');\n      }\n\n      mXSSAttempts--;\n      unsafeHtml = parsedHtml;\n      parsedHtml = inertBodyElement.innerHTML;\n      inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);\n    } while (unsafeHtml !== parsedHtml);\n\n    var sanitizer = new SanitizingHtmlSerializer();\n    var safeHtml = sanitizer.sanitizeChildren(getTemplateContent(inertBodyElement) || inertBodyElement);\n\n    if ((typeof ngDevMode === 'undefined' || ngDevMode) && sanitizer.sanitizedSomething) {\n      console.warn('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      var parent = getTemplateContent(inertBodyElement) || inertBodyElement;\n\n      while (parent.firstChild) {\n        parent.removeChild(parent.firstChild);\n      }\n    }\n  }\n}\n\nfunction getTemplateContent(el) {\n  return 'content' in el\n  /** Microsoft/TypeScript#21517 */\n  && isTemplateElement(el) ? el.content : null;\n}\n\nfunction isTemplateElement(el) {\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 */\n\n\nvar SecurityContext = /*@__PURE__*/function (SecurityContext) {\n  SecurityContext[SecurityContext[\"NONE\"] = 0] = \"NONE\";\n  SecurityContext[SecurityContext[\"HTML\"] = 1] = \"HTML\";\n  SecurityContext[SecurityContext[\"STYLE\"] = 2] = \"STYLE\";\n  SecurityContext[SecurityContext[\"SCRIPT\"] = 3] = \"SCRIPT\";\n  SecurityContext[SecurityContext[\"URL\"] = 4] = \"URL\";\n  SecurityContext[SecurityContext[\"RESOURCE_URL\"] = 5] = \"RESOURCE_URL\";\n  return SecurityContext;\n}({});\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * 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 */\n\n\nfunction ɵɵsanitizeHtml(unsafeHtml) {\n  var sanitizer = getSanitizer();\n\n  if (sanitizer) {\n    return trustedHTMLFromStringBypass(sanitizer.sanitize(SecurityContext.HTML, unsafeHtml) || '');\n  }\n\n  if (allowSanitizationBypassAndThrow(unsafeHtml, \"HTML\"\n  /* Html */\n  )) {\n    return trustedHTMLFromStringBypass(unwrapSafeValue(unsafeHtml));\n  }\n\n  return _sanitizeHtml(getDocument(), renderStringify(unsafeHtml));\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 */\n\n\nfunction ɵɵsanitizeStyle(unsafeStyle) {\n  var sanitizer = getSanitizer();\n\n  if (sanitizer) {\n    return sanitizer.sanitize(SecurityContext.STYLE, unsafeStyle) || '';\n  }\n\n  if (allowSanitizationBypassAndThrow(unsafeStyle, \"Style\"\n  /* Style */\n  )) {\n    return unwrapSafeValue(unsafeStyle);\n  }\n\n  return renderStringify(unsafeStyle);\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 */\n\n\nfunction ɵɵsanitizeUrl(unsafeUrl) {\n  var sanitizer = getSanitizer();\n\n  if (sanitizer) {\n    return sanitizer.sanitize(SecurityContext.URL, unsafeUrl) || '';\n  }\n\n  if (allowSanitizationBypassAndThrow(unsafeUrl, \"URL\"\n  /* Url */\n  )) {\n    return unwrapSafeValue(unsafeUrl);\n  }\n\n  return _sanitizeUrl(renderStringify(unsafeUrl));\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 */\n\n\nfunction ɵɵsanitizeResourceUrl(unsafeResourceUrl) {\n  var sanitizer = getSanitizer();\n\n  if (sanitizer) {\n    return trustedScriptURLFromStringBypass(sanitizer.sanitize(SecurityContext.RESOURCE_URL, unsafeResourceUrl) || '');\n  }\n\n  if (allowSanitizationBypassAndThrow(unsafeResourceUrl, \"ResourceURL\"\n  /* ResourceUrl */\n  )) {\n    return trustedScriptURLFromStringBypass(unwrapSafeValue(unsafeResourceUrl));\n  }\n\n  throw new Error('unsafe value used in a resource URL context (see https://g.co/ng/security#xss)');\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 */\n\n\nfunction ɵɵsanitizeScript(unsafeScript) {\n  var sanitizer = getSanitizer();\n\n  if (sanitizer) {\n    return trustedScriptFromStringBypass(sanitizer.sanitize(SecurityContext.SCRIPT, unsafeScript) || '');\n  }\n\n  if (allowSanitizationBypassAndThrow(unsafeScript, \"Script\"\n  /* Script */\n  )) {\n    return trustedScriptFromStringBypass(unwrapSafeValue(unsafeScript));\n  }\n\n  throw new Error('unsafe value used in a script context');\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 */\n\n\nfunction ɵɵtrustConstantHtml(html) {\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: \".concat(html.join('?')));\n  }\n\n  return trustedHTMLFromString(html[0]);\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 */\n\n\nfunction ɵɵtrustConstantResourceUrl(url) {\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: \".concat(url.join('?')));\n  }\n\n  return trustedScriptURLFromString(url[0]);\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 */\n\n\nfunction getUrlSanitizer(tag, prop) {\n  if (prop === 'src' && (tag === 'embed' || tag === 'frame' || tag === 'iframe' || tag === 'media' || tag === 'script') || prop === 'href' && (tag === 'base' || tag === 'link')) {\n    return ɵɵsanitizeResourceUrl;\n  }\n\n  return ɵɵsanitizeUrl;\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 */\n\n\nfunction ɵɵsanitizeUrlOrResourceUrl(unsafeUrl, tag, prop) {\n  return getUrlSanitizer(tag, prop)(unsafeUrl);\n}\n\nfunction validateAgainstEventProperties(name) {\n  if (name.toLowerCase().startsWith('on')) {\n    var msg = \"Binding to event property '\".concat(name, \"' is disallowed for security reasons, \") + \"please use (\".concat(name.slice(2), \")=...\") + \"\\nIf '\".concat(name, \"' is a directive input, make sure the directive is imported by the\") + \" current module.\";\n    throw new Error(msg);\n  }\n}\n\nfunction validateAgainstEventAttributes(name) {\n  if (name.toLowerCase().startsWith('on')) {\n    var msg = \"Binding to event attribute '\".concat(name, \"' is disallowed for security reasons, \") + \"please use (\".concat(name.slice(2), \")=...\");\n    throw new Error(msg);\n  }\n}\n\nfunction getSanitizer() {\n  var 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 */\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 */\n\n\nfunction getLContext(target) {\n  var mpValue = readPatchedData(target);\n\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      var lView = mpValue;\n      var nodeIndex;\n      var component = undefined;\n      var directives = undefined;\n\n      if (isComponentInstance(target)) {\n        nodeIndex = findViaComponent(lView, target);\n\n        if (nodeIndex == -1) {\n          throw new Error('The provided component was not found in the application');\n        }\n\n        component = target;\n      } else if (isDirectiveInstance(target)) {\n        nodeIndex = findViaDirective(lView, target);\n\n        if (nodeIndex == -1) {\n          throw new Error('The provided directive was not found in the application');\n        }\n\n        directives = getDirectivesAtNodeIndex(nodeIndex, lView, false);\n      } else {\n        nodeIndex = findViaNativeElement(lView, target);\n\n        if (nodeIndex == -1) {\n          return null;\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\n\n      var native = unwrapRNode(lView[nodeIndex]);\n      var existingCtx = readPatchedData(native);\n      var context = existingCtx && !Array.isArray(existingCtx) ? existingCtx : createLContext(lView, nodeIndex, native); // only when the component has been discovered then update the monkey-patch\n\n      if (component && context.component === undefined) {\n        context.component = component;\n        attachPatchData(context.component, context);\n      } // only when the directives have been discovered then update the monkey-patch\n\n\n      if (directives && context.directives === undefined) {\n        context.directives = directives;\n\n        for (var 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    var rElement = target;\n    ngDevMode && assertDomNode(rElement); // 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\n    var parent = rElement;\n\n    while (parent = parent.parentNode) {\n      var parentContext = readPatchedData(parent);\n\n      if (parentContext) {\n        var _lView2 = void 0;\n\n        if (Array.isArray(parentContext)) {\n          _lView2 = parentContext;\n        } else {\n          _lView2 = parentContext.lView;\n        } // the edge of the app was also reached here through another means\n        // (maybe because the DOM was changed manually).\n\n\n        if (!_lView2) {\n          return null;\n        }\n\n        var index = findViaNativeElement(_lView2, rElement);\n\n        if (index >= 0) {\n          var _native = unwrapRNode(_lView2[index]);\n\n          var _context = createLContext(_lView2, index, _native);\n\n          attachPatchData(_native, _context);\n          mpValue = _context;\n          break;\n        }\n      }\n    }\n  }\n\n  return mpValue || null;\n}\n/**\n * Creates an empty instance of a `LContext` context\n */\n\n\nfunction createLContext(lView, nodeIndex, native) {\n  return {\n    lView: lView,\n    nodeIndex: nodeIndex,\n    native: native,\n    component: undefined,\n    directives: undefined,\n    localRefs: undefined\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 */\n\n\nfunction getComponentViewByInstance(componentInstance) {\n  var lView = readPatchedData(componentInstance);\n  var view;\n\n  if (Array.isArray(lView)) {\n    var nodeIndex = findViaComponent(lView, componentInstance);\n    view = getComponentLViewByIndex(nodeIndex, lView);\n    var context = createLContext(lView, nodeIndex, view[HOST]);\n    context.component = componentInstance;\n    attachPatchData(componentInstance, context);\n    attachPatchData(context.native, context);\n  } else {\n    var _context2 = lView;\n    view = getComponentLViewByIndex(_context2.nodeIndex, _context2.lView);\n  }\n\n  return view;\n}\n/**\n * This property will be monkey-patched on elements, components and directives.\n */\n\n\nvar MONKEY_PATCH_KEY_NAME = '__ngContext__';\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 */\n\nfunction attachPatchData(target, data) {\n  ngDevMode && assertDefined(target, 'Target expected');\n  target[MONKEY_PATCH_KEY_NAME] = data;\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 */\n\n\nfunction readPatchedData(target) {\n  ngDevMode && assertDefined(target, 'Target expected');\n  return target[MONKEY_PATCH_KEY_NAME] || null;\n}\n\nfunction readPatchedLView(target) {\n  var value = readPatchedData(target);\n\n  if (value) {\n    return Array.isArray(value) ? value : value.lView;\n  }\n\n  return null;\n}\n\nfunction isComponentInstance(instance) {\n  return instance && instance.constructor && instance.constructor.ɵcmp;\n}\n\nfunction isDirectiveInstance(instance) {\n  return instance && instance.constructor && instance.constructor.ɵdir;\n}\n/**\n * Locates the element within the given LView and returns the matching index\n */\n\n\nfunction findViaNativeElement(lView, target) {\n  var tView = lView[TVIEW];\n\n  for (var 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 * Locates the next tNode (child, sibling or parent).\n */\n\n\nfunction traverseNextElement(tNode) {\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\n    return tNode.parent && tNode.parent.next;\n  }\n}\n/**\n * Locates the component within the given LView and returns the matching index\n */\n\n\nfunction findViaComponent(lView, componentInstance) {\n  var componentIndices = lView[TVIEW].components;\n\n  if (componentIndices) {\n    for (var i = 0; i < componentIndices.length; i++) {\n      var elementComponentIndex = componentIndices[i];\n      var componentView = getComponentLViewByIndex(elementComponentIndex, lView);\n\n      if (componentView[CONTEXT] === componentInstance) {\n        return elementComponentIndex;\n      }\n    }\n  } else {\n    var rootComponentView = getComponentLViewByIndex(HEADER_OFFSET, lView);\n    var rootComponent = rootComponentView[CONTEXT];\n\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\n  return -1;\n}\n/**\n * Locates the directive within the given LView and returns the matching index\n */\n\n\nfunction findViaDirective(lView, directiveInstance) {\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  var tNode = lView[TVIEW].firstChild;\n\n  while (tNode) {\n    var directiveIndexStart = tNode.directiveStart;\n    var directiveIndexEnd = tNode.directiveEnd;\n\n    for (var i = directiveIndexStart; i < directiveIndexEnd; i++) {\n      if (lView[i] === directiveInstance) {\n        return tNode.index;\n      }\n    }\n\n    tNode = traverseNextElement(tNode);\n  }\n\n  return -1;\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 */\n\n\nfunction getDirectivesAtNodeIndex(nodeIndex, lView, includeComponents) {\n  var tNode = lView[TVIEW].data[nodeIndex];\n  var directiveStartIndex = tNode.directiveStart;\n  if (directiveStartIndex == 0) return EMPTY_ARRAY;\n  var directiveEndIndex = tNode.directiveEnd;\n  if (!includeComponents && tNode.flags & 2\n  /* isComponentHost */\n  ) directiveStartIndex++;\n  return lView.slice(directiveStartIndex, directiveEndIndex);\n}\n\nfunction getComponentAtNodeIndex(nodeIndex, lView) {\n  var tNode = lView[TVIEW].data[nodeIndex];\n  var directiveStartIndex = tNode.directiveStart;\n  return tNode.flags & 2\n  /* isComponentHost */\n  ? lView[directiveStartIndex] : null;\n}\n/**\n * Returns a map of local references (local reference name => element or directive instance) that\n * exist on a given element.\n */\n\n\nfunction discoverLocalRefs(lView, nodeIndex) {\n  var tNode = lView[TVIEW].data[nodeIndex];\n\n  if (tNode && tNode.localNames) {\n    var result = {};\n    var localIndex = tNode.index + 1;\n\n    for (var i = 0; i < tNode.localNames.length; i += 2) {\n      result[tNode.localNames[i]] = lView[localIndex];\n      localIndex++;\n    }\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\n\nvar ERROR_TYPE = 'ngType';\nvar ERROR_DEBUG_CONTEXT = 'ngDebugContext';\nvar ERROR_ORIGINAL_ERROR = 'ngOriginalError';\nvar ERROR_LOGGER = 'ngErrorLogger';\n\nfunction wrappedError(message, originalError) {\n  var msg = \"\".concat(message, \" caused by: \").concat(originalError instanceof Error ? originalError.message : originalError);\n  var error = Error(msg);\n  error[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\n\nfunction getType(error) {\n  return error[ERROR_TYPE];\n}\n\nfunction getDebugContext(error) {\n  return error[ERROR_DEBUG_CONTEXT];\n}\n\nfunction getOriginalError(error) {\n  return error[ERROR_ORIGINAL_ERROR];\n}\n\nfunction getErrorLogger(error) {\n  return error && error[ERROR_LOGGER] || defaultErrorLogger;\n}\n\nfunction defaultErrorLogger(console) {\n  for (var _len8 = arguments.length, values = new Array(_len8 > 1 ? _len8 - 1 : 0), _key8 = 1; _key8 < _len8; _key8++) {\n    values[_key8 - 1] = arguments[_key8];\n  }\n\n  console.error.apply(console, 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\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 */\n\n\nvar ErrorHandler = /*#__PURE__*/function () {\n  function ErrorHandler() {\n    _classCallCheck(this, ErrorHandler);\n\n    /**\n     * @internal\n     */\n    this._console = console;\n  }\n\n  _createClass2(ErrorHandler, [{\n    key: \"handleError\",\n    value: function handleError(error) {\n      var originalError = this._findOriginalError(error);\n\n      var context = this._findContext(error); // 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\n\n      var errorLogger = getErrorLogger(error);\n      errorLogger(this._console, \"ERROR\", error);\n\n      if (originalError) {\n        errorLogger(this._console, \"ORIGINAL ERROR\", originalError);\n      }\n\n      if (context) {\n        errorLogger(this._console, 'ERROR CONTEXT', context);\n      }\n    }\n    /** @internal */\n\n  }, {\n    key: \"_findContext\",\n    value: function _findContext(error) {\n      return error ? getDebugContext(error) || this._findContext(getOriginalError(error)) : null;\n    }\n    /** @internal */\n\n  }, {\n    key: \"_findOriginalError\",\n    value: function _findOriginalError(error) {\n      var e = error && getOriginalError(error);\n\n      while (e && getOriginalError(e)) {\n        e = getOriginalError(e);\n      }\n\n      return e || null;\n    }\n  }]);\n\n  return ErrorHandler;\n}();\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 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 */\n\n\nvar CUSTOM_ELEMENTS_SCHEMA = {\n  name: 'custom-elements'\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 */\n\nvar NO_ERRORS_SCHEMA = {\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 */\n\nvar COMMENT_DISALLOWED = /^>|^->|<!--|-->|--!>|<!-$/g;\n/**\n * Delimiter in the disallowed strings which needs to be wrapped with zero with character.\n */\n\nvar COMMENT_DELIMITER = /(<|>)/;\nvar COMMENT_DELIMITER_ESCAPED = \"\\u200B$1\\u200B\";\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 */\n\nfunction escapeCommentText(value) {\n  return value.replace(COMMENT_DISALLOWED, function (text) {\n    return 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\n/**\n * THIS FILE CONTAINS CODE WHICH SHOULD BE TREE SHAKEN AND NEVER CALLED FROM PRODUCTION CODE!!!\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 */\n\n\nfunction createNamedArrayType(name) {\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 \".concat(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('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\n\nfunction normalizeDebugBindingName(name) {\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-\".concat(name);\n}\n\nvar CAMEL_CASE_REGEXP = /([A-Z])/g;\n\nfunction camelCaseToDashCase(input) {\n  return input.replace(CAMEL_CASE_REGEXP, function () {\n    for (var _len9 = arguments.length, m = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {\n      m[_key9] = arguments[_key9];\n    }\n\n    return '-' + m[1].toLowerCase();\n  });\n}\n\nfunction normalizeDebugBindingValue(value) {\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\n\nvar ɵ0$4 = function ɵ0$4() {\n  return (typeof requestAnimationFrame !== 'undefined' && requestAnimationFrame || // browser only\n  setTimeout // everything else\n  ).bind(_global);\n};\n\nvar defaultScheduler = /*@__PURE__*/ɵ0$4();\n/**\n *\n * @codeGenApi\n */\n\nfunction ɵɵresolveWindow(element) {\n  return element.ownerDocument.defaultView;\n}\n/**\n *\n * @codeGenApi\n */\n\n\nfunction ɵɵresolveDocument(element) {\n  return element.ownerDocument;\n}\n/**\n *\n * @codeGenApi\n */\n\n\nfunction ɵɵresolveBody(element) {\n  return element.ownerDocument.body;\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 */\n\n\nvar INTERPOLATION_DELIMITER = \"\\uFFFD\";\n/**\n * Unwrap a value which might be behind a closure (for forward declaration reasons).\n */\n\nfunction maybeUnwrapFn(value) {\n  if (value instanceof Function) {\n    return value();\n  } else {\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 */\n\n/** Called when there are multiple component selectors that match a given node */\n\n\nfunction throwMultipleComponentError(tNode) {\n  throw new RuntimeError(\"300\"\n  /* MULTIPLE_COMPONENTS_MATCH */\n  , \"Multiple components match node with tagname \".concat(tNode.value));\n}\n/** Throws an ExpressionChangedAfterChecked error if checkNoChanges mode is on. */\n\n\nfunction throwErrorIfNoChangesMode(creationMode, oldValue, currValue, propName) {\n  var field = propName ? \" for '\".concat(propName, \"'\") : '';\n  var msg = \"ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value\".concat(field, \": '\").concat(oldValue, \"'. Current value: '\").concat(currValue, \"'.\");\n\n  if (creationMode) {\n    msg += \" It seems like the view has been created after its parent and its children have been dirty checked.\" + \" Has it been created in a change detection hook?\";\n  } // TODO: include debug context, see `viewDebugError` function in\n  // `packages/core/src/view/errors.ts` for reference.\n\n\n  throw new RuntimeError(\"100\"\n  /* EXPRESSION_CHANGED_AFTER_CHECKED */\n  , msg);\n}\n\nfunction constructDetailsForInterpolation(lView, rootIndex, expressionIndex, meta, changedValue) {\n  var _meta$split = meta.split(INTERPOLATION_DELIMITER),\n      _meta$split2 = _toArray(_meta$split),\n      propName = _meta$split2[0],\n      prefix = _meta$split2[1],\n      chunks = _meta$split2.slice(2);\n\n  var oldValue = prefix,\n      newValue = prefix;\n\n  for (var i = 0; i < chunks.length; i++) {\n    var slotIdx = rootIndex + i;\n    oldValue += \"\".concat(lView[slotIdx]).concat(chunks[i]);\n    newValue += \"\".concat(slotIdx === expressionIndex ? changedValue : lView[slotIdx]).concat(chunks[i]);\n  }\n\n  return {\n    propName: propName,\n    oldValue: oldValue,\n    newValue: 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 */\n\n\nfunction getExpressionChangedErrorDetails(lView, bindingIndex, oldValue, newValue) {\n  var tData = lView[TVIEW].data;\n  var metadata = tData[bindingIndex];\n\n  if (typeof metadata === 'string') {\n    // metadata for property interpolation\n    if (metadata.indexOf(INTERPOLATION_DELIMITER) > -1) {\n      return constructDetailsForInterpolation(lView, bindingIndex, bindingIndex, metadata, newValue);\n    } // metadata for property binding\n\n\n    return {\n      propName: metadata,\n      oldValue: oldValue,\n      newValue: newValue\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\n\n  if (metadata === null) {\n    var idx = bindingIndex - 1;\n\n    while (typeof tData[idx] !== 'string' && tData[idx + 1] === null) {\n      idx--;\n    }\n\n    var meta = tData[idx];\n\n    if (typeof meta === 'string') {\n      var matches = meta.match(new RegExp(INTERPOLATION_DELIMITER, 'g')); // 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\n      if (matches && matches.length - 1 > bindingIndex - idx) {\n        return constructDetailsForInterpolation(lView, idx, bindingIndex, meta, newValue);\n      }\n    }\n  }\n\n  return {\n    propName: undefined,\n    oldValue: oldValue,\n    newValue: newValue\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 * Flags for renderer-specific style modifiers.\n * @publicApi\n */\n\n\nvar RendererStyleFlags2 = /*@__PURE__*/function (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  /**\n   * Marks a style as important.\n   */\n  RendererStyleFlags2[RendererStyleFlags2[\"Important\"] = 1] = \"Important\";\n  /**\n   * Marks a style as using dash case naming (this-is-dash-case).\n   */\n\n  RendererStyleFlags2[RendererStyleFlags2[\"DashCase\"] = 2] = \"DashCase\";\n  return RendererStyleFlags2;\n}({});\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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\nvar _icuContainerIterate;\n/**\n * Iterator which provides ability to visit all of the `TIcuContainerNode` root `RNode`s.\n */\n\n\nfunction icuContainerIterate(tIcuContainerNode, lView) {\n  return _icuContainerIterate(tIcuContainerNode, lView);\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 */\n\n\nfunction ensureIcuContainerVisitorLoaded(loader) {\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 * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\n\n\nvar unusedValueExportToPlacateAjd$5 = 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/**\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 */\n\nfunction getLViewParent(lView) {\n  ngDevMode && assertLView(lView);\n  var parent = lView[PARENT];\n  return isLContainer(parent) ? parent[PARENT] : parent;\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 */\n\n\nfunction getRootView(componentOrLView) {\n  ngDevMode && assertDefined(componentOrLView, 'component');\n  var lView = isLView(componentOrLView) ? componentOrLView : readPatchedLView(componentOrLView);\n\n  while (lView && !(lView[FLAGS] & 512\n  /* IsRoot */\n  )) {\n    lView = getLViewParent(lView);\n  }\n\n  ngDevMode && assertLView(lView);\n  return lView;\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 */\n\n\nfunction getRootContext(viewOrComponent) {\n  var rootView = getRootView(viewOrComponent);\n  ngDevMode && assertDefined(rootView[CONTEXT], 'RootView has no context. Perhaps it is disconnected?');\n  return rootView[CONTEXT];\n}\n/**\n * Gets the first `LContainer` in the LView or `null` if none exists.\n */\n\n\nfunction getFirstLContainer(lView) {\n  return getNearestLContainer(lView[CHILD_HEAD]);\n}\n/**\n * Gets the next `LContainer` that is a sibling of the given container.\n */\n\n\nfunction getNextLContainer(container) {\n  return getNearestLContainer(container[NEXT]);\n}\n\nfunction getNearestLContainer(viewOrContainer) {\n  while (viewOrContainer !== null && !isLContainer(viewOrContainer)) {\n    viewOrContainer = viewOrContainer[NEXT];\n  }\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\n\nvar unusedValueToPlacateAjd = unusedValueExportToPlacateAjd$1 + unusedValueExportToPlacateAjd$4 + unusedValueExportToPlacateAjd$5 + unusedValueExportToPlacateAjd$2 + unusedValueExportToPlacateAjd;\n/**\n * NOTE: for performance reasons, the possible actions are inlined within the function instead of\n * being passed as an argument.\n */\n\nfunction applyToElementOrContainer(action, renderer, parent, lNodeToHandle, beforeNode) {\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    var lContainer;\n    var isComponent = false; // 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\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\n    var rNode = unwrapRNode(lNodeToHandle);\n    ngDevMode && !isProceduralRenderer(renderer) && assertDomNode(rNode);\n\n    if (action === 0\n    /* Create */\n    && 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 === 1\n    /* Insert */\n    && parent !== null) {\n      nativeInsertBefore(renderer, parent, rNode, beforeNode || null, true);\n    } else if (action === 2\n    /* Detach */\n    ) {\n      nativeRemoveNode(renderer, rNode, isComponent);\n    } else if (action === 3\n    /* Destroy */\n    ) {\n      ngDevMode && ngDevMode.rendererDestroyNode++;\n      renderer.destroyNode(rNode);\n    }\n\n    if (lContainer != null) {\n      applyContainer(renderer, action, lContainer, parent, beforeNode);\n    }\n  }\n}\n\nfunction createTextNode(renderer, value) {\n  ngDevMode && ngDevMode.rendererCreateTextNode++;\n  ngDevMode && ngDevMode.rendererSetText++;\n  return isProceduralRenderer(renderer) ? renderer.createText(value) : renderer.createTextNode(value);\n}\n\nfunction updateTextNode(renderer, rNode, value) {\n  ngDevMode && ngDevMode.rendererSetText++;\n  isProceduralRenderer(renderer) ? renderer.setValue(rNode, value) : rNode.textContent = value;\n}\n\nfunction createCommentNode(renderer, value) {\n  ngDevMode && ngDevMode.rendererCreateComment++; // isProceduralRenderer check is not needed because both `Renderer2` and `Renderer3` have the same\n  // method name.\n\n  return renderer.createComment(escapeCommentText(value));\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 */\n\n\nfunction createElementNode(renderer, name, namespace) {\n  ngDevMode && ngDevMode.rendererCreateElement++;\n\n  if (isProceduralRenderer(renderer)) {\n    return renderer.createElement(name, namespace);\n  } else {\n    return namespace === null ? renderer.createElement(name) : renderer.createElementNS(namespace, name);\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 */\n\n\nfunction removeViewFromContainer(tView, lView) {\n  var renderer = lView[RENDERER];\n  applyView(tView, lView, renderer, 2\n  /* Detach */\n  , null, null);\n  lView[HOST] = null;\n  lView[T_HOST] = null;\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 */\n\n\nfunction addViewToContainer(tView, parentTNode, renderer, lView, parentNativeNode, beforeNode) {\n  lView[HOST] = parentNativeNode;\n  lView[T_HOST] = parentTNode;\n  applyView(tView, lView, renderer, 1\n  /* Insert */\n  , parentNativeNode, beforeNode);\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 */\n\n\nfunction renderDetachView(tView, lView) {\n  applyView(tView, lView, lView[RENDERER], 2\n  /* Detach */\n  , null, null);\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 */\n\n\nfunction destroyViewTree(rootView) {\n  // If the view has no children, we can clean it up and return early.\n  var lViewOrLContainer = rootView[CHILD_HEAD];\n\n  if (!lViewOrLContainer) {\n    return cleanUpView(rootView[TVIEW], rootView);\n  }\n\n  while (lViewOrLContainer) {\n    var next = null;\n\n    if (isLView(lViewOrLContainer)) {\n      // If LView, traverse down to child.\n      next = lViewOrLContainer[CHILD_HEAD];\n    } else {\n      ngDevMode && assertLContainer(lViewOrLContainer); // If container, traverse down to its first LView.\n\n      var firstView = 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\n        lViewOrLContainer = lViewOrLContainer[PARENT];\n      }\n\n      if (lViewOrLContainer === null) lViewOrLContainer = rootView;\n\n      if (isLView(lViewOrLContainer)) {\n        cleanUpView(lViewOrLContainer[TVIEW], lViewOrLContainer);\n      }\n\n      next = lViewOrLContainer && lViewOrLContainer[NEXT];\n    }\n\n    lViewOrLContainer = next;\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 */\n\n\nfunction insertView(tView, lView, lContainer, index) {\n  ngDevMode && assertLView(lView);\n  ngDevMode && assertLContainer(lContainer);\n  var indexInContainer = CONTAINER_HEADER_OFFSET + index;\n  var 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\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; // track views where declaration and insertion points are different\n\n  var declarationLContainer = lView[DECLARATION_LCONTAINER];\n\n  if (declarationLContainer !== null && lContainer !== declarationLContainer) {\n    trackMovedView(declarationLContainer, lView);\n  } // notify query that a new view has been added\n\n\n  var lQueries = lView[QUERIES];\n\n  if (lQueries !== null) {\n    lQueries.insertView(tView);\n  } // Sets the attached flag\n\n\n  lView[FLAGS] |= 128\n  /* Attached */\n  ;\n}\n/**\n * Track views created from the declaration container (TemplateRef) and inserted into a\n * different LContainer.\n */\n\n\nfunction trackMovedView(declarationContainer, lView) {\n  ngDevMode && assertDefined(lView, 'LView required');\n  ngDevMode && assertLContainer(declarationContainer);\n  var movedViews = declarationContainer[MOVED_VIEWS];\n  var insertedLContainer = lView[PARENT];\n  ngDevMode && assertLContainer(insertedLContainer);\n  var insertedComponentLView = insertedLContainer[PARENT][DECLARATION_COMPONENT_VIEW];\n  ngDevMode && assertDefined(insertedComponentLView, 'Missing insertedComponentLView');\n  var declaredComponentLView = lView[DECLARATION_COMPONENT_VIEW];\n  ngDevMode && assertDefined(declaredComponentLView, 'Missing declaredComponentLView');\n\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\n  if (movedViews === null) {\n    declarationContainer[MOVED_VIEWS] = [lView];\n  } else {\n    movedViews.push(lView);\n  }\n}\n\nfunction detachMovedView(declarationContainer, lView) {\n  ngDevMode && assertLContainer(declarationContainer);\n  ngDevMode && assertDefined(declarationContainer[MOVED_VIEWS], 'A projected view should belong to a non-empty projected views collection');\n  var movedViews = declarationContainer[MOVED_VIEWS];\n  var declarationViewIndex = movedViews.indexOf(lView);\n  var insertionLContainer = lView[PARENT];\n  ngDevMode && assertLContainer(insertionLContainer); // 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\n  if (lView[FLAGS] & 1024\n  /* RefreshTransplantedView */\n  ) {\n    lView[FLAGS] &= ~1024\n    /* RefreshTransplantedView */\n    ;\n    updateTransplantedViewCount(insertionLContainer, -1);\n  }\n\n  movedViews.splice(declarationViewIndex, 1);\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 */\n\n\nfunction detachView(lContainer, removeIndex) {\n  if (lContainer.length <= CONTAINER_HEADER_OFFSET) return;\n  var indexInContainer = CONTAINER_HEADER_OFFSET + removeIndex;\n  var viewToDetach = lContainer[indexInContainer];\n\n  if (viewToDetach) {\n    var declarationLContainer = viewToDetach[DECLARATION_LCONTAINER];\n\n    if (declarationLContainer !== null && declarationLContainer !== lContainer) {\n      detachMovedView(declarationLContainer, viewToDetach);\n    }\n\n    if (removeIndex > 0) {\n      lContainer[indexInContainer - 1][NEXT] = viewToDetach[NEXT];\n    }\n\n    var removedLView = removeFromArray(lContainer, CONTAINER_HEADER_OFFSET + removeIndex);\n    removeViewFromContainer(viewToDetach[TVIEW], viewToDetach); // notify query that a view has been removed\n\n    var lQueries = removedLView[QUERIES];\n\n    if (lQueries !== null) {\n      lQueries.detachView(removedLView[TVIEW]);\n    }\n\n    viewToDetach[PARENT] = null;\n    viewToDetach[NEXT] = null; // Unsets the attached flag\n\n    viewToDetach[FLAGS] &= ~128\n    /* Attached */\n    ;\n  }\n\n  return viewToDetach;\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 */\n\n\nfunction destroyLView(tView, lView) {\n  if (!(lView[FLAGS] & 256\n  /* Destroyed */\n  )) {\n    var renderer = lView[RENDERER];\n\n    if (isProceduralRenderer(renderer) && renderer.destroyNode) {\n      applyView(tView, lView, renderer, 3\n      /* Destroy */\n      , null, null);\n    }\n\n    destroyViewTree(lView);\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 */\n\n\nfunction cleanUpView(tView, lView) {\n  if (!(lView[FLAGS] & 256\n  /* Destroyed */\n  )) {\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] &= ~128\n    /* Attached */\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\n    lView[FLAGS] |= 256\n    /* Destroyed */\n    ;\n    executeOnDestroys(tView, lView);\n    processCleanups(tView, lView); // For component views only, the local renderer is destroyed at clean up time.\n\n    if (lView[TVIEW].type === 1\n    /* Component */\n    && isProceduralRenderer(lView[RENDERER])) {\n      ngDevMode && ngDevMode.rendererDestroy++;\n      lView[RENDERER].destroy();\n    }\n\n    var declarationContainer = lView[DECLARATION_LCONTAINER]; // we are dealing with an embedded view that is still inserted into a container\n\n    if (declarationContainer !== null && isLContainer(lView[PARENT])) {\n      // and this is a projected view\n      if (declarationContainer !== lView[PARENT]) {\n        detachMovedView(declarationContainer, lView);\n      } // For embedded views still attached to a container: remove query result from this view.\n\n\n      var lQueries = lView[QUERIES];\n\n      if (lQueries !== null) {\n        lQueries.detachView(tView);\n      }\n    }\n  }\n}\n/** Removes listeners and unsubscribes from output subscriptions */\n\n\nfunction processCleanups(tView, lView) {\n  var tCleanup = tView.cleanup;\n  var lCleanup = lView[CLEANUP]; // `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\n  var lastLCleanupIndex = -1;\n\n  if (tCleanup !== null) {\n    for (var i = 0; i < tCleanup.length - 1; i += 2) {\n      if (typeof tCleanup[i] === 'string') {\n        // This is a native DOM listener\n        var idxOrTargetGetter = tCleanup[i + 1];\n        var target = typeof idxOrTargetGetter === 'function' ? idxOrTargetGetter(lView) : unwrapRNode(lView[idxOrTargetGetter]);\n        var listener = lCleanup[lastLCleanupIndex = tCleanup[i + 2]];\n        var useCaptureOrSubIdx = tCleanup[i + 3];\n\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\n        i += 2;\n      } else {\n        // This is a cleanup function that is grouped with the index of its context\n        var context = lCleanup[lastLCleanupIndex = tCleanup[i + 1]];\n        tCleanup[i].call(context);\n      }\n    }\n  }\n\n  if (lCleanup !== null) {\n    for (var _i2 = lastLCleanupIndex + 1; _i2 < lCleanup.length; _i2++) {\n      var instanceCleanupFn = lCleanup[_i2];\n      ngDevMode && assertFunction(instanceCleanupFn, 'Expecting instance cleanup function.');\n      instanceCleanupFn();\n    }\n\n    lView[CLEANUP] = null;\n  }\n}\n/** Calls onDestroy hooks for this view */\n\n\nfunction executeOnDestroys(tView, lView) {\n  var destroyHooks;\n\n  if (tView != null && (destroyHooks = tView.destroyHooks) != null) {\n    for (var i = 0; i < destroyHooks.length; i += 2) {\n      var context = lView[destroyHooks[i]]; // Only call the destroy hook if the context has been requested.\n\n      if (!(context instanceof NodeInjectorFactory)) {\n        var toCall = destroyHooks[i + 1];\n\n        if (Array.isArray(toCall)) {\n          for (var j = 0; j < toCall.length; j += 2) {\n            var callContext = context[toCall[j]];\n            var hook = toCall[j + 1];\n            profiler(4\n            /* LifecycleHookStart */\n            , callContext, hook);\n\n            try {\n              hook.call(callContext);\n            } finally {\n              profiler(5\n              /* LifecycleHookEnd */\n              , callContext, hook);\n            }\n          }\n        } else {\n          profiler(4\n          /* LifecycleHookStart */\n          , context, toCall);\n\n          try {\n            toCall.call(context);\n          } finally {\n            profiler(5\n            /* LifecycleHookEnd */\n            , context, toCall);\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 */\n\n\nfunction getParentRElement(tView, tNode, lView) {\n  return getClosestRElement(tView, tNode.parent, lView);\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 */\n\n\nfunction getClosestRElement(tView, tNode, lView) {\n  var parentTNode = tNode; // 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\n  while (parentTNode !== null && parentTNode.type & (8\n  /* ElementContainer */\n  | 32\n  /* Icu */\n  )) {\n    tNode = parentTNode;\n    parentTNode = tNode.parent;\n  } // If the parent tNode is null, then we are inserting across views: either into an embedded view\n  // or a component view.\n\n\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, 3\n    /* AnyRNode */\n    | 4\n    /* Container */\n    );\n\n    if (parentTNode.flags & 2\n    /* isComponentHost */\n    ) {\n      ngDevMode && assertTNodeForLView(parentTNode, lView);\n      var encapsulation = tView.data[parentTNode.directiveStart].encapsulation; // 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\n      if (encapsulation === ViewEncapsulation.None || encapsulation === ViewEncapsulation.Emulated) {\n        return null;\n      }\n    }\n\n    return getNativeByTNode(parentTNode, lView);\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 */\n\n\nfunction nativeInsertBefore(renderer, parent, child, beforeNode, isMove) {\n  ngDevMode && ngDevMode.rendererInsertBefore++;\n\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, parent, child) {\n  ngDevMode && ngDevMode.rendererAppendChild++;\n  ngDevMode && assertDefined(parent, 'parent node must be defined');\n\n  if (isProceduralRenderer(renderer)) {\n    renderer.appendChild(parent, child);\n  } else {\n    parent.appendChild(child);\n  }\n}\n\nfunction nativeAppendOrInsertBefore(renderer, parent, child, beforeNode, isMove) {\n  if (beforeNode !== null) {\n    nativeInsertBefore(renderer, parent, child, beforeNode, isMove);\n  } else {\n    nativeAppendChild(renderer, parent, child);\n  }\n}\n/** Removes a node from the DOM given its native parent. */\n\n\nfunction nativeRemoveChild(renderer, parent, child, isHostElement) {\n  if (isProceduralRenderer(renderer)) {\n    renderer.removeChild(parent, child, isHostElement);\n  } else {\n    parent.removeChild(child);\n  }\n}\n/**\n * Returns a native parent of a given native node.\n */\n\n\nfunction nativeParentNode(renderer, node) {\n  return isProceduralRenderer(renderer) ? renderer.parentNode(node) : node.parentNode;\n}\n/**\n * Returns a native sibling of a given native node.\n */\n\n\nfunction nativeNextSibling(renderer, node) {\n  return isProceduralRenderer(renderer) ? renderer.nextSibling(node) : node.nextSibling;\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 */\n\n\nfunction getInsertInFrontOfRNode(parentTNode, currentTNode, lView) {\n  return _getInsertInFrontOfRNodeWithI18n(parentTNode, currentTNode, lView);\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 */\n\n\nfunction getInsertInFrontOfRNodeWithNoI18n(parentTNode, currentTNode, lView) {\n  if (parentTNode.type & (8\n  /* ElementContainer */\n  | 32\n  /* Icu */\n  )) {\n    return getNativeByTNode(parentTNode, lView);\n  }\n\n  return null;\n}\n/**\n * Tree shakable boundary for `getInsertInFrontOfRNodeWithI18n` function.\n *\n * This function will only be set if i18n code runs.\n */\n\n\nvar _getInsertInFrontOfRNodeWithI18n = getInsertInFrontOfRNodeWithNoI18n;\n/**\n * Tree shakable boundary for `processI18nInsertBefore` function.\n *\n * This function will only be set if i18n code runs.\n */\n\nvar _processI18nInsertBefore;\n\nfunction setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore) {\n  _getInsertInFrontOfRNodeWithI18n = getInsertInFrontOfRNodeWithI18n;\n  _processI18nInsertBefore = processI18nInsertBefore;\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 */\n\n\nfunction appendChild(tView, lView, childRNode, childTNode) {\n  var parentRNode = getParentRElement(tView, childTNode, lView);\n  var renderer = lView[RENDERER];\n  var parentTNode = childTNode.parent || lView[T_HOST];\n  var anchorNode = getInsertInFrontOfRNode(parentTNode, childTNode, lView);\n\n  if (parentRNode != null) {\n    if (Array.isArray(childRNode)) {\n      for (var 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 && _processI18nInsertBefore(renderer, childTNode, lView, childRNode, parentRNode);\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 */\n\n\nfunction getFirstNativeNode(lView, tNode) {\n  if (tNode !== null) {\n    ngDevMode && assertTNodeType(tNode, 3\n    /* AnyRNode */\n    | 12\n    /* AnyContainer */\n    | 32\n    /* Icu */\n    | 16\n    /* Projection */\n    );\n    var tNodeType = tNode.type;\n\n    if (tNodeType & 3\n    /* AnyRNode */\n    ) {\n      return getNativeByTNode(tNode, lView);\n    } else if (tNodeType & 4\n    /* Container */\n    ) {\n      return getBeforeNodeForView(-1, lView[tNode.index]);\n    } else if (tNodeType & 8\n    /* ElementContainer */\n    ) {\n      var elIcuContainerChild = tNode.child;\n\n      if (elIcuContainerChild !== null) {\n        return getFirstNativeNode(lView, elIcuContainerChild);\n      } else {\n        var rNodeOrLContainer = lView[tNode.index];\n\n        if (isLContainer(rNodeOrLContainer)) {\n          return getBeforeNodeForView(-1, rNodeOrLContainer);\n        } else {\n          return unwrapRNode(rNodeOrLContainer);\n        }\n      }\n    } else if (tNodeType & 32\n    /* Icu */\n    ) {\n      var nextRNode = icuContainerIterate(tNode, lView);\n      var rNode = nextRNode(); // If the ICU container has no nodes, than we use the ICU anchor as the node.\n\n      return rNode || unwrapRNode(lView[tNode.index]);\n    } else {\n      var projectionNodes = getProjectionNodes(lView, tNode);\n\n      if (projectionNodes !== null) {\n        if (Array.isArray(projectionNodes)) {\n          return projectionNodes[0];\n        }\n\n        var 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\nfunction getProjectionNodes(lView, tNode) {\n  if (tNode !== null) {\n    var componentView = lView[DECLARATION_COMPONENT_VIEW];\n    var componentHost = componentView[T_HOST];\n    var slotIdx = tNode.projection;\n    ngDevMode && assertProjectionSlots(lView);\n    return componentHost.projection[slotIdx];\n  }\n\n  return null;\n}\n\nfunction getBeforeNodeForView(viewIndexInContainer, lContainer) {\n  var nextViewIndex = CONTAINER_HEADER_OFFSET + viewIndexInContainer + 1;\n\n  if (nextViewIndex < lContainer.length) {\n    var lView = lContainer[nextViewIndex];\n    var firstTNodeOfView = lView[TVIEW].firstChild;\n\n    if (firstTNodeOfView !== null) {\n      return getFirstNativeNode(lView, firstTNodeOfView);\n    }\n  }\n\n  return lContainer[NATIVE];\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 */\n\n\nfunction nativeRemoveNode(renderer, rNode, isHostElement) {\n  ngDevMode && ngDevMode.rendererRemoveNode++;\n  var nativeParent = nativeParentNode(renderer, rNode);\n\n  if (nativeParent) {\n    nativeRemoveChild(renderer, nativeParent, rNode, isHostElement);\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 */\n\n\nfunction applyNodes(renderer, action, tNode, lView, parentRElement, beforeNode, isProjection) {\n  while (tNode != null) {\n    ngDevMode && assertTNodeForLView(tNode, lView);\n    ngDevMode && assertTNodeType(tNode, 3\n    /* AnyRNode */\n    | 12\n    /* AnyContainer */\n    | 16\n    /* Projection */\n    | 32\n    /* Icu */\n    );\n    var rawSlotValue = lView[tNode.index];\n    var tNodeType = tNode.type;\n\n    if (isProjection) {\n      if (action === 0\n      /* Create */\n      ) {\n        rawSlotValue && attachPatchData(unwrapRNode(rawSlotValue), lView);\n        tNode.flags |= 4\n        /* isProjected */\n        ;\n      }\n    }\n\n    if ((tNode.flags & 64\n    /* isDetached */\n    ) !== 64\n    /* isDetached */\n    ) {\n      if (tNodeType & 8\n      /* ElementContainer */\n      ) {\n        applyNodes(renderer, action, tNode.child, lView, parentRElement, beforeNode, false);\n        applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode);\n      } else if (tNodeType & 32\n      /* Icu */\n      ) {\n        var nextRNode = icuContainerIterate(tNode, lView);\n        var rNode = void 0;\n\n        while (rNode = nextRNode()) {\n          applyToElementOrContainer(action, renderer, parentRElement, rNode, beforeNode);\n        }\n\n        applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode);\n      } else if (tNodeType & 16\n      /* Projection */\n      ) {\n        applyProjectionRecursive(renderer, action, lView, tNode, parentRElement, beforeNode);\n      } else {\n        ngDevMode && assertTNodeType(tNode, 3\n        /* AnyRNode */\n        | 4\n        /* Container */\n        );\n        applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode);\n      }\n    }\n\n    tNode = isProjection ? tNode.projectionNext : tNode.next;\n  }\n}\n\nfunction applyView(tView, lView, renderer, action, parentRElement, beforeNode) {\n  applyNodes(renderer, action, tView.firstChild, lView, parentRElement, beforeNode, false);\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 */\n\n\nfunction applyProjection(tView, lView, tProjectionNode) {\n  var renderer = lView[RENDERER];\n  var parentRNode = getParentRElement(tView, tProjectionNode, lView);\n  var parentTNode = tProjectionNode.parent || lView[T_HOST];\n  var beforeNode = getInsertInFrontOfRNode(parentTNode, tProjectionNode, lView);\n  applyProjectionRecursive(renderer, 0\n  /* Create */\n  , lView, tProjectionNode, parentRNode, beforeNode);\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 */\n\n\nfunction applyProjectionRecursive(renderer, action, lView, tProjectionNode, parentRElement, beforeNode) {\n  var componentLView = lView[DECLARATION_COMPONENT_VIEW];\n  var componentNode = componentLView[T_HOST];\n  ngDevMode && assertEqual(typeof tProjectionNode.projection, 'number', 'expecting projection index');\n  var nodeToProjectOrRNodes = componentNode.projection[tProjectionNode.projection];\n\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 (var i = 0; i < nodeToProjectOrRNodes.length; i++) {\n      var rNode = nodeToProjectOrRNodes[i];\n      applyToElementOrContainer(action, renderer, parentRElement, rNode, beforeNode);\n    }\n  } else {\n    var nodeToProject = nodeToProjectOrRNodes;\n    var projectedComponentLView = componentLView[PARENT];\n    applyNodes(renderer, action, nodeToProject, projectedComponentLView, parentRElement, beforeNode, true);\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 */\n\n\nfunction applyContainer(renderer, action, lContainer, parentRElement, beforeNode) {\n  ngDevMode && assertLContainer(lContainer);\n  var anchor = lContainer[NATIVE]; // LContainer has its own before node.\n\n  var native = unwrapRNode(lContainer); // 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\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\n  for (var i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n    var lView = lContainer[i];\n    applyView(lView[TVIEW], lView, renderer, action, parentRElement, anchor);\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 */\n\n\nfunction applyStyling(renderer, isClassBased, rNode, prop, value) {\n  var isProcedural = isProceduralRenderer(renderer);\n\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\n      if (isProcedural) {\n        renderer.removeClass(rNode, prop);\n      } else {\n        rNode.classList.remove(prop);\n      }\n    } else {\n      ngDevMode && ngDevMode.rendererAddClass++;\n\n      if (isProcedural) {\n        renderer.addClass(rNode, prop);\n      } else {\n        ngDevMode && assertDefined(rNode.classList, 'HTMLElement expected');\n        rNode.classList.add(prop);\n      }\n    }\n  } else {\n    var flags = prop.indexOf('-') === -1 ? undefined : RendererStyleFlags2.DashCase;\n\n    if (value == null\n    /** || value === undefined */\n    ) {\n      ngDevMode && ngDevMode.rendererRemoveStyle++;\n\n      if (isProcedural) {\n        renderer.removeStyle(rNode, prop, flags);\n      } else {\n        rNode.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      var 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\n      if (isProcedural) {\n        renderer.setStyle(rNode, prop, value, flags);\n      } else {\n        ngDevMode && assertDefined(rNode.style, 'HTMLElement expected');\n        rNode.style.setProperty(prop, value, isImportant ? 'important' : '');\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 */\n\n\nfunction writeDirectStyle(renderer, element, newValue) {\n  ngDevMode && assertString(newValue, '\\'newValue\\' should be a string');\n\n  if (isProceduralRenderer(renderer)) {\n    renderer.setAttribute(element, 'style', newValue);\n  } else {\n    element.style.cssText = newValue;\n  }\n\n  ngDevMode && ngDevMode.rendererSetStyle++;\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 */\n\n\nfunction writeDirectClass(renderer, element, newValue) {\n  ngDevMode && assertString(newValue, '\\'newValue\\' should be a string');\n\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\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\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 */\n\n\nfunction classIndexOf(className, classToSearch, startingIndex) {\n  ngDevMode && assertNotEqual(classToSearch, '', 'can not look for \"\" string.');\n  var end = className.length;\n\n  while (true) {\n    var foundIndex = className.indexOf(classToSearch, startingIndex);\n    if (foundIndex === -1) return foundIndex;\n\n    if (foundIndex === 0 || className.charCodeAt(foundIndex - 1) <= 32\n    /* SPACE */\n    ) {\n      // Ensure that it has leading whitespace\n      var length = classToSearch.length;\n\n      if (foundIndex + length === end || className.charCodeAt(foundIndex + length) <= 32\n      /* SPACE */\n      ) {\n        // Ensure that it has trailing whitespace\n        return foundIndex;\n      }\n    } // False positive, keep searching from where we left off.\n\n\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\n\nvar unusedValueToPlacateAjd$1 = unusedValueExportToPlacateAjd$4 + unusedValueExportToPlacateAjd$5;\nvar NG_TEMPLATE_SELECTOR = 'ng-template';\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 */\n\nfunction isCssClassMatching(attrs, cssClassToMatch, isProjectionMode) {\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 && assertEqual(cssClassToMatch, cssClassToMatch.toLowerCase(), 'Class name expected to be lowercase.');\n  var i = 0;\n\n  while (i < attrs.length) {\n    var item = attrs[i++];\n\n    if (isProjectionMode && item === 'class') {\n      item = attrs[i];\n\n      if (classIndexOf(item.toLowerCase(), cssClassToMatch, 0) !== -1) {\n        return true;\n      }\n    } else if (item === 1\n    /* Classes */\n    ) {\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\n      return false;\n    }\n  }\n\n  return false;\n}\n/**\n * Checks whether the `tNode` represents an inline template (e.g. `*ngFor`).\n *\n * @param tNode current TNode\n */\n\n\nfunction isInlineTemplate(tNode) {\n  return tNode.type === 4\n  /* Container */\n  && tNode.value !== NG_TEMPLATE_SELECTOR;\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 */\n\n\nfunction hasTagAndTypeMatch(tNode, currentSelector, isProjectionMode) {\n  var tagNameToCompare = tNode.type === 4\n  /* Container */\n  && !isProjectionMode ? NG_TEMPLATE_SELECTOR : tNode.value;\n  return currentSelector === tagNameToCompare;\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 */\n\n\nfunction isNodeMatchingSelector(tNode, selector, isProjectionMode) {\n  ngDevMode && assertDefined(selector[0], 'Selector should have a tag name');\n  var mode = 4\n  /* ELEMENT */\n  ;\n  var nodeAttrs = tNode.attrs || []; // Find the index of first attribute that has no value, only a name.\n\n  var nameOnlyMarkerIdx = getNameOnlyMarkerIndex(nodeAttrs); // When processing \":not\" selectors, we skip to the next \":not\" if the\n  // current one doesn't match\n\n  var skipToNextSelector = false;\n\n  for (var i = 0; i < selector.length; i++) {\n    var current = selector[i];\n\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      } // 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\n\n      if (skipToNextSelector && isPositive(current)) continue;\n      skipToNextSelector = false;\n      mode = current | mode & 1\n      /* NOT */\n      ;\n      continue;\n    }\n\n    if (skipToNextSelector) continue;\n\n    if (mode & 4\n    /* ELEMENT */\n    ) {\n      mode = 2\n      /* ATTRIBUTE */\n      | mode & 1\n      /* NOT */\n      ;\n\n      if (current !== '' && !hasTagAndTypeMatch(tNode, current, isProjectionMode) || current === '' && selector.length === 1) {\n        if (isPositive(mode)) return false;\n        skipToNextSelector = true;\n      }\n    } else {\n      var selectorAttrValue = mode & 8\n      /* CLASS */\n      ? current : selector[++i]; // 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\n      if (mode & 8\n      /* CLASS */\n      && tNode.attrs !== null) {\n        if (!isCssClassMatching(tNode.attrs, selectorAttrValue, isProjectionMode)) {\n          if (isPositive(mode)) return false;\n          skipToNextSelector = true;\n        }\n\n        continue;\n      }\n\n      var attrName = mode & 8\n      /* CLASS */\n      ? 'class' : current;\n      var attrIndexInNode = 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        var nodeAttrValue = void 0;\n\n        if (attrIndexInNode > nameOnlyMarkerIdx) {\n          nodeAttrValue = '';\n        } else {\n          ngDevMode && assertNotEqual(nodeAttrs[attrIndexInNode], 0\n          /* NamespaceURI */\n          , 'We do not match directives on namespaced attributes'); // we lowercase the attribute value to be able to match\n          // selectors without case-sensitivity\n          // (selectors are already in lowercase when generated)\n\n          nodeAttrValue = nodeAttrs[attrIndexInNode + 1].toLowerCase();\n        }\n\n        var compareAgainstClassName = mode & 8\n        /* CLASS */\n        ? nodeAttrValue : null;\n\n        if (compareAgainstClassName && classIndexOf(compareAgainstClassName, selectorAttrValue, 0) !== -1 || mode & 2\n        /* ATTRIBUTE */\n        && 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) {\n  return (mode & 1\n  /* NOT */\n  ) === 0;\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 */\n\n\nfunction findAttrIndexInNode(name, attrs, isInlineTemplate, isProjectionMode) {\n  if (attrs === null) return -1;\n  var i = 0;\n\n  if (isProjectionMode || !isInlineTemplate) {\n    var bindingsMode = false;\n\n    while (i < attrs.length) {\n      var maybeAttrName = attrs[i];\n\n      if (maybeAttrName === name) {\n        return i;\n      } else if (maybeAttrName === 3\n      /* Bindings */\n      || maybeAttrName === 6\n      /* I18n */\n      ) {\n        bindingsMode = true;\n      } else if (maybeAttrName === 1\n      /* Classes */\n      || maybeAttrName === 2\n      /* Styles */\n      ) {\n        var value = attrs[++i]; // We should skip classes here because we have a separate mechanism for\n        // matching classes in projection mode.\n\n        while (typeof value === 'string') {\n          value = attrs[++i];\n        }\n\n        continue;\n      } else if (maybeAttrName === 4\n      /* Template */\n      ) {\n        // We do not care about Template attributes in this scenario.\n        break;\n      } else if (maybeAttrName === 0\n      /* NamespaceURI */\n      ) {\n        // Skip the whole namespaced attribute and value. This is by design.\n        i += 4;\n        continue;\n      } // In binding mode there are only names, rather than name-value pairs.\n\n\n      i += bindingsMode ? 1 : 2;\n    } // We did not match the attribute\n\n\n    return -1;\n  } else {\n    return matchTemplateAttribute(attrs, name);\n  }\n}\n\nfunction isNodeMatchingSelectorList(tNode, selector) {\n  var isProjectionMode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n  for (var i = 0; i < selector.length; i++) {\n    if (isNodeMatchingSelector(tNode, selector[i], isProjectionMode)) {\n      return true;\n    }\n  }\n\n  return false;\n}\n\nfunction getProjectAsAttrValue(tNode) {\n  var nodeAttrs = tNode.attrs;\n\n  if (nodeAttrs != null) {\n    var ngProjectAsAttrIdx = nodeAttrs.indexOf(5\n    /* 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\n    if ((ngProjectAsAttrIdx & 1) === 0) {\n      return nodeAttrs[ngProjectAsAttrIdx + 1];\n    }\n  }\n\n  return null;\n}\n\nfunction getNameOnlyMarkerIndex(nodeAttrs) {\n  for (var i = 0; i < nodeAttrs.length; i++) {\n    var nodeAttr = nodeAttrs[i];\n\n    if (isNameOnlyAttributeMarker(nodeAttr)) {\n      return i;\n    }\n  }\n\n  return nodeAttrs.length;\n}\n\nfunction matchTemplateAttribute(attrs, name) {\n  var i = attrs.indexOf(4\n  /* Template */\n  );\n\n  if (i > -1) {\n    i++;\n\n    while (i < attrs.length) {\n      var attr = attrs[i]; // 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\n      if (typeof attr === 'number') return -1;\n      if (attr === name) return i;\n      i++;\n    }\n  }\n\n  return -1;\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 */\n\n\nfunction isSelectorInSelectorList(selector, list) {\n  selectorListLoop: for (var i = 0; i < list.length; i++) {\n    var currentSelectorInList = list[i];\n\n    if (selector.length !== currentSelectorInList.length) {\n      continue;\n    }\n\n    for (var j = 0; j < selector.length; j++) {\n      if (selector[j] !== currentSelectorInList[j]) {\n        continue selectorListLoop;\n      }\n    }\n\n    return true;\n  }\n\n  return false;\n}\n\nfunction maybeWrapInNotSelector(isNegativeMode, chunk) {\n  return isNegativeMode ? ':not(' + chunk.trim() + ')' : chunk;\n}\n\nfunction stringifyCSSSelector(selector) {\n  var result = selector[0];\n  var i = 1;\n  var mode = 2\n  /* ATTRIBUTE */\n  ;\n  var currentChunk = '';\n  var isNegativeMode = false;\n\n  while (i < selector.length) {\n    var valueOrMarker = selector[i];\n\n    if (typeof valueOrMarker === 'string') {\n      if (mode & 2\n      /* ATTRIBUTE */\n      ) {\n        var attrValue = selector[++i];\n        currentChunk += '[' + valueOrMarker + (attrValue.length > 0 ? '=\"' + attrValue + '\"' : '') + ']';\n      } else if (mode & 8\n      /* CLASS */\n      ) {\n        currentChunk += '.' + valueOrMarker;\n      } else if (mode & 4\n      /* ELEMENT */\n      ) {\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\n      mode = valueOrMarker; // According to CssSelector spec, once we come across `SelectorFlags.NOT` flag, the negative\n      // mode is maintained for remaining chunks of a selector.\n\n      isNegativeMode = isNegativeMode || !isPositive(mode);\n    }\n\n    i++;\n  }\n\n  if (currentChunk !== '') {\n    result += maybeWrapInNotSelector(isNegativeMode, currentChunk);\n  }\n\n  return result;\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 */\n\n\nfunction stringifyCSSSelectorList(selectorList) {\n  return selectorList.map(stringifyCSSSelector).join(',');\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 */\n\n\nfunction extractAttrsAndClassesFromSelector(selector) {\n  var attrs = [];\n  var classes = [];\n  var i = 1;\n  var mode = 2\n  /* ATTRIBUTE */\n  ;\n\n  while (i < selector.length) {\n    var valueOrMarker = selector[i];\n\n    if (typeof valueOrMarker === 'string') {\n      if (mode === 2\n      /* ATTRIBUTE */\n      ) {\n        if (valueOrMarker !== '') {\n          attrs.push(valueOrMarker, selector[++i]);\n        }\n      } else if (mode === 8\n      /* CLASS */\n      ) {\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\n    i++;\n  }\n\n  return {\n    attrs: attrs,\n    classes: classes\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/** A special value which designates that a value has not changed. */\n\n\nvar NO_CHANGE = typeof ngDevMode === 'undefined' || ngDevMode ? {\n  __brand__: '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 */\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 */\n\nfunction ɵɵadvance(delta) {\n  ngDevMode && assertGreaterThan(delta, 0, 'Can only advance forward');\n  selectIndexInternal(getTView(), getLView(), getSelectedIndex() + delta, isInCheckNoChangesMode());\n}\n\nfunction selectIndexInternal(tView, lView, index, checkNoChangesMode) {\n  ngDevMode && assertIndexInDeclRange(lView, index); // 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\n  if (!checkNoChangesMode) {\n    var hooksInitPhaseCompleted = (lView[FLAGS] & 3\n    /* InitPhaseStateMask */\n    ) === 3\n    /* InitPhaseCompleted */\n    ;\n\n    if (hooksInitPhaseCompleted) {\n      var preOrderCheckHooks = tView.preOrderCheckHooks;\n\n      if (preOrderCheckHooks !== null) {\n        executeCheckHooks(lView, preOrderCheckHooks, index);\n      }\n    } else {\n      var preOrderHooks = tView.preOrderHooks;\n\n      if (preOrderHooks !== null) {\n        executeInitAndCheckHooks(lView, preOrderHooks, 0\n        /* OnInitHooksToBeRun */\n        , index);\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\n\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\n\nfunction toTStylingRange(prev, next) {\n  ngDevMode && assertNumberInRange(prev, 0, 32767\n  /* UNSIGNED_MASK */\n  );\n  ngDevMode && assertNumberInRange(next, 0, 32767\n  /* UNSIGNED_MASK */\n  );\n  return prev << 17\n  /* PREV_SHIFT */\n  | next << 2\n  /* NEXT_SHIFT */\n  ;\n}\n\nfunction getTStylingRangePrev(tStylingRange) {\n  ngDevMode && assertNumber(tStylingRange, 'expected number');\n  return tStylingRange >> 17\n  /* PREV_SHIFT */\n  & 32767\n  /* UNSIGNED_MASK */\n  ;\n}\n\nfunction getTStylingRangePrevDuplicate(tStylingRange) {\n  ngDevMode && assertNumber(tStylingRange, 'expected number');\n  return (tStylingRange & 2\n  /* PREV_DUPLICATE */\n  ) == 2\n  /* PREV_DUPLICATE */\n  ;\n}\n\nfunction setTStylingRangePrev(tStylingRange, previous) {\n  ngDevMode && assertNumber(tStylingRange, 'expected number');\n  ngDevMode && assertNumberInRange(previous, 0, 32767\n  /* UNSIGNED_MASK */\n  );\n  return tStylingRange & ~4294836224\n  /* PREV_MASK */\n  | previous << 17\n  /* PREV_SHIFT */\n  ;\n}\n\nfunction setTStylingRangePrevDuplicate(tStylingRange) {\n  ngDevMode && assertNumber(tStylingRange, 'expected number');\n  return tStylingRange | 2\n  /* PREV_DUPLICATE */\n  ;\n}\n\nfunction getTStylingRangeNext(tStylingRange) {\n  ngDevMode && assertNumber(tStylingRange, 'expected number');\n  return (tStylingRange & 131068\n  /* NEXT_MASK */\n  ) >> 2\n  /* NEXT_SHIFT */\n  ;\n}\n\nfunction setTStylingRangeNext(tStylingRange, next) {\n  ngDevMode && assertNumber(tStylingRange, 'expected number');\n  ngDevMode && assertNumberInRange(next, 0, 32767\n  /* UNSIGNED_MASK */\n  );\n  return tStylingRange & ~131068\n  /* NEXT_MASK */\n  | //\n  next << 2\n  /* NEXT_SHIFT */\n  ;\n}\n\nfunction getTStylingRangeNextDuplicate(tStylingRange) {\n  ngDevMode && assertNumber(tStylingRange, 'expected number');\n  return (tStylingRange & 1\n  /* NEXT_DUPLICATE */\n  ) === 1\n  /* NEXT_DUPLICATE */\n  ;\n}\n\nfunction setTStylingRangeNextDuplicate(tStylingRange) {\n  ngDevMode && assertNumber(tStylingRange, 'expected number');\n  return tStylingRange | 1\n  /* NEXT_DUPLICATE */\n  ;\n}\n\nfunction getTStylingRangeTail(tStylingRange) {\n  ngDevMode && assertNumber(tStylingRange, 'expected number');\n  var 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 */\n\n\nfunction attachDebugObject(obj, debug) {\n  if (ngDevMode) {\n    Object.defineProperty(obj, 'debug', {\n      value: debug,\n      enumerable: false\n    });\n  } else {\n    throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');\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 */\n\n\nfunction attachDebugGetter(obj, debugGetter) {\n  if (ngDevMode) {\n    Object.defineProperty(obj, 'debug', {\n      get: debugGetter,\n      enumerable: false\n    });\n  } else {\n    throw new Error('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\n\nvar NG_DEV_MODE = (typeof ngDevMode === 'undefined' || !!ngDevMode) && /*@__PURE__*/initNgDevMode();\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\nvar LVIEW_COMPONENT_CACHE;\nvar LVIEW_EMBEDDED_CACHE;\nvar LVIEW_ROOT;\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 */\n\nfunction cloneToLViewFromTViewBlueprint(tView) {\n  var debugTView = tView;\n  var lView = getLViewToClone(debugTView.type, tView.template && tView.template.name);\n  return lView.concat(tView.blueprint);\n}\n\nfunction getLViewToClone(type, name) {\n  switch (type) {\n    case 0\n    /* Root */\n    :\n      if (LVIEW_ROOT === undefined) LVIEW_ROOT = new (createNamedArrayType('LRootView'))();\n      return LVIEW_ROOT;\n\n    case 1\n    /* Component */\n    :\n      if (LVIEW_COMPONENT_CACHE === undefined) LVIEW_COMPONENT_CACHE = new Map();\n      var componentArray = LVIEW_COMPONENT_CACHE.get(name);\n\n      if (componentArray === undefined) {\n        componentArray = new (createNamedArrayType('LComponentView' + nameSuffix(name)))();\n        LVIEW_COMPONENT_CACHE.set(name, componentArray);\n      }\n\n      return componentArray;\n\n    case 2\n    /* Embedded */\n    :\n      if (LVIEW_EMBEDDED_CACHE === undefined) LVIEW_EMBEDDED_CACHE = new Map();\n      var embeddedArray = LVIEW_EMBEDDED_CACHE.get(name);\n\n      if (embeddedArray === undefined) {\n        embeddedArray = new (createNamedArrayType('LEmbeddedView' + nameSuffix(name)))();\n        LVIEW_EMBEDDED_CACHE.set(name, embeddedArray);\n      }\n\n      return embeddedArray;\n  }\n}\n\nfunction nameSuffix(text) {\n  if (text == null) return '';\n  var index = text.lastIndexOf('_Template');\n  return '_' + (index === -1 ? text : text.substr(0, index));\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 */\n\n\nvar TViewConstructor = /*#__PURE__*/function () {\n  function TView(type, blueprint, template, queries, viewQuery, declTNode, data, bindingStartIndex, expandoStartIndex, hostBindingOpCodes, firstCreatePass, firstUpdatePass, staticViewQueries, staticContentQueries, preOrderHooks, preOrderCheckHooks, contentHooks, contentCheckHooks, viewHooks, viewCheckHooks, destroyHooks, cleanup, contentQueries, components, directiveRegistry, pipeRegistry, firstChild, schemas, consts, incompleteFirstPass, _decls, _vars) {\n    _classCallCheck(this, TView);\n\n    this.type = type;\n    this.blueprint = blueprint;\n    this.template = template;\n    this.queries = queries;\n    this.viewQuery = viewQuery;\n    this.declTNode = declTNode;\n    this.data = data;\n    this.bindingStartIndex = bindingStartIndex;\n    this.expandoStartIndex = expandoStartIndex;\n    this.hostBindingOpCodes = hostBindingOpCodes;\n    this.firstCreatePass = firstCreatePass;\n    this.firstUpdatePass = firstUpdatePass;\n    this.staticViewQueries = staticViewQueries;\n    this.staticContentQueries = staticContentQueries;\n    this.preOrderHooks = preOrderHooks;\n    this.preOrderCheckHooks = preOrderCheckHooks;\n    this.contentHooks = contentHooks;\n    this.contentCheckHooks = contentCheckHooks;\n    this.viewHooks = viewHooks;\n    this.viewCheckHooks = viewCheckHooks;\n    this.destroyHooks = destroyHooks;\n    this.cleanup = cleanup;\n    this.contentQueries = contentQueries;\n    this.components = components;\n    this.directiveRegistry = directiveRegistry;\n    this.pipeRegistry = pipeRegistry;\n    this.firstChild = firstChild;\n    this.schemas = schemas;\n    this.consts = consts;\n    this.incompleteFirstPass = incompleteFirstPass;\n    this._decls = _decls;\n    this._vars = _vars;\n  }\n\n  _createClass2(TView, [{\n    key: \"template_\",\n    get: function get() {\n      var buf = [];\n      processTNodeChildren(this.firstChild, buf);\n      return buf.join('');\n    }\n  }, {\n    key: \"type_\",\n    get: function get() {\n      return TViewTypeAsString[this.type] || \"TViewType.?\".concat(this.type, \"?\");\n    }\n  }]);\n\n  return TView;\n}();\n\nvar TNode = /*#__PURE__*/function () {\n  function TNode(tView_, //\n  type, //\n  index, //\n  insertBeforeIndex, //\n  injectorIndex, //\n  directiveStart, //\n  directiveEnd, //\n  directiveStylingLast, //\n  propertyBindings, //\n  flags, //\n  providerIndexes, //\n  value, //\n  attrs, //\n  mergedAttrs, //\n  localNames, //\n  initialInputs, //\n  inputs, //\n  outputs, //\n  tViews, //\n  next, //\n  projectionNext, //\n  child, //\n  parent, //\n  projection, //\n  styles, //\n  stylesWithoutHost, //\n  residualStyles, //\n  classes, //\n  classesWithoutHost, //\n  residualClasses, //\n  classBindings, //\n  styleBindings) {\n    _classCallCheck(this, TNode);\n\n    this.tView_ = tView_;\n    this.type = type;\n    this.index = index;\n    this.insertBeforeIndex = insertBeforeIndex;\n    this.injectorIndex = injectorIndex;\n    this.directiveStart = directiveStart;\n    this.directiveEnd = directiveEnd;\n    this.directiveStylingLast = directiveStylingLast;\n    this.propertyBindings = propertyBindings;\n    this.flags = flags;\n    this.providerIndexes = providerIndexes;\n    this.value = value;\n    this.attrs = attrs;\n    this.mergedAttrs = mergedAttrs;\n    this.localNames = localNames;\n    this.initialInputs = initialInputs;\n    this.inputs = inputs;\n    this.outputs = outputs;\n    this.tViews = tViews;\n    this.next = next;\n    this.projectionNext = projectionNext;\n    this.child = child;\n    this.parent = parent;\n    this.projection = projection;\n    this.styles = styles;\n    this.stylesWithoutHost = stylesWithoutHost;\n    this.residualStyles = residualStyles;\n    this.classes = classes;\n    this.classesWithoutHost = classesWithoutHost;\n    this.residualClasses = residualClasses;\n    this.classBindings = classBindings;\n    this.styleBindings = styleBindings;\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\n\n  _createClass2(TNode, [{\n    key: \"debugNodeInjectorPath\",\n    value: function debugNodeInjectorPath(lView) {\n      var path = [];\n      var injectorIndex = getInjectorIndex(this, lView);\n\n      if (injectorIndex === -1) {\n        // Looks like the current `TNode` does not have `NodeInjector` associated with it => look for\n        // parent NodeInjector.\n        var parentLocation = getParentInjectorLocation(this, lView);\n\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 {// No parents have been found, so there are no `NodeInjector`s to consult.\n        }\n      }\n\n      while (injectorIndex !== -1) {\n        ngDevMode && assertNodeInjector(lView, injectorIndex);\n        var tNode = lView[TVIEW].data[injectorIndex + 8\n        /* TNODE */\n        ];\n        path.push(buildDebugNode(tNode, lView));\n        var _parentLocation = lView[injectorIndex + 8\n        /* PARENT */\n        ];\n\n        if (_parentLocation === NO_PARENT_INJECTOR) {\n          injectorIndex = -1;\n        } else {\n          injectorIndex = getParentInjectorIndex(_parentLocation);\n          lView = getParentInjectorView(_parentLocation, lView);\n        }\n      }\n\n      return path;\n    }\n  }, {\n    key: \"type_\",\n    get: function get() {\n      return toTNodeTypeAsString(this.type) || \"TNodeType.?\".concat(this.type, \"?\");\n    }\n  }, {\n    key: \"flags_\",\n    get: function get() {\n      var flags = [];\n      if (this.flags & 16\n      /* hasClassInput */\n      ) flags.push('TNodeFlags.hasClassInput');\n      if (this.flags & 8\n      /* hasContentQuery */\n      ) flags.push('TNodeFlags.hasContentQuery');\n      if (this.flags & 32\n      /* hasStyleInput */\n      ) flags.push('TNodeFlags.hasStyleInput');\n      if (this.flags & 128\n      /* hasHostBindings */\n      ) flags.push('TNodeFlags.hasHostBindings');\n      if (this.flags & 2\n      /* isComponentHost */\n      ) flags.push('TNodeFlags.isComponentHost');\n      if (this.flags & 1\n      /* isDirectiveHost */\n      ) flags.push('TNodeFlags.isDirectiveHost');\n      if (this.flags & 64\n      /* isDetached */\n      ) flags.push('TNodeFlags.isDetached');\n      if (this.flags & 4\n      /* isProjected */\n      ) flags.push('TNodeFlags.isProjected');\n      return flags.join('|');\n    }\n  }, {\n    key: \"template_\",\n    get: function get() {\n      if (this.type & 1\n      /* Text */\n      ) return this.value;\n      var buf = [];\n      var tagName = typeof this.value === 'string' && this.value || this.type_;\n      buf.push('<', tagName);\n\n      if (this.flags) {\n        buf.push(' ', this.flags_);\n      }\n\n      if (this.attrs) {\n        for (var i = 0; i < this.attrs.length;) {\n          var attrName = this.attrs[i++];\n\n          if (typeof attrName == 'number') {\n            break;\n          }\n\n          var attrValue = this.attrs[i++];\n          buf.push(' ', attrName, '=\"', attrValue, '\"');\n        }\n      }\n\n      buf.push('>');\n      processTNodeChildren(this.child, buf);\n      buf.push('</', tagName, '>');\n      return buf.join('');\n    }\n  }, {\n    key: \"styleBindings_\",\n    get: function get() {\n      return toDebugStyleBinding(this, false);\n    }\n  }, {\n    key: \"classBindings_\",\n    get: function get() {\n      return toDebugStyleBinding(this, true);\n    }\n  }, {\n    key: \"providerIndexStart_\",\n    get: function get() {\n      return this.providerIndexes & 1048575\n      /* ProvidersStartIndexMask */\n      ;\n    }\n  }, {\n    key: \"providerIndexEnd_\",\n    get: function get() {\n      return this.providerIndexStart_ + (this.providerIndexes >>> 20\n      /* CptViewProvidersCountShift */\n      );\n    }\n  }]);\n\n  return TNode;\n}();\n\nvar TNodeDebug = TNode;\n\nfunction toDebugStyleBinding(tNode, isClassBased) {\n  var tData = tNode.tView_.data;\n  var bindings = [];\n  var range = isClassBased ? tNode.classBindings : tNode.styleBindings;\n  var prev = getTStylingRangePrev(range);\n  var next = getTStylingRangeNext(range);\n  var isTemplate = next !== 0;\n  var cursor = isTemplate ? next : prev;\n\n  while (cursor !== 0) {\n    var itemKey = tData[cursor];\n    var itemRange = tData[cursor + 1];\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\n  bindings.push((isClassBased ? tNode.residualClasses : tNode.residualStyles) || null);\n  return bindings;\n}\n\nfunction processTNodeChildren(tNode, buf) {\n  while (tNode) {\n    buf.push(tNode.template_);\n    tNode = tNode.next;\n  }\n}\n\nvar TViewData = NG_DEV_MODE && /*@__PURE__*/createNamedArrayType('TViewData') || null;\nvar TVIEWDATA_EMPTY; // can't initialize here or it will not be tree shaken, because\n// `LView` constructor could have side-effects.\n\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 */\n\nfunction cloneToTViewData(list) {\n  if (TVIEWDATA_EMPTY === undefined) TVIEWDATA_EMPTY = new TViewData();\n  return TVIEWDATA_EMPTY.concat(list);\n}\n\nvar LViewBlueprint = NG_DEV_MODE && /*@__PURE__*/createNamedArrayType('LViewBlueprint') || null;\nvar MatchesArray = NG_DEV_MODE && /*@__PURE__*/createNamedArrayType('MatchesArray') || null;\nvar TViewComponents = NG_DEV_MODE && /*@__PURE__*/createNamedArrayType('TViewComponents') || null;\nvar TNodeLocalNames = NG_DEV_MODE && /*@__PURE__*/createNamedArrayType('TNodeLocalNames') || null;\nvar TNodeInitialInputs = NG_DEV_MODE && /*@__PURE__*/createNamedArrayType('TNodeInitialInputs') || null;\nvar TNodeInitialData = NG_DEV_MODE && /*@__PURE__*/createNamedArrayType('TNodeInitialData') || null;\nvar LCleanup = NG_DEV_MODE && /*@__PURE__*/createNamedArrayType('LCleanup') || null;\nvar TCleanup = NG_DEV_MODE && /*@__PURE__*/createNamedArrayType('TCleanup') || null;\n\nfunction attachLViewDebug(lView) {\n  attachDebugObject(lView, new LViewDebug(lView));\n}\n\nfunction attachLContainerDebug(lContainer) {\n  attachDebugObject(lContainer, new LContainerDebug(lContainer));\n}\n\nfunction toDebug(obj) {\n  if (obj) {\n    var debug = obj.debug;\n    assertDefined(debug, 'Object does not have a debug representation.');\n    return debug;\n  } else {\n    return obj;\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 */\n\n\nfunction toHtml(value) {\n  var includeChildren = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n  var node = unwrapRNode(value);\n\n  if (node) {\n    switch (node.nodeType) {\n      case Node.TEXT_NODE:\n        return node.textContent;\n\n      case Node.COMMENT_NODE:\n        return \"<!--\".concat(node.textContent, \"-->\");\n\n      case Node.ELEMENT_NODE:\n        var outerHTML = node.outerHTML;\n\n        if (includeChildren) {\n          return outerHTML;\n        } else {\n          var innerHTML = '>' + node.innerHTML + '<';\n          return outerHTML.split(innerHTML)[0] + '>';\n        }\n\n    }\n  }\n\n  return null;\n}\n\nvar LViewDebug = /*#__PURE__*/function () {\n  function LViewDebug(_raw_lView) {\n    _classCallCheck(this, LViewDebug);\n\n    this._raw_lView = _raw_lView;\n  }\n  /**\n   * Flags associated with the `LView` unpacked into a more readable state.\n   */\n\n\n  _createClass2(LViewDebug, [{\n    key: \"flags\",\n    get: function get() {\n      var flags = this._raw_lView[FLAGS];\n      return {\n        __raw__flags__: flags,\n        initPhaseState: flags & 3\n        /* InitPhaseStateMask */\n        ,\n        creationMode: !!(flags & 4\n        /* CreationMode */\n        ),\n        firstViewPass: !!(flags & 8\n        /* FirstLViewPass */\n        ),\n        checkAlways: !!(flags & 16\n        /* CheckAlways */\n        ),\n        dirty: !!(flags & 64\n        /* Dirty */\n        ),\n        attached: !!(flags & 128\n        /* Attached */\n        ),\n        destroyed: !!(flags & 256\n        /* Destroyed */\n        ),\n        isRoot: !!(flags & 512\n        /* IsRoot */\n        ),\n        indexWithinInitPhase: flags >> 11\n        /* IndexWithinInitPhaseShift */\n\n      };\n    }\n  }, {\n    key: \"parent\",\n    get: function get() {\n      return toDebug(this._raw_lView[PARENT]);\n    }\n  }, {\n    key: \"hostHTML\",\n    get: function get() {\n      return toHtml(this._raw_lView[HOST], true);\n    }\n  }, {\n    key: \"html\",\n    get: function get() {\n      return (this.nodes || []).map(mapToHTML).join('');\n    }\n  }, {\n    key: \"context\",\n    get: function get() {\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\n  }, {\n    key: \"nodes\",\n    get: function get() {\n      var lView = this._raw_lView;\n      var tNode = lView[TVIEW].firstChild;\n      return toDebugNodes(tNode, lView);\n    }\n  }, {\n    key: \"template\",\n    get: function get() {\n      return this.tView.template_;\n    }\n  }, {\n    key: \"tView\",\n    get: function get() {\n      return this._raw_lView[TVIEW];\n    }\n  }, {\n    key: \"cleanup\",\n    get: function get() {\n      return this._raw_lView[CLEANUP];\n    }\n  }, {\n    key: \"injector\",\n    get: function get() {\n      return this._raw_lView[INJECTOR];\n    }\n  }, {\n    key: \"rendererFactory\",\n    get: function get() {\n      return this._raw_lView[RENDERER_FACTORY];\n    }\n  }, {\n    key: \"renderer\",\n    get: function get() {\n      return this._raw_lView[RENDERER];\n    }\n  }, {\n    key: \"sanitizer\",\n    get: function get() {\n      return this._raw_lView[SANITIZER];\n    }\n  }, {\n    key: \"childHead\",\n    get: function get() {\n      return toDebug(this._raw_lView[CHILD_HEAD]);\n    }\n  }, {\n    key: \"next\",\n    get: function get() {\n      return toDebug(this._raw_lView[NEXT]);\n    }\n  }, {\n    key: \"childTail\",\n    get: function get() {\n      return toDebug(this._raw_lView[CHILD_TAIL]);\n    }\n  }, {\n    key: \"declarationView\",\n    get: function get() {\n      return toDebug(this._raw_lView[DECLARATION_VIEW]);\n    }\n  }, {\n    key: \"queries\",\n    get: function get() {\n      return this._raw_lView[QUERIES];\n    }\n  }, {\n    key: \"tHost\",\n    get: function get() {\n      return this._raw_lView[T_HOST];\n    }\n  }, {\n    key: \"decls\",\n    get: function get() {\n      return toLViewRange(this.tView, this._raw_lView, HEADER_OFFSET, this.tView.bindingStartIndex);\n    }\n  }, {\n    key: \"vars\",\n    get: function get() {\n      return toLViewRange(this.tView, this._raw_lView, this.tView.bindingStartIndex, this.tView.expandoStartIndex);\n    }\n  }, {\n    key: \"expando\",\n    get: function get() {\n      return toLViewRange(this.tView, this._raw_lView, this.tView.expandoStartIndex, this._raw_lView.length);\n    }\n    /**\n     * Normalized view of child views (and containers) attached at this location.\n     */\n\n  }, {\n    key: \"childViews\",\n    get: function get() {\n      var childViews = [];\n      var child = this.childHead;\n\n      while (child) {\n        childViews.push(child);\n        child = child.next;\n      }\n\n      return childViews;\n    }\n  }]);\n\n  return LViewDebug;\n}();\n\nfunction mapToHTML(node) {\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, lView, start, end) {\n  var content = [];\n\n  for (var index = start; index < end; index++) {\n    content.push({\n      index: index,\n      t: tView.data[index],\n      l: lView[index]\n    });\n  }\n\n  return {\n    start: start,\n    end: end,\n    length: end - start,\n    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 */\n\n\nfunction toDebugNodes(tNode, lView) {\n  if (tNode) {\n    var debugNodes = [];\n    var tNodeCursor = tNode;\n\n    while (tNodeCursor) {\n      debugNodes.push(buildDebugNode(tNodeCursor, lView));\n      tNodeCursor = tNodeCursor.next;\n    }\n\n    return debugNodes;\n  } else {\n    return [];\n  }\n}\n\nfunction buildDebugNode(tNode, lView) {\n  var rawValue = lView[tNode.index];\n  var native = unwrapRNode(rawValue);\n  var factories = [];\n  var instances = [];\n  var tView = lView[TVIEW];\n\n  for (var i = tNode.directiveStart; i < tNode.directiveEnd; i++) {\n    var def = tView.data[i];\n    factories.push(def.type);\n    instances.push(lView[i]);\n  }\n\n  return {\n    html: toHtml(native),\n    type: toTNodeTypeAsString(tNode.type),\n    tNode: tNode,\n    native: native,\n    children: toDebugNodes(tNode.child, lView),\n    factories: factories,\n    instances: instances,\n    injector: buildNodeInjectorDebug(tNode, tView, lView),\n\n    get injectorResolutionPath() {\n      return tNode.debugNodeInjectorPath(lView);\n    }\n\n  };\n}\n\nfunction buildNodeInjectorDebug(tNode, tView, lView) {\n  var viewProviders = [];\n\n  for (var i = tNode.providerIndexStart_; i < tNode.providerIndexEnd_; i++) {\n    viewProviders.push(tView.data[i]);\n  }\n\n  var providers = [];\n\n  for (var _i3 = tNode.providerIndexEnd_; _i3 < tNode.directiveEnd; _i3++) {\n    providers.push(tView.data[_i3]);\n  }\n\n  var nodeInjectorDebug = {\n    bloom: toBloom(lView, tNode.injectorIndex),\n    cumulativeBloom: toBloom(tView.data, tNode.injectorIndex),\n    providers: providers,\n    viewProviders: viewProviders,\n    parentInjectorIndex: lView[tNode.providerIndexStart_ - 1]\n  };\n  return nodeInjectorDebug;\n}\n/**\n * Convert a number at `idx` location in `array` into binary representation.\n *\n * @param array\n * @param idx\n */\n\n\nfunction binary(array, idx) {\n  var value = array[idx]; // If not a number we print 8 `?` to retain alignment but let user know that it was called on\n  // wrong type.\n\n  if (typeof value !== 'number') return '????????'; // We prefix 0s so that we have constant length number\n\n  var text = '00000000' + value.toString(2);\n  return text.substring(text.length - 8);\n}\n/**\n * Convert a bloom filter at location `idx` in `array` into binary representation.\n *\n * @param array\n * @param idx\n */\n\n\nfunction toBloom(array, idx) {\n  if (idx < 0) {\n    return 'NO_NODE_INJECTOR';\n  }\n\n  return \"\".concat(binary(array, idx + 7), \"_\").concat(binary(array, idx + 6), \"_\").concat(binary(array, idx + 5), \"_\").concat(binary(array, idx + 4), \"_\").concat(binary(array, idx + 3), \"_\").concat(binary(array, idx + 2), \"_\").concat(binary(array, idx + 1), \"_\").concat(binary(array, idx + 0));\n}\n\nvar LContainerDebug = /*#__PURE__*/function () {\n  function LContainerDebug(_raw_lContainer) {\n    _classCallCheck(this, LContainerDebug);\n\n    this._raw_lContainer = _raw_lContainer;\n  }\n\n  _createClass2(LContainerDebug, [{\n    key: \"hasTransplantedViews\",\n    get: function get() {\n      return this._raw_lContainer[HAS_TRANSPLANTED_VIEWS];\n    }\n  }, {\n    key: \"views\",\n    get: function get() {\n      return this._raw_lContainer.slice(CONTAINER_HEADER_OFFSET).map(toDebug);\n    }\n  }, {\n    key: \"parent\",\n    get: function get() {\n      return toDebug(this._raw_lContainer[PARENT]);\n    }\n  }, {\n    key: \"movedViews\",\n    get: function get() {\n      return this._raw_lContainer[MOVED_VIEWS];\n    }\n  }, {\n    key: \"host\",\n    get: function get() {\n      return this._raw_lContainer[HOST];\n    }\n  }, {\n    key: \"native\",\n    get: function get() {\n      return this._raw_lContainer[NATIVE];\n    }\n  }, {\n    key: \"next\",\n    get: function get() {\n      return toDebug(this._raw_lContainer[NEXT]);\n    }\n  }]);\n\n  return LContainerDebug;\n}();\n\nvar ɵ0$5 = function ɵ0$5() {\n  return Promise.resolve(null);\n};\n/**\n * A permanent marker promise which signifies that the current CD tree is\n * clean.\n */\n\n\nvar _CLEAN_PROMISE = /*@__PURE__*/ɵ0$5();\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 */\n\n\nfunction processHostBindingOpCodes(tView, lView) {\n  var hostBindingOpCodes = tView.hostBindingOpCodes;\n  if (hostBindingOpCodes === null) return;\n\n  try {\n    for (var i = 0; i < hostBindingOpCodes.length; i++) {\n      var opCode = hostBindingOpCodes[i];\n\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        var directiveIdx = opCode;\n        var bindingRootIndx = hostBindingOpCodes[++i];\n        var hostBindingFn = hostBindingOpCodes[++i];\n        setBindingRootForHostBindings(bindingRootIndx, directiveIdx);\n        var context = lView[directiveIdx];\n        hostBindingFn(2\n        /* Update */\n        , context);\n      }\n    }\n  } finally {\n    setSelectedIndex(-1);\n  }\n}\n/** Refreshes all content queries declared by directives in a given view */\n\n\nfunction refreshContentQueries(tView, lView) {\n  var contentQueries = tView.contentQueries;\n\n  if (contentQueries !== null) {\n    for (var i = 0; i < contentQueries.length; i += 2) {\n      var queryStartIdx = contentQueries[i];\n      var directiveDefIdx = contentQueries[i + 1];\n\n      if (directiveDefIdx !== -1) {\n        var _directiveDef2 = tView.data[directiveDefIdx];\n        ngDevMode && assertDefined(_directiveDef2, 'DirectiveDef not found.');\n        ngDevMode && assertDefined(_directiveDef2.contentQueries, 'contentQueries function should be defined');\n        setCurrentQueryIndex(queryStartIdx);\n\n        _directiveDef2.contentQueries(2\n        /* Update */\n        , lView[directiveDefIdx], directiveDefIdx);\n      }\n    }\n  }\n}\n/** Refreshes child components in the current view (update mode). */\n\n\nfunction refreshChildComponents(hostLView, components) {\n  for (var i = 0; i < components.length; i++) {\n    refreshComponent(hostLView, components[i]);\n  }\n}\n/** Renders child components in the current view (creation mode). */\n\n\nfunction renderChildComponents(hostLView, components) {\n  for (var i = 0; i < components.length; i++) {\n    renderComponent(hostLView, components[i]);\n  }\n}\n\nfunction createLView(parentLView, tView, context, flags, host, tHostNode, rendererFactory, renderer, sanitizer, injector) {\n  var lView = ngDevMode ? cloneToLViewFromTViewBlueprint(tView) : tView.blueprint.slice();\n  lView[HOST] = host;\n  lView[FLAGS] = flags | 4\n  /* CreationMode */\n  | 128\n  /* Attached */\n  | 8\n  /* FirstLViewPass */\n  ;\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] = injector || parentLView && parentLView[INJECTOR] || null;\n  lView[T_HOST] = tHostNode;\n  ngDevMode && assertEqual(tView.type == 2\n  /* Embedded */\n  ? parentLView !== null : true, true, 'Embedded views must have parentLView');\n  lView[DECLARATION_COMPONENT_VIEW] = tView.type == 2\n  /* Embedded */\n  ? parentLView[DECLARATION_COMPONENT_VIEW] : lView;\n  ngDevMode && attachLViewDebug(lView);\n  return lView;\n}\n\nfunction getOrCreateTNode(tView, index, type, name, attrs) {\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.'); // Keep this function short, so that the VM will inline it.\n\n  ngDevMode && assertPureTNodeType(type);\n  var tNode = tView.data[index];\n\n  if (tNode === null) {\n    tNode = createTNodeAtIndex(tView, index, type, name, attrs);\n\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 |= 64\n      /* isDetached */\n      ;\n    }\n  } else if (tNode.type & 64\n  /* Placeholder */\n  ) {\n    tNode.type = type;\n    tNode.value = name;\n    tNode.attrs = attrs;\n    var 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\n  setCurrentTNode(tNode, true);\n  return tNode;\n}\n\nfunction createTNodeAtIndex(tView, index, type, name, attrs) {\n  var currentTNode = getCurrentTNodePlaceholderOk();\n  var isParent = isCurrentTNodeParent();\n  var parent = isParent ? currentTNode : currentTNode && currentTNode.parent; // Parents cannot cross component boundaries because components will be used in multiple places.\n\n  var tNode = tView.data[index] = createTNode(tView, parent, type, index, name, attrs); // 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\n  if (tView.firstChild === null) {\n    tView.firstChild = tNode;\n  }\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\n  return tNode;\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 */\n\n\nfunction allocExpando(tView, lView, numSlotsToAlloc, initialValue) {\n  if (numSlotsToAlloc === 0) return -1;\n\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(tView.data.length, tView.blueprint.length, 'Expecting Blueprint to be same size as TView');\n    assertFirstUpdatePass(tView);\n  }\n\n  var allocIdx = lView.length;\n\n  for (var i = 0; i < numSlotsToAlloc; i++) {\n    lView.push(initialValue);\n    tView.blueprint.push(initialValue);\n    tView.data.push(null);\n  }\n\n  return allocIdx;\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 */\n\n\nfunction renderView(tView, lView, context) {\n  ngDevMode && assertEqual(isCreationMode(lView), true, 'Should be run in creation mode');\n  enterView(lView);\n\n  try {\n    var viewQuery = tView.viewQuery;\n\n    if (viewQuery !== null) {\n      executeViewQueryFn(1\n      /* Create */\n      , viewQuery, context);\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\n\n    var templateFn = tView.template;\n\n    if (templateFn !== null) {\n      executeTemplate(tView, lView, templateFn, 1\n      /* Create */\n      , context);\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\n\n    if (tView.firstCreatePass) {\n      tView.firstCreatePass = false;\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\n\n    if (tView.staticContentQueries) {\n      refreshContentQueries(tView, lView);\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\n\n    if (tView.staticViewQueries) {\n      executeViewQueryFn(2\n      /* Update */\n      , tView.viewQuery, context);\n    } // Render child component views.\n\n\n    var components = tView.components;\n\n    if (components !== null) {\n      renderChildComponents(lView, components);\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] &= ~4\n    /* CreationMode */\n    ;\n    leaveView();\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 */\n\n\nfunction refreshView(tView, lView, templateFn, context) {\n  ngDevMode && assertEqual(isCreationMode(lView), false, 'Should be run in update mode');\n  var flags = lView[FLAGS];\n  if ((flags & 256\n  /* Destroyed */\n  ) === 256\n  /* Destroyed */\n  ) return;\n  enterView(lView); // 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\n  var isInCheckNoChangesPass = isInCheckNoChangesMode();\n\n  try {\n    resetPreOrderHookFlags(lView);\n    setBindingIndex(tView.bindingStartIndex);\n\n    if (templateFn !== null) {\n      executeTemplate(tView, lView, templateFn, 2\n      /* Update */\n      , context);\n    }\n\n    var hooksInitPhaseCompleted = (flags & 3\n    /* InitPhaseStateMask */\n    ) === 3\n    /* InitPhaseCompleted */\n    ; // execute pre-order hooks (OnInit, OnChanges, DoCheck)\n    // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n\n    if (!isInCheckNoChangesPass) {\n      if (hooksInitPhaseCompleted) {\n        var preOrderCheckHooks = tView.preOrderCheckHooks;\n\n        if (preOrderCheckHooks !== null) {\n          executeCheckHooks(lView, preOrderCheckHooks, null);\n        }\n      } else {\n        var preOrderHooks = tView.preOrderHooks;\n\n        if (preOrderHooks !== null) {\n          executeInitAndCheckHooks(lView, preOrderHooks, 0\n          /* OnInitHooksToBeRun */\n          , null);\n        }\n\n        incrementInitPhaseFlags(lView, 0\n        /* OnInitHooksToBeRun */\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\n\n    markTransplantedViewsForRefresh(lView);\n    refreshEmbeddedViews(lView); // Content query results must be refreshed before content hooks are called.\n\n    if (tView.contentQueries !== null) {\n      refreshContentQueries(tView, lView);\n    } // execute content hooks (AfterContentInit, AfterContentChecked)\n    // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n\n\n    if (!isInCheckNoChangesPass) {\n      if (hooksInitPhaseCompleted) {\n        var contentCheckHooks = tView.contentCheckHooks;\n\n        if (contentCheckHooks !== null) {\n          executeCheckHooks(lView, contentCheckHooks);\n        }\n      } else {\n        var contentHooks = tView.contentHooks;\n\n        if (contentHooks !== null) {\n          executeInitAndCheckHooks(lView, contentHooks, 1\n          /* AfterContentInitHooksToBeRun */\n          );\n        }\n\n        incrementInitPhaseFlags(lView, 1\n        /* AfterContentInitHooksToBeRun */\n        );\n      }\n    }\n\n    processHostBindingOpCodes(tView, lView); // Refresh child component views.\n\n    var components = tView.components;\n\n    if (components !== null) {\n      refreshChildComponents(lView, components);\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\n\n    var viewQuery = tView.viewQuery;\n\n    if (viewQuery !== null) {\n      executeViewQueryFn(2\n      /* Update */\n      , viewQuery, context);\n    } // execute view hooks (AfterViewInit, AfterViewChecked)\n    // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n\n\n    if (!isInCheckNoChangesPass) {\n      if (hooksInitPhaseCompleted) {\n        var viewCheckHooks = tView.viewCheckHooks;\n\n        if (viewCheckHooks !== null) {\n          executeCheckHooks(lView, viewCheckHooks);\n        }\n      } else {\n        var viewHooks = tView.viewHooks;\n\n        if (viewHooks !== null) {\n          executeInitAndCheckHooks(lView, viewHooks, 2\n          /* AfterViewInitHooksToBeRun */\n          );\n        }\n\n        incrementInitPhaseFlags(lView, 2\n        /* AfterViewInitHooksToBeRun */\n        );\n      }\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    } // 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\n\n    if (!isInCheckNoChangesPass) {\n      lView[FLAGS] &= ~(64\n      /* Dirty */\n      | 8\n      /* FirstLViewPass */\n      );\n    }\n\n    if (lView[FLAGS] & 1024\n    /* RefreshTransplantedView */\n    ) {\n      lView[FLAGS] &= ~1024\n      /* RefreshTransplantedView */\n      ;\n      updateTransplantedViewCount(lView[PARENT], -1);\n    }\n  } finally {\n    leaveView();\n  }\n}\n\nfunction renderComponentOrTemplate(tView, lView, templateFn, context) {\n  var rendererFactory = lView[RENDERER_FACTORY];\n  var normalExecutionPath = !isInCheckNoChangesMode();\n  var creationModeIsActive = isCreationMode(lView);\n\n  try {\n    if (normalExecutionPath && !creationModeIsActive && rendererFactory.begin) {\n      rendererFactory.begin();\n    }\n\n    if (creationModeIsActive) {\n      renderView(tView, lView, context);\n    }\n\n    refreshView(tView, lView, templateFn, context);\n  } finally {\n    if (normalExecutionPath && !creationModeIsActive && rendererFactory.end) {\n      rendererFactory.end();\n    }\n  }\n}\n\nfunction executeTemplate(tView, lView, templateFn, rf, context) {\n  var prevSelectedIndex = getSelectedIndex();\n  var isUpdatePhase = rf & 2\n  /* Update */\n  ;\n\n  try {\n    setSelectedIndex(-1);\n\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    var preHookType = isUpdatePhase ? 2\n    /* TemplateUpdateStart */\n    : 0\n    /* TemplateCreateStart */\n    ;\n    profiler(preHookType, context);\n    templateFn(rf, context);\n  } finally {\n    setSelectedIndex(prevSelectedIndex);\n    var postHookType = isUpdatePhase ? 3\n    /* TemplateUpdateEnd */\n    : 1\n    /* TemplateCreateEnd */\n    ;\n    profiler(postHookType, context);\n  }\n} //////////////////////////\n//// Element\n//////////////////////////\n\n\nfunction executeContentQueries(tView, tNode, lView) {\n  if (isContentQueryHost(tNode)) {\n    var start = tNode.directiveStart;\n    var end = tNode.directiveEnd;\n\n    for (var directiveIndex = start; directiveIndex < end; directiveIndex++) {\n      var def = tView.data[directiveIndex];\n\n      if (def.contentQueries) {\n        def.contentQueries(1\n        /* Create */\n        , lView[directiveIndex], directiveIndex);\n      }\n    }\n  }\n}\n/**\n * Creates directive instances.\n */\n\n\nfunction createDirectivesInstances(tView, lView, tNode) {\n  if (!getBindingsEnabled()) return;\n  instantiateAllDirectives(tView, lView, tNode, getNativeByTNode(tNode, lView));\n\n  if ((tNode.flags & 128\n  /* hasHostBindings */\n  ) === 128\n  /* hasHostBindings */\n  ) {\n    invokeDirectivesHostBindings(tView, lView, tNode);\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 */\n\n\nfunction saveResolvedLocalsInData(viewData, tNode) {\n  var localRefExtractor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : getNativeByTNode;\n  var localNames = tNode.localNames;\n\n  if (localNames !== null) {\n    var localIndex = tNode.index + 1;\n\n    for (var i = 0; i < localNames.length; i += 2) {\n      var index = localNames[i + 1];\n      var value = index === -1 ? localRefExtractor(tNode, viewData) : viewData[index];\n      viewData[localIndex++] = value;\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 */\n\n\nfunction getOrCreateTComponentView(def) {\n  var tView = def.tView; // 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\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    var declTNode = null;\n    return def.tView = createTView(1\n    /* Component */\n    , declTNode, def.template, def.decls, def.vars, def.directiveDefs, def.pipeDefs, def.viewQuery, def.schemas, def.consts);\n  }\n\n  return tView;\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 */\n\n\nfunction createTView(type, declTNode, templateFn, decls, vars, directives, pipes, viewQuery, schemas, constsOrFactory) {\n  ngDevMode && ngDevMode.tView++;\n  var bindingStartIndex = HEADER_OFFSET + decls; // 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\n  var initialViewLength = bindingStartIndex + vars;\n  var blueprint = createViewBlueprint(bindingStartIndex, initialViewLength);\n  var consts = typeof constsOrFactory === 'function' ? constsOrFactory() : constsOrFactory;\n  var tView = blueprint[TVIEW] = ngDevMode ? new TViewConstructor(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) : {\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\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\n  return tView;\n}\n\nfunction createViewBlueprint(bindingStartIndex, initialViewLength) {\n  var blueprint = ngDevMode ? new LViewBlueprint() : [];\n\n  for (var i = 0; i < initialViewLength; i++) {\n    blueprint.push(i < bindingStartIndex ? null : NO_CHANGE);\n  }\n\n  return blueprint;\n}\n\nfunction createError(text, token) {\n  return new Error(\"Renderer: \".concat(text, \" [\").concat(stringifyForError(token), \"]\"));\n}\n\nfunction assertHostNodeExists(rElement, elementOrSelector) {\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 * 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 */\n\n\nfunction locateHostElement(renderer, elementOrSelector, encapsulation) {\n  if (isProceduralRenderer(renderer)) {\n    // When using native Shadow DOM, do not clear host element to allow native slot projection\n    var preserveContent = encapsulation === ViewEncapsulation.ShadowDom;\n    return renderer.selectRootElement(elementOrSelector, preserveContent);\n  }\n\n  var rElement = typeof elementOrSelector === 'string' ? renderer.querySelector(elementOrSelector) : elementOrSelector;\n  ngDevMode && assertHostNodeExists(rElement, elementOrSelector); // 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\n  rElement.textContent = '';\n  return rElement;\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 */\n\n\nfunction storeCleanupWithContext(tView, lView, context, cleanupFn) {\n  var lCleanup = getOrCreateLViewCleanup(lView);\n\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\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\nfunction createTNode(tView, tParent, type, index, value, attrs) {\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  var injectorIndex = tParent ? tParent.injectorIndex : -1;\n  var tNode = ngDevMode ? new TNodeDebug(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, // classBindings: TStylingRange;\n  0) : {\n    type: type,\n    index: index,\n    insertBeforeIndex: null,\n    injectorIndex: 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,\n    styleBindings: 0\n  };\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\n  return tNode;\n}\n\nfunction generatePropertyAliases(inputAliasMap, directiveDefIdx, propStore) {\n  for (var publicName in inputAliasMap) {\n    if (inputAliasMap.hasOwnProperty(publicName)) {\n      propStore = propStore === null ? {} : propStore;\n      var 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\n  return propStore;\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 */\n\n\nfunction initializeInputAndOutputAliases(tView, tNode) {\n  ngDevMode && assertFirstCreatePass(tView);\n  var start = tNode.directiveStart;\n  var end = tNode.directiveEnd;\n  var tViewData = tView.data;\n  var tNodeAttrs = tNode.attrs;\n  var inputsFromAttrs = ngDevMode ? new TNodeInitialInputs() : [];\n  var inputsStore = null;\n  var outputsStore = null;\n\n  for (var i = start; i < end; i++) {\n    var _directiveDef3 = tViewData[i];\n    var directiveInputs = _directiveDef3.inputs; // 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\n    var initialInputs = tNodeAttrs !== null && !isInlineTemplate(tNode) ? generateInitialInputs(directiveInputs, tNodeAttrs) : null;\n    inputsFromAttrs.push(initialInputs);\n    inputsStore = generatePropertyAliases(directiveInputs, i, inputsStore);\n    outputsStore = generatePropertyAliases(_directiveDef3.outputs, i, outputsStore);\n  }\n\n  if (inputsStore !== null) {\n    if (inputsStore.hasOwnProperty('class')) {\n      tNode.flags |= 16\n      /* hasClassInput */\n      ;\n    }\n\n    if (inputsStore.hasOwnProperty('style')) {\n      tNode.flags |= 32\n      /* hasStyleInput */\n      ;\n    }\n  }\n\n  tNode.initialInputs = inputsFromAttrs;\n  tNode.inputs = inputsStore;\n  tNode.outputs = outputsStore;\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 */\n\n\nfunction mapPropName(name) {\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\nfunction elementPropertyInternal(tView, tNode, lView, propName, value, renderer, sanitizer, nativeOnly) {\n  ngDevMode && assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');\n  var element = getNativeByTNode(tNode, lView);\n  var inputData = tNode.inputs;\n  var dataValue;\n\n  if (!nativeOnly && inputData != null && (dataValue = inputData[propName])) {\n    setInputsForProperty(tView, lView, dataValue, propName, value);\n    if (isComponentHost(tNode)) markDirtyIfOnPush(lView, tNode.index);\n\n    if (ngDevMode) {\n      setNgReflectProperties(lView, element, tNode.type, dataValue, value);\n    }\n  } else if (tNode.type & 3\n  /* AnyRNode */\n  ) {\n    propName = mapPropName(propName);\n\n    if (ngDevMode) {\n      validateAgainstEventProperties(propName);\n\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\n      ngDevMode.rendererSetProperty++;\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\n\n    value = sanitizer != null ? sanitizer(value, tNode.value || '', propName) : value;\n\n    if (isProceduralRenderer(renderer)) {\n      renderer.setProperty(element, propName, value);\n    } else if (!isAnimationProp(propName)) {\n      element.setProperty ? element.setProperty(propName, value) : element[propName] = value;\n    }\n  } else if (tNode.type & 12\n  /* AnyContainer */\n  ) {\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/** If node is an OnPush component, marks its LView dirty. */\n\n\nfunction markDirtyIfOnPush(lView, viewIndex) {\n  ngDevMode && assertLView(lView);\n  var childComponentLView = getComponentLViewByIndex(viewIndex, lView);\n\n  if (!(childComponentLView[FLAGS] & 16\n  /* CheckAlways */\n  )) {\n    childComponentLView[FLAGS] |= 64\n    /* Dirty */\n    ;\n  }\n}\n\nfunction setNgReflectProperty(lView, element, type, attrName, value) {\n  var renderer = lView[RENDERER];\n  attrName = normalizeDebugBindingName(attrName);\n  var debugValue = normalizeDebugBindingValue(value);\n\n  if (type & 3\n  /* AnyRNode */\n  ) {\n    if (value == null) {\n      isProceduralRenderer(renderer) ? renderer.removeAttribute(element, attrName) : element.removeAttribute(attrName);\n    } else {\n      isProceduralRenderer(renderer) ? renderer.setAttribute(element, attrName, debugValue) : element.setAttribute(attrName, debugValue);\n    }\n  } else {\n    var textContent = escapeCommentText(\"bindings=\".concat(JSON.stringify(_defineProperty({}, attrName, debugValue), null, 2)));\n\n    if (isProceduralRenderer(renderer)) {\n      renderer.setValue(element, textContent);\n    } else {\n      element.textContent = textContent;\n    }\n  }\n}\n\nfunction setNgReflectProperties(lView, element, type, dataValue, value) {\n  if (type & (3\n  /* AnyRNode */\n  | 4\n  /* Container */\n  )) {\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 (var i = 0; i < dataValue.length; i += 2) {\n      setNgReflectProperty(lView, element, type, dataValue[i + 1], value);\n    }\n  }\n}\n\nfunction validateProperty(tView, element, propName, tNode) {\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; // 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\n  if (matchingSchemas(tView, tNode.value) || propName in element || isAnimationProp(propName)) {\n    return true;\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\n\n  return typeof Node === 'undefined' || Node === null || !(element instanceof Node);\n}\n\nfunction matchingSchemas(tView, tagName) {\n  var schemas = tView.schemas;\n\n  if (schemas !== null) {\n    for (var i = 0; i < schemas.length; i++) {\n      var schema = schemas[i];\n\n      if (schema === NO_ERRORS_SCHEMA || schema === CUSTOM_ELEMENTS_SCHEMA && tagName && tagName.indexOf('-') > -1) {\n        return true;\n      }\n    }\n  }\n\n  return false;\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 */\n\n\nfunction logUnknownPropertyError(propName, tNode) {\n  var message = \"Can't bind to '\".concat(propName, \"' since it isn't a known property of '\").concat(tNode.value, \"'.\");\n  console.error(formatRuntimeError(\"303\"\n  /* UNKNOWN_BINDING */\n  , message));\n}\n/**\n * Instantiate a root component.\n */\n\n\nfunction instantiateRootComponent(tView, lView, def) {\n  var rootTNode = getCurrentTNode();\n\n  if (tView.firstCreatePass) {\n    if (def.providersResolver) def.providersResolver(def);\n    var directiveIndex = allocExpando(tView, lView, 1, null);\n    ngDevMode && assertEqual(directiveIndex, rootTNode.directiveStart, 'Because this is a root component the allocated expando should match the TNode component.');\n    configureViewWithDirective(tView, rootTNode, lView, directiveIndex, def);\n  }\n\n  var directive = getNodeInjectable(lView, tView, rootTNode.directiveStart, rootTNode);\n  attachPatchData(directive, lView);\n  var native = getNativeByTNode(rootTNode, lView);\n\n  if (native) {\n    attachPatchData(native, lView);\n  }\n\n  return directive;\n}\n/**\n * Resolve the matched directives on a node.\n */\n\n\nfunction resolveDirectives(tView, lView, tNode, localRefs) {\n  // Please make sure to have explicit type for `exportsMap`. Inferred type triggers bug in\n  // tsickle.\n  ngDevMode && assertFirstCreatePass(tView);\n  var hasDirectives = false;\n\n  if (getBindingsEnabled()) {\n    var directiveDefs = findDirectiveDefMatches(tView, lView, tNode);\n    var exportsMap = localRefs === null ? null : {\n      '': -1\n    };\n\n    if (directiveDefs !== null) {\n      hasDirectives = true;\n      initTNodeFlags(tNode, tView.data.length, directiveDefs.length); // 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\n      for (var i = 0; i < directiveDefs.length; i++) {\n        var def = directiveDefs[i];\n        if (def.providersResolver) def.providersResolver(def);\n      }\n\n      var preOrderHooksFound = false;\n      var preOrderCheckHooksFound = false;\n      var directiveIdx = allocExpando(tView, lView, directiveDefs.length, null);\n      ngDevMode && assertSame(directiveIdx, tNode.directiveStart, 'TNode.directiveStart should point to just allocated space');\n\n      for (var _i4 = 0; _i4 < directiveDefs.length; _i4++) {\n        var _def2 = directiveDefs[_i4]; // 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\n        tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, _def2.hostAttrs);\n        configureViewWithDirective(tView, tNode, lView, directiveIdx, _def2);\n        saveNameToExportMap(directiveIdx, _def2, exportsMap);\n        if (_def2.contentQueries !== null) tNode.flags |= 8\n        /* hasContentQuery */\n        ;\n        if (_def2.hostBindings !== null || _def2.hostAttrs !== null || _def2.hostVars !== 0) tNode.flags |= 128\n        /* hasHostBindings */\n        ;\n        var lifeCycleHooks = _def2.type.prototype; // Only push a node index into the preOrderHooks array if this is the first\n        // pre-order hook found on this node.\n\n        if (!preOrderHooksFound && (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\n    if (exportsMap) cacheMatchingLocalNames(tNode, localRefs, exportsMap);\n  } // Merge the template attrs last so that they have the highest priority.\n\n\n  tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, tNode.attrs);\n  return hasDirectives;\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 */\n\n\nfunction registerHostBindingOpCodes(tView, tNode, lView, directiveIdx, directiveVarsIdx, def) {\n  ngDevMode && assertFirstCreatePass(tView);\n  var hostBindings = def.hostBindings;\n\n  if (hostBindings) {\n    var hostBindingOpCodes = tView.hostBindingOpCodes;\n\n    if (hostBindingOpCodes === null) {\n      hostBindingOpCodes = tView.hostBindingOpCodes = [];\n    }\n\n    var elementIndx = ~tNode.index;\n\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\n    hostBindingOpCodes.push(directiveIdx, directiveVarsIdx, hostBindings);\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 */\n\n\nfunction lastSelectedElementIdx(hostBindingOpCodes) {\n  var i = hostBindingOpCodes.length;\n\n  while (i > 0) {\n    var value = hostBindingOpCodes[--i];\n\n    if (typeof value === 'number' && value < 0) {\n      return value;\n    }\n  }\n\n  return 0;\n}\n/**\n * Instantiate all the directives that were previously resolved on the current node.\n */\n\n\nfunction instantiateAllDirectives(tView, lView, tNode, native) {\n  var start = tNode.directiveStart;\n  var end = tNode.directiveEnd;\n\n  if (!tView.firstCreatePass) {\n    getOrCreateNodeInjectorForNode(tNode, lView);\n  }\n\n  attachPatchData(native, lView);\n  var initialInputs = tNode.initialInputs;\n\n  for (var i = start; i < end; i++) {\n    var def = tView.data[i];\n    var isComponent = isComponentDef(def);\n\n    if (isComponent) {\n      ngDevMode && assertTNodeType(tNode, 3\n      /* AnyRNode */\n      );\n      addComponentLogic(lView, tNode, def);\n    }\n\n    var 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      var componentView = getComponentLViewByIndex(tNode.index, lView);\n      componentView[CONTEXT] = directive;\n    }\n  }\n}\n\nfunction invokeDirectivesHostBindings(tView, lView, tNode) {\n  var start = tNode.directiveStart;\n  var end = tNode.directiveEnd;\n  var firstCreatePass = tView.firstCreatePass;\n  var elementIndex = tNode.index;\n  var currentDirectiveIndex = getCurrentDirectiveIndex();\n\n  try {\n    setSelectedIndex(elementIndex);\n\n    for (var dirIndex = start; dirIndex < end; dirIndex++) {\n      var def = tView.data[dirIndex];\n      var directive = lView[dirIndex];\n      setCurrentDirectiveIndex(dirIndex);\n\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 * 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 */\n\n\nfunction invokeHostBindingsInCreationMode(def, directive) {\n  if (def.hostBindings !== null) {\n    def.hostBindings(1\n    /* Create */\n    , directive);\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 */\n\n\nfunction findDirectiveDefMatches(tView, viewData, tNode) {\n  ngDevMode && assertFirstCreatePass(tView);\n  ngDevMode && assertTNodeType(tNode, 3\n  /* AnyRNode */\n  | 12\n  /* AnyContainer */\n  );\n  var registry = tView.directiveRegistry;\n  var matches = null;\n\n  if (registry) {\n    for (var i = 0; i < registry.length; i++) {\n      var def = registry[i];\n\n      if (isNodeMatchingSelectorList(tNode, def.selectors,\n      /* isProjectionMode */\n      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(tNode, 2\n            /* Element */\n            , \"\\\"\".concat(tNode.value, \"\\\" tags cannot be used as component hosts. \") + \"Please use a different tag to activate the \".concat(stringify(def.type), \" component.\"));\n            if (tNode.flags & 2\n            /* isComponentHost */\n            ) throwMultipleComponentError(tNode);\n          }\n\n          markAsComponentHost(tView, tNode); // The component is always stored first with directives after.\n\n          matches.unshift(def);\n        } else {\n          matches.push(def);\n        }\n      }\n    }\n  }\n\n  return matches;\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 */\n\n\nfunction markAsComponentHost(tView, hostTNode) {\n  ngDevMode && assertFirstCreatePass(tView);\n  hostTNode.flags |= 2\n  /* isComponentHost */\n  ;\n  (tView.components || (tView.components = ngDevMode ? new TViewComponents() : [])).push(hostTNode.index);\n}\n/** Caches local names and their matching directive indices for query and template lookups. */\n\n\nfunction cacheMatchingLocalNames(tNode, localRefs, exportsMap) {\n  if (localRefs) {\n    var localNames = tNode.localNames = ngDevMode ? new TNodeLocalNames() : []; // 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\n    for (var i = 0; i < localRefs.length; i += 2) {\n      var index = exportsMap[localRefs[i + 1]];\n      if (index == null) throw new RuntimeError(\"301\"\n      /* EXPORT_NOT_FOUND */\n      , \"Export of name '\".concat(localRefs[i + 1], \"' not found!\"));\n      localNames.push(localRefs[i], index);\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 */\n\n\nfunction saveNameToExportMap(directiveIdx, def, exportsMap) {\n  if (exportsMap) {\n    if (def.exportAs) {\n      for (var i = 0; i < def.exportAs.length; i++) {\n        exportsMap[def.exportAs[i]] = directiveIdx;\n      }\n    }\n\n    if (isComponentDef(def)) exportsMap[''] = directiveIdx;\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 */\n\n\nfunction initTNodeFlags(tNode, index, numberOfDirectives) {\n  ngDevMode && assertNotEqual(numberOfDirectives, tNode.directiveEnd - tNode.directiveStart, 'Reached the max number of directives');\n  tNode.flags |= 1\n  /* isDirectiveHost */\n  ; // When the first directive is created on a node, save the index\n\n  tNode.directiveStart = index;\n  tNode.directiveEnd = index + numberOfDirectives;\n  tNode.providerIndexes = index;\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 */\n\n\nfunction configureViewWithDirective(tView, tNode, lView, directiveIndex, def) {\n  ngDevMode && assertGreaterThanOrEqual(directiveIndex, HEADER_OFFSET, 'Must be in Expando section');\n  tView.data[directiveIndex] = def;\n  var directiveFactory = def.factory || (def.factory = getFactoryDef(def.type, true));\n  var nodeInjectorFactory = new NodeInjectorFactory(directiveFactory, isComponentDef(def), null);\n  tView.blueprint[directiveIndex] = nodeInjectorFactory;\n  lView[directiveIndex] = nodeInjectorFactory;\n  registerHostBindingOpCodes(tView, tNode, lView, directiveIndex, allocExpando(tView, lView, def.hostVars, NO_CHANGE), def);\n}\n\nfunction addComponentLogic(lView, hostTNode, def) {\n  var native = getNativeByTNode(hostTNode, lView);\n  var tView = getOrCreateTComponentView(def); // 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\n  var rendererFactory = lView[RENDERER_FACTORY];\n  var componentView = addToViewTree(lView, createLView(lView, tView, null, def.onPush ? 64\n  /* Dirty */\n  : 16\n  /* CheckAlways */\n  , native, hostTNode, rendererFactory, rendererFactory.createRenderer(native, def), null, null)); // Component view will always be created before any injected LContainers,\n  // so this is a regular element, wrap it with the component view\n\n  lView[hostTNode.index] = componentView;\n}\n\nfunction elementAttributeInternal(tNode, lView, name, value, sanitizer, namespace) {\n  if (ngDevMode) {\n    assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');\n    validateAgainstEventAttributes(name);\n    assertTNodeType(tNode, 2\n    /* Element */\n    , \"Attempted to set attribute `\".concat(name, \"` on a container node. \") + \"Host bindings are not valid on ng-container or ng-template.\");\n  }\n\n  var element = getNativeByTNode(tNode, lView);\n  setElementAttribute(lView[RENDERER], element, namespace, tNode.value, name, value, sanitizer);\n}\n\nfunction setElementAttribute(renderer, element, namespace, tagName, name, value, sanitizer) {\n  if (value == null) {\n    ngDevMode && ngDevMode.rendererRemoveAttribute++;\n    isProceduralRenderer(renderer) ? renderer.removeAttribute(element, name, namespace) : element.removeAttribute(name);\n  } else {\n    ngDevMode && ngDevMode.rendererSetAttribute++;\n    var strValue = sanitizer == null ? renderStringify(value) : sanitizer(value, tagName || '', name);\n\n    if (isProceduralRenderer(renderer)) {\n      renderer.setAttribute(element, name, strValue, namespace);\n    } else {\n      namespace ? element.setAttributeNS(namespace, name, strValue) : element.setAttribute(name, strValue);\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 */\n\n\nfunction setInputsFromAttrs(lView, directiveIndex, instance, def, tNode, initialInputData) {\n  var initialInputs = initialInputData[directiveIndex];\n\n  if (initialInputs !== null) {\n    var setInput = def.setInput;\n\n    for (var i = 0; i < initialInputs.length;) {\n      var publicName = initialInputs[i++];\n      var privateName = initialInputs[i++];\n      var value = initialInputs[i++];\n\n      if (setInput !== null) {\n        def.setInput(instance, value, publicName, privateName);\n      } else {\n        instance[privateName] = value;\n      }\n\n      if (ngDevMode) {\n        var nativeElement = getNativeByTNode(tNode, lView);\n        setNgReflectProperty(lView, nativeElement, tNode.type, privateName, value);\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 */\n\n\nfunction generateInitialInputs(inputs, attrs) {\n  var inputsToStore = null;\n  var i = 0;\n\n  while (i < attrs.length) {\n    var attrName = attrs[i];\n\n    if (attrName === 0\n    /* NamespaceURI */\n    ) {\n      // We do not allow inputs on namespaced attributes.\n      i += 4;\n      continue;\n    } else if (attrName === 5\n    /* ProjectAs */\n    ) {\n      // Skip over the `ngProjectAs` value.\n      i += 2;\n      continue;\n    } // If we hit any other attribute markers, we're done anyway. None of those are valid inputs.\n\n\n    if (typeof attrName === 'number') break;\n\n    if (inputs.hasOwnProperty(attrName)) {\n      if (inputsToStore === null) inputsToStore = [];\n      inputsToStore.push(attrName, inputs[attrName], attrs[i + 1]);\n    }\n\n    i += 2;\n  }\n\n  return inputsToStore;\n} //////////////////////////\n//// ViewContainer & View\n//////////////////////////\n// Not sure why I need to do `any` here but TS complains later.\n\n\nvar LContainerArray = (typeof ngDevMode === 'undefined' || ngDevMode) && /*@__PURE__*/initNgDevMode() && /*@__PURE__*/createNamedArrayType('LContainer');\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 */\n\nfunction createLContainer(hostNative, currentView, native, tNode) {\n  ngDevMode && assertLView(currentView);\n  ngDevMode && !isProceduralRenderer(currentView[RENDERER]) && assertDomNode(native); // https://jsperf.com/array-literal-vs-new-array-really\n\n  var lContainer = new (ngDevMode ? LContainerArray : Array)(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);\n  ngDevMode && assertEqual(lContainer.length, CONTAINER_HEADER_OFFSET, 'Should allocate correct number of slots for LContainer header.');\n  ngDevMode && attachLContainerDebug(lContainer);\n  return lContainer;\n}\n/**\n * Goes over embedded views (ones created through ViewContainerRef APIs) and refreshes\n * them by executing an associated template function.\n */\n\n\nfunction refreshEmbeddedViews(lView) {\n  for (var lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) {\n    for (var i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n      var embeddedLView = lContainer[i];\n      var embeddedTView = embeddedLView[TVIEW];\n      ngDevMode && assertDefined(embeddedTView, 'TView must be allocated');\n\n      if (viewAttachedToChangeDetector(embeddedLView)) {\n        refreshView(embeddedTView, embeddedLView, embeddedTView.template, embeddedLView[CONTEXT]);\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 */\n\n\nfunction markTransplantedViewsForRefresh(lView) {\n  for (var lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) {\n    if (!lContainer[HAS_TRANSPLANTED_VIEWS]) continue;\n    var movedViews = lContainer[MOVED_VIEWS];\n    ngDevMode && assertDefined(movedViews, 'Transplanted View flags set but missing MOVED_VIEWS');\n\n    for (var i = 0; i < movedViews.length; i++) {\n      var movedLView = movedViews[i];\n      var insertionLContainer = movedLView[PARENT];\n      ngDevMode && assertLContainer(insertionLContainer); // We don't want to increment the counter if the moved LView was already marked for\n      // refresh.\n\n      if ((movedLView[FLAGS] & 1024\n      /* RefreshTransplantedView */\n      ) === 0) {\n        updateTransplantedViewCount(insertionLContainer, 1);\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\n\n      movedLView[FLAGS] |= 1024\n      /* RefreshTransplantedView */\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 */\n\n\nfunction refreshComponent(hostLView, componentHostIdx) {\n  ngDevMode && assertEqual(isCreationMode(hostLView), false, 'Should be run in update mode');\n  var componentView = getComponentLViewByIndex(componentHostIdx, hostLView); // Only attached components that are CheckAlways or OnPush and dirty should be refreshed\n\n  if (viewAttachedToChangeDetector(componentView)) {\n    var tView = componentView[TVIEW];\n\n    if (componentView[FLAGS] & (16\n    /* CheckAlways */\n    | 64\n    /* Dirty */\n    )) {\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 * 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 */\n\n\nfunction refreshContainsDirtyView(lView) {\n  for (var lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) {\n    for (var i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n      var embeddedLView = lContainer[i];\n\n      if (embeddedLView[FLAGS] & 1024\n      /* RefreshTransplantedView */\n      ) {\n        var 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  var tView = lView[TVIEW]; // Refresh child component views.\n\n  var components = tView.components;\n\n  if (components !== null) {\n    for (var _i5 = 0; _i5 < components.length; _i5++) {\n      var componentView = getComponentLViewByIndex(components[_i5], lView); // Only attached components that are CheckAlways or OnPush and dirty should be refreshed\n\n      if (viewAttachedToChangeDetector(componentView) && componentView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) {\n        refreshContainsDirtyView(componentView);\n      }\n    }\n  }\n}\n\nfunction renderComponent(hostLView, componentHostIdx) {\n  ngDevMode && assertEqual(isCreationMode(hostLView), true, 'Should be run in creation mode');\n  var componentView = getComponentLViewByIndex(componentHostIdx, hostLView);\n  var componentTView = componentView[TVIEW];\n  syncViewWithBlueprint(componentTView, componentView);\n  renderView(componentTView, componentView, componentView[CONTEXT]);\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 */\n\n\nfunction syncViewWithBlueprint(tView, lView) {\n  for (var i = lView.length; i < tView.blueprint.length; i++) {\n    lView.push(tView.blueprint[i]);\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 */\n\n\nfunction addToViewTree(lView, lViewOrLContainer) {\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\n  lView[CHILD_TAIL] = lViewOrLContainer;\n  return lViewOrLContainer;\n} ///////////////////////////////\n//// Change detection\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 */\n\n\nfunction markViewDirty(lView) {\n  while (lView) {\n    lView[FLAGS] |= 64\n    /* Dirty */\n    ;\n    var parent = getLViewParent(lView); // Stop traversing up as soon as you find a root view that wasn't attached to any container\n\n    if (isRootView(lView) && !parent) {\n      return lView;\n    } // continue otherwise\n\n\n    lView = parent;\n  }\n\n  return null;\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 */\n\n\nfunction scheduleTick(rootContext, flags) {\n  var nothingScheduled = rootContext.flags === 0\n  /* Empty */\n  ;\n\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    var res;\n    rootContext.clean = new Promise(function (r) {\n      return res = r;\n    });\n    rootContext.scheduler(function () {\n      if (rootContext.flags & 1\n      /* DetectChanges */\n      ) {\n        rootContext.flags &= ~1\n        /* DetectChanges */\n        ;\n        tickRootContext(rootContext);\n      }\n\n      if (rootContext.flags & 2\n      /* FlushPlayers */\n      ) {\n        rootContext.flags &= ~2\n        /* FlushPlayers */\n        ;\n        var playerHandler = rootContext.playerHandler;\n\n        if (playerHandler) {\n          playerHandler.flushPlayers();\n        }\n      }\n\n      rootContext.clean = _CLEAN_PROMISE;\n      res(null);\n    });\n  }\n}\n\nfunction tickRootContext(rootContext) {\n  for (var i = 0; i < rootContext.components.length; i++) {\n    var rootComponent = rootContext.components[i];\n    var lView = readPatchedLView(rootComponent);\n    var tView = lView[TVIEW];\n    renderComponentOrTemplate(tView, lView, tView.template, rootComponent);\n  }\n}\n\nfunction detectChangesInternal(tView, lView, context) {\n  var rendererFactory = lView[RENDERER_FACTORY];\n  if (rendererFactory.begin) rendererFactory.begin();\n\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 * 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 */\n\n\nfunction detectChangesInRootView(lView) {\n  tickRootContext(lView[CONTEXT]);\n}\n\nfunction checkNoChangesInternal(tView, view, context) {\n  setIsInCheckNoChangesMode(true);\n\n  try {\n    detectChangesInternal(tView, view, context);\n  } finally {\n    setIsInCheckNoChangesMode(false);\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 */\n\n\nfunction checkNoChangesInRootView(lView) {\n  setIsInCheckNoChangesMode(true);\n\n  try {\n    detectChangesInRootView(lView);\n  } finally {\n    setIsInCheckNoChangesMode(false);\n  }\n}\n\nfunction executeViewQueryFn(flags, viewQueryFn, component) {\n  ngDevMode && assertDefined(viewQueryFn, 'View queries function to execute must be defined.');\n  setCurrentQueryIndex(0);\n  viewQueryFn(flags, component);\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 */\n\n\nfunction storePropertyBindingMetadata(tData, tNode, propertyName, bindingIndex) {\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      var propBindingIdxs = tNode.propertyBindings || (tNode.propertyBindings = []);\n      propBindingIdxs.push(bindingIndex);\n      var bindingMetadata = propertyName;\n\n      for (var _len10 = arguments.length, interpolationParts = new Array(_len10 > 4 ? _len10 - 4 : 0), _key10 = 4; _key10 < _len10; _key10++) {\n        interpolationParts[_key10 - 4] = arguments[_key10];\n      }\n\n      if (interpolationParts.length > 0) {\n        bindingMetadata += INTERPOLATION_DELIMITER + interpolationParts.join(INTERPOLATION_DELIMITER);\n      }\n\n      tData[bindingIndex] = bindingMetadata;\n    }\n  }\n}\n\nvar CLEAN_PROMISE = _CLEAN_PROMISE;\n\nfunction getOrCreateLViewCleanup(view) {\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\nfunction getOrCreateTViewCleanup(tView) {\n  return tView.cleanup || (tView.cleanup = ngDevMode ? new TCleanup() : []);\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 */\n\n\nfunction loadComponentRenderer(currentDef, tNode, lView) {\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\n  return lView[RENDERER];\n}\n/** Handles an error thrown in an LView. */\n\n\nfunction handleError(lView, error) {\n  var injector = lView[INJECTOR];\n  var errorHandler = injector ? injector.get(ErrorHandler, null) : null;\n  errorHandler && errorHandler.handleError(error);\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 */\n\n\nfunction setInputsForProperty(tView, lView, inputs, publicName, value) {\n  for (var i = 0; i < inputs.length;) {\n    var index = inputs[i++];\n    var privateName = inputs[i++];\n    var instance = lView[index];\n    ngDevMode && assertIndexInRange(lView, index);\n    var def = tView.data[index];\n\n    if (def.setInput !== null) {\n      def.setInput(instance, value, publicName, privateName);\n    } else {\n      instance[privateName] = value;\n    }\n  }\n}\n/**\n * Updates a text binding at a given index in a given LView.\n */\n\n\nfunction textBindingInternal(lView, index, value) {\n  ngDevMode && assertString(value, 'Value should be a string');\n  ngDevMode && assertNotSame(value, NO_CHANGE, 'value should not be NO_CHANGE');\n  ngDevMode && assertIndexInRange(lView, index);\n  var element = getNativeByIndex(index, lView);\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\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 */\n\n\nfunction computeStaticStyling(tNode, attrs, writeToHost) {\n  ngDevMode && assertFirstCreatePass(getTView(), 'Expecting to be called in first template pass only');\n  var styles = writeToHost ? tNode.styles : null;\n  var classes = writeToHost ? tNode.classes : null;\n  var mode = 0;\n\n  if (attrs !== null) {\n    for (var i = 0; i < attrs.length; i++) {\n      var value = attrs[i];\n\n      if (typeof value === 'number') {\n        mode = value;\n      } else if (mode == 1\n      /* Classes */\n      ) {\n        classes = concatStringsWithSpace(classes, value);\n      } else if (mode == 2\n      /* Styles */\n      ) {\n        var style = value;\n        var styleValue = attrs[++i];\n        styles = concatStringsWithSpace(styles, style + ': ' + styleValue + ';');\n      }\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\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 */\n\n\nfunction detectChanges(component) {\n  var view = getComponentViewByInstance(component);\n  detectChangesInternal(view[TVIEW], view, component);\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 */\n\n\nfunction markDirty(component) {\n  ngDevMode && assertDefined(component, 'component');\n  var rootView = markViewDirty(getComponentViewByInstance(component));\n  ngDevMode && assertDefined(rootView[CONTEXT], 'rootContext should be defined');\n  scheduleTick(rootView[CONTEXT], 1\n  /* 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 */\n\n\nfunction tick(component) {\n  var rootView = getRootView(component);\n  var rootContext = rootView[CONTEXT];\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\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 */\n\n\nvar INJECTOR$1 = /*@__PURE__*/new InjectionToken('INJECTOR', // 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-1\n/* 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\nvar NullInjector = /*#__PURE__*/function () {\n  function NullInjector() {\n    _classCallCheck(this, NullInjector);\n  }\n\n  _createClass2(NullInjector, [{\n    key: \"get\",\n    value: function get(token) {\n      var notFoundValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : THROW_IF_NOT_FOUND;\n\n      if (notFoundValue === THROW_IF_NOT_FOUND) {\n        var error = new Error(\"NullInjectorError: No provider for \".concat(stringify(token), \"!\"));\n        error.name = 'NullInjectorError';\n        throw error;\n      }\n\n      return notFoundValue;\n    }\n  }]);\n\n  return NullInjector;\n}();\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * 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 */\n\n\nvar INJECTOR_SCOPE = /*@__PURE__*/new InjectionToken('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\n/**\n * Marker which indicates that a value has not yet been created from the factory function.\n */\n\nvar NOT_YET = {};\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 */\n\nvar CIRCULAR = {};\n/**\n * A lazily initialized NullInjector.\n */\n\nvar NULL_INJECTOR = undefined;\n\nfunction getNullInjector() {\n  if (NULL_INJECTOR === undefined) {\n    NULL_INJECTOR = new NullInjector();\n  }\n\n  return NULL_INJECTOR;\n}\n/**\n * Create a new `Injector` which is configured using a `defType` of `InjectorType<any>`s.\n *\n * @publicApi\n */\n\n\nfunction createInjector(defType) {\n  var parent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n  var additionalProviders = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n  var name = arguments.length > 3 ? arguments[3] : undefined;\n  var injector = createInjectorWithoutInjectorInstances(defType, parent, additionalProviders, name);\n\n  injector._resolveInjectorDefTypes();\n\n  return injector;\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 */\n\n\nfunction createInjectorWithoutInjectorInstances(defType) {\n  var parent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n  var additionalProviders = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n  var name = arguments.length > 3 ? arguments[3] : undefined;\n  return new R3Injector(defType, additionalProviders, parent || getNullInjector(), name);\n}\n\nvar R3Injector = /*#__PURE__*/function () {\n  function R3Injector(def, additionalProviders, parent) {\n    var _this2 = this;\n\n    var source = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n\n    _classCallCheck(this, R3Injector);\n\n    this.parent = parent;\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\n    this.records = new Map();\n    /**\n     * The transitive set of `InjectorType`s which define this injector.\n     */\n\n    this.injectorDefTypes = new Set();\n    /**\n     * Set of values instantiated by this injector which contain `ngOnDestroy` lifecycle hooks.\n     */\n\n    this.onDestroy = new Set();\n    this._destroyed = false;\n    var dedupStack = []; // 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\n    additionalProviders && deepForEach(additionalProviders, function (provider) {\n      return _this2.processProvider(provider, def, additionalProviders);\n    });\n    deepForEach([def], function (injectorDef) {\n      return _this2.processInjectorType(injectorDef, [], dedupStack);\n    }); // Make sure the INJECTOR token provides this injector.\n\n    this.records.set(INJECTOR$1, makeRecord(undefined, this)); // Detect whether this injector has the APP_ROOT_SCOPE token and thus should provide\n    // any injectable scoped to APP_ROOT_SCOPE.\n\n    var record = this.records.get(INJECTOR_SCOPE);\n    this.scope = record != null ? record.value : null; // Source name, used for debugging\n\n    this.source = source || (typeof def === 'object' ? null : stringify(def));\n  }\n  /**\n   * Flag indicating that this injector was previously destroyed.\n   */\n\n\n  _createClass2(R3Injector, [{\n    key: \"destroyed\",\n    get: function get() {\n      return this._destroyed;\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\n  }, {\n    key: \"destroy\",\n    value: function destroy() {\n      this.assertNotDestroyed(); // Set destroyed = true first, in case lifecycle hooks re-enter destroy().\n\n      this._destroyed = true;\n\n      try {\n        // Call all the lifecycle hooks.\n        this.onDestroy.forEach(function (service) {\n          return service.ngOnDestroy();\n        });\n      } finally {\n        // Release all references.\n        this.records.clear();\n        this.onDestroy.clear();\n        this.injectorDefTypes.clear();\n      }\n    }\n  }, {\n    key: \"get\",\n    value: function get(token) {\n      var notFoundValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : THROW_IF_NOT_FOUND;\n      var flags = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : InjectFlags.Default;\n      this.assertNotDestroyed(); // Set the injection context.\n\n      var previousInjector = setCurrentInjector(this);\n      var previousInjectImplementation = setInjectImplementation(undefined);\n\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          var record = this.records.get(token);\n\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            var def = couldBeInjectableType(token) && getInjectableDef(token);\n\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\n            this.records.set(token, record);\n          } // If a record was found, get the instance for it and return it.\n\n\n          if (record != null\n          /* NOT null || undefined */\n          ) {\n            return this.hydrate(token, record);\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\n\n        var nextInjector = !(flags & InjectFlags.Self) ? this.parent : getNullInjector(); // 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\n        notFoundValue = flags & InjectFlags.Optional && notFoundValue === THROW_IF_NOT_FOUND ? null : notFoundValue;\n        return nextInjector.get(token, notFoundValue);\n      } catch (e) {\n        if (e.name === 'NullInjectorError') {\n          var path = e[NG_TEMP_TOKEN_PATH] = e[NG_TEMP_TOKEN_PATH] || [];\n          path.unshift(stringify(token));\n\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    /** @internal */\n\n  }, {\n    key: \"_resolveInjectorDefTypes\",\n    value: function _resolveInjectorDefTypes() {\n      var _this3 = this;\n\n      this.injectorDefTypes.forEach(function (defType) {\n        return _this3.get(defType);\n      });\n    }\n  }, {\n    key: \"toString\",\n    value: function toString() {\n      var tokens = [],\n          records = this.records;\n      records.forEach(function (v, token) {\n        return tokens.push(stringify(token));\n      });\n      return \"R3Injector[\".concat(tokens.join(', '), \"]\");\n    }\n  }, {\n    key: \"assertNotDestroyed\",\n    value: function assertNotDestroyed() {\n      if (this._destroyed) {\n        throw new Error('Injector has already been destroyed.');\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\n  }, {\n    key: \"processInjectorType\",\n    value: function processInjectorType(defOrWrappedDef, parents, dedupStack) {\n      var _this4 = this;\n\n      defOrWrappedDef = resolveForwardRef(defOrWrappedDef);\n      if (!defOrWrappedDef) return false; // 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      // First attempt to read the injector def (`ɵinj`).\n\n      var def = getInjectorDef(defOrWrappedDef); // If that's not present, then attempt to read ngModule from the InjectorDefTypeWithProviders.\n\n      var ngModule = def == null && defOrWrappedDef.ngModule || undefined; // 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\n      var defType = ngModule === undefined ? defOrWrappedDef : ngModule; // Check for circular dependencies.\n\n      if (ngDevMode && parents.indexOf(defType) !== -1) {\n        var defName = stringify(defType);\n        var path = parents.map(stringify);\n        throwCyclicDependencyError(defName, path);\n      } // Check for multiple imports of the same module\n\n\n      var isDuplicate = dedupStack.indexOf(defType) !== -1; // Finally, if defOrWrappedType was an `InjectorDefTypeWithProviders`, then the actual\n      // `InjectorDef` is on its `ngModule`.\n\n      if (ngModule !== undefined) {\n        def = getInjectorDef(ngModule);\n      } // If no definition was found, it might be from exports. Remove it.\n\n\n      if (def == null) {\n        return false;\n      } // Add providers in the same way that @NgModule resolution did:\n      // First, include providers from any imports.\n\n\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); // Add it to the set of dedups. This way we can detect multiple imports of the same module\n\n        dedupStack.push(defType);\n        var importTypesWithProviders;\n\n        try {\n          deepForEach(def.imports, function (imported) {\n            if (_this4.processInjectorType(imported, parents, dedupStack)) {\n              if (importTypesWithProviders === undefined) importTypesWithProviders = []; // 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\n              importTypesWithProviders.push(imported);\n            }\n          });\n        } finally {\n          // Remove it from the parents set when finished.\n          ngDevMode && parents.pop();\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\n\n        if (importTypesWithProviders !== undefined) {\n          var _loop = function _loop(i) {\n            var _importTypesWithProvi = importTypesWithProviders[i],\n                ngModule = _importTypesWithProvi.ngModule,\n                providers = _importTypesWithProvi.providers;\n            deepForEach(providers, function (provider) {\n              return _this4.processProvider(provider, ngModule, providers || EMPTY_ARRAY);\n            });\n          };\n\n          for (var i = 0; i < importTypesWithProviders.length; i++) {\n            _loop(i);\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\n\n      this.injectorDefTypes.add(defType);\n\n      var factory = getFactoryDef(defType) || function () {\n        return new defType();\n      };\n\n      this.records.set(defType, makeRecord(factory, NOT_YET)); // Next, include providers listed on the definition itself.\n\n      var defProviders = def.providers;\n\n      if (defProviders != null && !isDuplicate) {\n        var injectorType = defOrWrappedDef;\n        deepForEach(defProviders, function (provider) {\n          return _this4.processProvider(provider, injectorType, defProviders);\n        });\n      }\n\n      return ngModule !== undefined && defOrWrappedDef.providers !== undefined;\n    }\n    /**\n     * Process a `SingleProvider` and add it.\n     */\n\n  }, {\n    key: \"processProvider\",\n    value: function processProvider(provider, ngModuleType, providers) {\n      // Determine the token from the provider. Either it's its own token, or has a {provide: ...}\n      // property.\n      provider = resolveForwardRef(provider);\n      var token = isTypeProvider(provider) ? provider : resolveForwardRef(provider && provider.provide); // Construct a `Record` for the provider.\n\n      var 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        var multiRecord = this.records.get(token);\n\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\n          multiRecord.factory = function () {\n            return injectArgs(multiRecord.multi);\n          };\n\n          this.records.set(token, multiRecord);\n        }\n\n        token = provider;\n        multiRecord.multi.push(provider);\n      } else {\n        var existing = this.records.get(token);\n\n        if (ngDevMode && existing && existing.multi !== undefined) {\n          throwMixedMultiProviderError();\n        }\n      }\n\n      this.records.set(token, record);\n    }\n  }, {\n    key: \"hydrate\",\n    value: function hydrate(token, record) {\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\n      if (typeof record.value === 'object' && record.value && hasOnDestroy(record.value)) {\n        this.onDestroy.add(record.value);\n      }\n\n      return record.value;\n    }\n  }, {\n    key: \"injectableDefInScope\",\n    value: function injectableDefInScope(def) {\n      if (!def.providedIn) {\n        return false;\n      }\n\n      var providedIn = resolveForwardRef(def.providedIn);\n\n      if (typeof providedIn === 'string') {\n        return providedIn === 'any' || providedIn === this.scope;\n      } else {\n        return this.injectorDefTypes.has(providedIn);\n      }\n    }\n  }]);\n\n  return R3Injector;\n}();\n\nfunction injectableDefOrInjectorDefFactory(token) {\n  // Most tokens will have an injectable def directly on them, which specifies a factory directly.\n  var injectableDef = getInjectableDef(token);\n  var factory = injectableDef !== null ? injectableDef.factory : getFactoryDef(token);\n\n  if (factory !== null) {\n    return factory;\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\n\n  if (token instanceof InjectionToken) {\n    throw new Error(\"Token \".concat(stringify(token), \" is missing a \\u0275prov definition.\"));\n  } // Undecorated types can sometimes be created if they have no constructor arguments.\n\n\n  if (token instanceof Function) {\n    return getUndecoratedInjectableFactory(token);\n  } // There was no way to resolve a factory for this token.\n\n\n  throw new Error('unreachable');\n}\n\nfunction getUndecoratedInjectableFactory(token) {\n  // If the token has parameters then it has dependencies that we cannot resolve implicitly.\n  var paramLength = token.length;\n\n  if (paramLength > 0) {\n    var args = newArray(paramLength, '?');\n    throw new Error(\"Can't resolve all parameters for \".concat(stringify(token), \": (\").concat(args.join(', '), \").\"));\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\n\n  var inheritedInjectableDef = getInheritedInjectableDef(token);\n\n  if (inheritedInjectableDef !== null) {\n    return function () {\n      return inheritedInjectableDef.factory(token);\n    };\n  } else {\n    return function () {\n      return new token();\n    };\n  }\n}\n\nfunction providerToRecord(provider, ngModuleType, providers) {\n  if (isValueProvider(provider)) {\n    return makeRecord(undefined, provider.useValue);\n  } else {\n    var factory = providerToFactory(provider, ngModuleType, providers);\n    return makeRecord(factory, NOT_YET);\n  }\n}\n/**\n * Converts a `SingleProvider` into a factory function.\n *\n * @param provider provider to convert to factory\n */\n\n\nfunction providerToFactory(provider, ngModuleType, providers) {\n  var factory = undefined;\n\n  if (isTypeProvider(provider)) {\n    var unwrappedProvider = resolveForwardRef(provider);\n    return getFactoryDef(unwrappedProvider) || injectableDefOrInjectorDefFactory(unwrappedProvider);\n  } else {\n    if (isValueProvider(provider)) {\n      factory = function factory() {\n        return resolveForwardRef(provider.useValue);\n      };\n    } else if (isFactoryProvider(provider)) {\n      factory = function factory() {\n        return provider.useFactory.apply(provider, _toConsumableArray(injectArgs(provider.deps || [])));\n      };\n    } else if (isExistingProvider(provider)) {\n      factory = function factory() {\n        return ɵɵinject(resolveForwardRef(provider.useExisting));\n      };\n    } else {\n      var classRef = resolveForwardRef(provider && (provider.useClass || provider.provide));\n\n      if (ngDevMode && !classRef) {\n        throwInvalidProviderError(ngModuleType, providers, provider);\n      }\n\n      if (hasDeps(provider)) {\n        factory = function factory() {\n          return _construct(classRef, _toConsumableArray(injectArgs(provider.deps)));\n        };\n      } else {\n        return getFactoryDef(classRef) || injectableDefOrInjectorDefFactory(classRef);\n      }\n    }\n  }\n\n  return factory;\n}\n\nfunction makeRecord(factory, value) {\n  var multi = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n  return {\n    factory: factory,\n    value: value,\n    multi: multi ? [] : undefined\n  };\n}\n\nfunction isValueProvider(value) {\n  return value !== null && typeof value == 'object' && USE_VALUE in value;\n}\n\nfunction isExistingProvider(value) {\n  return !!(value && value.useExisting);\n}\n\nfunction isFactoryProvider(value) {\n  return !!(value && value.useFactory);\n}\n\nfunction isTypeProvider(value) {\n  return typeof value === 'function';\n}\n\nfunction isClassProvider(value) {\n  return !!value.useClass;\n}\n\nfunction hasDeps(value) {\n  return !!value.deps;\n}\n\nfunction hasOnDestroy(value) {\n  return value !== null && typeof value === 'object' && typeof value.ngOnDestroy === 'function';\n}\n\nfunction couldBeInjectableType(value) {\n  return typeof value === 'function' || 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\n\nfunction INJECTOR_IMPL__PRE_R3__(providers, parent, name) {\n  return new StaticInjector(providers, parent, name);\n}\n\nfunction INJECTOR_IMPL__POST_R3__(providers, parent, name) {\n  return createInjector({\n    name: name\n  }, parent, providers, name);\n}\n\nvar INJECTOR_IMPL = INJECTOR_IMPL__POST_R3__;\n\nvar Injector = /*@__PURE__*/function () {\n  var Injector = /*#__PURE__*/function () {\n    function Injector() {\n      _classCallCheck(this, Injector);\n    }\n\n    _createClass2(Injector, null, [{\n      key: \"create\",\n      value: function create(options, parent) {\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\n    return Injector;\n  }();\n\n  Injector.THROW_IF_NOT_FOUND = THROW_IF_NOT_FOUND;\n  Injector.NULL =\n  /*@__PURE__*/\n\n  /* @__PURE__ */\n  new NullInjector();\n  /** @nocollapse */\n\n  Injector.ɵprov = /*@__PURE__*/ɵɵdefineInjectable({\n    token: Injector,\n    providedIn: 'any',\n    factory: function factory() {\n      return ɵɵinject(INJECTOR$1);\n    }\n  });\n  /**\n   * @internal\n   * @nocollapse\n   */\n\n  Injector.__NG_ELEMENT_ID__ = -1\n  /* Injector */\n  ;\n  return Injector;\n}();\n\nvar IDENT = function IDENT(value) {\n  return value;\n};\n\nvar ɵ0$6 = IDENT;\nvar EMPTY = [];\nvar CIRCULAR$1 = IDENT;\n\nvar MULTI_PROVIDER_FN = function MULTI_PROVIDER_FN() {\n  return Array.prototype.slice.call(arguments);\n};\n\nvar ɵ1$1 = MULTI_PROVIDER_FN;\nvar NO_NEW_LINE$1 = 'ɵ';\n\nvar StaticInjector = /*#__PURE__*/function () {\n  function StaticInjector(providers) {\n    var parent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Injector.NULL;\n    var source = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n\n    _classCallCheck(this, StaticInjector);\n\n    this.parent = parent;\n    this.source = source;\n    var records = this._records = new Map();\n    records.set(Injector, {\n      token: Injector,\n      fn: IDENT,\n      deps: EMPTY,\n      value: this,\n      useNew: false\n    });\n    records.set(INJECTOR$1, {\n      token: INJECTOR$1,\n      fn: IDENT,\n      deps: EMPTY,\n      value: this,\n      useNew: false\n    });\n    this.scope = recursivelyProcessProviders(records, providers);\n  }\n\n  _createClass2(StaticInjector, [{\n    key: \"get\",\n    value: function get(token, notFoundValue) {\n      var flags = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : InjectFlags.Default;\n      var records = this._records;\n      var record = records.get(token);\n\n      if (record === undefined) {\n        // This means we have never seen this record, see if it is tree shakable provider.\n        var injectableDef = getInjectableDef(token);\n\n        if (injectableDef) {\n          var providedIn = injectableDef && resolveForwardRef(injectableDef.providedIn);\n\n          if (providedIn === 'any' || providedIn != null && providedIn === this.scope) {\n            records.set(token, record = resolveProvider({\n              provide: token,\n              useFactory: injectableDef.factory,\n              deps: EMPTY\n            }));\n          }\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\n      var lastInjector = setCurrentInjector(this);\n\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    key: \"toString\",\n    value: function toString() {\n      var tokens = [],\n          records = this._records;\n      records.forEach(function (v, token) {\n        return tokens.push(stringify(token));\n      });\n      return \"StaticInjector[\".concat(tokens.join(', '), \"]\");\n    }\n  }]);\n\n  return StaticInjector;\n}();\n\nfunction resolveProvider(provider) {\n  var deps = computeDeps(provider);\n  var fn = IDENT;\n  var value = EMPTY;\n  var useNew = false;\n  var provide = resolveForwardRef(provider.provide);\n\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.useValue;\n  } else if (provider.useFactory) {\n    fn = provider.useFactory;\n  } else if (provider.useExisting) {// Just use IDENT\n  } else if (provider.useClass) {\n    useNew = true;\n    fn = resolveForwardRef(provider.useClass);\n  } else if (typeof provide == 'function') {\n    useNew = true;\n    fn = provide;\n  } else {\n    throw staticError('StaticProvider does not have [useValue|useFactory|useExisting|useClass] or [provide] is not newable', provider);\n  }\n\n  return {\n    deps: deps,\n    fn: fn,\n    useNew: useNew,\n    value: value\n  };\n}\n\nfunction multiProviderMixError(token) {\n  return staticError('Cannot mix multi providers and regular providers', token);\n}\n\nfunction recursivelyProcessProviders(records, provider) {\n  var scope = null;\n\n  if (provider) {\n    provider = resolveForwardRef(provider);\n\n    if (Array.isArray(provider)) {\n      // if we have an array recurse into the array\n      for (var 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      var token = resolveForwardRef(provider.provide);\n      var resolvedProvider = resolveProvider(provider);\n\n      if (provider.multi === true) {\n        // This is a multi provider.\n        var multiProvider = records.get(token);\n\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 = {\n            token: provider.provide,\n            deps: [],\n            useNew: false,\n            fn: MULTI_PROVIDER_FN,\n            value: EMPTY\n          });\n        } // Treat the provider as the token.\n\n\n        token = provider;\n        multiProvider.deps.push({\n          token: token,\n          options: 6\n          /* Default */\n\n        });\n      }\n\n      var record = records.get(token);\n\n      if (record && record.fn == MULTI_PROVIDER_FN) {\n        throw multiProviderMixError(token);\n      }\n\n      if (token === INJECTOR_SCOPE) {\n        scope = resolvedProvider.value;\n      }\n\n      records.set(token, resolvedProvider);\n    } else {\n      throw staticError('Unexpected provider', provider);\n    }\n  }\n\n  return scope;\n}\n\nfunction tryResolveToken(token, record, records, parent, notFoundValue, flags) {\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\n    var path = e[NG_TEMP_TOKEN_PATH] = e[NG_TEMP_TOKEN_PATH] || [];\n    path.unshift(token);\n\n    if (record && record.value == CIRCULAR$1) {\n      // Reset the Circular flag.\n      record.value = EMPTY;\n    }\n\n    throw e;\n  }\n}\n\nfunction resolveToken(token, record, records, parent, notFoundValue, flags) {\n  var value;\n\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\n    if (value == CIRCULAR$1) {\n      throw Error(NO_NEW_LINE$1 + 'Circular dependency');\n    } else if (value === EMPTY) {\n      record.value = CIRCULAR$1;\n      var obj = undefined;\n      var useNew = record.useNew;\n      var fn = record.fn;\n      var depRecords = record.deps;\n      var deps = EMPTY;\n\n      if (depRecords.length) {\n        deps = [];\n\n        for (var i = 0; i < depRecords.length; i++) {\n          var depRecord = depRecords[i];\n          var options = depRecord.options;\n          var childRecord = options & 2\n          /* CheckSelf */\n          ? records.get(depRecord.token) : undefined;\n          deps.push(tryResolveToken( // Current Token to resolve\n          depRecord.token, // A record which describes how to resolve the token.\n          // If undefined, this means we don't have such a record\n          childRecord, // Other records we know about.\n          records, // 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 & 4\n          /* CheckParent */\n          ) ? Injector.NULL : parent, options & 1\n          /* Optional */\n          ? null : Injector.THROW_IF_NOT_FOUND, InjectFlags.Default));\n        }\n      }\n\n      record.value = value = useNew ? _construct(fn, _toConsumableArray(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\n  return value;\n}\n\nfunction computeDeps(provider) {\n  var deps = EMPTY;\n  var providerDeps = provider.deps;\n\n  if (providerDeps && providerDeps.length) {\n    deps = [];\n\n    for (var i = 0; i < providerDeps.length; i++) {\n      var options = 6\n      /* Default */\n      ;\n      var token = resolveForwardRef(providerDeps[i]);\n\n      if (Array.isArray(token)) {\n        for (var j = 0, annotations = token; j < annotations.length; j++) {\n          var annotation = annotations[j];\n\n          if (annotation instanceof Optional || annotation == Optional) {\n            options = options | 1\n            /* Optional */\n            ;\n          } else if (annotation instanceof SkipSelf || annotation == SkipSelf) {\n            options = options & ~2\n            /* CheckSelf */\n            ;\n          } else if (annotation instanceof Self || annotation == Self) {\n            options = options & ~4\n            /* CheckParent */\n            ;\n          } else if (annotation instanceof Inject) {\n            token = annotation.token;\n          } else {\n            token = resolveForwardRef(annotation);\n          }\n        }\n      }\n\n      deps.push({\n        token: token,\n        options: options\n      });\n    }\n  } else if (provider.useExisting) {\n    var _token = resolveForwardRef(provider.useExisting);\n\n    deps = [{\n      token: _token,\n      options: 6\n      /* Default */\n\n    }];\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\n  return deps;\n}\n\nfunction staticError(text, obj) {\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\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 */\n\n\nfunction getComponent(element) {\n  assertDomElement(element);\n  var 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;\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 */\n\n\nfunction getContext(element) {\n  assertDomElement(element);\n  var context = getLContext(element);\n  return context === null ? null : context.lView[CONTEXT];\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 */\n\n\nfunction getOwningComponent(elementOrDir) {\n  var context = getLContext(elementOrDir);\n  if (context === null) return null;\n  var lView = context.lView;\n  var parent;\n  ngDevMode && assertLView(lView);\n\n  while (lView[TVIEW].type === 2\n  /* Embedded */\n  && (parent = getLViewParent(lView))) {\n    lView = parent;\n  }\n\n  return lView[FLAGS] & 512\n  /* IsRoot */\n  ? null : lView[CONTEXT];\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 */\n\n\nfunction getRootComponents(elementOrDir) {\n  return _toConsumableArray(getRootContext(elementOrDir).components);\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 */\n\n\nfunction getInjector(elementOrDir) {\n  var context = getLContext(elementOrDir);\n  if (context === null) return Injector.NULL;\n  var tNode = context.lView[TVIEW].data[context.nodeIndex];\n  return new NodeInjector(tNode, context.lView);\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 */\n\n\nfunction getInjectionTokens(element) {\n  var context = getLContext(element);\n  if (context === null) return [];\n  var lView = context.lView;\n  var tView = lView[TVIEW];\n  var tNode = tView.data[context.nodeIndex];\n  var providerTokens = [];\n  var startIndex = tNode.providerIndexes & 1048575\n  /* ProvidersStartIndexMask */\n  ;\n  var endIndex = tNode.directiveEnd;\n\n  for (var i = startIndex; i < endIndex; i++) {\n    var value = tView.data[i];\n\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\n    providerTokens.push(value);\n  }\n\n  return providerTokens;\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 */\n\n\nfunction getDirectives(node) {\n  // Skip text nodes because we can't have directives associated with them.\n  if (node instanceof Text) {\n    return [];\n  }\n\n  var context = getLContext(node);\n\n  if (context === null) {\n    return [];\n  }\n\n  var lView = context.lView;\n  var tView = lView[TVIEW];\n  var nodeIndex = context.nodeIndex;\n\n  if (!(tView === null || tView === void 0 ? void 0 : tView.data[nodeIndex])) {\n    return [];\n  }\n\n  if (context.directives === undefined) {\n    context.directives = getDirectivesAtNodeIndex(nodeIndex, lView, false);\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\n\n  return context.directives === null ? [] : _toConsumableArray(context.directives);\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 */\n\n\nfunction getDirectiveMetadata(directiveOrComponentInstance) {\n  var constructor = directiveOrComponentInstance.constructor;\n\n  if (!constructor) {\n    throw new Error('Unable to find the instance constructor');\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\n\n  var componentDef = getComponentDef(constructor);\n\n  if (componentDef) {\n    return {\n      inputs: componentDef.inputs,\n      outputs: componentDef.outputs,\n      encapsulation: componentDef.encapsulation,\n      changeDetection: componentDef.onPush ? ChangeDetectionStrategy.OnPush : ChangeDetectionStrategy.Default\n    };\n  }\n\n  var directiveDef = getDirectiveDef(constructor);\n\n  if (directiveDef) {\n    return {\n      inputs: directiveDef.inputs,\n      outputs: directiveDef.outputs\n    };\n  }\n\n  return null;\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 */\n\n\nfunction getLocalRefs(target) {\n  var 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 * 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 */\n\n\nfunction getHostElement(componentOrDirective) {\n  return getLContext(componentOrDirective).native;\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 */\n\n\nfunction getRenderedText(component) {\n  var hostElement = getHostElement(component);\n  return hostElement.textContent || '';\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 */\n\n\nfunction getListeners(element) {\n  assertDomElement(element);\n  var lContext = getLContext(element);\n  if (lContext === null) return [];\n  var lView = lContext.lView;\n  var tView = lView[TVIEW];\n  var lCleanup = lView[CLEANUP];\n  var tCleanup = tView.cleanup;\n  var listeners = [];\n\n  if (tCleanup && lCleanup) {\n    for (var i = 0; i < tCleanup.length;) {\n      var firstParam = tCleanup[i++];\n      var secondParam = tCleanup[i++];\n\n      if (typeof firstParam === 'string') {\n        var name = firstParam;\n        var listenerElement = unwrapRNode(lView[secondParam]);\n        var callback = lCleanup[tCleanup[i++]];\n        var useCaptureOrIndx = tCleanup[i++]; // 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\n        var type = typeof useCaptureOrIndx === 'boolean' || useCaptureOrIndx >= 0 ? 'dom' : 'output';\n        var useCapture = typeof useCaptureOrIndx === 'boolean' ? useCaptureOrIndx : false;\n\n        if (element == listenerElement) {\n          listeners.push({\n            element: element,\n            name: name,\n            callback: callback,\n            useCapture: useCapture,\n            type: type\n          });\n        }\n      }\n    }\n  }\n\n  listeners.sort(sortListeners);\n  return listeners;\n}\n\nfunction sortListeners(a, b) {\n  if (a.name == b.name) return 0;\n  return a.name < b.name ? -1 : 1;\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 */\n\n\nfunction isDirectiveDefHack(obj) {\n  return obj.type !== undefined && obj.template !== undefined && obj.declaredInputs !== undefined;\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 */\n\n\nfunction getDebugNode(element) {\n  if (ngDevMode && !(element instanceof Node)) {\n    throw new Error('Expecting instance of DOM Element');\n  }\n\n  var lContext = getLContext(element);\n\n  if (lContext === null) {\n    return null;\n  }\n\n  var lView = lContext.lView;\n  var nodeIndex = lContext.nodeIndex;\n\n  if (nodeIndex !== -1) {\n    var valueInLView = lView[nodeIndex]; // 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\n    var tNode = isLView(valueInLView) ? valueInLView[T_HOST] : getTNode(lView[TVIEW], nodeIndex);\n    ngDevMode && 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 * 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 */\n\n\nfunction getComponentLView(target) {\n  var lContext = getLContext(target);\n  var nodeIndx = lContext.nodeIndex;\n  var lView = lContext.lView;\n  var componentLView = lView[nodeIndx];\n  ngDevMode && assertLView(componentLView);\n  return componentLView;\n}\n/** Asserts that a value is a DOM Element. */\n\n\nfunction assertDomElement(value) {\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\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 */\n\n\nfunction applyChanges(component) {\n  markDirty(component);\n  getRootComponents(component).forEach(function (rootComponent) {\n    return detectChanges(rootComponent);\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 * 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 * */\n\n\nvar GLOBAL_PUBLISH_EXPANDO_KEY = 'ng';\nvar _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 */\n\nfunction publishDefaultGlobalUtils() {\n  if (!_published) {\n    _published = true;\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\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/**\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 */\n\n\nfunction publishGlobalUtil(name, fn) {\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    var w = _global;\n    ngDevMode && assertDefined(fn, 'function not defined');\n\n    if (w) {\n      var container = w[GLOBAL_PUBLISH_EXPANDO_KEY];\n\n      if (!container) {\n        container = w[GLOBAL_PUBLISH_EXPANDO_KEY] = {};\n      }\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\nvar ɵ0$7 = function ɵ0$7(token, notFoundValue) {\n  throwProviderNotFoundError(token, 'NullInjector');\n}; // TODO: A hack to not pull in the NullInjector from @angular/core.\n\n\nvar NULL_INJECTOR$1 = {\n  get: ɵ0$7\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 */\n\nfunction renderComponent$1(componentType\n/* Type as workaround for: Microsoft/TypeScript/issues/4881 */\n) {\n  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  ngDevMode && publishDefaultGlobalUtils();\n  ngDevMode && assertComponentType(componentType);\n  var rendererFactory = opts.rendererFactory || domRendererFactory3;\n  var sanitizer = opts.sanitizer || null;\n  var componentDef = getComponentDef(componentType);\n  if (componentDef.type != componentType) componentDef.type = componentType; // The first index of the first selector is the tag name.\n\n  var componentTag = componentDef.selectors[0][0];\n  var hostRenderer = rendererFactory.createRenderer(null, null);\n  var hostRNode = locateHostElement(hostRenderer, opts.host || componentTag, componentDef.encapsulation);\n  var rootFlags = componentDef.onPush ? 64\n  /* Dirty */\n  | 512\n  /* IsRoot */\n  : 16\n  /* CheckAlways */\n  | 512\n  /* IsRoot */\n  ;\n  var rootContext = createRootContext(opts.scheduler, opts.playerHandler);\n  var renderer = rendererFactory.createRenderer(hostRNode, componentDef);\n  var rootTView = createTView(0\n  /* Root */\n  , null, null, 1, 0, null, null, null, null, null);\n  var rootView = createLView(null, rootTView, rootContext, rootFlags, null, null, rendererFactory, renderer, null, opts.injector || null);\n  enterView(rootView);\n  var component;\n\n  try {\n    if (rendererFactory.begin) rendererFactory.begin();\n    var componentView = createRootComponentView(hostRNode, componentDef, rootView, rendererFactory, renderer, sanitizer);\n    component = createRootComponent(componentView, componentDef, rootView, rootContext, opts.hostFeatures || null); // create mode pass\n\n    renderView(rootTView, rootView, null); // update mode pass\n\n    refreshView(rootTView, rootView, null, null);\n  } finally {\n    leaveView();\n    if (rendererFactory.end) rendererFactory.end();\n  }\n\n  return component;\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 */\n\n\nfunction createRootComponentView(rNode, def, rootView, rendererFactory, hostRenderer, sanitizer) {\n  var tView = rootView[TVIEW];\n  var index = HEADER_OFFSET;\n  ngDevMode && assertIndexInRange(rootView, index);\n  rootView[index] = rNode; // '#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\n  var tNode = getOrCreateTNode(tView, index, 2\n  /* Element */\n  , '#host', null);\n  var mergedAttrs = tNode.mergedAttrs = def.hostAttrs;\n\n  if (mergedAttrs !== null) {\n    computeStaticStyling(tNode, mergedAttrs, true);\n\n    if (rNode !== null) {\n      setUpAttributes(hostRenderer, rNode, mergedAttrs);\n\n      if (tNode.classes !== null) {\n        writeDirectClass(hostRenderer, rNode, tNode.classes);\n      }\n\n      if (tNode.styles !== null) {\n        writeDirectStyle(hostRenderer, rNode, tNode.styles);\n      }\n    }\n  }\n\n  var viewRenderer = rendererFactory.createRenderer(rNode, def);\n  var componentView = createLView(rootView, getOrCreateTComponentView(def), null, def.onPush ? 64\n  /* Dirty */\n  : 16\n  /* CheckAlways */\n  , rootView[index], tNode, 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); // Store component view at node index, with node as the HOST\n\n  return rootView[index] = componentView;\n}\n/**\n * Creates a root component and sets it up with features and host bindings. Shared by\n * renderComponent() and ViewContainerRef.createComponent().\n */\n\n\nfunction createRootComponent(componentView, componentDef, rootLView, rootContext, hostFeatures) {\n  var tView = rootLView[TVIEW]; // Create directive instance with factory() and store at next index in viewData\n\n  var component = instantiateRootComponent(tView, rootLView, componentDef);\n  rootContext.components.push(component);\n  componentView[CONTEXT] = component;\n  hostFeatures && hostFeatures.forEach(function (feature) {\n    return feature(component, componentDef);\n  }); // We want to generate an empty QueryList for root content queries for backwards\n  // compatibility with ViewEngine.\n\n  if (componentDef.contentQueries) {\n    var tNode = getCurrentTNode();\n    ngDevMode && assertDefined(tNode, 'TNode expected');\n    componentDef.contentQueries(1\n    /* Create */\n    , component, tNode.directiveStart);\n  }\n\n  var rootTNode = getCurrentTNode();\n  ngDevMode && assertDefined(rootTNode, 'tNode should have been already created');\n\n  if (tView.firstCreatePass && (componentDef.hostBindings !== null || componentDef.hostAttrs !== null)) {\n    setSelectedIndex(rootTNode.index);\n    var rootTView = rootLView[TVIEW];\n    registerHostBindingOpCodes(rootTView, rootTNode, rootLView, rootTNode.directiveStart, rootTNode.directiveEnd, componentDef);\n    invokeHostBindingsInCreationMode(componentDef, component);\n  }\n\n  return component;\n}\n\nfunction createRootContext(scheduler, playerHandler) {\n  return {\n    components: [],\n    scheduler: scheduler || defaultScheduler,\n    clean: CLEAN_PROMISE,\n    playerHandler: playerHandler || null,\n    flags: 0\n    /* 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 */\n\n\nfunction LifecycleHooksFeature(component, def) {\n  var lView = readPatchedLView(component);\n  ngDevMode && assertDefined(lView, 'LView is required');\n  var tView = lView[TVIEW];\n  var tNode = getCurrentTNode();\n  ngDevMode && assertDefined(tNode, 'TNode is required');\n  registerPostOrderHooks(tView, tNode);\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 */\n\n\nfunction whenRendered(component) {\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\n\nfunction getSuperType(type) {\n  return Object.getPrototypeOf(type.prototype).constructor;\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 */\n\n\nfunction ɵɵInheritDefinitionFeature(definition) {\n  var superType = getSuperType(definition.type);\n  var shouldInheritFields = true;\n  var inheritanceChain = [definition];\n\n  while (superType) {\n    var superDef = undefined;\n\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      } // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n\n\n      superDef = superType.ɵdir;\n    }\n\n    if (superDef) {\n      if (shouldInheritFields) {\n        inheritanceChain.push(superDef); // 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\n        var writeableDef = definition;\n        writeableDef.inputs = maybeUnwrapEmpty(definition.inputs);\n        writeableDef.declaredInputs = maybeUnwrapEmpty(definition.declaredInputs);\n        writeableDef.outputs = maybeUnwrapEmpty(definition.outputs); // Merge hostBindings\n\n        var superHostBindings = superDef.hostBindings;\n        superHostBindings && inheritHostBindings(definition, superHostBindings); // Merge queries\n\n        var superViewQuery = superDef.viewQuery;\n        var superContentQueries = superDef.contentQueries;\n        superViewQuery && inheritViewQuery(definition, superViewQuery);\n        superContentQueries && inheritContentQueries(definition, superContentQueries); // Merge inputs and outputs\n\n        fillProperties(definition.inputs, superDef.inputs);\n        fillProperties(definition.declaredInputs, superDef.declaredInputs);\n        fillProperties(definition.outputs, superDef.outputs); // Merge animations metadata.\n        // If `superDef` is a Component, the `data` field is present (defaults to an empty object).\n\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          var defData = definition.data;\n          defData.animation = (defData.animation || []).concat(superDef.data.animation);\n        }\n      } // Run parent features\n\n\n      var features = superDef.features;\n\n      if (features) {\n        for (var i = 0; i < features.length; i++) {\n          var feature = features[i];\n\n          if (feature && feature.ngInherit) {\n            feature(definition);\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\n\n          if (feature === ɵɵInheritDefinitionFeature) {\n            shouldInheritFields = false;\n          }\n        }\n      }\n    }\n\n    superType = Object.getPrototypeOf(superType);\n  }\n\n  mergeHostAttrsAcrossInheritance(inheritanceChain);\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 */\n\n\nfunction mergeHostAttrsAcrossInheritance(inheritanceChain) {\n  var hostVars = 0;\n  var hostAttrs = null; // We process the inheritance order from the base to the leaves here.\n\n  for (var i = inheritanceChain.length - 1; i >= 0; i--) {\n    var def = inheritanceChain[i]; // For each `hostVars`, we need to add the superclass amount.\n\n    def.hostVars = hostVars += def.hostVars; // for each `hostAttrs` we need to merge it with superclass.\n\n    def.hostAttrs = mergeHostAttrs(def.hostAttrs, hostAttrs = mergeHostAttrs(hostAttrs, def.hostAttrs));\n  }\n}\n\nfunction maybeUnwrapEmpty(value) {\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, superViewQuery) {\n  var prevViewQuery = definition.viewQuery;\n\n  if (prevViewQuery) {\n    definition.viewQuery = function (rf, ctx) {\n      superViewQuery(rf, ctx);\n      prevViewQuery(rf, ctx);\n    };\n  } else {\n    definition.viewQuery = superViewQuery;\n  }\n}\n\nfunction inheritContentQueries(definition, superContentQueries) {\n  var prevContentQueries = definition.contentQueries;\n\n  if (prevContentQueries) {\n    definition.contentQueries = function (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(definition, superHostBindings) {\n  var prevHostBindings = definition.hostBindings;\n\n  if (prevHostBindings) {\n    definition.hostBindings = function (rf, ctx) {\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\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 */\n\n\nvar COPY_DIRECTIVE_FIELDS = [// The child class should use the providers of its parent.\n'providersResolver' // Not listed here are any fields which are handled by the `ɵɵInheritDefinitionFeature`, such\n// as inputs, outputs, and host binding functions.\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 */\n\nvar COPY_COMPONENT_FIELDS = [// The child class should use the template function of its parent, including all template\n// semantics.\n'template', 'decls', 'consts', 'vars', 'onPush', 'ngContentSelectors', // The child class should use the CSS styles of its parent, including all styling semantics.\n'styles', 'encapsulation', // The child class should be checked by the runtime in the same way as its parent.\n'schemas'];\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 */\n\nfunction ɵɵCopyDefinitionFeature(definition) {\n  var superType = getSuperType(definition.type);\n  var superDef = undefined;\n\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  } // Needed because `definition` fields are readonly.\n\n\n  var defAny = definition; // Copy over any fields that apply to either directives or components.\n\n  var _iterator2 = _createForOfIteratorHelper(COPY_DIRECTIVE_FIELDS),\n      _step2;\n\n  try {\n    for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n      var _field = _step2.value;\n      defAny[_field] = superDef[_field];\n    }\n  } catch (err) {\n    _iterator2.e(err);\n  } finally {\n    _iterator2.f();\n  }\n\n  if (isComponentDef(superDef)) {\n    // Copy over any component-specific fields.\n    var _iterator3 = _createForOfIteratorHelper(COPY_COMPONENT_FIELDS),\n        _step3;\n\n    try {\n      for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n        var field = _step3.value;\n        defAny[field] = superDef[field];\n      }\n    } catch (err) {\n      _iterator3.e(err);\n    } finally {\n      _iterator3.f();\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\nvar _symbolIterator = null;\n\nfunction getSymbolIterator() {\n  if (!_symbolIterator) {\n    var _Symbol = _global['Symbol'];\n\n    if (_Symbol && _Symbol.iterator) {\n      _symbolIterator = _Symbol.iterator;\n    } else {\n      // es6-shim specific logic\n      var keys = Object.getOwnPropertyNames(Map.prototype);\n\n      for (var i = 0; i < keys.length; ++i) {\n        var key = keys[i];\n\n        if (key !== 'entries' && key !== 'size' && Map.prototype[key] === Map.prototype['entries']) {\n          _symbolIterator = key;\n        }\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\n\nfunction devModeEqual(a, b) {\n  var isListLikeIterableA = isListLikeIterable(a);\n  var isListLikeIterableB = isListLikeIterable(b);\n\n  if (isListLikeIterableA && isListLikeIterableB) {\n    return areIterablesEqual(a, b, devModeEqual);\n  } else {\n    var isAObject = a && (typeof a === 'object' || typeof a === 'function');\n    var isBObject = b && (typeof b === 'object' || typeof b === 'function');\n\n    if (!isListLikeIterableA && isAObject && !isListLikeIterableB && isBObject) {\n      return true;\n    } else {\n      return Object.is(a, b);\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 */\n\n\nvar WrappedValue = /*#__PURE__*/function () {\n  function WrappedValue(value) {\n    _classCallCheck(this, WrappedValue);\n\n    this.wrapped = value;\n  }\n  /** Creates a wrapped value. */\n\n\n  _createClass2(WrappedValue, null, [{\n    key: \"wrap\",\n    value: function wrap(value) {\n      return new WrappedValue(value);\n    }\n    /**\n     * Returns the underlying value of a wrapped value.\n     * Returns the given `value` when it is not wrapped.\n     **/\n\n  }, {\n    key: \"unwrap\",\n    value: function unwrap(value) {\n      return WrappedValue.isWrapped(value) ? value.wrapped : value;\n    }\n    /** Returns true if `value` is a wrapped value. */\n\n  }, {\n    key: \"isWrapped\",\n    value: function isWrapped(value) {\n      return value instanceof WrappedValue;\n    }\n  }]);\n\n  return WrappedValue;\n}();\n\nfunction isListLikeIterable(obj) {\n  if (!isJsObject(obj)) return false;\n  return Array.isArray(obj) || !(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\nfunction areIterablesEqual(a, b, comparator) {\n  var iterator1 = a[getSymbolIterator()]();\n  var iterator2 = b[getSymbolIterator()]();\n\n  while (true) {\n    var item1 = iterator1.next();\n    var 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\nfunction iterateListLike(obj, fn) {\n  if (Array.isArray(obj)) {\n    for (var i = 0; i < obj.length; i++) {\n      fn(obj[i]);\n    }\n  } else {\n    var iterator = obj[getSymbolIterator()]();\n    var item;\n\n    while (!(item = iterator.next()).done) {\n      fn(item.value);\n    }\n  }\n}\n\nfunction isJsObject(o) {\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// TODO(misko): consider inlining\n\n/** Updates binding and returns the value. */\n\n\nfunction updateBinding(lView, bindingIndex, value) {\n  return lView[bindingIndex] = value;\n}\n/** Gets the current binding value. */\n\n\nfunction getBinding(lView, bindingIndex) {\n  ngDevMode && assertIndexInRange(lView, bindingIndex);\n  ngDevMode && assertNotSame(lView[bindingIndex], NO_CHANGE, 'Stored value should never be NO_CHANGE.');\n  return lView[bindingIndex];\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 */\n\n\nfunction bindingUpdated(lView, bindingIndex, value) {\n  ngDevMode && assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');\n  ngDevMode && assertLessThan(bindingIndex, lView.length, \"Slot should have been initialized to NO_CHANGE\");\n  var 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      var oldValueToCompare = oldValue !== NO_CHANGE ? oldValue : undefined;\n\n      if (!devModeEqual(oldValueToCompare, value)) {\n        var details = getExpressionChangedErrorDetails(lView, bindingIndex, oldValueToCompare, value);\n        throwErrorIfNoChangesMode(oldValue === NO_CHANGE, details.oldValue, details.newValue, details.propName);\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\n\n      return false;\n    }\n\n    lView[bindingIndex] = value;\n    return true;\n  }\n}\n/** Updates 2 bindings if changed, then returns whether either was updated. */\n\n\nfunction bindingUpdated2(lView, bindingIndex, exp1, exp2) {\n  var different = bindingUpdated(lView, bindingIndex, exp1);\n  return bindingUpdated(lView, bindingIndex + 1, exp2) || different;\n}\n/** Updates 3 bindings if changed, then returns whether any was updated. */\n\n\nfunction bindingUpdated3(lView, bindingIndex, exp1, exp2, exp3) {\n  var different = bindingUpdated2(lView, bindingIndex, exp1, exp2);\n  return bindingUpdated(lView, bindingIndex + 2, exp3) || different;\n}\n/** Updates 4 bindings if changed, then returns whether any was updated. */\n\n\nfunction bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4) {\n  var 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 */\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 */\n\n\nfunction ɵɵattribute(name, value, sanitizer, namespace) {\n  var lView = getLView();\n  var bindingIndex = nextBindingIndex();\n\n  if (bindingUpdated(lView, bindingIndex, value)) {\n    var tView = getTView();\n    var tNode = getSelectedTNode();\n    elementAttributeInternal(tNode, lView, name, value, sanitizer, namespace);\n    ngDevMode && storePropertyBindingMetadata(tView.data, tNode, 'attr.' + name, bindingIndex);\n  }\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\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 */\n\n\nfunction interpolationV(lView, values) {\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  var isBindingUpdated = false;\n  var bindingIndex = getBindingIndex();\n\n  for (var 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\n  setBindingIndex(bindingIndex);\n\n  if (!isBindingUpdated) {\n    return NO_CHANGE;\n  } // Build the updated content\n\n\n  var content = values[0];\n\n  for (var _i6 = 1; _i6 < values.length; _i6 += 2) {\n    content += renderStringify(values[_i6]) + values[_i6 + 1];\n  }\n\n  return content;\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 */\n\n\nfunction interpolation1(lView, prefix, v0, suffix) {\n  var different = bindingUpdated(lView, nextBindingIndex(), v0);\n  return different ? prefix + renderStringify(v0) + suffix : NO_CHANGE;\n}\n/**\n * Creates an interpolation binding with 2 expressions.\n */\n\n\nfunction interpolation2(lView, prefix, v0, i0, v1, suffix) {\n  var bindingIndex = getBindingIndex();\n  var different = bindingUpdated2(lView, bindingIndex, v0, v1);\n  incrementBindingIndex(2);\n  return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + suffix : NO_CHANGE;\n}\n/**\n * Creates an interpolation binding with 3 expressions.\n */\n\n\nfunction interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix) {\n  var bindingIndex = getBindingIndex();\n  var different = bindingUpdated3(lView, bindingIndex, v0, v1, v2);\n  incrementBindingIndex(3);\n  return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + suffix : NO_CHANGE;\n}\n/**\n * Create an interpolation binding with 4 expressions.\n */\n\n\nfunction interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {\n  var bindingIndex = getBindingIndex();\n  var different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n  incrementBindingIndex(4);\n  return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 + renderStringify(v3) + suffix : NO_CHANGE;\n}\n/**\n * Creates an interpolation binding with 5 expressions.\n */\n\n\nfunction interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {\n  var bindingIndex = getBindingIndex();\n  var different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n  different = bindingUpdated(lView, bindingIndex + 4, v4) || different;\n  incrementBindingIndex(5);\n  return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + suffix : NO_CHANGE;\n}\n/**\n * Creates an interpolation binding with 6 expressions.\n */\n\n\nfunction interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {\n  var bindingIndex = getBindingIndex();\n  var different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n  different = bindingUpdated2(lView, bindingIndex + 4, v4, v5) || different;\n  incrementBindingIndex(6);\n  return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + i4 + renderStringify(v5) + suffix : NO_CHANGE;\n}\n/**\n * Creates an interpolation binding with 7 expressions.\n */\n\n\nfunction interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {\n  var bindingIndex = getBindingIndex();\n  var different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n  different = bindingUpdated3(lView, bindingIndex + 4, v4, v5, v6) || different;\n  incrementBindingIndex(7);\n  return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + i4 + renderStringify(v5) + i5 + renderStringify(v6) + suffix : NO_CHANGE;\n}\n/**\n * Creates an interpolation binding with 8 expressions.\n */\n\n\nfunction interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {\n  var bindingIndex = getBindingIndex();\n  var different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n  different = bindingUpdated4(lView, bindingIndex + 4, v4, v5, v6, v7) || different;\n  incrementBindingIndex(8);\n  return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + i4 + renderStringify(v5) + i5 + renderStringify(v6) + i6 + renderStringify(v7) + suffix : NO_CHANGE;\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 */\n\n\nfunction ɵɵattributeInterpolate1(attrName, prefix, v0, suffix, sanitizer, namespace) {\n  var lView = getLView();\n  var interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n\n  if (interpolatedValue !== NO_CHANGE) {\n    var tNode = getSelectedTNode();\n    elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n    ngDevMode && storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 1, prefix, suffix);\n  }\n\n  return ɵɵattributeInterpolate1;\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 */\n\n\nfunction ɵɵattributeInterpolate2(attrName, prefix, v0, i0, v1, suffix, sanitizer, namespace) {\n  var lView = getLView();\n  var interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n\n  if (interpolatedValue !== NO_CHANGE) {\n    var tNode = getSelectedTNode();\n    elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n    ngDevMode && storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 2, prefix, i0, suffix);\n  }\n\n  return ɵɵattributeInterpolate2;\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 */\n\n\nfunction ɵɵattributeInterpolate3(attrName, prefix, v0, i0, v1, i1, v2, suffix, sanitizer, namespace) {\n  var lView = getLView();\n  var interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n\n  if (interpolatedValue !== NO_CHANGE) {\n    var tNode = getSelectedTNode();\n    elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n    ngDevMode && storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 3, prefix, i0, i1, suffix);\n  }\n\n  return ɵɵattributeInterpolate3;\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 */\n\n\nfunction ɵɵattributeInterpolate4(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, suffix, sanitizer, namespace) {\n  var lView = getLView();\n  var interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n\n  if (interpolatedValue !== NO_CHANGE) {\n    var tNode = getSelectedTNode();\n    elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n    ngDevMode && storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 4, prefix, i0, i1, i2, suffix);\n  }\n\n  return ɵɵattributeInterpolate4;\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 */\n\n\nfunction ɵɵattributeInterpolate5(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix, sanitizer, namespace) {\n  var lView = getLView();\n  var interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n\n  if (interpolatedValue !== NO_CHANGE) {\n    var tNode = getSelectedTNode();\n    elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n    ngDevMode && storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 5, prefix, i0, i1, i2, i3, suffix);\n  }\n\n  return ɵɵattributeInterpolate5;\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 */\n\n\nfunction ɵɵattributeInterpolate6(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix, sanitizer, namespace) {\n  var lView = getLView();\n  var interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n\n  if (interpolatedValue !== NO_CHANGE) {\n    var tNode = getSelectedTNode();\n    elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n    ngDevMode && storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 6, prefix, i0, i1, i2, i3, i4, suffix);\n  }\n\n  return ɵɵattributeInterpolate6;\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 */\n\n\nfunction ɵɵattributeInterpolate7(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix, sanitizer, namespace) {\n  var lView = getLView();\n  var interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n\n  if (interpolatedValue !== NO_CHANGE) {\n    var tNode = getSelectedTNode();\n    elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n    ngDevMode && storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 7, prefix, i0, i1, i2, i3, i4, i5, suffix);\n  }\n\n  return ɵɵattributeInterpolate7;\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 */\n\n\nfunction ɵɵattributeInterpolate8(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix, sanitizer, namespace) {\n  var lView = getLView();\n  var interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n\n  if (interpolatedValue !== NO_CHANGE) {\n    var tNode = getSelectedTNode();\n    elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n    ngDevMode && storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 8, prefix, i0, i1, i2, i3, i4, i5, i6, suffix);\n  }\n\n  return ɵɵattributeInterpolate8;\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 */\n\n\nfunction ɵɵattributeInterpolateV(attrName, values, sanitizer, namespace) {\n  var lView = getLView();\n  var interpolated = interpolationV(lView, values);\n\n  if (interpolated !== NO_CHANGE) {\n    var tNode = getSelectedTNode();\n    elementAttributeInternal(tNode, lView, attrName, interpolated, sanitizer, namespace);\n\n    if (ngDevMode) {\n      var interpolationInBetween = [values[0]]; // prefix\n\n      for (var i = 2; i < values.length; i += 2) {\n        interpolationInBetween.push(values[i]);\n      }\n\n      storePropertyBindingMetadata.apply(void 0, [getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - interpolationInBetween.length + 1].concat(interpolationInBetween));\n    }\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 */\n\n\nfunction templateFirstCreatePass(index, tView, lView, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex) {\n  ngDevMode && assertFirstCreatePass(tView);\n  ngDevMode && ngDevMode.firstCreatePass++;\n  var tViewConsts = tView.consts; // TODO(pk): refactor getOrCreateTNode to have the \"create\" only version\n\n  var tNode = getOrCreateTNode(tView, index, 4\n  /* Container */\n  , tagName || null, getConstant(tViewConsts, attrsIndex));\n  resolveDirectives(tView, lView, tNode, getConstant(tViewConsts, localRefsIndex));\n  registerPostOrderHooks(tView, tNode);\n  var embeddedTView = tNode.tViews = createTView(2\n  /* Embedded */\n  , tNode, templateFn, decls, vars, tView.directiveRegistry, 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 * 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 */\n\n\nfunction ɵɵtemplate(index, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex, localRefExtractor) {\n  var lView = getLView();\n  var tView = getTView();\n  var adjustedIndex = index + HEADER_OFFSET;\n  var tNode = tView.firstCreatePass ? templateFirstCreatePass(adjustedIndex, tView, lView, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex) : tView.data[adjustedIndex];\n  setCurrentTNode(tNode, false);\n  var comment = lView[RENDERER].createComment(ngDevMode ? 'container' : '');\n  appendChild(tView, lView, comment, tNode);\n  attachPatchData(comment, lView);\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 */\n\n/** Store a value in the `data` at a given `index`. */\n\n\nfunction store(tView, lView, index, value) {\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\n  lView[index] = value;\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 */\n\n\nfunction ɵɵreference(index) {\n  var contextLView = getContextLView();\n  return load(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 */\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 */\n\n\nvar angularCoreDiEnv = {\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\n/**\n * Compile an Angular injectable according to its `Injectable` metadata, and patch the resulting\n * injectable def (`ɵprov`) onto the injectable type.\n */\n\nfunction compileInjectable(type, meta) {\n  var ngInjectableDef = null;\n  var ngFactoryDef = null; // if NG_PROV_DEF is already defined on this class then don't overwrite it\n\n  if (!type.hasOwnProperty(NG_PROV_DEF)) {\n    Object.defineProperty(type, NG_PROV_DEF, {\n      get: function get() {\n        if (ngInjectableDef === null) {\n          var compiler = getCompilerFacade({\n            usage: 0\n            /* Decorator */\n            ,\n            kind: 'injectable',\n            type: type\n          });\n          ngInjectableDef = compiler.compileInjectable(angularCoreDiEnv, \"ng:///\".concat(type.name, \"/\\u0275prov.js\"), getInjectableMetadata(type, meta));\n        }\n\n        return ngInjectableDef;\n      }\n    });\n  } // if NG_FACTORY_DEF is already defined on this class then don't overwrite it\n\n\n  if (!type.hasOwnProperty(NG_FACTORY_DEF)) {\n    Object.defineProperty(type, NG_FACTORY_DEF, {\n      get: function get() {\n        if (ngFactoryDef === null) {\n          var compiler = getCompilerFacade({\n            usage: 0\n            /* Decorator */\n            ,\n            kind: 'injectable',\n            type: type\n          });\n          ngFactoryDef = compiler.compileFactory(angularCoreDiEnv, \"ng:///\".concat(type.name, \"/\\u0275fac.js\"), {\n            name: type.name,\n            type: type,\n            typeArgumentCount: 0,\n            deps: reflectDependencies(type),\n            target: compiler.FactoryTarget.Injectable\n          });\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\nvar ɵ0$8 = getClosureSafeProperty;\nvar USE_VALUE$1 = /*@__PURE__*/getClosureSafeProperty({\n  provide: String,\n  useValue: ɵ0$8\n});\n\nfunction isUseClassProvider(meta) {\n  return meta.useClass !== undefined;\n}\n\nfunction isUseValueProvider(meta) {\n  return USE_VALUE$1 in meta;\n}\n\nfunction isUseFactoryProvider(meta) {\n  return meta.useFactory !== undefined;\n}\n\nfunction isUseExistingProvider(meta) {\n  return meta.useExisting !== undefined;\n}\n\nfunction getInjectableMetadata(type, srcMeta) {\n  // Allow the compilation of a class with a `@Injectable()` decorator without parameters\n  var meta = srcMeta || {\n    providedIn: null\n  };\n  var compilerMeta = {\n    name: type.name,\n    type: type,\n    typeArgumentCount: 0,\n    providedIn: meta.providedIn\n  };\n\n  if ((isUseClassProvider(meta) || isUseFactoryProvider(meta)) && meta.deps !== undefined) {\n    compilerMeta.deps = convertDependencies(meta.deps);\n  } // Check to see if the user explicitly provided a `useXxxx` property.\n\n\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\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\n\nvar ɵ0$9 = getClosureSafeProperty;\nvar USE_VALUE$2 = /*@__PURE__*/getClosureSafeProperty({\n  provide: String,\n  useValue: ɵ0$9\n});\n\nfunction convertInjectableProviderToFactory(type, provider) {\n  if (!provider) {\n    var reflectionCapabilities = new ReflectionCapabilities();\n    var deps = reflectionCapabilities.parameters(type); // TODO - convert to flags.\n\n    return function () {\n      return _construct(type, _toConsumableArray(injectArgs(deps)));\n    };\n  }\n\n  if (USE_VALUE$2 in provider) {\n    var valueProvider = provider;\n    return function () {\n      return valueProvider.useValue;\n    };\n  } else if (provider.useExisting) {\n    var existingProvider = provider;\n    return function () {\n      return ɵɵinject(resolveForwardRef(existingProvider.useExisting));\n    };\n  } else if (provider.useFactory) {\n    var factoryProvider = provider;\n    return function () {\n      return factoryProvider.useFactory.apply(factoryProvider, _toConsumableArray(injectArgs(factoryProvider.deps || EMPTY_ARRAY)));\n    };\n  } else if (provider.useClass) {\n    var classProvider = provider;\n    var _deps = provider.deps;\n\n    if (!_deps) {\n      var _reflectionCapabilities = new ReflectionCapabilities();\n\n      _deps = _reflectionCapabilities.parameters(type);\n    }\n\n    return function () {\n      return _construct(resolveForwardRef(classProvider.useClass), _toConsumableArray(injectArgs(_deps)));\n    };\n  } else {\n    var _deps2 = provider.deps;\n\n    if (!_deps2) {\n      var _reflectionCapabilities2 = new ReflectionCapabilities();\n\n      _deps2 = _reflectionCapabilities2.parameters(type);\n    }\n\n    return function () {\n      return _construct(type, _toConsumableArray(injectArgs(_deps2)));\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\nvar ɵ0$a = function ɵ0$a(type, meta) {\n  return SWITCH_COMPILE_INJECTABLE(type, meta);\n};\n/**\n * Injectable decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\n\n\nvar Injectable = /*@__PURE__*/makeDecorator('Injectable', undefined, undefined, undefined, ɵ0$a);\n/**\n * Supports @Injectable() in JIT mode for Render2.\n */\n\nfunction render2CompileInjectable(injectableType, options) {\n  if (options && options.providedIn !== undefined && !getInjectableDef(injectableType)) {\n    injectableType.ɵprov = ɵɵdefineInjectable({\n      token: injectableType,\n      providedIn: options.providedIn,\n      factory: convertInjectableProviderToFactory(injectableType, options)\n    });\n  }\n}\n\nvar SWITCH_COMPILE_INJECTABLE__POST_R3__ = compileInjectable;\nvar SWITCH_COMPILE_INJECTABLE__PRE_R3__ = render2CompileInjectable;\nvar SWITCH_COMPILE_INJECTABLE = SWITCH_COMPILE_INJECTABLE__POST_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\nfunction findFirstClosedCycle(keys) {\n  var res = [];\n\n  for (var i = 0; i < keys.length; ++i) {\n    if (res.indexOf(keys[i]) > -1) {\n      res.push(keys[i]);\n      return res;\n    }\n\n    res.push(keys[i]);\n  }\n\n  return res;\n}\n\nfunction constructResolvingPath(keys) {\n  if (keys.length > 1) {\n    var reversed = findFirstClosedCycle(keys.slice().reverse());\n    var tokenStrs = reversed.map(function (k) {\n      return stringify(k.token);\n    });\n    return ' (' + tokenStrs.join(' -> ') + ')';\n  }\n\n  return '';\n}\n\nfunction injectionError(injector, key, constructResolvingMessage, originalError) {\n  var keys = [key];\n  var errMsg = constructResolvingMessage(keys);\n  var error = originalError ? wrappedError(errMsg, originalError) : Error(errMsg);\n  error.addKey = addKey;\n  error.keys = keys;\n  error.injectors = [injector];\n  error.constructResolvingMessage = constructResolvingMessage;\n  error[ERROR_ORIGINAL_ERROR] = originalError;\n  return error;\n}\n\nfunction addKey(injector, key) {\n  this.injectors.push(injector);\n  this.keys.push(key); // Note: This updated message won't be reflected in the `.stack` property\n\n  this.message = this.constructResolvingMessage(this.keys);\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 */\n\n\nfunction noProviderError(injector, key) {\n  return injectionError(injector, key, function (keys) {\n    var first = stringify(keys[0].token);\n    return \"No provider for \".concat(first, \"!\").concat(constructResolvingPath(keys));\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 */\n\n\nfunction cyclicDependencyError(injector, key) {\n  return injectionError(injector, key, function (keys) {\n    return \"Cannot instantiate cyclic dependency!\".concat(constructResolvingPath(keys));\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\r\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 */\n\n\nfunction instantiationError(injector, originalException, originalStack, key) {\n  return injectionError(injector, key, function (keys) {\n    var first = stringify(keys[0].token);\n    return \"\".concat(originalException.message, \": Error during instantiation of \").concat(first, \"!\").concat(constructResolvingPath(keys), \".\");\n  }, originalException);\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 */\n\n\nfunction invalidProviderError(provider) {\n  return Error(\"Invalid provider - only instances of Provider and Type are allowed, got: \".concat(provider));\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 */\n\n\nfunction noAnnotationError(typeOrFunc, params) {\n  var signature = [];\n\n  for (var i = 0, ii = params.length; i < ii; i++) {\n    var parameter = params[i];\n\n    if (!parameter || parameter.length == 0) {\n      signature.push('?');\n    } else {\n      signature.push(parameter.map(stringify).join(' '));\n    }\n  }\n\n  return Error('Cannot resolve all parameters for \\'' + stringify(typeOrFunc) + '\\'(' + signature.join(', ') + '). ' + 'Make sure that all the parameters are decorated with Inject or have valid type annotations and that \\'' + stringify(typeOrFunc) + '\\' is decorated with Injectable.');\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 */\n\n\nfunction outOfBoundsError(index) {\n  return Error(\"Index \".concat(index, \" is out-of-bounds.\"));\n} // TODO: add a working example after alpha38 is released\n\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 */\n\n\nfunction mixingMultiProvidersWithRegularProvidersError(provider1, provider2) {\n  return Error(\"Cannot mix multi providers and regular providers, got: \".concat(provider1, \" \").concat(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\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 */\n\n\nvar ReflectiveKey = /*#__PURE__*/function () {\n  /**\n   * Private\n   */\n  function ReflectiveKey(token, id) {\n    _classCallCheck(this, ReflectiveKey);\n\n    this.token = token;\n    this.id = id;\n\n    if (!token) {\n      throw new Error('Token must be defined!');\n    }\n\n    this.displayName = stringify(this.token);\n  }\n  /**\n   * Retrieves a `Key` for a token.\n   */\n\n\n  _createClass2(ReflectiveKey, null, [{\n    key: \"get\",\n    value: function get(token) {\n      return _globalKeyRegistry.get(resolveForwardRef(token));\n    }\n    /**\n     * @returns the number of keys registered in the system.\n     */\n\n  }, {\n    key: \"numberOfKeys\",\n    get: function get() {\n      return _globalKeyRegistry.numberOfKeys;\n    }\n  }]);\n\n  return ReflectiveKey;\n}();\n\nvar KeyRegistry = /*#__PURE__*/function () {\n  function KeyRegistry() {\n    _classCallCheck(this, KeyRegistry);\n\n    this._allKeys = new Map();\n  }\n\n  _createClass2(KeyRegistry, [{\n    key: \"get\",\n    value: function get(token) {\n      if (token instanceof ReflectiveKey) return token;\n\n      if (this._allKeys.has(token)) {\n        return this._allKeys.get(token);\n      }\n\n      var newKey = new ReflectiveKey(token, ReflectiveKey.numberOfKeys);\n\n      this._allKeys.set(token, newKey);\n\n      return newKey;\n    }\n  }, {\n    key: \"numberOfKeys\",\n    get: function get() {\n      return this._allKeys.size;\n    }\n  }]);\n\n  return KeyRegistry;\n}();\n\nvar _globalKeyRegistry = /*@__PURE__*/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\n/**\n * Provides access to reflection data about symbols. Used internally by Angular\n * to power dependency injection and compilation.\n */\n\n\nvar Reflector = /*#__PURE__*/function () {\n  function Reflector(reflectionCapabilities) {\n    _classCallCheck(this, Reflector);\n\n    this.reflectionCapabilities = reflectionCapabilities;\n  }\n\n  _createClass2(Reflector, [{\n    key: \"updateCapabilities\",\n    value: function updateCapabilities(caps) {\n      this.reflectionCapabilities = caps;\n    }\n  }, {\n    key: \"factory\",\n    value: function factory(type) {\n      return this.reflectionCapabilities.factory(type);\n    }\n  }, {\n    key: \"parameters\",\n    value: function parameters(typeOrFunc) {\n      return this.reflectionCapabilities.parameters(typeOrFunc);\n    }\n  }, {\n    key: \"annotations\",\n    value: function annotations(typeOrFunc) {\n      return this.reflectionCapabilities.annotations(typeOrFunc);\n    }\n  }, {\n    key: \"propMetadata\",\n    value: function propMetadata(typeOrFunc) {\n      return this.reflectionCapabilities.propMetadata(typeOrFunc);\n    }\n  }, {\n    key: \"hasLifecycleHook\",\n    value: function hasLifecycleHook(type, lcProperty) {\n      return this.reflectionCapabilities.hasLifecycleHook(type, lcProperty);\n    }\n  }, {\n    key: \"getter\",\n    value: function getter(name) {\n      return this.reflectionCapabilities.getter(name);\n    }\n  }, {\n    key: \"setter\",\n    value: function setter(name) {\n      return this.reflectionCapabilities.setter(name);\n    }\n  }, {\n    key: \"method\",\n    value: function method(name) {\n      return this.reflectionCapabilities.method(name);\n    }\n  }, {\n    key: \"importUri\",\n    value: function importUri(type) {\n      return this.reflectionCapabilities.importUri(type);\n    }\n  }, {\n    key: \"resourceUri\",\n    value: function resourceUri(type) {\n      return this.reflectionCapabilities.resourceUri(type);\n    }\n  }, {\n    key: \"resolveIdentifier\",\n    value: function resolveIdentifier(name, moduleUrl, members, runtime) {\n      return this.reflectionCapabilities.resolveIdentifier(name, moduleUrl, members, runtime);\n    }\n  }, {\n    key: \"resolveEnum\",\n    value: function resolveEnum(identifier, name) {\n      return this.reflectionCapabilities.resolveEnum(identifier, name);\n    }\n  }]);\n\n  return Reflector;\n}();\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 {@link Reflector} used internally in Angular to access metadata\n * about symbols.\n */\n\n\nvar reflector = /*@__PURE__*/new Reflector( /*@__PURE__*/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\n/**\n * `Dependency` is used by the framework to extend DI.\n * This is internal to Angular and should not be used directly.\n */\n\nvar ReflectiveDependency = /*#__PURE__*/function () {\n  function ReflectiveDependency(key, optional, visibility) {\n    _classCallCheck(this, ReflectiveDependency);\n\n    this.key = key;\n    this.optional = optional;\n    this.visibility = visibility;\n  }\n\n  _createClass2(ReflectiveDependency, null, [{\n    key: \"fromKey\",\n    value: function fromKey(key) {\n      return new ReflectiveDependency(key, false, null);\n    }\n  }]);\n\n  return ReflectiveDependency;\n}();\n\nvar _EMPTY_LIST = [];\n\nvar ResolvedReflectiveProvider_ = /*#__PURE__*/_createClass2(function ResolvedReflectiveProvider_(key, resolvedFactories, multiProvider) {\n  _classCallCheck(this, ResolvedReflectiveProvider_);\n\n  this.key = key;\n  this.resolvedFactories = resolvedFactories;\n  this.multiProvider = multiProvider;\n  this.resolvedFactory = this.resolvedFactories[0];\n});\n/**\n * An internal resolved representation of a factory function created by resolving `Provider`.\n * @publicApi\n */\n\n\nvar ResolvedReflectiveFactory = /*#__PURE__*/_createClass2(function ResolvedReflectiveFactory(\n/**\n * Factory function which can return an instance of an object represented by a key.\n */\nfactory,\n/**\n * Arguments (dependencies) to the `factory` function.\n */\ndependencies) {\n  _classCallCheck(this, ResolvedReflectiveFactory);\n\n  this.factory = factory;\n  this.dependencies = dependencies;\n});\n/**\n * Resolve a single provider.\n */\n\n\nfunction resolveReflectiveFactory(provider) {\n  var factoryFn;\n  var resolvedDeps;\n\n  if (provider.useClass) {\n    var useClass = resolveForwardRef(provider.useClass);\n    factoryFn = reflector.factory(useClass);\n    resolvedDeps = _dependenciesFor(useClass);\n  } else if (provider.useExisting) {\n    factoryFn = function factoryFn(aliasInstance) {\n      return aliasInstance;\n    };\n\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 = function factoryFn() {\n      return provider.useValue;\n    };\n\n    resolvedDeps = _EMPTY_LIST;\n  }\n\n  return new ResolvedReflectiveFactory(factoryFn, resolvedDeps);\n}\n/**\n * Converts the `Provider` into `ResolvedProvider`.\n *\n * `Injector` internally only uses `ResolvedProvider`, `Provider` contains convenience provider\n * syntax.\n */\n\n\nfunction resolveReflectiveProvider(provider) {\n  return new ResolvedReflectiveProvider_(ReflectiveKey.get(provider.provide), [resolveReflectiveFactory(provider)], provider.multi || false);\n}\n/**\n * Resolve a list of Providers.\n */\n\n\nfunction resolveReflectiveProviders(providers) {\n  var normalized = _normalizeProviders(providers, []);\n\n  var resolved = normalized.map(resolveReflectiveProvider);\n  var resolvedProviderMap = mergeResolvedReflectiveProviders(resolved, new Map());\n  return Array.from(resolvedProviderMap.values());\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 */\n\n\nfunction mergeResolvedReflectiveProviders(providers, normalizedProvidersMap) {\n  for (var i = 0; i < providers.length; i++) {\n    var provider = providers[i];\n    var existing = normalizedProvidersMap.get(provider.key.id);\n\n    if (existing) {\n      if (provider.multiProvider !== existing.multiProvider) {\n        throw mixingMultiProvidersWithRegularProvidersError(existing, provider);\n      }\n\n      if (provider.multiProvider) {\n        for (var 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      var resolvedProvider = void 0;\n\n      if (provider.multiProvider) {\n        resolvedProvider = new ResolvedReflectiveProvider_(provider.key, provider.resolvedFactories.slice(), provider.multiProvider);\n      } else {\n        resolvedProvider = provider;\n      }\n\n      normalizedProvidersMap.set(provider.key.id, resolvedProvider);\n    }\n  }\n\n  return normalizedProvidersMap;\n}\n\nfunction _normalizeProviders(providers, res) {\n  providers.forEach(function (b) {\n    if (b instanceof Type) {\n      res.push({\n        provide: b,\n        useClass: b\n      });\n    } else if (b && typeof b == 'object' && b.provide !== undefined) {\n      res.push(b);\n    } else if (Array.isArray(b)) {\n      _normalizeProviders(b, res);\n    } else {\n      throw invalidProviderError(b);\n    }\n  });\n  return res;\n}\n\nfunction constructDependencies(typeOrFunc, dependencies) {\n  if (!dependencies) {\n    return _dependenciesFor(typeOrFunc);\n  } else {\n    var params = dependencies.map(function (t) {\n      return [t];\n    });\n    return dependencies.map(function (t) {\n      return _extractToken(typeOrFunc, t, params);\n    });\n  }\n}\n\nfunction _dependenciesFor(typeOrFunc) {\n  var params = reflector.parameters(typeOrFunc);\n  if (!params) return [];\n\n  if (params.some(function (p) {\n    return p == null;\n  })) {\n    throw noAnnotationError(typeOrFunc, params);\n  }\n\n  return params.map(function (p) {\n    return _extractToken(typeOrFunc, p, params);\n  });\n}\n\nfunction _extractToken(typeOrFunc, metadata, params) {\n  var token = null;\n  var 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  var visibility = null;\n\n  for (var i = 0; i < metadata.length; ++i) {\n    var paramMetadata = metadata[i];\n\n    if (paramMetadata instanceof Type) {\n      token = paramMetadata;\n    } else if (paramMetadata instanceof Inject) {\n      token = paramMetadata.token;\n    } else if (paramMetadata instanceof Optional) {\n      optional = true;\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(token, optional, visibility) {\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// Threshold for the dynamic version\n\n\nvar UNDEFINED = {};\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 */\n\nvar ReflectiveInjector = /*#__PURE__*/function () {\n  function ReflectiveInjector() {\n    _classCallCheck(this, ReflectiveInjector);\n  }\n\n  _createClass2(ReflectiveInjector, null, [{\n    key: \"resolve\",\n    value:\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    function resolve(providers) {\n      return resolveReflectiveProviders(providers);\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\n  }, {\n    key: \"resolveAndCreate\",\n    value: function resolveAndCreate(providers, parent) {\n      var ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers);\n      return ReflectiveInjector.fromResolvedProviders(ResolvedReflectiveProviders, parent);\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\n  }, {\n    key: \"fromResolvedProviders\",\n    value: function fromResolvedProviders(providers, parent) {\n      return new ReflectiveInjector_(providers, parent);\n    }\n  }]);\n\n  return ReflectiveInjector;\n}();\n\nvar ReflectiveInjector_ = /*@__PURE__*/function () {\n  var ReflectiveInjector_ = /*#__PURE__*/function () {\n    /**\n     * Private\n     */\n    function ReflectiveInjector_(_providers, _parent) {\n      _classCallCheck(this, ReflectiveInjector_);\n\n      /** @internal */\n      this._constructionCounter = 0;\n      this._providers = _providers;\n      this.parent = _parent || null;\n      var len = _providers.length;\n      this.keyIds = [];\n      this.objs = [];\n\n      for (var i = 0; i < len; i++) {\n        this.keyIds[i] = _providers[i].key.id;\n        this.objs[i] = UNDEFINED;\n      }\n    }\n\n    _createClass2(ReflectiveInjector_, [{\n      key: \"get\",\n      value: function get(token) {\n        var notFoundValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : THROW_IF_NOT_FOUND;\n        return this._getByKey(ReflectiveKey.get(token), null, notFoundValue);\n      }\n    }, {\n      key: \"resolveAndCreateChild\",\n      value: function resolveAndCreateChild(providers) {\n        var ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers);\n        return this.createChildFromResolved(ResolvedReflectiveProviders);\n      }\n    }, {\n      key: \"createChildFromResolved\",\n      value: function createChildFromResolved(providers) {\n        var inj = new ReflectiveInjector_(providers);\n        inj.parent = this;\n        return inj;\n      }\n    }, {\n      key: \"resolveAndInstantiate\",\n      value: function resolveAndInstantiate(provider) {\n        return this.instantiateResolved(ReflectiveInjector.resolve([provider])[0]);\n      }\n    }, {\n      key: \"instantiateResolved\",\n      value: function instantiateResolved(provider) {\n        return this._instantiateProvider(provider);\n      }\n    }, {\n      key: \"getProviderAtIndex\",\n      value: function getProviderAtIndex(index) {\n        if (index < 0 || index >= this._providers.length) {\n          throw outOfBoundsError(index);\n        }\n\n        return this._providers[index];\n      }\n      /** @internal */\n\n    }, {\n      key: \"_new\",\n      value: function _new(provider) {\n        if (this._constructionCounter++ > this._getMaxNumberOfObjects()) {\n          throw cyclicDependencyError(this, provider.key);\n        }\n\n        return this._instantiateProvider(provider);\n      }\n    }, {\n      key: \"_getMaxNumberOfObjects\",\n      value: function _getMaxNumberOfObjects() {\n        return this.objs.length;\n      }\n    }, {\n      key: \"_instantiateProvider\",\n      value: function _instantiateProvider(provider) {\n        if (provider.multiProvider) {\n          var res = [];\n\n          for (var i = 0; i < provider.resolvedFactories.length; ++i) {\n            res[i] = this._instantiate(provider, provider.resolvedFactories[i]);\n          }\n\n          return res;\n        } else {\n          return this._instantiate(provider, provider.resolvedFactories[0]);\n        }\n      }\n    }, {\n      key: \"_instantiate\",\n      value: function _instantiate(provider, ResolvedReflectiveFactory) {\n        var _this5 = this;\n\n        var factory = ResolvedReflectiveFactory.factory;\n        var deps;\n\n        try {\n          deps = ResolvedReflectiveFactory.dependencies.map(function (dep) {\n            return _this5._getByReflectiveDependency(dep);\n          });\n        } catch (e) {\n          if (e.addKey) {\n            e.addKey(this, provider.key);\n          }\n\n          throw e;\n        }\n\n        var obj;\n\n        try {\n          obj = factory.apply(void 0, _toConsumableArray(deps));\n        } catch (e) {\n          throw instantiationError(this, e, e.stack, provider.key);\n        }\n\n        return obj;\n      }\n    }, {\n      key: \"_getByReflectiveDependency\",\n      value: function _getByReflectiveDependency(dep) {\n        return this._getByKey(dep.key, dep.visibility, dep.optional ? null : THROW_IF_NOT_FOUND);\n      }\n    }, {\n      key: \"_getByKey\",\n      value: function _getByKey(key, visibility, notFoundValue) {\n        if (key === ReflectiveInjector_.INJECTOR_KEY) {\n          return this;\n        }\n\n        if (visibility instanceof Self) {\n          return this._getByKeySelf(key, notFoundValue);\n        } else {\n          return this._getByKeyDefault(key, notFoundValue, visibility);\n        }\n      }\n    }, {\n      key: \"_getObjByKeyId\",\n      value: function _getObjByKeyId(keyId) {\n        for (var 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      /** @internal */\n\n    }, {\n      key: \"_throwOrNull\",\n      value: function _throwOrNull(key, notFoundValue) {\n        if (notFoundValue !== THROW_IF_NOT_FOUND) {\n          return notFoundValue;\n        } else {\n          throw noProviderError(this, key);\n        }\n      }\n      /** @internal */\n\n    }, {\n      key: \"_getByKeySelf\",\n      value: function _getByKeySelf(key, notFoundValue) {\n        var obj = this._getObjByKeyId(key.id);\n\n        return obj !== UNDEFINED ? obj : this._throwOrNull(key, notFoundValue);\n      }\n      /** @internal */\n\n    }, {\n      key: \"_getByKeyDefault\",\n      value: function _getByKeyDefault(key, notFoundValue, visibility) {\n        var inj;\n\n        if (visibility instanceof SkipSelf) {\n          inj = this.parent;\n        } else {\n          inj = this;\n        }\n\n        while (inj instanceof ReflectiveInjector_) {\n          var inj_ = inj;\n\n          var obj = inj_._getObjByKeyId(key.id);\n\n          if (obj !== UNDEFINED) return obj;\n          inj = inj_.parent;\n        }\n\n        if (inj !== null) {\n          return inj.get(key.token, notFoundValue);\n        } else {\n          return this._throwOrNull(key, notFoundValue);\n        }\n      }\n    }, {\n      key: \"displayName\",\n      get: function get() {\n        var providers = _mapProviders(this, function (b) {\n          return ' \"' + b.key.displayName + '\" ';\n        }).join(', ');\n\n        return \"ReflectiveInjector(providers: [\".concat(providers, \"])\");\n      }\n    }, {\n      key: \"toString\",\n      value: function toString() {\n        return this.displayName;\n      }\n    }]);\n\n    return ReflectiveInjector_;\n  }();\n\n  ReflectiveInjector_.INJECTOR_KEY =\n  /*@__PURE__*/\n\n  /* @__PURE__ */\n  ReflectiveKey.get(Injector);\n  return ReflectiveInjector_;\n}();\n\nfunction _mapProviders(injector, fn) {\n  var res = [];\n\n  for (var i = 0; i < injector._providers.length; ++i) {\n    res[i] = fn(injector.getProviderAtIndex(i));\n  }\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 * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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\nfunction ɵɵdirectiveInject(token) {\n  var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : InjectFlags.Default;\n  var lView = getLView(); // 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\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\n  var tNode = getCurrentTNode();\n  return getOrCreateInjectable(tNode, lView, resolveForwardRef(token), flags);\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 */\n\n\nfunction ɵɵinvalidFactory() {\n  var msg = 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 */\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 */\n\n\nfunction ɵɵproperty(propName, value, sanitizer) {\n  var lView = getLView();\n  var bindingIndex = nextBindingIndex();\n\n  if (bindingUpdated(lView, bindingIndex, value)) {\n    var tView = getTView();\n    var tNode = getSelectedTNode();\n    elementPropertyInternal(tView, tNode, lView, propName, value, lView[RENDERER], sanitizer, false);\n    ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);\n  }\n\n  return ɵɵproperty;\n}\n/**\n * Given `<div style=\"...\" my-dir>` and `MyDir` with `@Input('style')` we need to write to\n * directive input.\n */\n\n\nfunction setDirectiveInputsWhichShadowsStyling(tView, tNode, lView, value, isClassBased) {\n  var inputs = tNode.inputs;\n  var property = isClassBased ? 'class' : 'style'; // We support both 'class' and `className` hence the fallback.\n\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\n\nfunction elementStartFirstCreatePass(index, tView, lView, native, name, attrsIndex, localRefsIndex) {\n  ngDevMode && assertFirstCreatePass(tView);\n  ngDevMode && ngDevMode.firstCreatePass++;\n  var tViewConsts = tView.consts;\n  var attrs = getConstant(tViewConsts, attrsIndex);\n  var tNode = getOrCreateTNode(tView, index, 2\n  /* Element */\n  , name, attrs);\n  var hasDirectives = resolveDirectives(tView, lView, tNode, getConstant(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 * 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 */\n\n\nfunction ɵɵelementStart(index, name, attrsIndex, localRefsIndex) {\n  var lView = getLView();\n  var tView = getTView();\n  var adjustedIndex = HEADER_OFFSET + index;\n  ngDevMode && assertEqual(getBindingIndex(), tView.bindingStartIndex, 'elements should be created before any bindings');\n  ngDevMode && assertIndexInRange(lView, adjustedIndex);\n  var renderer = lView[RENDERER];\n  var native = lView[adjustedIndex] = createElementNode(renderer, name, getNamespace());\n  var tNode = tView.firstCreatePass ? elementStartFirstCreatePass(adjustedIndex, tView, lView, native, name, attrsIndex, localRefsIndex) : tView.data[adjustedIndex];\n  setCurrentTNode(tNode, true);\n  var mergedAttrs = tNode.mergedAttrs;\n\n  if (mergedAttrs !== null) {\n    setUpAttributes(renderer, native, mergedAttrs);\n  }\n\n  var classes = tNode.classes;\n\n  if (classes !== null) {\n    writeDirectClass(renderer, native, classes);\n  }\n\n  var styles = tNode.styles;\n\n  if (styles !== null) {\n    writeDirectStyle(renderer, native, styles);\n  }\n\n  if ((tNode.flags & 64\n  /* isDetached */\n  ) !== 64\n  /* isDetached */\n  ) {\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  } // 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\n\n  if (getElementDepthCount() === 0) {\n    attachPatchData(native, lView);\n  }\n\n  increaseElementDepthCount();\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 * Mark the end of the element.\n *\n * @codeGenApi\n */\n\n\nfunction ɵɵelementEnd() {\n  var currentTNode = getCurrentTNode();\n  ngDevMode && assertDefined(currentTNode, 'No parent node to close.');\n\n  if (isCurrentTNodeParent()) {\n    setCurrentTNodeAsNotParent();\n  } else {\n    ngDevMode && assertHasParent(getCurrentTNode());\n    currentTNode = currentTNode.parent;\n    setCurrentTNode(currentTNode, false);\n  }\n\n  var tNode = currentTNode;\n  ngDevMode && assertTNodeType(tNode, 3\n  /* AnyRNode */\n  );\n  decreaseElementDepthCount();\n  var tView = getTView();\n\n  if (tView.firstCreatePass) {\n    registerPostOrderHooks(tView, currentTNode);\n\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 * 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 */\n\n\nfunction ɵɵelement(index, name, attrsIndex, localRefsIndex) {\n  ɵɵelementStart(index, name, attrsIndex, localRefsIndex);\n  ɵɵelementEnd();\n}\n\nfunction logUnknownElementError(tView, element, tNode, hasDirectives) {\n  var schemas = tView.schemas; // 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\n  if (schemas === null) return;\n  var tagName = tNode.value; // If the element matches any directive, it's considered as valid.\n\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    var isUnknown = // 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 && element instanceof HTMLUnknownElement || typeof customElements !== 'undefined' && tagName.indexOf('-') > -1 && !customElements.get(tagName);\n\n    if (isUnknown && !matchingSchemas(tView, tagName)) {\n      var message = \"'\".concat(tagName, \"' is not a known element:\\n\");\n      message += \"1. If '\".concat(tagName, \"' is an Angular component, then verify that it is part of this module.\\n\");\n\n      if (tagName && tagName.indexOf('-') > -1) {\n        message += \"2. If '\".concat(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 += \"2. To allow any element add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.\";\n      }\n\n      console.error(formatRuntimeError(\"304\"\n      /* UNKNOWN_ELEMENT */\n      , 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 */\n\n\nfunction elementContainerStartFirstCreatePass(index, tView, lView, attrsIndex, localRefsIndex) {\n  ngDevMode && ngDevMode.firstCreatePass++;\n  var tViewConsts = tView.consts;\n  var attrs = getConstant(tViewConsts, attrsIndex);\n  var tNode = getOrCreateTNode(tView, index, 8\n  /* ElementContainer */\n  , 'ng-container', attrs); // While ng-container doesn't necessarily support styling, we use the style context to identify\n  // and execute directives on the ng-container.\n\n  if (attrs !== null) {\n    computeStaticStyling(tNode, attrs, true);\n  }\n\n  var localRefs = getConstant(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 * 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 */\n\n\nfunction ɵɵelementContainerStart(index, attrsIndex, localRefsIndex) {\n  var lView = getLView();\n  var tView = getTView();\n  var adjustedIndex = index + HEADER_OFFSET;\n  ngDevMode && assertIndexInRange(lView, adjustedIndex);\n  ngDevMode && assertEqual(getBindingIndex(), tView.bindingStartIndex, 'element containers should be created before any bindings');\n  var tNode = tView.firstCreatePass ? elementContainerStartFirstCreatePass(adjustedIndex, tView, lView, attrsIndex, localRefsIndex) : tView.data[adjustedIndex];\n  setCurrentTNode(tNode, true);\n  ngDevMode && ngDevMode.rendererCreateComment++;\n  var native = lView[adjustedIndex] = 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 * Mark the end of the <ng-container>.\n *\n * @codeGenApi\n */\n\n\nfunction ɵɵelementContainerEnd() {\n  var currentTNode = getCurrentTNode();\n  var tView = getTView();\n\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, 8\n  /* ElementContainer */\n  );\n\n  if (tView.firstCreatePass) {\n    registerPostOrderHooks(tView, currentTNode);\n\n    if (isContentQueryHost(currentTNode)) {\n      tView.queries.elementEnd(currentTNode);\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 */\n\n\nfunction ɵɵelementContainer(index, attrsIndex, localRefsIndex) {\n  ɵɵelementContainerStart(index, attrsIndex, localRefsIndex);\n  ɵɵelementContainerEnd();\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 */\n\n\nfunction ɵɵgetCurrentView() {\n  return getLView();\n}\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Determine if the argument is shaped like a Promise\n */\n\n\nfunction isPromise(obj) {\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 * Determine if the argument is a Subscribable\n */\n\n\nfunction isSubscribable(obj) {\n  return !!obj && typeof obj.subscribe === 'function';\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 */\n\n\nvar isObservable = isSubscribable;\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * 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 */\n\nfunction ɵɵlistener(eventName, listenerFn, useCapture, eventTargetResolver) {\n  var lView = getLView();\n  var tView = getTView();\n  var tNode = getCurrentTNode();\n  listenerInternal(tView, lView, lView[RENDERER], tNode, eventName, listenerFn, !!useCapture, eventTargetResolver);\n  return ɵɵlistener;\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 */\n\n\nfunction ɵɵsyntheticHostListener(eventName, listenerFn) {\n  var tNode = getCurrentTNode();\n  var lView = getLView();\n  var tView = getTView();\n  var currentDef = getCurrentDirectiveDef(tView.data);\n  var renderer = loadComponentRenderer(currentDef, tNode, lView);\n  listenerInternal(tView, lView, renderer, tNode, eventName, listenerFn, false);\n  return ɵɵsyntheticHostListener;\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 */\n\n\nfunction findExistingListener(tView, lView, eventName, tNodeIdx) {\n  var tCleanup = tView.cleanup;\n\n  if (tCleanup != null) {\n    for (var i = 0; i < tCleanup.length - 1; i += 2) {\n      var cleanupEventName = tCleanup[i];\n\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        var lCleanup = lView[CLEANUP];\n        var listenerIdxInLCleanup = tCleanup[i + 2];\n        return lCleanup.length > listenerIdxInLCleanup ? lCleanup[listenerIdxInLCleanup] : null;\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\n\n      if (typeof cleanupEventName === 'string') {\n        i += 2;\n      }\n    }\n  }\n\n  return null;\n}\n\nfunction listenerInternal(tView, lView, renderer, tNode, eventName, listenerFn, useCapture, eventTargetResolver) {\n  var isTNodeDirectiveHost = isDirectiveHost(tNode);\n  var firstCreatePass = tView.firstCreatePass;\n  var tCleanup = firstCreatePass && getOrCreateTViewCleanup(tView);\n  var context = lView[CONTEXT]; // 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\n  var lCleanup = getOrCreateLViewCleanup(lView);\n  ngDevMode && assertTNodeType(tNode, 3\n  /* AnyRNode */\n  | 12\n  /* AnyContainer */\n  );\n  var processOutputs = true; // 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\n  if (tNode.type & 3\n  /* AnyRNode */\n  || eventTargetResolver) {\n    var native = getNativeByTNode(tNode, lView);\n    var target = eventTargetResolver ? eventTargetResolver(native) : native;\n    var lCleanupIndex = lCleanup.length;\n    var idxOrTargetGetter = eventTargetResolver ? function (_lView) {\n      return eventTargetResolver(unwrapRNode(_lView[tNode.index]));\n    } : tNode.index; // In order to match current behavior, native DOM event listeners must be added for all\n    // events (including outputs).\n\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      var existingListener = null; // 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\n      if (!eventTargetResolver && isTNodeDirectiveHost) {\n        existingListener = findExistingListener(tView, lView, eventName, tNode.index);\n      }\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        var lastListenerFn = existingListener.__ngLastListenerFn__ || existingListener;\n        lastListenerFn.__ngNextListenerFn__ = listenerFn;\n        existingListener.__ngLastListenerFn__ = listenerFn;\n        processOutputs = false;\n      } else {\n        listenerFn = wrapListener(tNode, lView, context, listenerFn, false\n        /** preventDefault */\n        );\n        var cleanupFn = renderer.listen(target, eventName, listenerFn);\n        ngDevMode && ngDevMode.rendererAddEventListener++;\n        lCleanup.push(listenerFn, cleanupFn);\n        tCleanup && tCleanup.push(eventName, idxOrTargetGetter, lCleanupIndex, lCleanupIndex + 1);\n      }\n    } else {\n      listenerFn = wrapListener(tNode, lView, context, listenerFn, true\n      /** preventDefault */\n      );\n      target.addEventListener(eventName, listenerFn, useCapture);\n      ngDevMode && ngDevMode.rendererAddEventListener++;\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\n    /** preventDefault */\n    );\n  } // subscribe to directive outputs\n\n\n  var outputs = tNode.outputs;\n  var props;\n\n  if (processOutputs && outputs !== null && (props = outputs[eventName])) {\n    var propsLength = props.length;\n\n    if (propsLength) {\n      for (var i = 0; i < propsLength; i += 2) {\n        var index = props[i];\n        ngDevMode && assertIndexInRange(lView, index);\n        var minifiedName = props[i + 1];\n        var directiveInstance = lView[index];\n        var output = directiveInstance[minifiedName];\n\n        if (ngDevMode && !isObservable(output)) {\n          throw new Error(\"@Output \".concat(minifiedName, \" not initialized in '\").concat(directiveInstance.constructor.name, \"'.\"));\n        }\n\n        var subscription = output.subscribe(listenerFn);\n        var 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(lView, context, listenerFn, e) {\n  try {\n    profiler(6\n    /* OutputStart */\n    , context, listenerFn); // Only explicitly returning false from a listener should preventDefault\n\n    return listenerFn(e) !== false;\n  } catch (error) {\n    handleError(lView, error);\n    return false;\n  } finally {\n    profiler(7\n    /* OutputEnd */\n    , context, listenerFn);\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 */\n\n\nfunction wrapListener(tNode, lView, context, listenerFn, wrapWithPreventDefault) {\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) {\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    } // 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\n\n    var startView = tNode.flags & 2\n    /* isComponentHost */\n    ? getComponentLViewByIndex(tNode.index, lView) : lView; // See interfaces/view.ts for more on LViewFlags.ManualOnPush\n\n    if ((lView[FLAGS] & 32\n    /* ManualOnPush */\n    ) === 0) {\n      markViewDirty(startView);\n    }\n\n    var result = executeListenerWithErrorHandling(lView, context, listenerFn, e); // A just-invoked listener function might have coalesced listeners so we need to check for\n    // their presence and invoke as needed.\n\n    var nextListenerFn = wrapListenerIn_markDirtyAndPreventDefault.__ngNextListenerFn__;\n\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 = nextListenerFn.__ngNextListenerFn__;\n    }\n\n    if (wrapWithPreventDefault && result === false) {\n      e.preventDefault(); // Necessary for legacy browsers that don't support preventDefault (e.g. IE)\n\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\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * 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 */\n\n\nfunction ɵɵnextContext() {\n  var level = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;\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 */\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 */\n\n\nfunction matchingProjectionSlotIndex(tNode, projectionSlots) {\n  var wildcardNgContentIndex = null;\n  var ngProjectAsAttrVal = getProjectAsAttrValue(tNode);\n\n  for (var i = 0; i < projectionSlots.length; i++) {\n    var slotValue = projectionSlots[i]; // 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\n    if (slotValue === '*') {\n      wildcardNgContentIndex = i;\n      continue;\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\n\n    if (ngProjectAsAttrVal === null ? isNodeMatchingSelectorList(tNode, slotValue,\n    /* isProjectionMode */\n    true) : isSelectorInSelectorList(ngProjectAsAttrVal, slotValue)) {\n      return i; // first matching selector \"captures\" a given node\n    }\n  }\n\n  return wildcardNgContentIndex;\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 */\n\n\nfunction ɵɵprojectionDef(projectionSlots) {\n  var componentNode = getLView()[DECLARATION_COMPONENT_VIEW][T_HOST];\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    var numProjectionSlots = projectionSlots ? projectionSlots.length : 1;\n    var projectionHeads = componentNode.projection = newArray(numProjectionSlots, null);\n    var tails = projectionHeads.slice();\n    var componentChild = componentNode.child;\n\n    while (componentChild !== null) {\n      var slotIndex = 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\n        tails[slotIndex] = componentChild;\n      }\n\n      componentChild = componentChild.next;\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 */\n\n\nfunction ɵɵprojection(nodeIndex) {\n  var selectorIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n  var attrs = arguments.length > 2 ? arguments[2] : undefined;\n  var lView = getLView();\n  var tView = getTView();\n  var tProjectionNode = getOrCreateTNode(tView, HEADER_OFFSET + nodeIndex, 16\n  /* Projection */\n  , null, attrs || null); // We can't use viewData[HOST_NODE] because projection nodes can be nested in embedded views.\n\n  if (tProjectionNode.projection === null) tProjectionNode.projection = selectorIndex; // `<ng-content>` has no content\n\n  setCurrentTNodeAsNotParent();\n\n  if ((tProjectionNode.flags & 64\n  /* isDetached */\n  ) !== 64\n  /* isDetached */\n  ) {\n    // re-distribution of projectable nodes is stored on a component's view level\n    applyProjection(tView, lView, tProjectionNode);\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 */\n\n\nfunction ɵɵpropertyInterpolate(propName, v0, sanitizer) {\n  ɵɵpropertyInterpolate1(propName, '', v0, '', sanitizer);\n  return ɵɵpropertyInterpolate;\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 */\n\n\nfunction ɵɵpropertyInterpolate1(propName, prefix, v0, suffix, sanitizer) {\n  var lView = getLView();\n  var interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n\n  if (interpolatedValue !== NO_CHANGE) {\n    var tView = getTView();\n    var tNode = getSelectedTNode();\n    elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n    ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 1, prefix, suffix);\n  }\n\n  return ɵɵpropertyInterpolate1;\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 */\n\n\nfunction ɵɵpropertyInterpolate2(propName, prefix, v0, i0, v1, suffix, sanitizer) {\n  var lView = getLView();\n  var interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n\n  if (interpolatedValue !== NO_CHANGE) {\n    var tView = getTView();\n    var tNode = getSelectedTNode();\n    elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n    ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 2, prefix, i0, suffix);\n  }\n\n  return ɵɵpropertyInterpolate2;\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 */\n\n\nfunction ɵɵpropertyInterpolate3(propName, prefix, v0, i0, v1, i1, v2, suffix, sanitizer) {\n  var lView = getLView();\n  var interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n\n  if (interpolatedValue !== NO_CHANGE) {\n    var tView = getTView();\n    var tNode = getSelectedTNode();\n    elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n    ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 3, prefix, i0, i1, suffix);\n  }\n\n  return ɵɵpropertyInterpolate3;\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 */\n\n\nfunction ɵɵpropertyInterpolate4(propName, prefix, v0, i0, v1, i1, v2, i2, v3, suffix, sanitizer) {\n  var lView = getLView();\n  var interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n\n  if (interpolatedValue !== NO_CHANGE) {\n    var tView = getTView();\n    var tNode = getSelectedTNode();\n    elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n    ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 4, prefix, i0, i1, i2, suffix);\n  }\n\n  return ɵɵpropertyInterpolate4;\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 */\n\n\nfunction ɵɵpropertyInterpolate5(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix, sanitizer) {\n  var lView = getLView();\n  var interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n\n  if (interpolatedValue !== NO_CHANGE) {\n    var tView = getTView();\n    var tNode = getSelectedTNode();\n    elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n    ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 5, prefix, i0, i1, i2, i3, suffix);\n  }\n\n  return ɵɵpropertyInterpolate5;\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 */\n\n\nfunction ɵɵpropertyInterpolate6(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix, sanitizer) {\n  var lView = getLView();\n  var interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n\n  if (interpolatedValue !== NO_CHANGE) {\n    var tView = getTView();\n    var tNode = getSelectedTNode();\n    elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n    ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 6, prefix, i0, i1, i2, i3, i4, suffix);\n  }\n\n  return ɵɵpropertyInterpolate6;\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 */\n\n\nfunction ɵɵpropertyInterpolate7(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix, sanitizer) {\n  var lView = getLView();\n  var interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n\n  if (interpolatedValue !== NO_CHANGE) {\n    var tView = getTView();\n    var tNode = getSelectedTNode();\n    elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n    ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 7, prefix, i0, i1, i2, i3, i4, i5, suffix);\n  }\n\n  return ɵɵpropertyInterpolate7;\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 */\n\n\nfunction ɵɵpropertyInterpolate8(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix, sanitizer) {\n  var lView = getLView();\n  var interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n\n  if (interpolatedValue !== NO_CHANGE) {\n    var tView = getTView();\n    var tNode = getSelectedTNode();\n    elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n    ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 8, prefix, i0, i1, i2, i3, i4, i5, i6, suffix);\n  }\n\n  return ɵɵpropertyInterpolate8;\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 */\n\n\nfunction ɵɵpropertyInterpolateV(propName, values, sanitizer) {\n  var lView = getLView();\n  var interpolatedValue = interpolationV(lView, values);\n\n  if (interpolatedValue !== NO_CHANGE) {\n    var tView = getTView();\n    var tNode = getSelectedTNode();\n    elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n\n    if (ngDevMode) {\n      var interpolationInBetween = [values[0]]; // prefix\n\n      for (var i = 2; i < values.length; i += 2) {\n        interpolationInBetween.push(values[i]);\n      }\n\n      storePropertyBindingMetadata.apply(void 0, [tView.data, tNode, propName, getBindingIndex() - interpolationInBetween.length + 1].concat(interpolationInBetween));\n    }\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\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 */\n\n\nvar __unused_const_as_closure_does_not_like_standalone_comment_blocks__;\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 */\n\n\nfunction insertTStylingBinding(tData, tNode, tStylingKeyWithStatic, index, isHostBinding, isClassBinding) {\n  ngDevMode && assertFirstUpdatePass(getTView());\n  var tBindings = isClassBinding ? tNode.classBindings : tNode.styleBindings;\n  var tmplHead = getTStylingRangePrev(tBindings);\n  var tmplTail = getTStylingRangeNext(tBindings);\n  tData[index] = tStylingKeyWithStatic;\n  var isKeyDuplicateOfStatic = false;\n  var tStylingKey;\n\n  if (Array.isArray(tStylingKeyWithStatic)) {\n    // We are case when the `TStylingKey` contains static fields as well.\n    var staticKeyValueArray = tStylingKeyWithStatic;\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\n    if (tStylingKey === null || keyValueArrayIndexOf(staticKeyValueArray, tStylingKey) > 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\n  if (isHostBinding) {\n    // We are inserting host bindings\n    // If we don't have template bindings then `tail` is 0.\n    var hasTemplateBindings = tmplTail !== 0; // 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\n    if (hasTemplateBindings) {\n      // template head's \"prev\" will point to last host binding or to 0 if no host bindings yet\n      var previousNode = getTStylingRangePrev(tData[tmplHead + 1]);\n      tData[index + 1] = toTStylingRange(previousNode, tmplHead); // 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\n      if (previousNode !== 0) {\n        // We need to update the template-tail value to point to us.\n        tData[previousNode + 1] = setTStylingRangeNext(tData[previousNode + 1], index);\n      } // The \"previous\" of the template binding head should point to this host binding\n\n\n      tData[tmplHead + 1] = setTStylingRangePrev(tData[tmplHead + 1], index);\n    } else {\n      tData[index + 1] = toTStylingRange(tmplHead, 0); // 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\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], index);\n      } // if we don't have template, the head points to template-tail, and needs to be advanced.\n\n\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 && assertEqual(tmplHead !== 0 && tmplTail === 0, false, 'Adding template bindings after hostBindings is not allowed.');\n\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], index);\n    }\n\n    tmplTail = index;\n  } // Now we need to update / compute the duplicates.\n  // Starting with our location search towards head (least priority)\n\n\n  if (isKeyDuplicateOfStatic) {\n    tData[index + 1] = setTStylingRangePrevDuplicate(tData[index + 1]);\n  }\n\n  markDuplicates(tData, tStylingKey, index, true, isClassBinding);\n  markDuplicates(tData, tStylingKey, index, false, isClassBinding);\n  markDuplicateOfResidualStyling(tNode, tStylingKey, tData, index, isClassBinding);\n  tBindings = toTStylingRange(tmplHead, tmplTail);\n\n  if (isClassBinding) {\n    tNode.classBindings = tBindings;\n  } else {\n    tNode.styleBindings = tBindings;\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 */\n\n\nfunction markDuplicateOfResidualStyling(tNode, tStylingKey, tData, index, isClassBinding) {\n  var residual = isClassBinding ? tNode.residualClasses : tNode.residualStyles;\n\n  if (residual != null\n  /* or undefined */\n  && typeof tStylingKey == 'string' && keyValueArrayIndexOf(residual, tStylingKey) >= 0) {\n    // We have duplicate in the residual so mark ourselves as duplicate.\n    tData[index + 1] = setTStylingRangeNextDuplicate(tData[index + 1]);\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 */\n\n\nfunction markDuplicates(tData, tStylingKey, index, isPrevDir, isClassBinding) {\n  var tStylingAtIndex = tData[index + 1];\n  var isMap = tStylingKey === null;\n  var cursor = isPrevDir ? getTStylingRangePrev(tStylingAtIndex) : getTStylingRangeNext(tStylingAtIndex);\n  var foundDuplicate = false; // 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\n  while (cursor !== 0 && (foundDuplicate === false || isMap)) {\n    ngDevMode && assertIndexInRange(tData, cursor);\n    var tStylingValueAtCursor = tData[cursor];\n    var tStyleRangeAtCursor = tData[cursor + 1];\n\n    if (isStylingMatch(tStylingValueAtCursor, tStylingKey)) {\n      foundDuplicate = true;\n      tData[cursor + 1] = isPrevDir ? setTStylingRangeNextDuplicate(tStyleRangeAtCursor) : setTStylingRangePrevDuplicate(tStyleRangeAtCursor);\n    }\n\n    cursor = isPrevDir ? getTStylingRangePrev(tStyleRangeAtCursor) : getTStylingRangeNext(tStyleRangeAtCursor);\n  }\n\n  if (foundDuplicate) {\n    // if we found a duplicate, than mark ourselves.\n    tData[index + 1] = isPrevDir ? setTStylingRangePrevDuplicate(tStylingAtIndex) : setTStylingRangeNextDuplicate(tStylingAtIndex);\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 */\n\n\nfunction isStylingMatch(tStylingKeyCursor, tStylingKey) {\n  ngDevMode && assertNotEqual(Array.isArray(tStylingKey), true, 'Expected that \\'tStylingKey\\' has been unwrapped');\n\n  if (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) === 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) >= 0; // see if we are matching the key\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// Global state of the parser. (This makes parser non-reentrant, but that is not an issue)\n\n\nvar parserState = {\n  textEnd: 0,\n  key: 0,\n  keyEnd: 0,\n  value: 0,\n  valueEnd: 0\n};\n/**\n * Retrieves the last parsed `key` of style.\n * @param text the text to substring the key from.\n */\n\nfunction getLastParsedKey(text) {\n  return text.substring(parserState.key, parserState.keyEnd);\n}\n/**\n * Retrieves the last parsed `value` of style.\n * @param text the text to substring the key from.\n */\n\n\nfunction getLastParsedValue(text) {\n  return text.substring(parserState.value, parserState.valueEnd);\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 */\n\n\nfunction parseClassName(text) {\n  resetParserState(text);\n  return parseClassNameNext(text, consumeWhitespace(text, 0, parserState.textEnd));\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 */\n\n\nfunction parseClassNameNext(text, index) {\n  var end = parserState.textEnd;\n\n  if (end === index) {\n    return -1;\n  }\n\n  index = parserState.keyEnd = consumeClassToken(text, parserState.key = index, end);\n  return consumeWhitespace(text, index, end);\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 */\n\n\nfunction parseStyle(text) {\n  resetParserState(text);\n  return parseStyleNext(text, consumeWhitespace(text, 0, parserState.textEnd));\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 */\n\n\nfunction parseStyleNext(text, startIndex) {\n  var end = parserState.textEnd;\n  var index = parserState.key = consumeWhitespace(text, startIndex, end);\n\n  if (end === index) {\n    // we reached an end so just quit\n    return -1;\n  }\n\n  index = parserState.keyEnd = consumeStyleKey(text, index, end);\n  index = consumeSeparator(text, index, end, 58\n  /* COLON */\n  );\n  index = parserState.value = consumeWhitespace(text, index, end);\n  index = parserState.valueEnd = consumeStyleValue(text, index, end);\n  return consumeSeparator(text, index, end, 59\n  /* SEMI_COLON */\n  );\n}\n/**\n * Reset the global state of the styling parser.\n * @param text The styling text to parse.\n */\n\n\nfunction resetParserState(text) {\n  parserState.key = 0;\n  parserState.keyEnd = 0;\n  parserState.value = 0;\n  parserState.valueEnd = 0;\n  parserState.textEnd = text.length;\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 */\n\n\nfunction consumeWhitespace(text, startIndex, endIndex) {\n  while (startIndex < endIndex && text.charCodeAt(startIndex) <= 32\n  /* SPACE */\n  ) {\n    startIndex++;\n  }\n\n  return startIndex;\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 */\n\n\nfunction consumeClassToken(text, startIndex, endIndex) {\n  while (startIndex < endIndex && text.charCodeAt(startIndex) > 32\n  /* SPACE */\n  ) {\n    startIndex++;\n  }\n\n  return startIndex;\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 */\n\n\nfunction consumeStyleKey(text, startIndex, endIndex) {\n  var ch;\n\n  while (startIndex < endIndex && ((ch = text.charCodeAt(startIndex)) === 45\n  /* DASH */\n  || ch === 95\n  /* UNDERSCORE */\n  || (ch & -33\n  /* UPPER_CASE */\n  ) >= 65\n  /* A */\n  && (ch & -33\n  /* UPPER_CASE */\n  ) <= 90\n  /* Z */\n  || ch >= 48\n  /* ZERO */\n  && ch <= 57\n  /* NINE */\n  )) {\n    startIndex++;\n  }\n\n  return startIndex;\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 */\n\n\nfunction consumeSeparator(text, startIndex, endIndex, separator) {\n  startIndex = consumeWhitespace(text, startIndex, endIndex);\n\n  if (startIndex < endIndex) {\n    if (ngDevMode && text.charCodeAt(startIndex) !== separator) {\n      malformedStyleError(text, String.fromCharCode(separator), startIndex);\n    }\n\n    startIndex++;\n  }\n\n  return startIndex;\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 */\n\n\nfunction consumeStyleValue(text, startIndex, endIndex) {\n  var ch1 = -1; // 1st previous character\n\n  var ch2 = -1; // 2nd previous character\n\n  var ch3 = -1; // 3rd previous character\n\n  var i = startIndex;\n  var lastChIndex = i;\n\n  while (i < endIndex) {\n    var ch = text.charCodeAt(i++);\n\n    if (ch === 59\n    /* SEMI_COLON */\n    ) {\n      return lastChIndex;\n    } else if (ch === 34\n    /* DOUBLE_QUOTE */\n    || ch === 39\n    /* SINGLE_QUOTE */\n    ) {\n      lastChIndex = i = consumeQuotedText(text, ch, i, endIndex);\n    } else if (startIndex === i - 4 && // We have seen only 4 characters so far \"URL(\" (Ignore \"foo_URL()\")\n    ch3 === 85\n    /* U */\n    && ch2 === 82\n    /* R */\n    && ch1 === 76\n    /* L */\n    && ch === 40\n    /* OPEN_PAREN */\n    ) {\n      lastChIndex = i = consumeQuotedText(text, 41\n      /* CLOSE_PAREN */\n      , i, endIndex);\n    } else if (ch > 32\n    /* SPACE */\n    ) {\n      // if we have a non-whitespace character then capture its location\n      lastChIndex = i;\n    }\n\n    ch3 = ch2;\n    ch2 = ch1;\n    ch1 = ch & -33\n    /* UPPER_CASE */\n    ;\n  }\n\n  return lastChIndex;\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 */\n\n\nfunction consumeQuotedText(text, quoteCharCode, startIndex, endIndex) {\n  var ch1 = -1; // 1st previous character\n\n  var index = startIndex;\n\n  while (index < endIndex) {\n    var ch = text.charCodeAt(index++);\n\n    if (ch == quoteCharCode && ch1 !== 92\n    /* BACK_SLASH */\n    ) {\n      return index;\n    }\n\n    if (ch == 92\n    /* BACK_SLASH */\n    && ch1 === 92\n    /* BACK_SLASH */\n    ) {\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\n  throw ngDevMode ? malformedStyleError(text, String.fromCharCode(quoteCharCode), endIndex) : new Error();\n}\n\nfunction malformedStyleError(text, expecting, index) {\n  ngDevMode && assertEqual(typeof text === 'string', true, 'String expected here');\n  throw throwError(\"Malformed style at location \".concat(index, \" in string '\") + text.substring(0, index) + '[>>' + text.substring(index, index + 1) + '<<]' + text.substr(index + 1) + \"'. Expecting '\".concat(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\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 */\n\n\nfunction ɵɵstyleProp(prop, value, suffix) {\n  checkStylingProperty(prop, value, suffix, false);\n  return ɵɵstyleProp;\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 */\n\n\nfunction ɵɵclassProp(className, value) {\n  checkStylingProperty(className, value, null, true);\n  return ɵɵclassProp;\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 */\n\n\nfunction ɵɵstyleMap(styles) {\n  checkStylingMap(styleKeyValueArraySet, styleStringParser, styles, false);\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 */\n\n\nfunction styleStringParser(keyValueArray, text) {\n  for (var i = parseStyle(text); i >= 0; i = parseStyleNext(text, i)) {\n    styleKeyValueArraySet(keyValueArray, getLastParsedKey(text), getLastParsedValue(text));\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 */\n\n\nfunction ɵɵclassMap(classes) {\n  checkStylingMap(keyValueArraySet, classStringParser, classes, true);\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 */\n\n\nfunction classStringParser(keyValueArray, text) {\n  for (var i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) {\n    keyValueArraySet(keyValueArray, getLastParsedKey(text), true);\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 */\n\n\nfunction checkStylingProperty(prop, value, suffix, isClassBased) {\n  var lView = getLView();\n  var tView = getTView(); // Styling instructions use 2 slots per binding.\n  // 1. one for the value / TStylingKey\n  // 2. one for the intermittent-value / TStylingRange\n\n  var bindingIndex = incrementBindingIndex(2);\n\n  if (tView.firstUpdatePass) {\n    stylingFirstUpdatePass(tView, prop, bindingIndex, isClassBased);\n  }\n\n  if (value !== NO_CHANGE && bindingUpdated(lView, bindingIndex, value)) {\n    var tNode = tView.data[getSelectedIndex()];\n    updateStyling(tView, tNode, lView, lView[RENDERER], prop, lView[bindingIndex + 1] = normalizeSuffix(value, suffix), isClassBased, bindingIndex);\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 */\n\n\nfunction checkStylingMap(keyValueArraySet, stringParser, value, isClassBased) {\n  var tView = getTView();\n  var bindingIndex = incrementBindingIndex(2);\n\n  if (tView.firstUpdatePass) {\n    stylingFirstUpdatePass(tView, null, bindingIndex, isClassBased);\n  }\n\n  var lView = getLView();\n\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    var tNode = tView.data[getSelectedIndex()];\n\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        var tStylingKey = tView.data[bindingIndex];\n        assertEqual(Array.isArray(tStylingKey) ? tStylingKey[1] : tStylingKey, false, 'Styling linked list shadow input should be marked as \\'false\\'');\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\n\n      var staticPrefix = isClassBased ? tNode.classesWithoutHost : tNode.stylesWithoutHost;\n      ngDevMode && isClassBased === false && staticPrefix !== null && assertEqual(staticPrefix.endsWith(';'), true, 'Expecting static portion to end with \\';\\'');\n\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      } // Given `<div [style] my-dir>` such that `my-dir` has `@Input('style')`.\n      // This takes over the `[style]` binding. (Same for `[class]`)\n\n\n      setDirectiveInputsWhichShadowsStyling(tView, tNode, lView, value, isClassBased);\n    } else {\n      updateStylingMap(tView, tNode, lView, lView[RENDERER], lView[bindingIndex + 1], lView[bindingIndex + 1] = toStylingKeyValueArray(keyValueArraySet, stringParser, value), isClassBased, bindingIndex);\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 */\n\n\nfunction isInHostBindings(tView, bindingIndex) {\n  // All host bindings are placed after the expando section.\n  return bindingIndex >= tView.expandoStartIndex;\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 */\n\n\nfunction stylingFirstUpdatePass(tView, tStylingKey, bindingIndex, isClassBased) {\n  ngDevMode && assertFirstUpdatePass(tView);\n  var tData = tView.data;\n\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    var tNode = tData[getSelectedIndex()];\n    ngDevMode && assertDefined(tNode, 'TNode expected');\n    var isHostBindings = isInHostBindings(tView, bindingIndex);\n\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\n    tStylingKey = wrapInStaticStylingKey(tData, tNode, tStylingKey, isClassBased);\n    insertTStylingBinding(tData, tNode, tStylingKey, bindingIndex, isHostBindings, isClassBased);\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 */\n\n\nfunction wrapInStaticStylingKey(tData, tNode, stylingKey, isClassBased) {\n  var hostDirectiveDef = getCurrentDirectiveDef(tData);\n  var residual = isClassBased ? tNode.residualClasses : tNode.residualStyles;\n\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    var isFirstStylingInstructionInTemplate = (isClassBased ? tNode.classBindings : tNode.styleBindings) === 0;\n\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); // We know that if we have styling binding in template we can't have residual.\n\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    var directiveStylingLast = tNode.directiveStylingLast;\n    var isFirstStylingInstructionInHostBinding = directiveStylingLast === -1 || tData[directiveStylingLast] !== hostDirectiveDef;\n\n    if (isFirstStylingInstructionInHostBinding) {\n      stylingKey = collectStylingFromDirectives(hostDirectiveDef, tData, tNode, stylingKey, isClassBased);\n\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        var templateStylingKey = getTemplateHeadTStylingKey(tData, tNode, isClassBased);\n\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(null, tData, tNode, templateStylingKey[1]\n          /* unwrap previous statics */\n          , isClassBased);\n          templateStylingKey = 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\n  if (residual !== undefined) {\n    isClassBased ? tNode.residualClasses = residual : tNode.residualStyles = residual;\n  }\n\n  return stylingKey;\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 */\n\n\nfunction getTemplateHeadTStylingKey(tData, tNode, isClassBased) {\n  var bindings = isClassBased ? tNode.classBindings : tNode.styleBindings;\n\n  if (getTStylingRangeNext(bindings) === 0) {\n    // There does not seem to be a styling instruction in the `template`.\n    return undefined;\n  }\n\n  return tData[getTStylingRangePrev(bindings)];\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 */\n\n\nfunction setTemplateHeadTStylingKey(tData, tNode, isClassBased, tStylingKey) {\n  var bindings = isClassBased ? tNode.classBindings : tNode.styleBindings;\n  ngDevMode && assertNotEqual(getTStylingRangeNext(bindings), 0, 'Expecting to have at least one template styling binding.');\n  tData[getTStylingRangePrev(bindings)] = tStylingKey;\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 */\n\n\nfunction collectResidual(tData, tNode, isClassBased) {\n  var residual = undefined;\n  var directiveEnd = tNode.directiveEnd;\n  ngDevMode && assertNotEqual(tNode.directiveStylingLast, -1, 'By the time this function gets called at least one hostBindings-node styling instruction must have executed.'); // 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\n  for (var i = 1 + tNode.directiveStylingLast; i < directiveEnd; i++) {\n    var attrs = tData[i].hostAttrs;\n    residual = collectStylingFromTAttrs(residual, attrs, isClassBased);\n  }\n\n  return collectStylingFromTAttrs(residual, tNode.attrs, isClassBased);\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 */\n\n\nfunction collectStylingFromDirectives(hostDirectiveDef, tData, tNode, stylingKey, isClassBased) {\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  var currentDirective = null;\n  var directiveEnd = tNode.directiveEnd;\n  var directiveStylingLast = tNode.directiveStylingLast;\n\n  if (directiveStylingLast === -1) {\n    directiveStylingLast = tNode.directiveStart;\n  } else {\n    directiveStylingLast++;\n  }\n\n  while (directiveStylingLast < directiveEnd) {\n    currentDirective = tData[directiveStylingLast];\n    ngDevMode && assertDefined(currentDirective, 'expected to be defined');\n    stylingKey = collectStylingFromTAttrs(stylingKey, currentDirective.hostAttrs, isClassBased);\n    if (currentDirective === hostDirectiveDef) break;\n    directiveStylingLast++;\n  }\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\n  return stylingKey;\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 */\n\n\nfunction collectStylingFromTAttrs(stylingKey, attrs, isClassBased) {\n  var desiredMarker = isClassBased ? 1\n  /* Classes */\n  : 2\n  /* Styles */\n  ;\n  var currentMarker = -1\n  /* ImplicitAttributes */\n  ;\n\n  if (attrs !== null) {\n    for (var i = 0; i < attrs.length; i++) {\n      var item = attrs[i];\n\n      if (typeof item === 'number') {\n        currentMarker = item;\n      } else {\n        if (currentMarker === desiredMarker) {\n          if (!Array.isArray(stylingKey)) {\n            stylingKey = stylingKey === undefined ? [] : ['', stylingKey];\n          }\n\n          keyValueArraySet(stylingKey, item, isClassBased ? true : attrs[++i]);\n        }\n      }\n    }\n  }\n\n  return stylingKey === undefined ? null : stylingKey;\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 */\n\n\nfunction toStylingKeyValueArray(keyValueArraySet, stringParser, value) {\n  if (value == null\n  /*|| value === undefined */\n  || value === '') return EMPTY_ARRAY;\n  var styleKeyValueArray = [];\n  var unwrappedValue = unwrapSafeValue(value);\n\n  if (Array.isArray(unwrappedValue)) {\n    for (var i = 0; i < unwrappedValue.length; i++) {\n      keyValueArraySet(styleKeyValueArray, unwrappedValue[i], true);\n    }\n  } else if (typeof unwrappedValue === 'object') {\n    for (var 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 && throwError('Unsupported styling type ' + typeof unwrappedValue + ': ' + unwrappedValue);\n  }\n\n  return styleKeyValueArray;\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 */\n\n\nfunction styleKeyValueArraySet(keyValueArray, key, value) {\n  keyValueArraySet(keyValueArray, key, unwrapSafeValue(value));\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 */\n\n\nfunction updateStylingMap(tView, tNode, lView, renderer, oldKeyValueArray, newKeyValueArray, isClassBased, bindingIndex) {\n  if (oldKeyValueArray === NO_CHANGE) {\n    // On first execution the oldKeyValueArray is NO_CHANGE => treat it as empty KeyValueArray.\n    oldKeyValueArray = EMPTY_ARRAY;\n  }\n\n  var oldIndex = 0;\n  var newIndex = 0;\n  var oldKey = 0 < oldKeyValueArray.length ? oldKeyValueArray[0] : null;\n  var newKey = 0 < newKeyValueArray.length ? newKeyValueArray[0] : null;\n\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    var oldValue = oldIndex < oldKeyValueArray.length ? oldKeyValueArray[oldIndex + 1] : undefined;\n    var newValue = newIndex < newKeyValueArray.length ? newKeyValueArray[newIndex + 1] : undefined;\n    var setKey = null;\n    var setValue = undefined;\n\n    if (oldKey === newKey) {\n      // UPDATE: Keys are equal => new value is overwriting old value.\n      oldIndex += 2;\n      newIndex += 2;\n\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\n    if (setKey !== null) {\n      updateStyling(tView, tNode, lView, renderer, setKey, setValue, isClassBased, bindingIndex);\n    }\n\n    oldKey = oldIndex < oldKeyValueArray.length ? oldKeyValueArray[oldIndex] : null;\n    newKey = newIndex < newKeyValueArray.length ? newKeyValueArray[newIndex] : null;\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 */\n\n\nfunction updateStyling(tView, tNode, lView, renderer, prop, value, isClassBased, bindingIndex) {\n  if (!(tNode.type & 3\n  /* AnyRNode */\n  )) {\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\n  var tData = tView.data;\n  var tRange = tData[bindingIndex + 1];\n  var higherPriorityValue = getTStylingRangeNextDuplicate(tRange) ? findStylingValue(tData, tNode, lView, prop, getTStylingRangeNext(tRange), isClassBased) : undefined;\n\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\n    var rNode = getNativeByIndex(getSelectedIndex(), lView);\n    applyStyling(renderer, isClassBased, rNode, prop, value);\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 */\n\n\nfunction findStylingValue(tData, tNode, lView, prop, index, isClassBased) {\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  var isPrevDirection = tNode === null;\n  var value = undefined;\n\n  while (index > 0) {\n    var rawKey = tData[index];\n    var containsStatics = Array.isArray(rawKey); // Unwrap the key if we contain static values.\n\n    var key = containsStatics ? rawKey[1] : rawKey;\n    var isStylingMap = key === null;\n    var valueAtLViewIndex = lView[index + 1];\n\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\n    var currentValue = isStylingMap ? keyValueArrayGet(valueAtLViewIndex, prop) : key === prop ? valueAtLViewIndex : undefined;\n\n    if (containsStatics && !isStylingValuePresent(currentValue)) {\n      currentValue = keyValueArrayGet(rawKey, prop);\n    }\n\n    if (isStylingValuePresent(currentValue)) {\n      value = currentValue;\n\n      if (isPrevDirection) {\n        return value;\n      }\n    }\n\n    var tRange = tData[index + 1];\n    index = isPrevDirection ? getTStylingRangePrev(tRange) : getTStylingRangeNext(tRange);\n  }\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    var residual = isClassBased ? tNode.residualClasses : tNode.residualStyles;\n\n    if (residual != null\n    /** OR residual !=== undefined */\n    ) {\n      value = keyValueArrayGet(residual, prop);\n    }\n  }\n\n  return value;\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 */\n\n\nfunction isStylingValuePresent(value) {\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 * 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 */\n\n\nfunction normalizeSuffix(value, suffix) {\n  if (value == null\n  /** || 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\n  return value;\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 */\n\n\nfunction hasStylingInputShadow(tNode, isClassBased) {\n  return (tNode.flags & (isClassBased ? 16\n  /* hasClassInput */\n  : 32\n  /* hasStyleInput */\n  )) !== 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\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 */\n\n\nfunction ɵɵtext(index) {\n  var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n  var lView = getLView();\n  var tView = getTView();\n  var adjustedIndex = index + HEADER_OFFSET;\n  ngDevMode && assertEqual(getBindingIndex(), tView.bindingStartIndex, 'text nodes should be created before any bindings');\n  ngDevMode && assertIndexInRange(lView, adjustedIndex);\n  var tNode = tView.firstCreatePass ? getOrCreateTNode(tView, adjustedIndex, 1\n  /* Text */\n  , value, null) : tView.data[adjustedIndex];\n  var textNative = lView[adjustedIndex] = createTextNode(lView[RENDERER], value);\n  appendChild(tView, lView, textNative, tNode); // Text nodes are self closing.\n\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 */\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 */\n\n\nfunction ɵɵtextInterpolate(v0) {\n  ɵɵtextInterpolate1('', v0, '');\n  return ɵɵtextInterpolate;\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 */\n\n\nfunction ɵɵtextInterpolate1(prefix, v0, suffix) {\n  var lView = getLView();\n  var interpolated = interpolation1(lView, prefix, v0, suffix);\n\n  if (interpolated !== NO_CHANGE) {\n    textBindingInternal(lView, getSelectedIndex(), interpolated);\n  }\n\n  return ɵɵtextInterpolate1;\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 */\n\n\nfunction ɵɵtextInterpolate2(prefix, v0, i0, v1, suffix) {\n  var lView = getLView();\n  var interpolated = interpolation2(lView, prefix, v0, i0, v1, suffix);\n\n  if (interpolated !== NO_CHANGE) {\n    textBindingInternal(lView, getSelectedIndex(), interpolated);\n  }\n\n  return ɵɵtextInterpolate2;\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 */\n\n\nfunction ɵɵtextInterpolate3(prefix, v0, i0, v1, i1, v2, suffix) {\n  var lView = getLView();\n  var interpolated = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n\n  if (interpolated !== NO_CHANGE) {\n    textBindingInternal(lView, getSelectedIndex(), interpolated);\n  }\n\n  return ɵɵtextInterpolate3;\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 */\n\n\nfunction ɵɵtextInterpolate4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {\n  var lView = getLView();\n  var interpolated = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n\n  if (interpolated !== NO_CHANGE) {\n    textBindingInternal(lView, getSelectedIndex(), interpolated);\n  }\n\n  return ɵɵtextInterpolate4;\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 */\n\n\nfunction ɵɵtextInterpolate5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {\n  var lView = getLView();\n  var interpolated = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n\n  if (interpolated !== NO_CHANGE) {\n    textBindingInternal(lView, getSelectedIndex(), interpolated);\n  }\n\n  return ɵɵtextInterpolate5;\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 */\n\n\nfunction ɵɵtextInterpolate6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {\n  var lView = getLView();\n  var interpolated = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n\n  if (interpolated !== NO_CHANGE) {\n    textBindingInternal(lView, getSelectedIndex(), interpolated);\n  }\n\n  return ɵɵtextInterpolate6;\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 */\n\n\nfunction ɵɵtextInterpolate7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {\n  var lView = getLView();\n  var interpolated = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n\n  if (interpolated !== NO_CHANGE) {\n    textBindingInternal(lView, getSelectedIndex(), interpolated);\n  }\n\n  return ɵɵtextInterpolate7;\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 */\n\n\nfunction ɵɵtextInterpolate8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {\n  var lView = getLView();\n  var interpolated = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n\n  if (interpolated !== NO_CHANGE) {\n    textBindingInternal(lView, getSelectedIndex(), interpolated);\n  }\n\n  return ɵɵtextInterpolate8;\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 */\n\n\nfunction ɵɵtextInterpolateV(values) {\n  var lView = getLView();\n  var interpolated = interpolationV(lView, values);\n\n  if (interpolated !== NO_CHANGE) {\n    textBindingInternal(lView, getSelectedIndex(), interpolated);\n  }\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\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 */\n\n\nfunction ɵɵclassMapInterpolate1(prefix, v0, suffix) {\n  var lView = getLView();\n  var interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n  checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\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 */\n\n\nfunction ɵɵclassMapInterpolate2(prefix, v0, i0, v1, suffix) {\n  var lView = getLView();\n  var interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n  checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\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 */\n\n\nfunction ɵɵclassMapInterpolate3(prefix, v0, i0, v1, i1, v2, suffix) {\n  var lView = getLView();\n  var interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n  checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\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 */\n\n\nfunction ɵɵclassMapInterpolate4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {\n  var lView = getLView();\n  var interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n  checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\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 */\n\n\nfunction ɵɵclassMapInterpolate5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {\n  var lView = getLView();\n  var interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n  checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\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 */\n\n\nfunction ɵɵclassMapInterpolate6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {\n  var lView = getLView();\n  var interpolatedValue = 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 * 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 */\n\n\nfunction ɵɵclassMapInterpolate7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {\n  var lView = getLView();\n  var interpolatedValue = 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 * 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 */\n\n\nfunction ɵɵclassMapInterpolate8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {\n  var lView = getLView();\n  var interpolatedValue = interpolation8(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 * 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 */\n\n\nfunction ɵɵclassMapInterpolateV(values) {\n  var lView = getLView();\n  var 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\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 */\n\n\nfunction ɵɵstyleMapInterpolate1(prefix, v0, suffix) {\n  var lView = getLView();\n  var interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n  ɵɵstyleMap(interpolatedValue);\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 */\n\n\nfunction ɵɵstyleMapInterpolate2(prefix, v0, i0, v1, suffix) {\n  var lView = getLView();\n  var interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n  ɵɵstyleMap(interpolatedValue);\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 */\n\n\nfunction ɵɵstyleMapInterpolate3(prefix, v0, i0, v1, i1, v2, suffix) {\n  var lView = getLView();\n  var interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n  ɵɵstyleMap(interpolatedValue);\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 */\n\n\nfunction ɵɵstyleMapInterpolate4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {\n  var lView = getLView();\n  var interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n  ɵɵstyleMap(interpolatedValue);\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 */\n\n\nfunction ɵɵstyleMapInterpolate5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {\n  var lView = getLView();\n  var interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n  ɵɵstyleMap(interpolatedValue);\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 */\n\n\nfunction ɵɵstyleMapInterpolate6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {\n  var lView = getLView();\n  var interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n  ɵɵstyleMap(interpolatedValue);\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 */\n\n\nfunction ɵɵstyleMapInterpolate7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {\n  var lView = getLView();\n  var interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n  ɵɵstyleMap(interpolatedValue);\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 */\n\n\nfunction ɵɵstyleMapInterpolate8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {\n  var lView = getLView();\n  var interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n  ɵɵstyleMap(interpolatedValue);\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 */\n\n\nfunction ɵɵstyleMapInterpolateV(values) {\n  var lView = getLView();\n  var 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\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 */\n\n\nfunction ɵɵstylePropInterpolate1(prop, prefix, v0, suffix, valueSuffix) {\n  var lView = getLView();\n  var interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n  checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n  return ɵɵstylePropInterpolate1;\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 */\n\n\nfunction ɵɵstylePropInterpolate2(prop, prefix, v0, i0, v1, suffix, valueSuffix) {\n  var lView = getLView();\n  var interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n  checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n  return ɵɵstylePropInterpolate2;\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 */\n\n\nfunction ɵɵstylePropInterpolate3(prop, prefix, v0, i0, v1, i1, v2, suffix, valueSuffix) {\n  var lView = getLView();\n  var interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n  checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n  return ɵɵstylePropInterpolate3;\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 */\n\n\nfunction ɵɵstylePropInterpolate4(prop, prefix, v0, i0, v1, i1, v2, i2, v3, suffix, valueSuffix) {\n  var lView = getLView();\n  var 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 * 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 */\n\n\nfunction ɵɵstylePropInterpolate5(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix, valueSuffix) {\n  var lView = getLView();\n  var interpolatedValue = 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 * 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 */\n\n\nfunction ɵɵstylePropInterpolate6(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix, valueSuffix) {\n  var lView = getLView();\n  var interpolatedValue = 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 * 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 */\n\n\nfunction ɵɵstylePropInterpolate7(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix, valueSuffix) {\n  var lView = getLView();\n  var interpolatedValue = 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 * 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 */\n\n\nfunction ɵɵstylePropInterpolate8(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix, valueSuffix) {\n  var lView = getLView();\n  var interpolatedValue = interpolation8(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 * 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 */\n\n\nfunction ɵɵstylePropInterpolateV(prop, values, valueSuffix) {\n  var lView = getLView();\n  var 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 */\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 */\n\n\nfunction ɵɵhostProperty(propName, value, sanitizer) {\n  var lView = getLView();\n  var bindingIndex = nextBindingIndex();\n\n  if (bindingUpdated(lView, bindingIndex, value)) {\n    var tView = getTView();\n    var tNode = getSelectedTNode();\n    elementPropertyInternal(tView, tNode, lView, propName, value, lView[RENDERER], sanitizer, true);\n    ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);\n  }\n\n  return ɵɵhostProperty;\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 */\n\n\nfunction ɵɵsyntheticHostProperty(propName, value, sanitizer) {\n  var lView = getLView();\n  var bindingIndex = nextBindingIndex();\n\n  if (bindingUpdated(lView, bindingIndex, value)) {\n    var tView = getTView();\n    var tNode = getSelectedTNode();\n    var currentDef = getCurrentDirectiveDef(tView.data);\n    var 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\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\n/**\n * NOTE: changes to the `ngI18nClosureMode` name must be synced with `compiler-cli/src/tooling.ts`.\n */\n\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\n  /*@__PURE__*/\n  (function () {\n    // tslint:disable-next-line:no-toplevel-property-access\n    _global['ngI18nClosureMode'] = // 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// THIS CODE IS GENERATED - DO NOT MODIFY.\n\n\nvar u = undefined;\n\nfunction plural(n) {\n  var i = Math.floor(Math.abs(n)),\n      v = n.toString().replace(/^[^.]*\\.?/, '').length;\n  if (i === 1 && v === 0) return 1;\n  return 5;\n}\n\nvar localeEn = [\"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 */\n\n/**\n * This const is used to store the locale data registered with `registerLocaleData`\n */\n\nvar LOCALE_DATA = {};\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 */\n\nfunction registerLocaleData(data, localeId, extraData) {\n  if (typeof localeId !== 'string') {\n    extraData = localeId;\n    localeId = data[LocaleDataIndex.LocaleId];\n  }\n\n  localeId = localeId.toLowerCase().replace(/_/g, '-');\n  LOCALE_DATA[localeId] = data;\n\n  if (extraData) {\n    LOCALE_DATA[localeId][LocaleDataIndex.ExtraData] = extraData;\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 */\n\n\nfunction findLocaleData(locale) {\n  var normalizedLocale = normalizeLocale(locale);\n  var match = getLocaleData(normalizedLocale);\n\n  if (match) {\n    return match;\n  } // let's try to find a parent locale\n\n\n  var parentLocale = normalizedLocale.split('-')[0];\n  match = getLocaleData(parentLocale);\n\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 \\\"\".concat(locale, \"\\\".\"));\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 */\n\n\nfunction getLocaleCurrencyCode(locale) {\n  var data = findLocaleData(locale);\n  return data[LocaleDataIndex.CurrencyCode] || null;\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 */\n\n\nfunction getLocalePluralCase(locale) {\n  var data = findLocaleData(locale);\n  return data[LocaleDataIndex.PluralCase];\n}\n/**\n * Helper function to get the given `normalizedLocale` from `LOCALE_DATA`\n * or from the global `ng.common.locale`.\n */\n\n\nfunction getLocaleData(normalizedLocale) {\n  if (!(normalizedLocale in LOCALE_DATA)) {\n    LOCALE_DATA[normalizedLocale] = _global.ng && _global.ng.common && _global.ng.common.locales && _global.ng.common.locales[normalizedLocale];\n  }\n\n  return LOCALE_DATA[normalizedLocale];\n}\n/**\n * Helper function to remove all the locale data from `LOCALE_DATA`.\n */\n\n\nfunction unregisterAllLocaleData() {\n  LOCALE_DATA = {};\n}\n/**\n * Index of each type of locale data from the locale data array\n */\n\n\nvar LocaleDataIndex = /*@__PURE__*/function (LocaleDataIndex) {\n  LocaleDataIndex[LocaleDataIndex[\"LocaleId\"] = 0] = \"LocaleId\";\n  LocaleDataIndex[LocaleDataIndex[\"DayPeriodsFormat\"] = 1] = \"DayPeriodsFormat\";\n  LocaleDataIndex[LocaleDataIndex[\"DayPeriodsStandalone\"] = 2] = \"DayPeriodsStandalone\";\n  LocaleDataIndex[LocaleDataIndex[\"DaysFormat\"] = 3] = \"DaysFormat\";\n  LocaleDataIndex[LocaleDataIndex[\"DaysStandalone\"] = 4] = \"DaysStandalone\";\n  LocaleDataIndex[LocaleDataIndex[\"MonthsFormat\"] = 5] = \"MonthsFormat\";\n  LocaleDataIndex[LocaleDataIndex[\"MonthsStandalone\"] = 6] = \"MonthsStandalone\";\n  LocaleDataIndex[LocaleDataIndex[\"Eras\"] = 7] = \"Eras\";\n  LocaleDataIndex[LocaleDataIndex[\"FirstDayOfWeek\"] = 8] = \"FirstDayOfWeek\";\n  LocaleDataIndex[LocaleDataIndex[\"WeekendRange\"] = 9] = \"WeekendRange\";\n  LocaleDataIndex[LocaleDataIndex[\"DateFormat\"] = 10] = \"DateFormat\";\n  LocaleDataIndex[LocaleDataIndex[\"TimeFormat\"] = 11] = \"TimeFormat\";\n  LocaleDataIndex[LocaleDataIndex[\"DateTimeFormat\"] = 12] = \"DateTimeFormat\";\n  LocaleDataIndex[LocaleDataIndex[\"NumberSymbols\"] = 13] = \"NumberSymbols\";\n  LocaleDataIndex[LocaleDataIndex[\"NumberFormats\"] = 14] = \"NumberFormats\";\n  LocaleDataIndex[LocaleDataIndex[\"CurrencyCode\"] = 15] = \"CurrencyCode\";\n  LocaleDataIndex[LocaleDataIndex[\"CurrencySymbol\"] = 16] = \"CurrencySymbol\";\n  LocaleDataIndex[LocaleDataIndex[\"CurrencyName\"] = 17] = \"CurrencyName\";\n  LocaleDataIndex[LocaleDataIndex[\"Currencies\"] = 18] = \"Currencies\";\n  LocaleDataIndex[LocaleDataIndex[\"Directionality\"] = 19] = \"Directionality\";\n  LocaleDataIndex[LocaleDataIndex[\"PluralCase\"] = 20] = \"PluralCase\";\n  LocaleDataIndex[LocaleDataIndex[\"ExtraData\"] = 21] = \"ExtraData\";\n  return LocaleDataIndex;\n}({});\n/**\n * Returns the canonical form of a locale name - lowercase with `_` replaced with `-`.\n */\n\n\nfunction normalizeLocale(locale) {\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\n\nvar pluralMapping = ['zero', 'one', 'two', 'few', 'many'];\n/**\n * Returns the plural case based on the locale\n */\n\nfunction getPluralCase(value, locale) {\n  var plural = getLocalePluralCase(locale)(parseInt(value, 10));\n  var result = pluralMapping[plural];\n  return result !== undefined ? result : 'other';\n}\n/**\n * The locale id that the application is using by default (for translations and ICU expressions).\n */\n\n\nvar DEFAULT_LOCALE_ID = 'en-US';\n/**\n * USD currency code that the application uses by default for CurrencyPipe when no\n * DEFAULT_CURRENCY_CODE is provided.\n */\n\nvar 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\n/**\n * Marks that the next string is an element name.\n *\n * See `I18nMutateOpCodes` documentation.\n */\n\nvar ELEMENT_MARKER = {\n  marker: 'element'\n};\n/**\n * Marks that the next string is comment text need for ICU.\n *\n * See `I18nMutateOpCodes` documentation.\n */\n\nvar ICU_MARKER = {\n  marker: 'ICU'\n};\n/**\n * See `I18nCreateOpCodes`\n */\n\nvar I18nCreateOpCode = /*@__PURE__*/function (I18nCreateOpCode) {\n  /**\n   * Number of bits to shift index so that it can be combined with the `APPEND_EAGERLY` and\n   * `COMMENT`.\n   */\n  I18nCreateOpCode[I18nCreateOpCode[\"SHIFT\"] = 2] = \"SHIFT\";\n  /**\n   * Should the node be appended to parent imedditatly after creation.\n   */\n\n  I18nCreateOpCode[I18nCreateOpCode[\"APPEND_EAGERLY\"] = 1] = \"APPEND_EAGERLY\";\n  /**\n   * If set the node should be comment (rather than a text) node.\n   */\n\n  I18nCreateOpCode[I18nCreateOpCode[\"COMMENT\"] = 2] = \"COMMENT\";\n  return I18nCreateOpCode;\n}({}); // Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\n\n\nvar unusedValueExportToPlacateAjd$6 = 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/**\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 */\n\nvar LOCALE_ID = DEFAULT_LOCALE_ID;\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 */\n\nfunction setLocaleId(localeId) {\n  assertDefined(localeId, \"Expected localeId to be defined\");\n\n  if (typeof localeId === 'string') {\n    LOCALE_ID = localeId.toLowerCase().replace(/_/g, '-');\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 */\n\n\nfunction getLocaleId() {\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\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 */\n\n\nfunction getInsertInFrontOfRNodeWithI18n(parentTNode, currentTNode, lView) {\n  var tNodeInsertBeforeIndex = currentTNode.insertBeforeIndex;\n  var insertBeforeIndex = Array.isArray(tNodeInsertBeforeIndex) ? tNodeInsertBeforeIndex[0] : tNodeInsertBeforeIndex;\n\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 * Process `TNode.insertBeforeIndex` by adding i18n text nodes.\n *\n * See `TNode.insertBeforeIndex`\n */\n\n\nfunction processI18nInsertBefore(renderer, childTNode, lView, childRNode, parentRElement) {\n  var tNodeInsertBeforeIndex = childTNode.insertBeforeIndex;\n\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    var i18nParent = childRNode;\n    var anchorRNode = null;\n\n    if (!(childTNode.type & 3\n    /* AnyRNode */\n    )) {\n      anchorRNode = i18nParent;\n      i18nParent = parentRElement;\n    }\n\n    if (i18nParent !== null && (childTNode.flags & 2\n    /* isComponentHost */\n    ) === 0) {\n      for (var 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        var 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\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 */\n\n\nfunction addTNodeAndUpdateInsertBeforeIndex(previousTNodes, newTNode) {\n  // Start with Rule1\n  ngDevMode && assertEqual(newTNode.insertBeforeIndex, null, 'We expect that insertBeforeIndex is not set');\n  previousTNodes.push(newTNode);\n\n  if (previousTNodes.length > 1) {\n    for (var i = previousTNodes.length - 2; i >= 0; i--) {\n      var existingTNode = previousTNodes[i]; // Text nodes are created eagerly and so they don't need their `indexBeforeIndex` updated.\n      // It is safe to ignore them.\n\n      if (!isI18nText(existingTNode)) {\n        if (isNewTNodeCreatedBefore(existingTNode, newTNode) && 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) {\n  return !(tNode.type & 64\n  /* Placeholder */\n  );\n}\n\nfunction isNewTNodeCreatedBefore(existingTNode, newTNode) {\n  return isI18nText(newTNode) || existingTNode.index > newTNode.index;\n}\n\nfunction getInsertBeforeIndex(tNode) {\n  var index = tNode.insertBeforeIndex;\n  return Array.isArray(index) ? index[0] : index;\n}\n\nfunction setInsertBeforeIndex(tNode, value) {\n  var index = tNode.insertBeforeIndex;\n\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\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 */\n\n\nfunction getTIcu(tView, index) {\n  var value = tView.data[index];\n  if (value === null || typeof value === 'string') return null;\n\n  if (ngDevMode && !(value.hasOwnProperty('tViews') || value.hasOwnProperty('currentCaseLViewIndex'))) {\n    throwError('We expect to get \\'null\\'|\\'TIcu\\'|\\'TIcuContainer\\', but got: ' + value);\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\n\n  var tIcu = value.hasOwnProperty('currentCaseLViewIndex') ? value : value.value;\n  ngDevMode && assertTIcu(tIcu);\n  return tIcu;\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 */\n\n\nfunction setTIcu(tView, index, tIcu) {\n  var tNode = tView.data[index];\n  ngDevMode && assertEqual(tNode === null || tNode.hasOwnProperty('tViews'), true, 'We expect to get \\'null\\'|\\'TIcuContainer\\'');\n\n  if (tNode === null) {\n    tView.data[index] = tIcu;\n  } else {\n    ngDevMode && assertTNodeType(tNode, 32\n    /* Icu */\n    );\n    tNode.value = tIcu;\n  }\n}\n/**\n * Set `TNode.insertBeforeIndex` taking the `Array` into account.\n *\n * See `TNode.insertBeforeIndex`\n */\n\n\nfunction setTNodeInsertBeforeIndex(tNode, index) {\n  ngDevMode && assertTNode(tNode);\n  var insertBeforeIndex = tNode.insertBeforeIndex;\n\n  if (insertBeforeIndex === null) {\n    setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore);\n    insertBeforeIndex = tNode.insertBeforeIndex = [null\n    /* may be updated to number later */\n    , index];\n  } else {\n    assertEqual(Array.isArray(insertBeforeIndex), true, 'Expecting array here');\n    insertBeforeIndex.push(index);\n  }\n}\n/**\n * Create `TNode.type=TNodeType.Placeholder` node.\n *\n * See `TNodeType.Placeholder` for more information.\n */\n\n\nfunction createTNodePlaceholder(tView, previousTNodes, index) {\n  var tNode = createTNodeAtIndex(tView, index, 64\n  /* Placeholder */\n  , null, null);\n  addTNodeAndUpdateInsertBeforeIndex(previousTNodes, tNode);\n  return tNode;\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 */\n\n\nfunction getCurrentICUCaseIndex(tIcu, lView) {\n  var currentCase = lView[tIcu.currentCaseLViewIndex];\n  return currentCase === null ? currentCase : currentCase < 0 ? ~currentCase : currentCase;\n}\n\nfunction getParentFromIcuCreateOpCode(mergedCode) {\n  return mergedCode >>> 17\n  /* SHIFT_PARENT */\n  ;\n}\n\nfunction getRefFromIcuCreateOpCode(mergedCode) {\n  return (mergedCode & 131070\n  /* MASK_REF */\n  ) >>> 1\n  /* SHIFT_REF */\n  ;\n}\n\nfunction getInstructionFromIcuCreateOpCode(mergedCode) {\n  return mergedCode & 1\n  /* MASK_INSTRUCTION */\n  ;\n}\n\nfunction icuCreateOpCode(opCode, parentIdx, refIdx) {\n  ngDevMode && assertGreaterThanOrEqual(parentIdx, 0, 'Missing parent index');\n  ngDevMode && assertGreaterThan(refIdx, 0, 'Missing ref index');\n  return opCode | parentIdx << 17\n  /* SHIFT_PARENT */\n  | refIdx << 1\n  /* SHIFT_REF */\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 * 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 */\n\n\nvar changeMask = 0;\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 */\n\nvar changeMaskCounter = 0;\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 */\n\nfunction setMaskBit(hasChange) {\n  if (hasChange) {\n    changeMask = changeMask | 1 << Math.min(changeMaskCounter, 31);\n  }\n\n  changeMaskCounter++;\n}\n\nfunction applyI18n(tView, lView, index) {\n  if (changeMaskCounter > 0) {\n    ngDevMode && assertDefined(tView, \"tView should be defined\");\n    var tI18n = tView.data[index]; // When `index` points to an `ɵɵi18nAttributes` then we have an array otherwise `TI18n`\n\n    var updateOpCodes = Array.isArray(tI18n) ? tI18n : tI18n.update;\n    var bindingsStartIndex = getBindingIndex() - changeMaskCounter - 1;\n    applyUpdateOpCodes(tView, lView, updateOpCodes, bindingsStartIndex, changeMask);\n  } // Reset changeMask & maskBit to default for the next update cycle\n\n\n  changeMask = 0;\n  changeMaskCounter = 0;\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 */\n\n\nfunction applyCreateOpCodes(lView, createOpCodes, parentRNode, insertInFrontOf) {\n  var renderer = lView[RENDERER];\n\n  for (var i = 0; i < createOpCodes.length; i++) {\n    var opCode = createOpCodes[i++];\n    var text = createOpCodes[i];\n    var isComment = (opCode & I18nCreateOpCode.COMMENT) === I18nCreateOpCode.COMMENT;\n    var appendNow = (opCode & I18nCreateOpCode.APPEND_EAGERLY) === I18nCreateOpCode.APPEND_EAGERLY;\n    var index = opCode >>> I18nCreateOpCode.SHIFT;\n    var rNode = lView[index];\n\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] = isComment ? renderer.createComment(text) : createTextNode(renderer, text);\n    }\n\n    if (appendNow && parentRNode !== null) {\n      nativeInsertBefore(renderer, parentRNode, rNode, insertInFrontOf, false);\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 */\n\n\nfunction applyMutableOpCodes(tView, mutableOpCodes, lView, anchorRNode) {\n  ngDevMode && assertDomNode(anchorRNode);\n  var renderer = lView[RENDERER]; // `rootIdx` represents the node into which all inserts happen.\n\n  var rootIdx = null; // `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\n  var rootRNode;\n\n  for (var i = 0; i < mutableOpCodes.length; i++) {\n    var opCode = mutableOpCodes[i];\n\n    if (typeof opCode == 'string') {\n      var textNodeIndex = mutableOpCodes[++i];\n\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 & 1\n      /* MASK_INSTRUCTION */\n      ) {\n        case 0\n        /* AppendChild */\n        :\n          var parentIdx = getParentFromIcuCreateOpCode(opCode);\n\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\n          var insertInFrontOf = void 0;\n          var parentRNode = void 0;\n\n          if (parentIdx === rootIdx) {\n            insertInFrontOf = anchorRNode;\n            parentRNode = rootRNode;\n          } else {\n            insertInFrontOf = null;\n            parentRNode = unwrapRNode(lView[parentIdx]);\n          } // FIXME(misko): Refactor with `processI18nText`\n\n\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            var refIdx = getRefFromIcuCreateOpCode(opCode);\n            ngDevMode && assertGreaterThan(refIdx, HEADER_OFFSET, 'Missing ref'); // `unwrapRNode` is not needed here as all of these point to RNodes as part of the i18n\n            // which can't have components.\n\n            var child = lView[refIdx];\n            ngDevMode && assertDomNode(child);\n            nativeInsertBefore(renderer, parentRNode, child, insertInFrontOf, false);\n            var tIcu = getTIcu(tView, refIdx);\n\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              var caseIndex = getCurrentICUCaseIndex(tIcu, lView);\n\n              if (caseIndex !== null) {\n                applyMutableOpCodes(tView, tIcu.create[caseIndex], lView, lView[tIcu.anchorIdx]);\n              }\n            }\n          }\n\n          break;\n\n        case 1\n        /* Attr */\n        :\n          var elementNodeIndex = opCode >>> 1\n          /* SHIFT_REF */\n          ;\n          var attrName = mutableOpCodes[++i];\n          var attrValue = mutableOpCodes[++i]; // 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\n          setElementAttribute(renderer, getNativeByIndex(elementNodeIndex, lView), null, null, attrName, attrValue, null);\n          break;\n\n        default:\n          throw new Error(\"Unable to determine the type of mutate operation for \\\"\".concat(opCode, \"\\\"\"));\n      }\n    } else {\n      switch (opCode) {\n        case ICU_MARKER:\n          var commentValue = mutableOpCodes[++i];\n          var commentNodeIndex = mutableOpCodes[++i];\n\n          if (lView[commentNodeIndex] === null) {\n            ngDevMode && assertEqual(typeof commentValue, 'string', \"Expected \\\"\".concat(commentValue, \"\\\" to be a comment node value\"));\n            ngDevMode && ngDevMode.rendererCreateComment++;\n            ngDevMode && assertIndexInExpandoRange(lView, commentNodeIndex);\n            var commentRNode = lView[commentNodeIndex] = createCommentNode(renderer, commentValue); // FIXME(misko): Attaching patch data is only needed for the root (Also add tests)\n\n            attachPatchData(commentRNode, lView);\n          }\n\n          break;\n\n        case ELEMENT_MARKER:\n          var tagName = mutableOpCodes[++i];\n          var _elementNodeIndex = mutableOpCodes[++i];\n\n          if (lView[_elementNodeIndex] === null) {\n            ngDevMode && assertEqual(typeof tagName, 'string', \"Expected \\\"\".concat(tagName, \"\\\" to be an element node tag name\"));\n            ngDevMode && ngDevMode.rendererCreateElement++;\n            ngDevMode && assertIndexInExpandoRange(lView, _elementNodeIndex);\n            var elementRNode = lView[_elementNodeIndex] = createElementNode(renderer, tagName, null); // FIXME(misko): Attaching patch data is only needed for the root (Also add tests)\n\n            attachPatchData(elementRNode, lView);\n          }\n\n          break;\n\n        default:\n          ngDevMode && throwError(\"Unable to determine the type of mutate operation for \\\"\".concat(opCode, \"\\\"\"));\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 */\n\n\nfunction applyUpdateOpCodes(tView, lView, updateOpCodes, bindingsStartIndex, changeMask) {\n  for (var i = 0; i < updateOpCodes.length; i++) {\n    // bit code to check if we should apply the next update\n    var checkBit = updateOpCodes[i]; // Number of opCodes to skip until next set of update codes\n\n    var skipCodes = updateOpCodes[++i];\n\n    if (checkBit & changeMask) {\n      // The value has been updated since last checked\n      var value = '';\n\n      for (var j = i + 1; j <= i + skipCodes; j++) {\n        var opCode = updateOpCodes[j];\n\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            var nodeIndex = opCode >>> 2\n            /* SHIFT_REF */\n            ;\n\n            switch (opCode & 3\n            /* MASK_OPCODE */\n            ) {\n              case 1\n              /* Attr */\n              :\n                var propName = updateOpCodes[++j];\n                var sanitizeFn = updateOpCodes[++j];\n                var tNodeOrTagName = tView.data[nodeIndex];\n                ngDevMode && assertDefined(tNodeOrTagName, 'Experting TNode or string');\n\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(lView[RENDERER], lView[nodeIndex], null, tNodeOrTagName, propName, value, sanitizeFn);\n                } else {\n                  elementPropertyInternal(tView, tNodeOrTagName, lView, propName, value, lView[RENDERER], sanitizeFn, false);\n                }\n\n                break;\n\n              case 0\n              /* Text */\n              :\n                var rText = lView[nodeIndex];\n                rText !== null && updateTextNode(lView[RENDERER], rText, value);\n                break;\n\n              case 2\n              /* IcuSwitch */\n              :\n                applyIcuSwitchCase(tView, getTIcu(tView, nodeIndex), lView, value);\n                break;\n\n              case 3\n              /* IcuUpdate */\n              :\n                applyIcuUpdateCase(tView, getTIcu(tView, nodeIndex), bindingsStartIndex, lView);\n                break;\n            }\n          }\n        }\n      }\n    } else {\n      var _opCode = updateOpCodes[i + 1];\n\n      if (_opCode > 0 && (_opCode & 3\n      /* MASK_OPCODE */\n      ) === 3\n      /* IcuUpdate */\n      ) {\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        var _nodeIndex = _opCode >>> 2\n        /* SHIFT_REF */\n        ;\n\n        var tIcu = getTIcu(tView, _nodeIndex);\n        var currentIndex = lView[tIcu.currentCaseLViewIndex];\n\n        if (currentIndex < 0) {\n          applyIcuUpdateCase(tView, tIcu, bindingsStartIndex, lView);\n        }\n      }\n    }\n\n    i += skipCodes;\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 */\n\n\nfunction applyIcuUpdateCase(tView, tIcu, bindingsStartIndex, lView) {\n  ngDevMode && assertIndexInRange(lView, tIcu.currentCaseLViewIndex);\n  var activeCaseIndex = lView[tIcu.currentCaseLViewIndex];\n\n  if (activeCaseIndex !== null) {\n    var mask = changeMask;\n\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; // -1 is same as all bits on, which simulates creation since it marks all bits dirty\n\n      mask = -1;\n    }\n\n    applyUpdateOpCodes(tView, lView, tIcu.update[activeCaseIndex], bindingsStartIndex, mask);\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 */\n\n\nfunction applyIcuSwitchCase(tView, tIcu, lView, value) {\n  // Rebuild a new case for this ICU\n  var caseIndex = getCaseIndex(tIcu, value);\n  var activeCaseIndex = getCurrentICUCaseIndex(tIcu, lView);\n\n  if (activeCaseIndex !== caseIndex) {\n    applyIcuSwitchCaseRemove(tView, tIcu, lView);\n    lView[tIcu.currentCaseLViewIndex] = caseIndex === null ? null : ~caseIndex;\n\n    if (caseIndex !== null) {\n      // Add the nodes for the new case\n      var anchorRNode = lView[tIcu.anchorIdx];\n\n      if (anchorRNode) {\n        ngDevMode && assertDomNode(anchorRNode);\n        applyMutableOpCodes(tView, tIcu.create[caseIndex], lView, anchorRNode);\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 */\n\n\nfunction applyIcuSwitchCaseRemove(tView, tIcu, lView) {\n  var activeCaseIndex = getCurrentICUCaseIndex(tIcu, lView);\n\n  if (activeCaseIndex !== null) {\n    var removeCodes = tIcu.remove[activeCaseIndex];\n\n    for (var i = 0; i < removeCodes.length; i++) {\n      var nodeOrIcuIndex = removeCodes[i];\n\n      if (nodeOrIcuIndex > 0) {\n        // Positive numbers are `RNode`s.\n        var 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 * 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 */\n\n\nfunction getCaseIndex(icuExpression, bindingValue) {\n  var index = icuExpression.cases.indexOf(bindingValue);\n\n  if (index === -1) {\n    switch (icuExpression.type) {\n      case 1\n      /* plural */\n      :\n        {\n          var resolvedCase = getPluralCase(bindingValue, getLocaleId());\n          index = icuExpression.cases.indexOf(resolvedCase);\n\n          if (index === -1 && resolvedCase !== 'other') {\n            index = icuExpression.cases.indexOf('other');\n          }\n\n          break;\n        }\n\n      case 0\n      /* select */\n      :\n        {\n          index = icuExpression.cases.indexOf('other');\n          break;\n        }\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\n\nfunction loadIcuContainerVisitor() {\n  var _stack = [];\n\n  var _index = -1;\n\n  var _lView;\n\n  var _removes;\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\n\n  function icuContainerIteratorStart(tIcuContainerNode, lView) {\n    _lView = lView;\n\n    while (_stack.length) {\n      _stack.pop();\n    }\n\n    ngDevMode && assertTNodeForLView(tIcuContainerNode, lView);\n    enterIcu(tIcuContainerNode.value, lView);\n    return icuContainerIteratorNext;\n  }\n\n  function enterIcu(tIcu, lView) {\n    _index = 0;\n    var currentCase = getCurrentICUCaseIndex(tIcu, lView);\n\n    if (currentCase !== null) {\n      ngDevMode && assertNumberInRange(currentCase, 0, tIcu.cases.length - 1);\n      _removes = tIcu.remove[currentCase];\n    } else {\n      _removes = EMPTY_ARRAY;\n    }\n  }\n\n  function icuContainerIteratorNext() {\n    if (_index < _removes.length) {\n      var removeOpCode = _removes[_index++];\n      ngDevMode && assertNumber(removeOpCode, 'Expecting OpCode number');\n\n      if (removeOpCode > 0) {\n        var rNode = _lView[removeOpCode];\n        ngDevMode && assertDomNode(rNode);\n        return rNode;\n      } else {\n        _stack.push(_index, _removes); // ICUs are represented by negative indices\n\n\n        var tIcuIndex = ~removeOpCode;\n        var tIcu = _lView[TVIEW].data[tIcuIndex];\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\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 */\n\n\nfunction i18nCreateOpCodesToString(opcodes) {\n  var createOpCodes = opcodes || (Array.isArray(this) ? this : []);\n  var lines = [];\n\n  for (var i = 0; i < createOpCodes.length; i++) {\n    var opCode = createOpCodes[i++];\n    var text = createOpCodes[i];\n    var isComment = (opCode & I18nCreateOpCode.COMMENT) === I18nCreateOpCode.COMMENT;\n    var appendNow = (opCode & I18nCreateOpCode.APPEND_EAGERLY) === I18nCreateOpCode.APPEND_EAGERLY;\n    var index = opCode >>> I18nCreateOpCode.SHIFT;\n    lines.push(\"lView[\".concat(index, \"] = document.\").concat(isComment ? 'createComment' : 'createText', \"(\").concat(JSON.stringify(text), \");\"));\n\n    if (appendNow) {\n      lines.push(\"parent.appendChild(lView[\".concat(index, \"]);\"));\n    }\n  }\n\n  return lines;\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 */\n\n\nfunction i18nUpdateOpCodesToString(opcodes) {\n  var parser = new OpCodeParser(opcodes || (Array.isArray(this) ? this : []));\n  var lines = [];\n\n  function consumeOpCode(value) {\n    var ref = value >>> 2\n    /* SHIFT_REF */\n    ;\n    var opCode = value & 3\n    /* MASK_OPCODE */\n    ;\n\n    switch (opCode) {\n      case 0\n      /* Text */\n      :\n        return \"(lView[\".concat(ref, \"] as Text).textContent = $$$\");\n\n      case 1\n      /* Attr */\n      :\n        var attrName = parser.consumeString();\n        var sanitizationFn = parser.consumeFunction();\n\n        var _value = sanitizationFn ? \"(\".concat(sanitizationFn, \")($$$)\") : '$$$';\n\n        return \"(lView[\".concat(ref, \"] as Element).setAttribute('\").concat(attrName, \"', \").concat(_value, \")\");\n\n      case 2\n      /* IcuSwitch */\n      :\n        return \"icuSwitchCase(\".concat(ref, \", $$$)\");\n\n      case 3\n      /* IcuUpdate */\n      :\n        return \"icuUpdateCase(\".concat(ref, \")\");\n    }\n\n    throw new Error('unexpected OpCode');\n  }\n\n  while (parser.hasMore()) {\n    var mask = parser.consumeNumber();\n    var size = parser.consumeNumber();\n    var end = parser.i + size;\n    var statements = [];\n    var statement = '';\n\n    while (parser.i < end) {\n      var value = parser.consumeNumberOrString();\n\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        var opCodeText = consumeOpCode(value);\n        statements.push(opCodeText.replace('$$$', '`' + statement + '`') + ';');\n        statement = '';\n      }\n    }\n\n    lines.push(\"if (mask & 0b\".concat(mask.toString(2), \") { \").concat(statements.join(' '), \" }\"));\n  }\n\n  return lines;\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 */\n\n\nfunction icuCreateOpCodesToString(opcodes) {\n  var parser = new OpCodeParser(opcodes || (Array.isArray(this) ? this : []));\n  var lines = [];\n\n  function consumeOpCode(opCode) {\n    var parent = getParentFromIcuCreateOpCode(opCode);\n    var ref = getRefFromIcuCreateOpCode(opCode);\n\n    switch (getInstructionFromIcuCreateOpCode(opCode)) {\n      case 0\n      /* AppendChild */\n      :\n        return \"(lView[\".concat(parent, \"] as Element).appendChild(lView[\").concat(lastRef, \"])\");\n\n      case 1\n      /* Attr */\n      :\n        return \"(lView[\".concat(ref, \"] as Element).setAttribute(\\\"\").concat(parser.consumeString(), \"\\\", \\\"\").concat(parser.consumeString(), \"\\\")\");\n    }\n\n    throw new Error('Unexpected OpCode: ' + getInstructionFromIcuCreateOpCode(opCode));\n  }\n\n  var lastRef = -1;\n\n  while (parser.hasMore()) {\n    var value = parser.consumeNumberStringOrMarker();\n\n    if (value === ICU_MARKER) {\n      var text = parser.consumeString();\n      lastRef = parser.consumeNumber();\n      lines.push(\"lView[\".concat(lastRef, \"] = document.createComment(\\\"\").concat(text, \"\\\")\"));\n    } else if (value === ELEMENT_MARKER) {\n      var _text = parser.consumeString();\n\n      lastRef = parser.consumeNumber();\n      lines.push(\"lView[\".concat(lastRef, \"] = document.createElement(\\\"\").concat(_text, \"\\\")\"));\n    } else if (typeof value === 'string') {\n      lastRef = parser.consumeNumber();\n      lines.push(\"lView[\".concat(lastRef, \"] = document.createTextNode(\\\"\").concat(value, \"\\\")\"));\n    } else if (typeof value === 'number') {\n      var 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 * 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 */\n\n\nfunction i18nRemoveOpCodesToString(opcodes) {\n  var removeCodes = opcodes || (Array.isArray(this) ? this : []);\n  var lines = [];\n\n  for (var i = 0; i < removeCodes.length; i++) {\n    var nodeOrIcuIndex = removeCodes[i];\n\n    if (nodeOrIcuIndex > 0) {\n      // Positive numbers are `RNode`s.\n      lines.push(\"remove(lView[\".concat(nodeOrIcuIndex, \"])\"));\n    } else {\n      // Negative numbers are ICUs\n      lines.push(\"removeNestedICU(\".concat(~nodeOrIcuIndex, \")\"));\n    }\n  }\n\n  return lines;\n}\n\nvar OpCodeParser = /*#__PURE__*/function () {\n  function OpCodeParser(codes) {\n    _classCallCheck(this, OpCodeParser);\n\n    this.i = 0;\n    this.codes = codes;\n  }\n\n  _createClass2(OpCodeParser, [{\n    key: \"hasMore\",\n    value: function hasMore() {\n      return this.i < this.codes.length;\n    }\n  }, {\n    key: \"consumeNumber\",\n    value: function consumeNumber() {\n      var value = this.codes[this.i++];\n      assertNumber(value, 'expecting number in OpCode');\n      return value;\n    }\n  }, {\n    key: \"consumeString\",\n    value: function consumeString() {\n      var value = this.codes[this.i++];\n      assertString(value, 'expecting string in OpCode');\n      return value;\n    }\n  }, {\n    key: \"consumeFunction\",\n    value: function consumeFunction() {\n      var value = this.codes[this.i++];\n\n      if (value === null || typeof value === 'function') {\n        return value;\n      }\n\n      throw new Error('expecting function in OpCode');\n    }\n  }, {\n    key: \"consumeNumberOrString\",\n    value: function consumeNumberOrString() {\n      var value = this.codes[this.i++];\n\n      if (typeof value === 'string') {\n        return value;\n      }\n\n      assertNumber(value, 'expecting number or string in OpCode');\n      return value;\n    }\n  }, {\n    key: \"consumeNumberStringOrMarker\",\n    value: function consumeNumberStringOrMarker() {\n      var value = this.codes[this.i++];\n\n      if (typeof value === 'string' || typeof value === 'number' || value == ICU_MARKER || value == ELEMENT_MARKER) {\n        return value;\n      }\n\n      assertNumber(value, 'expecting number, string, ICU_MARKER or ELEMENT_MARKER in OpCode');\n      return value;\n    }\n  }]);\n\n  return OpCodeParser;\n}();\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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\nvar BINDING_REGEXP = /�(\\d+):?\\d*�/gi;\nvar ICU_REGEXP = /({\\s*�\\d+:?\\d*�\\s*,\\s*\\S{6}\\s*,[\\s\\S]*})/gi;\nvar NESTED_ICU = /�(\\d+)�/;\nvar ICU_BLOCK_REGEXP = /^\\s*(�\\d+:?\\d*�)\\s*,\\s*(select|plural)\\s*,/;\nvar MARKER = \"\\uFFFD\";\nvar SUBTEMPLATE_REGEXP = /�\\/?\\*(\\d+:\\d+)�/gi;\nvar PH_REGEXP = /�(\\/?[#*]\\d+):?\\d*�/gi;\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 */\n\nvar NGSP_UNICODE_REGEXP = /\\uE500/g;\n\nfunction replaceNgsp(value) {\n  return value.replace(NGSP_UNICODE_REGEXP, ' ');\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 */\n\n\nfunction i18nStartFirstCreatePass(tView, parentTNodeIndex, lView, index, message, subTemplateIndex) {\n  var rootTNode = getCurrentParentTNode();\n  var createOpCodes = [];\n  var updateOpCodes = [];\n  var existingTNodeStack = [[]];\n\n  if (ngDevMode) {\n    attachDebugGetter(createOpCodes, i18nCreateOpCodesToString);\n    attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString);\n  }\n\n  message = getTranslationForTemplate(message, subTemplateIndex);\n  var msgParts = replaceNgsp(message).split(PH_REGEXP);\n\n  for (var i = 0; i < msgParts.length; i++) {\n    var value = msgParts[i];\n\n    if ((i & 1) === 0) {\n      // Even indexes are text (including bindings & ICU expressions)\n      var parts = i18nParseTextIntoPartsAndICU(value);\n\n      for (var j = 0; j < parts.length; j++) {\n        var part = parts[j];\n\n        if ((j & 1) === 0) {\n          // `j` is odd therefore `part` is string\n          var text = part;\n          ngDevMode && assertString(text, 'Parsed ICU part should be string');\n\n          if (text !== '') {\n            i18nStartFirstCreatePassProcessTextNode(tView, rootTNode, existingTNodeStack[0], createOpCodes, updateOpCodes, lView, text);\n          }\n        } else {\n          // `j` is Even therefor `part` is an `ICUExpression`\n          var icuExpression = part; // 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\n          if (typeof icuExpression !== 'object') {\n            throw new Error(\"Unable to parse ICU expression in \\\"\".concat(message, \"\\\" message.\"));\n          }\n\n          var icuContainerTNode = createTNodeAndAddOpCode(tView, rootTNode, existingTNodeStack[0], lView, createOpCodes, ngDevMode ? \"ICU \".concat(index, \":\").concat(icuExpression.mainBinding) : '', true);\n          var icuNodeIndex = icuContainerTNode.index;\n          ngDevMode && assertGreaterThanOrEqual(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      var isClosing = value.charCodeAt(0) === 47\n      /* SLASH */\n      ;\n      var type = value.charCodeAt(isClosing ? 1 : 0);\n      ngDevMode && assertOneOf(type, 42\n      /* STAR */\n      , 35\n      /* HASH */\n      );\n\n      var _index2 = HEADER_OFFSET + Number.parseInt(value.substring(isClosing ? 2 : 1));\n\n      if (isClosing) {\n        existingTNodeStack.shift();\n        setCurrentTNode(getCurrentParentTNode(), false);\n      } else {\n        var tNode = createTNodePlaceholder(tView, existingTNodeStack[0], _index2);\n        existingTNodeStack.unshift([]);\n        setCurrentTNode(tNode, true);\n      }\n    }\n  }\n\n  tView.data[index] = {\n    create: createOpCodes,\n    update: updateOpCodes\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 */\n\n\nfunction createTNodeAndAddOpCode(tView, rootTNode, existingTNodes, lView, createOpCodes, text, isICU) {\n  var i18nNodeIdx = allocExpando(tView, lView, 1, null);\n  var opCode = i18nNodeIdx << I18nCreateOpCode.SHIFT;\n  var 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\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\n  if (isICU) {\n    opCode |= I18nCreateOpCode.COMMENT;\n    ensureIcuContainerVisitorLoaded(loadIcuContainerVisitor);\n  }\n\n  createOpCodes.push(opCode, text === null ? '' : text); // We store `{{?}}` so that when looking at debug `TNodeType.template` we can see where the\n  // bindings are.\n\n  var tNode = createTNodeAtIndex(tView, i18nNodeIdx, isICU ? 32\n  /* Icu */\n  : 1\n  /* Text */\n  , text === null ? ngDevMode ? '{{?}}' : '' : text, null);\n  addTNodeAndUpdateInsertBeforeIndex(existingTNodes, tNode);\n  var tNodeIdx = tNode.index;\n  setCurrentTNode(tNode, false\n  /* Text nodes are self closing */\n  );\n\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\n  return tNode;\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 */\n\n\nfunction i18nStartFirstCreatePassProcessTextNode(tView, rootTNode, existingTNodes, createOpCodes, updateOpCodes, lView, text) {\n  var hasBinding = text.match(BINDING_REGEXP);\n  var tNode = createTNodeAndAddOpCode(tView, rootTNode, existingTNodes, lView, createOpCodes, hasBinding ? null : text, false);\n\n  if (hasBinding) {\n    generateBindingUpdateOpCodes(updateOpCodes, text, tNode.index, null, 0, null);\n  }\n}\n/**\n * See `i18nAttributes` above.\n */\n\n\nfunction i18nAttributesFirstPass(tView, index, values) {\n  var previousElement = getCurrentTNode();\n  var previousElementIndex = previousElement.index;\n  var updateOpCodes = [];\n\n  if (ngDevMode) {\n    attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString);\n  }\n\n  if (tView.firstCreatePass && tView.data[index] === null) {\n    for (var i = 0; i < values.length; i += 2) {\n      var attrName = values[i];\n      var 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(\"ICU expressions are not supported in attributes. Message: \\\"\".concat(message, \"\\\".\"));\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\n\n        generateBindingUpdateOpCodes(updateOpCodes, message, previousElementIndex, attrName, countBindings(updateOpCodes), null);\n      }\n    }\n\n    tView.data[index] = updateOpCodes;\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 */\n\n\nfunction generateBindingUpdateOpCodes(updateOpCodes, str, destinationNode, attrName, bindingStart, sanitizeFn) {\n  ngDevMode && assertGreaterThanOrEqual(destinationNode, HEADER_OFFSET, 'Index must be in absolute LView offset');\n  var maskIndex = updateOpCodes.length; // Location of mask\n\n  var sizeIndex = maskIndex + 1; // location of size for skipping\n\n  updateOpCodes.push(null, null); // Alloc space for mask and size\n\n  var startIndex = maskIndex + 2; // location of first allocation.\n\n  if (ngDevMode) {\n    attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString);\n  }\n\n  var textParts = str.split(BINDING_REGEXP);\n  var mask = 0;\n\n  for (var j = 0; j < textParts.length; j++) {\n    var textValue = textParts[j];\n\n    if (j & 1) {\n      // Odd indexes are bindings\n      var 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(destinationNode << 2\n  /* SHIFT_REF */\n  | (attrName ? 1\n  /* Attr */\n  : 0\n  /* Text */\n  ));\n\n  if (attrName) {\n    updateOpCodes.push(attrName, sanitizeFn);\n  }\n\n  updateOpCodes[maskIndex] = mask;\n  updateOpCodes[sizeIndex] = updateOpCodes.length - startIndex;\n  return mask;\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 */\n\n\nfunction countBindings(opCodes) {\n  var count = 0;\n\n  for (var i = 0; i < opCodes.length; i++) {\n    var opCode = opCodes[i]; // Bindings are negative numbers.\n\n    if (typeof opCode === 'number' && opCode < 0) {\n      count++;\n    }\n  }\n\n  return count;\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 */\n\n\nfunction toMaskBit(bindingIndex) {\n  return 1 << Math.min(bindingIndex, 31);\n}\n\nfunction isRootTemplateMessage(subTemplateIndex) {\n  return subTemplateIndex === -1;\n}\n/**\n * Removes everything inside the sub-templates of a message.\n */\n\n\nfunction removeInnerTemplateTranslation(message) {\n  var match;\n  var res = '';\n  var index = 0;\n  var inTemplate = false;\n  var 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] === \"\".concat(MARKER, \"/*\").concat(tagMatched).concat(MARKER)) {\n        index = match.index;\n        inTemplate = false;\n      }\n    }\n  }\n\n  ngDevMode && assertEqual(inTemplate, false, \"Tag mismatch: unable to find the end of the sub-template in the translation \\\"\".concat(message, \"\\\"\"));\n  res += message.substr(index);\n  return res;\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 */\n\n\nfunction getTranslationForTemplate(message, subTemplateIndex) {\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    var start = message.indexOf(\":\".concat(subTemplateIndex).concat(MARKER)) + 2 + subTemplateIndex.toString().length;\n    var end = message.search(new RegExp(\"\".concat(MARKER, \"\\\\/\\\\*\\\\d+:\").concat(subTemplateIndex).concat(MARKER)));\n    return removeInnerTemplateTranslation(message.substring(start, end));\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 */\n\n\nfunction icuStart(tView, lView, updateOpCodes, parentIdx, icuExpression, anchorIdx) {\n  ngDevMode && assertDefined(icuExpression, 'ICU expression must be defined');\n  var bindingMask = 0;\n  var tIcu = {\n    type: icuExpression.type,\n    currentCaseLViewIndex: allocExpando(tView, lView, 1, null),\n    anchorIdx: anchorIdx,\n    cases: [],\n    create: [],\n    remove: [],\n    update: []\n  };\n  addUpdateIcuSwitch(updateOpCodes, icuExpression, anchorIdx);\n  setTIcu(tView, anchorIdx, tIcu);\n  var values = icuExpression.values;\n\n  for (var i = 0; i < values.length; i++) {\n    // Each value is an array of strings & other ICU expressions\n    var valueArr = values[i];\n    var nestedIcus = [];\n\n    for (var j = 0; j < valueArr.length; j++) {\n      var value = valueArr[j];\n\n      if (typeof value !== 'string') {\n        // It is an nested ICU expression\n        var icuIndex = nestedIcus.push(value) - 1; // Replace nested ICU expression by a comment node\n\n        valueArr[j] = \"<!--\\uFFFD\".concat(icuIndex, \"\\uFFFD-->\");\n      }\n    }\n\n    bindingMask = parseIcuCase(tView, tIcu, lView, updateOpCodes, parentIdx, icuExpression.cases[i], valueArr.join(''), nestedIcus) | bindingMask;\n  }\n\n  if (bindingMask) {\n    addUpdateIcuUpdate(updateOpCodes, bindingMask, anchorIdx);\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 */\n\n\nfunction parseICUBlock(pattern) {\n  var cases = [];\n  var values = [];\n  var icuType = 1\n  /* plural */\n  ;\n  var mainBinding = 0;\n  pattern = pattern.replace(ICU_BLOCK_REGEXP, function (str, binding, type) {\n    if (type === 'select') {\n      icuType = 0\n      /* select */\n      ;\n    } else {\n      icuType = 1\n      /* plural */\n      ;\n    }\n\n    mainBinding = parseInt(binding.substr(1), 10);\n    return '';\n  });\n  var parts = i18nParseTextIntoPartsAndICU(pattern); // Looking for (key block)+ sequence. One of the keys has to be \"other\".\n\n  for (var pos = 0; pos < parts.length;) {\n    var key = parts[pos++].trim();\n\n    if (icuType === 1\n    /* plural */\n    ) {\n      // Key can be \"=x\", we just want \"x\"\n      key = key.replace(/\\s*(?:=)?(\\w+)\\s*/, '$1');\n    }\n\n    if (key.length) {\n      cases.push(key);\n    }\n\n    var blocks = i18nParseTextIntoPartsAndICU(parts[pos++]);\n\n    if (cases.length > values.length) {\n      values.push(blocks);\n    }\n  } // TODO(ocombe): support ICU expressions in attributes, see #21615\n\n\n  return {\n    type: icuType,\n    mainBinding: mainBinding,\n    cases: cases,\n    values: values\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 */\n\n\nfunction i18nParseTextIntoPartsAndICU(pattern) {\n  if (!pattern) {\n    return [];\n  }\n\n  var prevPos = 0;\n  var braceStack = [];\n  var results = [];\n  var braces = /[{}]/g; // lastIndex doesn't get set to 0 so we have to.\n\n  braces.lastIndex = 0;\n  var match;\n\n  while (match = braces.exec(pattern)) {\n    var pos = match.index;\n\n    if (match[0] == '}') {\n      braceStack.pop();\n\n      if (braceStack.length == 0) {\n        // End of the block.\n        var block = pattern.substring(prevPos, pos);\n\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        var _substring = pattern.substring(prevPos, pos);\n\n        results.push(_substring);\n        prevPos = pos + 1;\n      }\n\n      braceStack.push('{');\n    }\n  }\n\n  var substring = pattern.substring(prevPos);\n  results.push(substring);\n  return results;\n}\n/**\n * Parses a node, its children and its siblings, and generates the mutate & update OpCodes.\n *\n */\n\n\nfunction parseIcuCase(tView, tIcu, lView, updateOpCodes, parentIdx, caseName, unsafeCaseHtml, nestedIcus) {\n  var create = [];\n  var remove = [];\n  var update = [];\n\n  if (ngDevMode) {\n    attachDebugGetter(create, icuCreateOpCodesToString);\n    attachDebugGetter(remove, i18nRemoveOpCodesToString);\n    attachDebugGetter(update, i18nUpdateOpCodesToString);\n  }\n\n  tIcu.cases.push(caseName);\n  tIcu.create.push(create);\n  tIcu.remove.push(remove);\n  tIcu.update.push(update);\n  var inertBodyHelper = getInertBodyHelper(getDocument());\n  var inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeCaseHtml);\n  ngDevMode && assertDefined(inertBodyElement, 'Unable to generate inert body element');\n  var inertRootNode = getTemplateContent(inertBodyElement) || inertBodyElement;\n\n  if (inertRootNode) {\n    return walkIcuTree(tView, tIcu, lView, updateOpCodes, create, remove, update, inertRootNode, parentIdx, nestedIcus, 0);\n  } else {\n    return 0;\n  }\n}\n\nfunction walkIcuTree(tView, tIcu, lView, sharedUpdateOpCodes, create, remove, update, parentNode, parentIdx, nestedIcus, depth) {\n  var bindingMask = 0;\n  var currentNode = parentNode.firstChild;\n\n  while (currentNode) {\n    var newIndex = allocExpando(tView, lView, 1, null);\n\n    switch (currentNode.nodeType) {\n      case Node.ELEMENT_NODE:\n        var element = currentNode;\n        var tagName = element.tagName.toLowerCase();\n\n        if (VALID_ELEMENTS.hasOwnProperty(tagName)) {\n          addCreateNodeAndAppend(create, ELEMENT_MARKER, tagName, parentIdx, newIndex);\n          tView.data[newIndex] = tagName;\n          var elAttrs = element.attributes;\n\n          for (var i = 0; i < elAttrs.length; i++) {\n            var attr = elAttrs.item(i);\n            var lowerAttrName = attr.name.toLowerCase();\n\n            var _hasBinding = !!attr.value.match(BINDING_REGEXP); // we assume the input string is safe, unless it's using a binding\n\n\n            if (_hasBinding) {\n              if (VALID_ATTRS.hasOwnProperty(lowerAttrName)) {\n                if (URI_ATTRS[lowerAttrName]) {\n                  generateBindingUpdateOpCodes(update, attr.value, newIndex, attr.name, 0, _sanitizeUrl);\n                } else if (SRCSET_ATTRS[lowerAttrName]) {\n                  generateBindingUpdateOpCodes(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 && console.warn(\"WARNING: ignoring unsafe attribute value \" + \"\".concat(lowerAttrName, \" on element \").concat(tagName, \" \") + \"(see https://g.co/ng/security#xss)\");\n              }\n            } else {\n              addCreateAttribute(create, newIndex, attr);\n            }\n          } // Parse the children of this node (if any)\n\n\n          bindingMask = walkIcuTree(tView, tIcu, lView, sharedUpdateOpCodes, create, remove, update, currentNode, newIndex, nestedIcus, depth + 1) | bindingMask;\n          addRemoveNode(remove, newIndex, depth);\n        }\n\n        break;\n\n      case Node.TEXT_NODE:\n        var value = currentNode.textContent || '';\n        var hasBinding = value.match(BINDING_REGEXP);\n        addCreateNodeAndAppend(create, null, hasBinding ? '' : value, parentIdx, newIndex);\n        addRemoveNode(remove, newIndex, depth);\n\n        if (hasBinding) {\n          bindingMask = generateBindingUpdateOpCodes(update, value, newIndex, null, 0, null) | bindingMask;\n        }\n\n        break;\n\n      case Node.COMMENT_NODE:\n        // Check if the comment node is a placeholder for a nested ICU\n        var isNestedIcu = NESTED_ICU.exec(currentNode.textContent || '');\n\n        if (isNestedIcu) {\n          var nestedIcuIndex = parseInt(isNestedIcu[1], 10);\n          var icuExpression = nestedIcus[nestedIcuIndex]; // Create the comment node that will anchor the ICU expression\n\n          addCreateNodeAndAppend(create, ICU_MARKER, ngDevMode ? \"nested ICU \".concat(nestedIcuIndex) : '', parentIdx, newIndex);\n          icuStart(tView, lView, sharedUpdateOpCodes, parentIdx, icuExpression, newIndex);\n          addRemoveNestedIcu(remove, newIndex, depth);\n        }\n\n        break;\n    }\n\n    currentNode = currentNode.nextSibling;\n  }\n\n  return bindingMask;\n}\n\nfunction addRemoveNode(remove, index, depth) {\n  if (depth === 0) {\n    remove.push(index);\n  }\n}\n\nfunction addRemoveNestedIcu(remove, index, depth) {\n  if (depth === 0) {\n    remove.push(~index); // remove ICU at `index`\n\n    remove.push(index); // remove ICU comment at `index`\n  }\n}\n\nfunction addUpdateIcuSwitch(update, icuExpression, index) {\n  update.push(toMaskBit(icuExpression.mainBinding), 2, -1 - icuExpression.mainBinding, index << 2\n  /* SHIFT_REF */\n  | 2\n  /* IcuSwitch */\n  );\n}\n\nfunction addUpdateIcuUpdate(update, bindingMask, index) {\n  update.push(bindingMask, 1, index << 2\n  /* SHIFT_REF */\n  | 3\n  /* IcuUpdate */\n  );\n}\n\nfunction addCreateNodeAndAppend(create, marker, text, appendToParentIdx, createAtIdx) {\n  if (marker !== null) {\n    create.push(marker);\n  }\n\n  create.push(text, createAtIdx, icuCreateOpCode(0\n  /* AppendChild */\n  , appendToParentIdx, createAtIdx));\n}\n\nfunction addCreateAttribute(create, newIndex, attr) {\n  create.push(newIndex << 1\n  /* SHIFT_REF */\n  | 1\n  /* Attr */\n  , 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// i18nPostprocess consts\n\n\nvar ROOT_TEMPLATE_ID = 0;\nvar PP_MULTI_VALUE_PLACEHOLDERS_REGEXP = /\\[(�.+?�?)\\]/;\nvar PP_PLACEHOLDERS_REGEXP = /\\[(�.+?�?)\\]|(�\\/?\\*\\d+:\\d+�)/g;\nvar PP_ICU_VARS_REGEXP = /({\\s*)(VAR_(PLURAL|SELECT)(_\\d+)?)(\\s*,)/g;\nvar PP_ICU_PLACEHOLDERS_REGEXP = /{([A-Z0-9_]+)}/g;\nvar PP_ICUS_REGEXP = /�I18N_EXP_(ICU(_\\d+)?)�/g;\nvar PP_CLOSE_TEMPLATE_REGEXP = /\\/\\*/;\nvar PP_TEMPLATE_ID_REGEXP = /\\d+\\:(\\d+)/;\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 */\n\nfunction i18nPostprocess(message) {\n  var replacements = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\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  var result = message;\n\n  if (PP_MULTI_VALUE_PLACEHOLDERS_REGEXP.test(message)) {\n    var matches = {};\n    var templateIdsStack = [ROOT_TEMPLATE_ID];\n    result = result.replace(PP_PLACEHOLDERS_REGEXP, function (m, phs, tmpl) {\n      var content = phs || tmpl;\n      var placeholders = matches[content] || [];\n\n      if (!placeholders.length) {\n        content.split('|').forEach(function (placeholder) {\n          var match = placeholder.match(PP_TEMPLATE_ID_REGEXP);\n          var templateId = match ? parseInt(match[1], 10) : ROOT_TEMPLATE_ID;\n          var 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 - \".concat(content));\n      }\n\n      var currentTemplateId = templateIdsStack[templateIdsStack.length - 1];\n      var idx = 0; // find placeholder index that matches current template id\n\n      for (var i = 0; i < placeholders.length; i++) {\n        if (placeholders[i][0] === currentTemplateId) {\n          idx = i;\n          break;\n        }\n      } // update template id stack based on the current tag extracted\n\n\n      var _placeholders$idx = _slicedToArray(placeholders[idx], 3),\n          templateId = _placeholders$idx[0],\n          isCloseTemplateTag = _placeholders$idx[1],\n          placeholder = _placeholders$idx[2];\n\n      if (isCloseTemplateTag) {\n        templateIdsStack.pop();\n      } else if (currentTemplateId !== templateId) {\n        templateIdsStack.push(templateId);\n      } // remove processed tag from the list\n\n\n      placeholders.splice(idx, 1);\n      return placeholder;\n    });\n  } // return current result if no replacements specified\n\n\n  if (!Object.keys(replacements).length) {\n    return result;\n  }\n  /**\n   * Step 2: replace all ICU vars (like \"VAR_PLURAL\")\n   */\n\n\n  result = result.replace(PP_ICU_VARS_REGEXP, function (match, start, key, _type, _idx, end) {\n    return replacements.hasOwnProperty(key) ? \"\".concat(start).concat(replacements[key]).concat(end) : match;\n  });\n  /**\n   * Step 3: replace all placeholders used inside ICUs in a form of {PLACEHOLDER}\n   */\n\n  result = result.replace(PP_ICU_PLACEHOLDERS_REGEXP, function (match, key) {\n    return replacements.hasOwnProperty(key) ? replacements[key] : match;\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\n  result = result.replace(PP_ICUS_REGEXP, function (match, key) {\n    if (replacements.hasOwnProperty(key)) {\n      var list = replacements[key];\n\n      if (!list.length) {\n        throw new Error(\"i18n postprocess: unmatched ICU - \".concat(match, \" with key: \").concat(key));\n      }\n\n      return list.shift();\n    }\n\n    return match;\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\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 */\n\n\nfunction ɵɵi18nStart(index, messageIndex) {\n  var subTemplateIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : -1;\n  var tView = getTView();\n  var lView = getLView();\n  var adjustedIndex = HEADER_OFFSET + index;\n  ngDevMode && assertDefined(tView, \"tView should be defined\");\n  var message = getConstant(tView.consts, messageIndex);\n  var parentTNode = getCurrentParentTNode();\n\n  if (tView.firstCreatePass) {\n    i18nStartFirstCreatePass(tView, parentTNode === null ? 0 : parentTNode.index, lView, adjustedIndex, message, subTemplateIndex);\n  }\n\n  var tI18n = tView.data[adjustedIndex];\n  var sameViewParentTNode = parentTNode === lView[T_HOST] ? null : parentTNode;\n  var parentRNode = getClosestRElement(tView, sameViewParentTNode, lView); // 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\n  var insertInFrontOf = parentTNode && parentTNode.type & 8\n  /* ElementContainer */\n  ? lView[parentTNode.index] : null;\n  applyCreateOpCodes(lView, tI18n.create, parentRNode, insertInFrontOf);\n  setInI18nBlock(true);\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 */\n\n\nfunction ɵɵi18nEnd() {\n  setInI18nBlock(false);\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 */\n\n\nfunction ɵɵi18n(index, messageIndex, subTemplateIndex) {\n  ɵɵi18nStart(index, messageIndex, subTemplateIndex);\n  ɵɵi18nEnd();\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 */\n\n\nfunction ɵɵi18nAttributes(index, attrsIndex) {\n  var tView = getTView();\n  ngDevMode && assertDefined(tView, \"tView should be defined\");\n  var attrs = getConstant(tView.consts, attrsIndex);\n  i18nAttributesFirstPass(tView, index + HEADER_OFFSET, attrs);\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 */\n\n\nfunction ɵɵi18nExp(value) {\n  var lView = getLView();\n  setMaskBit(bindingUpdated(lView, nextBindingIndex(), value));\n  return ɵɵi18nExp;\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 */\n\n\nfunction ɵɵi18nApply(index) {\n  applyI18n(getTView(), getLView(), index + HEADER_OFFSET);\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 */\n\n\nfunction ɵɵi18nPostprocess(message) {\n  var replacements = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\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 * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * 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 */\n\n\nfunction providersResolver(def, providers, viewProviders) {\n  var tView = getTView();\n\n  if (tView.firstCreatePass) {\n    var isComponent = isComponentDef(def); // The list of view providers is processed first, and the flags are updated\n\n    resolveProvider$1(viewProviders, tView.data, tView.blueprint, isComponent, true); // Then, the list of providers is processed, and the flags are updated\n\n    resolveProvider$1(providers, tView.data, tView.blueprint, isComponent, false);\n  }\n}\n/**\n * Resolves a provider and publishes it to the DI system.\n */\n\n\nfunction resolveProvider$1(provider, tInjectables, lInjectablesBlueprint, isComponent, isViewProvider) {\n  provider = resolveForwardRef(provider);\n\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 (var i = 0; i < provider.length; i++) {\n      resolveProvider$1(provider[i], tInjectables, lInjectablesBlueprint, isComponent, isViewProvider);\n    }\n  } else {\n    var tView = getTView();\n    var lView = getLView();\n    var token = isTypeProvider(provider) ? provider : resolveForwardRef(provider.provide);\n    var providerFactory = providerToFactory(provider);\n    var tNode = getCurrentTNode();\n    var beginIndex = tNode.providerIndexes & 1048575\n    /* ProvidersStartIndexMask */\n    ;\n    var endIndex = tNode.directiveStart;\n    var cptViewProvidersCount = tNode.providerIndexes >> 20\n    /* CptViewProvidersCountShift */\n    ;\n\n    if (isTypeProvider(provider) || !provider.multi) {\n      // Single provider case: the factory is created and pushed immediately\n      var factory = new NodeInjectorFactory(providerFactory, isViewProvider, ɵɵdirectiveInject);\n      var existingFactoryIndex = indexOf(token, tInjectables, isViewProvider ? beginIndex : beginIndex + cptViewProvidersCount, endIndex);\n\n      if (existingFactoryIndex === -1) {\n        diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, token);\n        registerDestroyHooksIfSupported(tView, provider, tInjectables.length);\n        tInjectables.push(token);\n        tNode.directiveStart++;\n        tNode.directiveEnd++;\n\n        if (isViewProvider) {\n          tNode.providerIndexes += 1048576\n          /* CptViewProvidersCountShifter */\n          ;\n        }\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      var existingProvidersFactoryIndex = indexOf(token, tInjectables, beginIndex + cptViewProvidersCount, endIndex);\n      var existingViewProvidersFactoryIndex = indexOf(token, tInjectables, beginIndex, beginIndex + cptViewProvidersCount);\n      var doesProvidersFactoryExist = existingProvidersFactoryIndex >= 0 && lInjectablesBlueprint[existingProvidersFactoryIndex];\n      var doesViewProvidersFactoryExist = existingViewProvidersFactoryIndex >= 0 && lInjectablesBlueprint[existingViewProvidersFactoryIndex];\n\n      if (isViewProvider && !doesViewProvidersFactoryExist || !isViewProvider && !doesProvidersFactoryExist) {\n        // Cases 1.a and 2.a\n        diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, token);\n\n        var _factory = multiFactory(isViewProvider ? multiViewProvidersFactoryResolver : multiProvidersFactoryResolver, lInjectablesBlueprint.length, isViewProvider, isComponent, providerFactory);\n\n        if (!isViewProvider && doesViewProvidersFactoryExist) {\n          lInjectablesBlueprint[existingViewProvidersFactoryIndex].providerFactory = _factory;\n        }\n\n        registerDestroyHooksIfSupported(tView, provider, tInjectables.length, 0);\n        tInjectables.push(token);\n        tNode.directiveStart++;\n        tNode.directiveEnd++;\n\n        if (isViewProvider) {\n          tNode.providerIndexes += 1048576\n          /* CptViewProvidersCountShifter */\n          ;\n        }\n\n        lInjectablesBlueprint.push(_factory);\n        lView.push(_factory);\n      } else {\n        // Cases 1.b and 2.b\n        var indexInFactory = multiFactoryAdd(lInjectablesBlueprint[isViewProvider ? existingViewProvidersFactoryIndex : existingProvidersFactoryIndex], providerFactory, !isViewProvider && isComponent);\n        registerDestroyHooksIfSupported(tView, provider, existingProvidersFactoryIndex > -1 ? existingProvidersFactoryIndex : existingViewProvidersFactoryIndex, indexInFactory);\n      }\n\n      if (!isViewProvider && isComponent && doesViewProvidersFactoryExist) {\n        lInjectablesBlueprint[existingViewProvidersFactoryIndex].componentProviders++;\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 */\n\n\nfunction registerDestroyHooksIfSupported(tView, provider, contextIndex, indexInFactory) {\n  var providerIsTypeProvider = isTypeProvider(provider);\n\n  if (providerIsTypeProvider || isClassProvider(provider)) {\n    var prototype = (provider.useClass || provider).prototype;\n    var ngOnDestroy = prototype.ngOnDestroy;\n\n    if (ngOnDestroy) {\n      var hooks = tView.destroyHooks || (tView.destroyHooks = []);\n\n      if (!providerIsTypeProvider && provider.multi) {\n        ngDevMode && assertDefined(indexInFactory, 'indexInFactory when registering multi factory destroy hook');\n        var existingCallbacksIndex = hooks.indexOf(contextIndex);\n\n        if (existingCallbacksIndex === -1) {\n          hooks.push(contextIndex, [indexInFactory, ngOnDestroy]);\n        } else {\n          hooks[existingCallbacksIndex + 1].push(indexInFactory, ngOnDestroy);\n        }\n      } else {\n        hooks.push(contextIndex, ngOnDestroy);\n      }\n    }\n  }\n}\n/**\n * Add a factory in a multi factory.\n * @returns Index at which the factory was inserted.\n */\n\n\nfunction multiFactoryAdd(multiFactory, factory, isComponentProvider) {\n  if (isComponentProvider) {\n    multiFactory.componentProviders++;\n  }\n\n  return multiFactory.multi.push(factory) - 1;\n}\n/**\n * Returns the index of item in the array, but only in the begin to end range.\n */\n\n\nfunction indexOf(item, arr, begin, end) {\n  for (var i = begin; i < end; i++) {\n    if (arr[i] === item) return i;\n  }\n\n  return -1;\n}\n/**\n * Use this with `multi` `providers`.\n */\n\n\nfunction multiProvidersFactoryResolver(_, tData, lData, tNode) {\n  return multiResolve(this.multi, []);\n}\n/**\n * Use this with `multi` `viewProviders`.\n *\n * This factory knows how to concatenate itself with the existing `multi` `providers`.\n */\n\n\nfunction multiViewProvidersFactoryResolver(_, tData, lView, tNode) {\n  var factories = this.multi;\n  var result;\n\n  if (this.providerFactory) {\n    var componentCount = this.providerFactory.componentProviders;\n    var multiProviders = getNodeInjectable(lView, lView[TVIEW], this.providerFactory.index, tNode); // Copy the section of the array which contains `multi` `providers` from the component\n\n    result = multiProviders.slice(0, componentCount); // Insert the `viewProvider` instances.\n\n    multiResolve(factories, result); // Copy the section of the array which contains `multi` `providers` from other directives\n\n    for (var i = componentCount; i < multiProviders.length; i++) {\n      result.push(multiProviders[i]);\n    }\n  } else {\n    result = []; // Insert the `viewProvider` instances.\n\n    multiResolve(factories, result);\n  }\n\n  return result;\n}\n/**\n * Maps an array of factories into an array of values.\n */\n\n\nfunction multiResolve(factories, result) {\n  for (var i = 0; i < factories.length; i++) {\n    var factory = factories[i];\n    result.push(factory());\n  }\n\n  return result;\n}\n/**\n * Creates a multi factory.\n */\n\n\nfunction multiFactory(factoryFn, index, isViewProvider, isComponent, f) {\n  var 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 * 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 */\n\n\nfunction ɵɵProvidersFeature(providers) {\n  var viewProviders = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n  return function (definition) {\n    definition.providersResolver = function (def, processProvidersFn) {\n      return providersResolver(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\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 */\n\n\nvar ComponentRef = /*#__PURE__*/_createClass2(function ComponentRef() {\n  _classCallCheck(this, ComponentRef);\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 */\n\n\nvar ComponentFactory = /*#__PURE__*/_createClass2(function ComponentFactory() {\n  _classCallCheck(this, ComponentFactory);\n});\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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\nfunction noComponentFactoryError(component) {\n  var error = Error(\"No component factory found for \".concat(stringify(component), \". Did you add it to @NgModule.entryComponents?\"));\n  error[ERROR_COMPONENT] = component;\n  return error;\n}\n\nvar ERROR_COMPONENT = 'ngComponent';\n\nfunction getComponent$1(error) {\n  return error[ERROR_COMPONENT];\n}\n\nvar _NullComponentFactoryResolver = /*#__PURE__*/function () {\n  function _NullComponentFactoryResolver() {\n    _classCallCheck(this, _NullComponentFactoryResolver);\n  }\n\n  _createClass2(_NullComponentFactoryResolver, [{\n    key: \"resolveComponentFactory\",\n    value: function resolveComponentFactory(component) {\n      throw noComponentFactoryError(component);\n    }\n  }]);\n\n  return _NullComponentFactoryResolver;\n}();\n\nvar ComponentFactoryResolver = /*@__PURE__*/function () {\n  var ComponentFactoryResolver = /*#__PURE__*/_createClass2(function ComponentFactoryResolver() {\n    _classCallCheck(this, ComponentFactoryResolver);\n  });\n\n  ComponentFactoryResolver.NULL =\n  /*@__PURE__*/\n\n  /* @__PURE__ */\n  new _NullComponentFactoryResolver();\n  return ComponentFactoryResolver;\n}();\n\nvar CodegenComponentFactoryResolver = /*#__PURE__*/function () {\n  function CodegenComponentFactoryResolver(factories, _parent, _ngModule) {\n    _classCallCheck(this, CodegenComponentFactoryResolver);\n\n    this._parent = _parent;\n    this._ngModule = _ngModule;\n    this._factories = new Map();\n\n    for (var i = 0; i < factories.length; i++) {\n      var factory = factories[i];\n\n      this._factories.set(factory.componentType, factory);\n    }\n  }\n\n  _createClass2(CodegenComponentFactoryResolver, [{\n    key: \"resolveComponentFactory\",\n    value: function resolveComponentFactory(component) {\n      var factory = this._factories.get(component);\n\n      if (!factory && this._parent) {\n        factory = this._parent.resolveComponentFactory(component);\n      }\n\n      if (!factory) {\n        throw noComponentFactoryError(component);\n      }\n\n      return new ComponentFactoryBoundToModule(factory, this._ngModule);\n    }\n  }]);\n\n  return CodegenComponentFactoryResolver;\n}();\n\nvar ComponentFactoryBoundToModule = /*#__PURE__*/function (_ComponentFactory) {\n  _inherits(ComponentFactoryBoundToModule, _ComponentFactory);\n\n  var _super7 = _createSuper(ComponentFactoryBoundToModule);\n\n  function ComponentFactoryBoundToModule(factory, ngModule) {\n    var _this6;\n\n    _classCallCheck(this, ComponentFactoryBoundToModule);\n\n    _this6 = _super7.call(this);\n    _this6.factory = factory;\n    _this6.ngModule = ngModule;\n    _this6.selector = factory.selector;\n    _this6.componentType = factory.componentType;\n    _this6.ngContentSelectors = factory.ngContentSelectors;\n    _this6.inputs = factory.inputs;\n    _this6.outputs = factory.outputs;\n    return _this6;\n  }\n\n  _createClass2(ComponentFactoryBoundToModule, [{\n    key: \"create\",\n    value: function create(injector, projectableNodes, rootSelectorOrNode, ngModule) {\n      return this.factory.create(injector, projectableNodes, rootSelectorOrNode, ngModule || this.ngModule);\n    }\n  }]);\n\n  return ComponentFactoryBoundToModule;\n}(ComponentFactory);\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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\nfunction noop() {// 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\n/**\n * Creates an ElementRef from the most recent node.\n *\n * @returns The ElementRef instance to use\n */\n\n\nfunction injectElementRef() {\n  return createElementRef(getCurrentTNode(), getLView());\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 */\n\n\nfunction createElementRef(tNode, lView) {\n  return new ElementRef(getNativeByTNode(tNode, lView));\n}\n\nvar SWITCH_ELEMENT_REF_FACTORY__POST_R3__ = injectElementRef;\nvar SWITCH_ELEMENT_REF_FACTORY__PRE_R3__ = noop;\nvar SWITCH_ELEMENT_REF_FACTORY = SWITCH_ELEMENT_REF_FACTORY__POST_R3__;\n\nvar ElementRef = /*@__PURE__*/function () {\n  var ElementRef = /*#__PURE__*/_createClass2(function ElementRef(nativeElement) {\n    _classCallCheck(this, ElementRef);\n\n    this.nativeElement = nativeElement;\n  });\n  /**\n   * @internal\n   * @nocollapse\n   */\n\n\n  ElementRef.__NG_ELEMENT_ID__ = SWITCH_ELEMENT_REF_FACTORY;\n  return ElementRef;\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 */\n\n\nfunction unwrapElementRef(value) {\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\n\nvar Renderer2Interceptor = /*@__PURE__*/new InjectionToken('Renderer2Interceptor');\n/**\n * Creates and initializes a custom renderer that implements the `Renderer2` base class.\n *\n * @publicApi\n */\n\nvar RendererFactory2 = /*#__PURE__*/_createClass2(function RendererFactory2() {\n  _classCallCheck(this, RendererFactory2);\n});\n\nvar Renderer2 = /*@__PURE__*/function () {\n  var Renderer2 = /*#__PURE__*/_createClass2(function Renderer2() {\n    _classCallCheck(this, Renderer2);\n  });\n  /**\n   * @internal\n   * @nocollapse\n   */\n\n\n  Renderer2.__NG_ELEMENT_ID__ = function () {\n    return SWITCH_RENDERER2_FACTORY();\n  };\n\n  return Renderer2;\n}();\n\nvar SWITCH_RENDERER2_FACTORY__POST_R3__ = injectRenderer2;\nvar SWITCH_RENDERER2_FACTORY__PRE_R3__ = noop;\nvar SWITCH_RENDERER2_FACTORY = SWITCH_RENDERER2_FACTORY__POST_R3__;\n/** Returns a Renderer2 (or throws when application was bootstrapped with Renderer3) */\n\nfunction getOrCreateRenderer2(lView) {\n  var renderer = lView[RENDERER];\n\n  if (ngDevMode && !isProceduralRenderer(renderer)) {\n    throw new Error('Cannot inject Renderer2 when the application uses Renderer3!');\n  }\n\n  return renderer;\n}\n/** Injects a Renderer2 for the current component. */\n\n\nfunction injectRenderer2() {\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  var lView = getLView();\n  var tNode = getCurrentTNode();\n  var nodeAtIndex = getComponentLViewByIndex(tNode.index, lView);\n  return getOrCreateRenderer2(isLView(nodeAtIndex) ? nodeAtIndex : lView);\n}\n\nvar Sanitizer = /*@__PURE__*/function () {\n  var Sanitizer = /*#__PURE__*/_createClass2(function Sanitizer() {\n    _classCallCheck(this, Sanitizer);\n  });\n  /** @nocollapse */\n\n\n  Sanitizer.ɵprov = /*@__PURE__*/ɵɵdefineInjectable({\n    token: Sanitizer,\n    providedIn: 'root',\n    factory: function factory() {\n      return null;\n    }\n  });\n  return 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 */\n\n/**\n * @description Represents the version of Angular\n *\n * @publicApi\n */\n\n\nvar Version = /*#__PURE__*/_createClass2(function Version(full) {\n  _classCallCheck(this, Version);\n\n  this.full = full;\n  this.major = full.split('.')[0];\n  this.minor = full.split('.')[1];\n  this.patch = full.split('.').slice(2).join('.');\n});\n/**\n * @publicApi\n */\n\n\nvar VERSION = /*@__PURE__*/new Version('12.2.16');\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nvar DefaultIterableDifferFactory = /*#__PURE__*/function () {\n  function DefaultIterableDifferFactory() {\n    _classCallCheck(this, DefaultIterableDifferFactory);\n  }\n\n  _createClass2(DefaultIterableDifferFactory, [{\n    key: \"supports\",\n    value: function supports(obj) {\n      return isListLikeIterable(obj);\n    }\n  }, {\n    key: \"create\",\n    value: function create(trackByFn) {\n      return new DefaultIterableDiffer(trackByFn);\n    }\n  }]);\n\n  return DefaultIterableDifferFactory;\n}();\n\nvar trackByIdentity = function trackByIdentity(index, item) {\n  return item;\n};\n\nvar ɵ0$b = trackByIdentity;\n/**\n * @deprecated v4.0.0 - Should not be part of public API.\n * @publicApi\n */\n\nvar DefaultIterableDiffer = /*#__PURE__*/function () {\n  function DefaultIterableDiffer(trackByFn) {\n    _classCallCheck(this, DefaultIterableDiffer);\n\n    this.length = 0; // Keeps track of the used records at any point in time (during & across `_check()` calls)\n\n    this._linkedRecords = null; // Keeps track of the removed records at any point in time during `_check()` calls.\n\n    this._unlinkedRecords = null;\n    this._previousItHead = null;\n    this._itHead = null;\n    this._itTail = null;\n    this._additionsHead = null;\n    this._additionsTail = null;\n    this._movesHead = null;\n    this._movesTail = null;\n    this._removalsHead = null;\n    this._removalsTail = null; // Keeps track of records where custom track by is the same, but item identity has changed\n\n    this._identityChangesHead = null;\n    this._identityChangesTail = null;\n    this._trackByFn = trackByFn || trackByIdentity;\n  }\n\n  _createClass2(DefaultIterableDiffer, [{\n    key: \"forEachItem\",\n    value: function forEachItem(fn) {\n      var record;\n\n      for (record = this._itHead; record !== null; record = record._next) {\n        fn(record);\n      }\n    }\n  }, {\n    key: \"forEachOperation\",\n    value: function forEachOperation(fn) {\n      var nextIt = this._itHead;\n      var nextRemove = this._removalsHead;\n      var addRemoveOffset = 0;\n      var moveOffsets = null;\n\n      while (nextIt || nextRemove) {\n        // Figure out which is the next record to process\n        // Order: remove, add, move\n        var record = !nextRemove || nextIt && nextIt.currentIndex < getPreviousIndex(nextRemove, addRemoveOffset, moveOffsets) ? nextIt : nextRemove;\n        var adjPreviousIndex = getPreviousIndex(record, addRemoveOffset, moveOffsets);\n        var currentIndex = record.currentIndex; // consume the item, and adjust the addRemoveOffset and update moveDistance if necessary\n\n        if (record === nextRemove) {\n          addRemoveOffset--;\n          nextRemove = nextRemove._nextRemoved;\n        } else {\n          nextIt = nextIt._next;\n\n          if (record.previousIndex == null) {\n            addRemoveOffset++;\n          } else {\n            // INVARIANT:  currentIndex < previousIndex\n            if (!moveOffsets) moveOffsets = [];\n            var localMovePreviousIndex = adjPreviousIndex - addRemoveOffset;\n            var localCurrentIndex = currentIndex - addRemoveOffset;\n\n            if (localMovePreviousIndex != localCurrentIndex) {\n              for (var i = 0; i < localMovePreviousIndex; i++) {\n                var offset = i < moveOffsets.length ? moveOffsets[i] : moveOffsets[i] = 0;\n                var index = offset + i;\n\n                if (localCurrentIndex <= index && index < localMovePreviousIndex) {\n                  moveOffsets[i] = offset + 1;\n                }\n              }\n\n              var 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    key: \"forEachPreviousItem\",\n    value: function forEachPreviousItem(fn) {\n      var record;\n\n      for (record = this._previousItHead; record !== null; record = record._nextPrevious) {\n        fn(record);\n      }\n    }\n  }, {\n    key: \"forEachAddedItem\",\n    value: function forEachAddedItem(fn) {\n      var record;\n\n      for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n        fn(record);\n      }\n    }\n  }, {\n    key: \"forEachMovedItem\",\n    value: function forEachMovedItem(fn) {\n      var record;\n\n      for (record = this._movesHead; record !== null; record = record._nextMoved) {\n        fn(record);\n      }\n    }\n  }, {\n    key: \"forEachRemovedItem\",\n    value: function forEachRemovedItem(fn) {\n      var record;\n\n      for (record = this._removalsHead; record !== null; record = record._nextRemoved) {\n        fn(record);\n      }\n    }\n  }, {\n    key: \"forEachIdentityChange\",\n    value: function forEachIdentityChange(fn) {\n      var record;\n\n      for (record = this._identityChangesHead; record !== null; record = record._nextIdentityChange) {\n        fn(record);\n      }\n    }\n  }, {\n    key: \"diff\",\n    value: function diff(collection) {\n      if (collection == null) collection = [];\n\n      if (!isListLikeIterable(collection)) {\n        throw new Error(\"Error trying to diff '\".concat(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    key: \"onDestroy\",\n    value: function onDestroy() {}\n  }, {\n    key: \"check\",\n    value: function check(collection) {\n      var _this7 = this;\n\n      this._reset();\n\n      var record = this._itHead;\n      var mayBeDirty = false;\n      var index;\n      var item;\n      var itemTrackBy;\n\n      if (Array.isArray(collection)) {\n        this.length = collection.length;\n\n        for (var _index3 = 0; _index3 < this.length; _index3++) {\n          item = collection[_index3];\n          itemTrackBy = this._trackByFn(_index3, item);\n\n          if (record === null || !Object.is(record.trackById, itemTrackBy)) {\n            record = this._mismatch(record, item, itemTrackBy, _index3);\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, _index3);\n            }\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, function (item) {\n          itemTrackBy = _this7._trackByFn(index, item);\n\n          if (record === null || !Object.is(record.trackById, itemTrackBy)) {\n            record = _this7._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 = _this7._verifyReinsertion(record, item, itemTrackBy, index);\n            }\n\n            if (!Object.is(record.item, item)) _this7._addIdentityChange(record, item);\n          }\n\n          record = record._next;\n          index++;\n        });\n        this.length = index;\n      }\n\n      this._truncate(record);\n\n      this.collection = collection;\n      return this.isDirty;\n    }\n    /* CollectionChanges is considered dirty if it has any additions, moves, removals, or identity\n     * changes.\n     */\n\n  }, {\n    key: \"isDirty\",\n    get: function get() {\n      return this._additionsHead !== null || this._movesHead !== null || this._removalsHead !== null || this._identityChangesHead !== null;\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\n  }, {\n    key: \"_reset\",\n    value: function _reset() {\n      if (this.isDirty) {\n        var record;\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\n        this._additionsHead = this._additionsTail = null;\n\n        for (record = this._movesHead; record !== null; record = record._nextMoved) {\n          record.previousIndex = record.currentIndex;\n        }\n\n        this._movesHead = this._movesTail = null;\n        this._removalsHead = this._removalsTail = null;\n        this._identityChangesHead = this._identityChangesTail = null; // TODO(vicb): when assert gets supported\n        // assert(!this.isDirty);\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\n  }, {\n    key: \"_mismatch\",\n    value: function _mismatch(record, item, itemTrackBy, index) {\n      // The previous record after which we will append the current one.\n      var previousRecord;\n\n      if (record === null) {\n        previousRecord = this._itTail;\n      } else {\n        previousRecord = record._prev; // Remove the record from the collection since we know it does not match the item.\n\n        this._remove(record);\n      } // See if we have evicted the item, which used to be at some anterior position of _itHead list.\n\n\n      record = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);\n\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\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 = this._addAfter(new IterableChangeRecord_(item, itemTrackBy), previousRecord, index);\n        }\n      }\n\n      return record;\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\n  }, {\n    key: \"_verifyReinsertion\",\n    value: function _verifyReinsertion(record, item, itemTrackBy, index) {\n      var reinsertRecord = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);\n\n      if (reinsertRecord !== null) {\n        record = this._reinsertAfter(reinsertRecord, record._prev, index);\n      } else if (record.currentIndex != index) {\n        record.currentIndex = index;\n\n        this._addToMoves(record, index);\n      }\n\n      return record;\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\n  }, {\n    key: \"_truncate\",\n    value: function _truncate(record) {\n      // Anything after that needs to be removed;\n      while (record !== null) {\n        var nextRecord = record._next;\n\n        this._addToRemovals(this._unlink(record));\n\n        record = nextRecord;\n      }\n\n      if (this._unlinkedRecords !== null) {\n        this._unlinkedRecords.clear();\n      }\n\n      if (this._additionsTail !== null) {\n        this._additionsTail._nextAdded = null;\n      }\n\n      if (this._movesTail !== null) {\n        this._movesTail._nextMoved = null;\n      }\n\n      if (this._itTail !== null) {\n        this._itTail._next = null;\n      }\n\n      if (this._removalsTail !== null) {\n        this._removalsTail._nextRemoved = null;\n      }\n\n      if (this._identityChangesTail !== null) {\n        this._identityChangesTail._nextIdentityChange = null;\n      }\n    }\n    /** @internal */\n\n  }, {\n    key: \"_reinsertAfter\",\n    value: function _reinsertAfter(record, prevRecord, index) {\n      if (this._unlinkedRecords !== null) {\n        this._unlinkedRecords.remove(record);\n      }\n\n      var prev = record._prevRemoved;\n      var next = record._nextRemoved;\n\n      if (prev === null) {\n        this._removalsHead = next;\n      } else {\n        prev._nextRemoved = next;\n      }\n\n      if (next === null) {\n        this._removalsTail = prev;\n      } else {\n        next._prevRemoved = prev;\n      }\n\n      this._insertAfter(record, prevRecord, index);\n\n      this._addToMoves(record, index);\n\n      return record;\n    }\n    /** @internal */\n\n  }, {\n    key: \"_moveAfter\",\n    value: function _moveAfter(record, prevRecord, index) {\n      this._unlink(record);\n\n      this._insertAfter(record, prevRecord, index);\n\n      this._addToMoves(record, index);\n\n      return record;\n    }\n    /** @internal */\n\n  }, {\n    key: \"_addAfter\",\n    value: function _addAfter(record, prevRecord, index) {\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\n      return record;\n    }\n    /** @internal */\n\n  }, {\n    key: \"_insertAfter\",\n    value: function _insertAfter(record, prevRecord, index) {\n      // TODO(vicb):\n      // assert(record != prevRecord);\n      // assert(record._next === null);\n      // assert(record._prev === null);\n      var next = prevRecord === null ? this._itHead : prevRecord._next; // TODO(vicb):\n      // assert(next != record);\n      // assert(prevRecord != record);\n\n      record._next = next;\n      record._prev = prevRecord;\n\n      if (next === null) {\n        this._itTail = record;\n      } else {\n        next._prev = record;\n      }\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();\n      }\n\n      this._linkedRecords.put(record);\n\n      record.currentIndex = index;\n      return record;\n    }\n    /** @internal */\n\n  }, {\n    key: \"_remove\",\n    value: function _remove(record) {\n      return this._addToRemovals(this._unlink(record));\n    }\n    /** @internal */\n\n  }, {\n    key: \"_unlink\",\n    value: function _unlink(record) {\n      if (this._linkedRecords !== null) {\n        this._linkedRecords.remove(record);\n      }\n\n      var prev = record._prev;\n      var next = record._next; // 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\n      if (next === null) {\n        this._itTail = prev;\n      } else {\n        next._prev = prev;\n      }\n\n      return record;\n    }\n    /** @internal */\n\n  }, {\n    key: \"_addToMoves\",\n    value: function _addToMoves(record, toIndex) {\n      // TODO(vicb):\n      // assert(record._nextMoved === null);\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    key: \"_addToRemovals\",\n    value: function _addToRemovals(record) {\n      if (this._unlinkedRecords === null) {\n        this._unlinkedRecords = new _DuplicateMap();\n      }\n\n      this._unlinkedRecords.put(record);\n\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\n      return record;\n    }\n    /** @internal */\n\n  }, {\n    key: \"_addIdentityChange\",\n    value: function _addIdentityChange(record, item) {\n      record.item = item;\n\n      if (this._identityChangesTail === null) {\n        this._identityChangesTail = this._identityChangesHead = record;\n      } else {\n        this._identityChangesTail = this._identityChangesTail._nextIdentityChange = record;\n      }\n\n      return record;\n    }\n  }]);\n\n  return DefaultIterableDiffer;\n}();\n\nvar IterableChangeRecord_ = /*#__PURE__*/_createClass2(function IterableChangeRecord_(item, trackById) {\n  _classCallCheck(this, IterableChangeRecord_);\n\n  this.item = item;\n  this.trackById = trackById;\n  this.currentIndex = null;\n  this.previousIndex = null;\n  /** @internal */\n\n  this._nextPrevious = null;\n  /** @internal */\n\n  this._prev = null;\n  /** @internal */\n\n  this._next = null;\n  /** @internal */\n\n  this._prevDup = null;\n  /** @internal */\n\n  this._nextDup = null;\n  /** @internal */\n\n  this._prevRemoved = null;\n  /** @internal */\n\n  this._nextRemoved = null;\n  /** @internal */\n\n  this._nextAdded = null;\n  /** @internal */\n\n  this._nextMoved = null;\n  /** @internal */\n\n  this._nextIdentityChange = null;\n}); // A linked list of IterableChangeRecords with the same IterableChangeRecord_.item\n\n\nvar _DuplicateItemRecordList = /*#__PURE__*/function () {\n  function _DuplicateItemRecordList() {\n    _classCallCheck(this, _DuplicateItemRecordList);\n\n    /** @internal */\n    this._head = null;\n    /** @internal */\n\n    this._tail = 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\n\n  _createClass2(_DuplicateItemRecordList, [{\n    key: \"add\",\n    value: function add(record) {\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    } // Returns a IterableChangeRecord_ having IterableChangeRecord_.trackById == trackById and\n    // IterableChangeRecord_.currentIndex >= atOrAfterIndex\n\n  }, {\n    key: \"get\",\n    value: function get(trackById, atOrAfterIndex) {\n      var record;\n\n      for (record = this._head; record !== null; record = record._nextDup) {\n        if ((atOrAfterIndex === null || atOrAfterIndex <= record.currentIndex) && Object.is(record.trackById, trackById)) {\n          return record;\n        }\n      }\n\n      return null;\n    }\n    /**\n     * Remove one {@link IterableChangeRecord_} from the list of duplicates.\n     *\n     * Returns whether the list of duplicates is empty.\n     */\n\n  }, {\n    key: \"remove\",\n    value: function remove(record) {\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      var prev = record._prevDup;\n      var next = record._nextDup;\n\n      if (prev === null) {\n        this._head = next;\n      } else {\n        prev._nextDup = next;\n      }\n\n      if (next === null) {\n        this._tail = prev;\n      } else {\n        next._prevDup = prev;\n      }\n\n      return this._head === null;\n    }\n  }]);\n\n  return _DuplicateItemRecordList;\n}();\n\nvar _DuplicateMap = /*#__PURE__*/function () {\n  function _DuplicateMap() {\n    _classCallCheck(this, _DuplicateMap);\n\n    this.map = new Map();\n  }\n\n  _createClass2(_DuplicateMap, [{\n    key: \"put\",\n    value: function put(record) {\n      var key = record.trackById;\n      var duplicates = this.map.get(key);\n\n      if (!duplicates) {\n        duplicates = new _DuplicateItemRecordList();\n        this.map.set(key, duplicates);\n      }\n\n      duplicates.add(record);\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\n  }, {\n    key: \"get\",\n    value: function get(trackById, atOrAfterIndex) {\n      var key = trackById;\n      var recordList = this.map.get(key);\n      return recordList ? recordList.get(trackById, atOrAfterIndex) : null;\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\n  }, {\n    key: \"remove\",\n    value: function remove(record) {\n      var key = record.trackById;\n      var recordList = this.map.get(key); // Remove the list of duplicates when it gets empty\n\n      if (recordList.remove(record)) {\n        this.map.delete(key);\n      }\n\n      return record;\n    }\n  }, {\n    key: \"isEmpty\",\n    get: function get() {\n      return this.map.size === 0;\n    }\n  }, {\n    key: \"clear\",\n    value: function clear() {\n      this.map.clear();\n    }\n  }]);\n\n  return _DuplicateMap;\n}();\n\nfunction getPreviousIndex(item, addRemoveOffset, moveOffsets) {\n  var previousIndex = item.previousIndex;\n  if (previousIndex === null) return previousIndex;\n  var moveOffset = 0;\n\n  if (moveOffsets && previousIndex < moveOffsets.length) {\n    moveOffset = moveOffsets[previousIndex];\n  }\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\n\nvar DefaultKeyValueDifferFactory = /*#__PURE__*/function () {\n  function DefaultKeyValueDifferFactory() {\n    _classCallCheck(this, DefaultKeyValueDifferFactory);\n  }\n\n  _createClass2(DefaultKeyValueDifferFactory, [{\n    key: \"supports\",\n    value: function supports(obj) {\n      return obj instanceof Map || isJsObject(obj);\n    }\n  }, {\n    key: \"create\",\n    value: function create() {\n      return new DefaultKeyValueDiffer();\n    }\n  }]);\n\n  return DefaultKeyValueDifferFactory;\n}();\n\nvar DefaultKeyValueDiffer = /*#__PURE__*/function () {\n  function DefaultKeyValueDiffer() {\n    _classCallCheck(this, DefaultKeyValueDiffer);\n\n    this._records = new Map();\n    this._mapHead = null; // _appendAfter is used in the check loop\n\n    this._appendAfter = null;\n    this._previousMapHead = null;\n    this._changesHead = null;\n    this._changesTail = null;\n    this._additionsHead = null;\n    this._additionsTail = null;\n    this._removalsHead = null;\n    this._removalsTail = null;\n  }\n\n  _createClass2(DefaultKeyValueDiffer, [{\n    key: \"isDirty\",\n    get: function get() {\n      return this._additionsHead !== null || this._changesHead !== null || this._removalsHead !== null;\n    }\n  }, {\n    key: \"forEachItem\",\n    value: function forEachItem(fn) {\n      var record;\n\n      for (record = this._mapHead; record !== null; record = record._next) {\n        fn(record);\n      }\n    }\n  }, {\n    key: \"forEachPreviousItem\",\n    value: function forEachPreviousItem(fn) {\n      var record;\n\n      for (record = this._previousMapHead; record !== null; record = record._nextPrevious) {\n        fn(record);\n      }\n    }\n  }, {\n    key: \"forEachChangedItem\",\n    value: function forEachChangedItem(fn) {\n      var record;\n\n      for (record = this._changesHead; record !== null; record = record._nextChanged) {\n        fn(record);\n      }\n    }\n  }, {\n    key: \"forEachAddedItem\",\n    value: function forEachAddedItem(fn) {\n      var record;\n\n      for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n        fn(record);\n      }\n    }\n  }, {\n    key: \"forEachRemovedItem\",\n    value: function forEachRemovedItem(fn) {\n      var record;\n\n      for (record = this._removalsHead; record !== null; record = record._nextRemoved) {\n        fn(record);\n      }\n    }\n  }, {\n    key: \"diff\",\n    value: function diff(map) {\n      if (!map) {\n        map = new Map();\n      } else if (!(map instanceof Map || isJsObject(map))) {\n        throw new Error(\"Error trying to diff '\".concat(stringify(map), \"'. Only maps and objects are allowed\"));\n      }\n\n      return this.check(map) ? this : null;\n    }\n  }, {\n    key: \"onDestroy\",\n    value: function onDestroy() {}\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\n  }, {\n    key: \"check\",\n    value: function check(map) {\n      var _this8 = this;\n\n      this._reset();\n\n      var insertBefore = this._mapHead;\n      this._appendAfter = null;\n\n      this._forEach(map, function (value, key) {\n        if (insertBefore && insertBefore.key === key) {\n          _this8._maybeAddToChanges(insertBefore, value);\n\n          _this8._appendAfter = insertBefore;\n          insertBefore = insertBefore._next;\n        } else {\n          var record = _this8._getOrCreateRecordForKey(key, value);\n\n          insertBefore = _this8._insertBeforeOrAppend(insertBefore, record);\n        }\n      }); // Items remaining at the end of the list have been deleted\n\n\n      if (insertBefore) {\n        if (insertBefore._prev) {\n          insertBefore._prev._next = null;\n        }\n\n        this._removalsHead = insertBefore;\n\n        for (var record = insertBefore; record !== null; record = record._nextRemoved) {\n          if (record === this._mapHead) {\n            this._mapHead = null;\n          }\n\n          this._records.delete(record.key);\n\n          record._nextRemoved = record._next;\n          record.previousValue = record.currentValue;\n          record.currentValue = null;\n          record._prev = null;\n          record._next = null;\n        }\n      } // Make sure tails have no next records from previous runs\n\n\n      if (this._changesTail) this._changesTail._nextChanged = null;\n      if (this._additionsTail) this._additionsTail._nextAdded = null;\n      return this.isDirty;\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\n  }, {\n    key: \"_insertBeforeOrAppend\",\n    value: function _insertBeforeOrAppend(before, record) {\n      if (before) {\n        var prev = before._prev;\n        record._next = before;\n        record._prev = prev;\n        before._prev = record;\n\n        if (prev) {\n          prev._next = record;\n        }\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    key: \"_getOrCreateRecordForKey\",\n    value: function _getOrCreateRecordForKey(key, value) {\n      if (this._records.has(key)) {\n        var _record = this._records.get(key);\n\n        this._maybeAddToChanges(_record, value);\n\n        var prev = _record._prev;\n        var next = _record._next;\n\n        if (prev) {\n          prev._next = next;\n        }\n\n        if (next) {\n          next._prev = prev;\n        }\n\n        _record._next = null;\n        _record._prev = null;\n        return _record;\n      }\n\n      var record = new KeyValueChangeRecord_(key);\n\n      this._records.set(key, record);\n\n      record.currentValue = value;\n\n      this._addToAdditions(record);\n\n      return record;\n    }\n    /** @internal */\n\n  }, {\n    key: \"_reset\",\n    value: function _reset() {\n      if (this.isDirty) {\n        var record; // let `_previousMapHead` contain the state of the map before the changes\n\n        this._previousMapHead = this._mapHead;\n\n        for (record = this._previousMapHead; record !== null; record = record._next) {\n          record._nextPrevious = record._next;\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\n\n        for (record = this._changesHead; record !== null; record = record._nextChanged) {\n          record.previousValue = record.currentValue;\n        }\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    } // Add the record or a given key to the list of changes only when the value has actually changed\n\n  }, {\n    key: \"_maybeAddToChanges\",\n    value: function _maybeAddToChanges(record, newValue) {\n      if (!Object.is(newValue, record.currentValue)) {\n        record.previousValue = record.currentValue;\n        record.currentValue = newValue;\n\n        this._addToChanges(record);\n      }\n    }\n  }, {\n    key: \"_addToAdditions\",\n    value: function _addToAdditions(record) {\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    key: \"_addToChanges\",\n    value: function _addToChanges(record) {\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    /** @internal */\n\n  }, {\n    key: \"_forEach\",\n    value: function _forEach(obj, fn) {\n      if (obj instanceof Map) {\n        obj.forEach(fn);\n      } else {\n        Object.keys(obj).forEach(function (k) {\n          return fn(obj[k], k);\n        });\n      }\n    }\n  }]);\n\n  return DefaultKeyValueDiffer;\n}();\n\nvar KeyValueChangeRecord_ = /*#__PURE__*/_createClass2(function KeyValueChangeRecord_(key) {\n  _classCallCheck(this, KeyValueChangeRecord_);\n\n  this.key = key;\n  this.previousValue = null;\n  this.currentValue = null;\n  /** @internal */\n\n  this._nextPrevious = null;\n  /** @internal */\n\n  this._next = null;\n  /** @internal */\n\n  this._prev = null;\n  /** @internal */\n\n  this._nextAdded = null;\n  /** @internal */\n\n  this._nextRemoved = null;\n  /** @internal */\n\n  this._nextChanged = 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\nfunction defaultIterableDiffersFactory() {\n  return new IterableDiffers([new DefaultIterableDifferFactory()]);\n}\n\nvar IterableDiffers = /*@__PURE__*/function () {\n  var IterableDiffers = /*#__PURE__*/function () {\n    function IterableDiffers(factories) {\n      _classCallCheck(this, IterableDiffers);\n\n      this.factories = factories;\n    }\n\n    _createClass2(IterableDiffers, [{\n      key: \"find\",\n      value: function find(iterable) {\n        var factory = this.factories.find(function (f) {\n          return f.supports(iterable);\n        });\n\n        if (factory != null) {\n          return factory;\n        } else {\n          throw new Error(\"Cannot find a differ supporting object '\".concat(iterable, \"' of type '\").concat(getTypeNameForDebugging(iterable), \"'\"));\n        }\n      }\n    }], [{\n      key: \"create\",\n      value: function create(factories, parent) {\n        if (parent != null) {\n          var copied = parent.factories.slice();\n          factories = factories.concat(copied);\n        }\n\n        return new IterableDiffers(factories);\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\n    }, {\n      key: \"extend\",\n      value: function extend(factories) {\n        return {\n          provide: IterableDiffers,\n          useFactory: function useFactory(parent) {\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\n    return IterableDiffers;\n  }();\n  /** @nocollapse */\n\n\n  IterableDiffers.ɵprov = /*@__PURE__*/ɵɵdefineInjectable({\n    token: IterableDiffers,\n    providedIn: 'root',\n    factory: defaultIterableDiffersFactory\n  });\n  return IterableDiffers;\n}();\n\nfunction getTypeNameForDebugging(type) {\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\n\nfunction defaultKeyValueDiffersFactory() {\n  return new KeyValueDiffers([new DefaultKeyValueDifferFactory()]);\n}\n\nvar KeyValueDiffers = /*@__PURE__*/function () {\n  var KeyValueDiffers = /*#__PURE__*/function () {\n    function KeyValueDiffers(factories) {\n      _classCallCheck(this, KeyValueDiffers);\n\n      this.factories = factories;\n    }\n\n    _createClass2(KeyValueDiffers, [{\n      key: \"find\",\n      value: function find(kv) {\n        var factory = this.factories.find(function (f) {\n          return f.supports(kv);\n        });\n\n        if (factory) {\n          return factory;\n        }\n\n        throw new Error(\"Cannot find a differ supporting object '\".concat(kv, \"'\"));\n      }\n    }], [{\n      key: \"create\",\n      value: function create(factories, parent) {\n        if (parent) {\n          var copied = parent.factories.slice();\n          factories = factories.concat(copied);\n        }\n\n        return new KeyValueDiffers(factories);\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\n    }, {\n      key: \"extend\",\n      value: function extend(factories) {\n        return {\n          provide: KeyValueDiffers,\n          useFactory: function useFactory(parent) {\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\n    return KeyValueDiffers;\n  }();\n  /** @nocollapse */\n\n\n  KeyValueDiffers.ɵprov = /*@__PURE__*/ɵɵdefineInjectable({\n    token: KeyValueDiffers,\n    providedIn: 'root',\n    factory: defaultKeyValueDiffersFactory\n  });\n  return KeyValueDiffers;\n}();\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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\nfunction collectNativeNodes(tView, lView, tNode, result) {\n  var isProjection = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n\n  while (tNode !== null) {\n    ngDevMode && assertTNodeType(tNode, 3\n    /* AnyRNode */\n    | 12\n    /* AnyContainer */\n    | 16\n    /* Projection */\n    | 32\n    /* Icu */\n    );\n    var lNode = lView[tNode.index];\n\n    if (lNode !== null) {\n      result.push(unwrapRNode(lNode));\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\n\n    if (isLContainer(lNode)) {\n      for (var i = CONTAINER_HEADER_OFFSET; i < lNode.length; i++) {\n        var lViewInAContainer = lNode[i];\n        var lViewFirstChildTNode = lViewInAContainer[TVIEW].firstChild;\n\n        if (lViewFirstChildTNode !== null) {\n          collectNativeNodes(lViewInAContainer[TVIEW], lViewInAContainer, lViewFirstChildTNode, result);\n        }\n      }\n    }\n\n    var tNodeType = tNode.type;\n\n    if (tNodeType & 8\n    /* ElementContainer */\n    ) {\n      collectNativeNodes(tView, lView, tNode.child, result);\n    } else if (tNodeType & 32\n    /* Icu */\n    ) {\n      var nextRNode = icuContainerIterate(tNode, lView);\n      var rNode = void 0;\n\n      while (rNode = nextRNode()) {\n        result.push(rNode);\n      }\n    } else if (tNodeType & 16\n    /* Projection */\n    ) {\n      var nodesInSlot = getProjectionNodes(lView, tNode);\n\n      if (Array.isArray(nodesInSlot)) {\n        result.push.apply(result, _toConsumableArray(nodesInSlot));\n      } else {\n        var parentView = getLViewParent(lView[DECLARATION_COMPONENT_VIEW]);\n        ngDevMode && assertParentView(parentView);\n        collectNativeNodes(parentView[TVIEW], parentView, nodesInSlot, result, true);\n      }\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\n\nvar ViewRef = /*#__PURE__*/function () {\n  function ViewRef(\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  _lView,\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  _cdRefInjectingView) {\n    _classCallCheck(this, ViewRef);\n\n    this._lView = _lView;\n    this._cdRefInjectingView = _cdRefInjectingView;\n    this._appRef = null;\n    this._attachedToViewContainer = false;\n  }\n\n  _createClass2(ViewRef, [{\n    key: \"rootNodes\",\n    get: function get() {\n      var lView = this._lView;\n      var tView = lView[TVIEW];\n      return collectNativeNodes(tView, lView, tView.firstChild, []);\n    }\n  }, {\n    key: \"context\",\n    get: function get() {\n      return this._lView[CONTEXT];\n    },\n    set: function set(value) {\n      this._lView[CONTEXT] = value;\n    }\n  }, {\n    key: \"destroyed\",\n    get: function get() {\n      return (this._lView[FLAGS] & 256\n      /* Destroyed */\n      ) === 256\n      /* Destroyed */\n      ;\n    }\n  }, {\n    key: \"destroy\",\n    value: function destroy() {\n      if (this._appRef) {\n        this._appRef.detachView(this);\n      } else if (this._attachedToViewContainer) {\n        var parent = this._lView[PARENT];\n\n        if (isLContainer(parent)) {\n          var viewRefs = parent[VIEW_REFS];\n          var index = viewRefs ? viewRefs.indexOf(this) : -1;\n\n          if (index > -1) {\n            ngDevMode && assertEqual(index, parent.indexOf(this._lView) - CONTAINER_HEADER_OFFSET, '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\n        this._attachedToViewContainer = false;\n      }\n\n      destroyLView(this._lView[TVIEW], this._lView);\n    }\n  }, {\n    key: \"onDestroy\",\n    value: function onDestroy(callback) {\n      storeCleanupWithContext(this._lView[TVIEW], this._lView, null, callback);\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\n  }, {\n    key: \"markForCheck\",\n    value: function markForCheck() {\n      markViewDirty(this._cdRefInjectingView || this._lView);\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\n  }, {\n    key: \"detach\",\n    value: function detach() {\n      this._lView[FLAGS] &= ~128\n      /* 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\n  }, {\n    key: \"reattach\",\n    value: function reattach() {\n      this._lView[FLAGS] |= 128\n      /* 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\n  }, {\n    key: \"detectChanges\",\n    value: function detectChanges() {\n      detectChangesInternal(this._lView[TVIEW], this._lView, this.context);\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\n  }, {\n    key: \"checkNoChanges\",\n    value: function checkNoChanges() {\n      checkNoChangesInternal(this._lView[TVIEW], this._lView, this.context);\n    }\n  }, {\n    key: \"attachToViewContainerRef\",\n    value: function attachToViewContainerRef() {\n      if (this._appRef) {\n        throw new Error('This view is already attached directly to the ApplicationRef!');\n      }\n\n      this._attachedToViewContainer = true;\n    }\n  }, {\n    key: \"detachFromAppRef\",\n    value: function detachFromAppRef() {\n      this._appRef = null;\n      renderDetachView(this._lView[TVIEW], this._lView);\n    }\n  }, {\n    key: \"attachToAppRef\",\n    value: function attachToAppRef(appRef) {\n      if (this._attachedToViewContainer) {\n        throw new Error('This view is already attached to a ViewContainer!');\n      }\n\n      this._appRef = appRef;\n    }\n  }]);\n\n  return ViewRef;\n}();\n/** @internal */\n\n\nvar RootViewRef = /*#__PURE__*/function (_ViewRef) {\n  _inherits(RootViewRef, _ViewRef);\n\n  var _super8 = _createSuper(RootViewRef);\n\n  function RootViewRef(_view) {\n    var _this9;\n\n    _classCallCheck(this, RootViewRef);\n\n    _this9 = _super8.call(this, _view);\n    _this9._view = _view;\n    return _this9;\n  }\n\n  _createClass2(RootViewRef, [{\n    key: \"detectChanges\",\n    value: function detectChanges() {\n      detectChangesInRootView(this._view);\n    }\n  }, {\n    key: \"checkNoChanges\",\n    value: function checkNoChanges() {\n      checkNoChangesInRootView(this._view);\n    }\n  }, {\n    key: \"context\",\n    get: function get() {\n      return null;\n    }\n  }]);\n\n  return RootViewRef;\n}(ViewRef);\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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\nvar SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__ = injectChangeDetectorRef;\nvar SWITCH_CHANGE_DETECTOR_REF_FACTORY__PRE_R3__ = noop;\nvar SWITCH_CHANGE_DETECTOR_REF_FACTORY = SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__;\n\nvar ChangeDetectorRef = /*@__PURE__*/function () {\n  var ChangeDetectorRef = /*#__PURE__*/_createClass2(function ChangeDetectorRef() {\n    _classCallCheck(this, ChangeDetectorRef);\n  });\n  /**\n   * @internal\n   * @nocollapse\n   */\n\n\n  ChangeDetectorRef.__NG_ELEMENT_ID__ = SWITCH_CHANGE_DETECTOR_REF_FACTORY;\n  return ChangeDetectorRef;\n}();\n/** Returns a ChangeDetectorRef (a.k.a. a ViewRef) */\n\n\nfunction injectChangeDetectorRef(flags) {\n  return createViewRef(getCurrentTNode(), getLView(), (flags & 16\n  /* ForPipe */\n  ) === 16\n  /* 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 */\n\n\nfunction createViewRef(tNode, lView, isPipe) {\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    var componentView = getComponentLViewByIndex(tNode.index, lView); // look down\n\n    return new ViewRef(componentView, componentView);\n  } else if (tNode.type & (3\n  /* AnyRNode */\n  | 12\n  /* AnyContainer */\n  | 32\n  /* Icu */\n  )) {\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    var hostComponentView = lView[DECLARATION_COMPONENT_VIEW]; // look up\n\n    return new ViewRef(hostComponentView, lView);\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\n/**\n * Structural diffing for `Object`s and `Map`s.\n */\n\n\nvar keyValDiff = [/*@__PURE__*/new DefaultKeyValueDifferFactory()];\n/**\n * Structural diffing for `Iterable` types such as `Array`s.\n */\n\nvar iterableDiff = [/*@__PURE__*/new DefaultIterableDifferFactory()];\nvar defaultIterableDiffers = /*@__PURE__*/new IterableDiffers(iterableDiff);\nvar defaultKeyValueDiffers = /*@__PURE__*/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\nvar SWITCH_TEMPLATE_REF_FACTORY__POST_R3__ = injectTemplateRef;\nvar SWITCH_TEMPLATE_REF_FACTORY__PRE_R3__ = noop;\nvar SWITCH_TEMPLATE_REF_FACTORY = SWITCH_TEMPLATE_REF_FACTORY__POST_R3__;\n\nvar TemplateRef = /*@__PURE__*/function () {\n  var TemplateRef = /*#__PURE__*/_createClass2(function TemplateRef() {\n    _classCallCheck(this, TemplateRef);\n  });\n  /**\n   * @internal\n   * @nocollapse\n   */\n\n\n  TemplateRef.__NG_ELEMENT_ID__ = SWITCH_TEMPLATE_REF_FACTORY;\n  return TemplateRef;\n}();\n\nvar ViewEngineTemplateRef = TemplateRef;\n\nvar R3TemplateRef = /*#__PURE__*/function (_ViewEngineTemplateRe) {\n  _inherits(TemplateRef, _ViewEngineTemplateRe);\n\n  var _super9 = _createSuper(TemplateRef);\n\n  function TemplateRef(_declarationLView, _declarationTContainer, elementRef) {\n    var _this10;\n\n    _classCallCheck(this, TemplateRef);\n\n    _this10 = _super9.call(this);\n    _this10._declarationLView = _declarationLView;\n    _this10._declarationTContainer = _declarationTContainer;\n    _this10.elementRef = elementRef;\n    return _this10;\n  }\n\n  _createClass2(TemplateRef, [{\n    key: \"createEmbeddedView\",\n    value: function createEmbeddedView(context) {\n      var embeddedTView = this._declarationTContainer.tViews;\n      var embeddedLView = createLView(this._declarationLView, embeddedTView, context, 16\n      /* CheckAlways */\n      , null, embeddedTView.declTNode, null, null, null, null);\n      var declarationLContainer = this._declarationLView[this._declarationTContainer.index];\n      ngDevMode && assertLContainer(declarationLContainer);\n      embeddedLView[DECLARATION_LCONTAINER] = declarationLContainer;\n      var declarationViewLQueries = this._declarationLView[QUERIES];\n\n      if (declarationViewLQueries !== null) {\n        embeddedLView[QUERIES] = declarationViewLQueries.createEmbeddedView(embeddedTView);\n      }\n\n      renderView(embeddedTView, embeddedLView, context);\n      return new ViewRef(embeddedLView);\n    }\n  }]);\n\n  return TemplateRef;\n}(ViewEngineTemplateRef);\n/**\n * Creates a TemplateRef given a node.\n *\n * @returns The TemplateRef instance to use\n */\n\n\nfunction injectTemplateRef() {\n  return createTemplateRef(getCurrentTNode(), getLView());\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 */\n\n\nfunction createTemplateRef(hostTNode, hostLView) {\n  if (hostTNode.type & 4\n  /* Container */\n  ) {\n    ngDevMode && assertDefined(hostTNode.tViews, 'TView must be allocated');\n    return new R3TemplateRef(hostLView, hostTNode, createElementRef(hostTNode, hostLView));\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\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 */\n\n\nvar NgModuleRef = /*#__PURE__*/_createClass2(function NgModuleRef() {\n  _classCallCheck(this, NgModuleRef);\n});\n/**\n * @publicApi\n */\n\n\nvar NgModuleFactory = /*#__PURE__*/_createClass2(function NgModuleFactory() {\n  _classCallCheck(this, NgModuleFactory);\n});\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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\nvar SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__ = injectViewContainerRef;\nvar SWITCH_VIEW_CONTAINER_REF_FACTORY__PRE_R3__ = noop;\nvar SWITCH_VIEW_CONTAINER_REF_FACTORY = SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__;\n\nvar ViewContainerRef = /*@__PURE__*/function () {\n  var ViewContainerRef = /*#__PURE__*/_createClass2(function ViewContainerRef() {\n    _classCallCheck(this, ViewContainerRef);\n  });\n  /**\n   * @internal\n   * @nocollapse\n   */\n\n\n  ViewContainerRef.__NG_ELEMENT_ID__ = SWITCH_VIEW_CONTAINER_REF_FACTORY;\n  return ViewContainerRef;\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 */\n\n\nfunction injectViewContainerRef() {\n  var previousTNode = getCurrentTNode();\n  return createContainerRef(previousTNode, getLView());\n}\n\nvar VE_ViewContainerRef = ViewContainerRef;\n\nvar R3ViewContainerRef = /*#__PURE__*/function (_VE_ViewContainerRef) {\n  _inherits(ViewContainerRef, _VE_ViewContainerRef);\n\n  var _super10 = _createSuper(ViewContainerRef);\n\n  function ViewContainerRef(_lContainer, _hostTNode, _hostLView) {\n    var _this11;\n\n    _classCallCheck(this, ViewContainerRef);\n\n    _this11 = _super10.call(this);\n    _this11._lContainer = _lContainer;\n    _this11._hostTNode = _hostTNode;\n    _this11._hostLView = _hostLView;\n    return _this11;\n  }\n\n  _createClass2(ViewContainerRef, [{\n    key: \"element\",\n    get: function get() {\n      return createElementRef(this._hostTNode, this._hostLView);\n    }\n  }, {\n    key: \"injector\",\n    get: function get() {\n      return new NodeInjector(this._hostTNode, this._hostLView);\n    }\n    /** @deprecated No replacement */\n\n  }, {\n    key: \"parentInjector\",\n    get: function get() {\n      var parentLocation = getParentInjectorLocation(this._hostTNode, this._hostLView);\n\n      if (hasParentInjector(parentLocation)) {\n        var parentView = getParentInjectorView(parentLocation, this._hostLView);\n        var injectorIndex = getParentInjectorIndex(parentLocation);\n        ngDevMode && assertNodeInjector(parentView, injectorIndex);\n        var parentTNode = parentView[TVIEW].data[injectorIndex + 8\n        /* TNODE */\n        ];\n        return new NodeInjector(parentTNode, parentView);\n      } else {\n        return new NodeInjector(null, this._hostLView);\n      }\n    }\n  }, {\n    key: \"clear\",\n    value: function clear() {\n      while (this.length > 0) {\n        this.remove(this.length - 1);\n      }\n    }\n  }, {\n    key: \"get\",\n    value: function get(index) {\n      var viewRefs = getViewRefs(this._lContainer);\n      return viewRefs !== null && viewRefs[index] || null;\n    }\n  }, {\n    key: \"length\",\n    get: function get() {\n      return this._lContainer.length - CONTAINER_HEADER_OFFSET;\n    }\n  }, {\n    key: \"createEmbeddedView\",\n    value: function createEmbeddedView(templateRef, context, index) {\n      var viewRef = templateRef.createEmbeddedView(context || {});\n      this.insert(viewRef, index);\n      return viewRef;\n    }\n  }, {\n    key: \"createComponent\",\n    value: function createComponent(componentFactory, index, injector, projectableNodes, ngModuleRef) {\n      var contextInjector = injector || this.parentInjector;\n\n      if (!ngModuleRef && componentFactory.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        var result = contextInjector.get(NgModuleRef, null);\n\n        if (result) {\n          ngModuleRef = result;\n        }\n      }\n\n      var componentRef = componentFactory.create(contextInjector, projectableNodes, undefined, ngModuleRef);\n      this.insert(componentRef.hostView, index);\n      return componentRef;\n    }\n  }, {\n    key: \"insert\",\n    value: function insert(viewRef, index) {\n      var lView = viewRef._lView;\n      var 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        var prevIdx = this.indexOf(viewRef); // 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\n        if (prevIdx !== -1) {\n          this.detach(prevIdx);\n        } else {\n          var prevLContainer = lView[PARENT];\n          ngDevMode && assertEqual(isLContainer(prevLContainer), true, 'An attached view should have its PARENT point to a container.'); // We need to re-create a R3ViewContainerRef instance since those are not stored on\n          // LView (nor anywhere else).\n\n          var prevVCRef = new R3ViewContainerRef(prevLContainer, prevLContainer[T_HOST], prevLContainer[PARENT]);\n          prevVCRef.detach(prevVCRef.indexOf(viewRef));\n        }\n      } // Logical operation of adding `LView` to `LContainer`\n\n\n      var adjustedIdx = this._adjustIndex(index);\n\n      var lContainer = this._lContainer;\n      insertView(tView, lView, lContainer, adjustedIdx); // Physical operation of adding the DOM nodes.\n\n      var beforeNode = getBeforeNodeForView(adjustedIdx, lContainer);\n      var renderer = lView[RENDERER];\n      var parentRNode = nativeParentNode(renderer, lContainer[NATIVE]);\n\n      if (parentRNode !== null) {\n        addViewToContainer(tView, lContainer[T_HOST], renderer, lView, parentRNode, beforeNode);\n      }\n\n      viewRef.attachToViewContainerRef();\n      addToArray(getOrCreateViewRefs(lContainer), adjustedIdx, viewRef);\n      return viewRef;\n    }\n  }, {\n    key: \"move\",\n    value: function move(viewRef, newIndex) {\n      if (ngDevMode && viewRef.destroyed) {\n        throw new Error('Cannot move a destroyed View in a ViewContainer!');\n      }\n\n      return this.insert(viewRef, newIndex);\n    }\n  }, {\n    key: \"indexOf\",\n    value: function indexOf(viewRef) {\n      var viewRefsArr = getViewRefs(this._lContainer);\n      return viewRefsArr !== null ? viewRefsArr.indexOf(viewRef) : -1;\n    }\n  }, {\n    key: \"remove\",\n    value: function remove(index) {\n      var adjustedIdx = this._adjustIndex(index, -1);\n\n      var 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    key: \"detach\",\n    value: function detach(index) {\n      var adjustedIdx = this._adjustIndex(index, -1);\n\n      var view = detachView(this._lContainer, adjustedIdx);\n      var wasDetached = view && removeFromArray(getOrCreateViewRefs(this._lContainer), adjustedIdx) != null;\n      return wasDetached ? new ViewRef(view) : null;\n    }\n  }, {\n    key: \"_adjustIndex\",\n    value: function _adjustIndex(index) {\n      var shift = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n      if (index == null) {\n        return this.length + shift;\n      }\n\n      if (ngDevMode) {\n        assertGreaterThan(index, -1, \"ViewRef index must be positive, got \".concat(index)); // +1 because it's legal to insert at the end.\n\n        assertLessThan(index, this.length + 1 + shift, 'index');\n      }\n\n      return index;\n    }\n  }]);\n\n  return ViewContainerRef;\n}(VE_ViewContainerRef);\n\nfunction getViewRefs(lContainer) {\n  return lContainer[VIEW_REFS];\n}\n\nfunction getOrCreateViewRefs(lContainer) {\n  return lContainer[VIEW_REFS] || (lContainer[VIEW_REFS] = []);\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 */\n\n\nfunction createContainerRef(hostTNode, hostLView) {\n  ngDevMode && assertTNodeType(hostTNode, 12\n  /* AnyContainer */\n  | 3\n  /* AnyRNode */\n  );\n  var lContainer;\n  var slotValue = hostLView[hostTNode.index];\n\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    var commentNode; // 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\n    if (hostTNode.type & 8\n    /* ElementContainer */\n    ) {\n      commentNode = unwrapRNode(slotValue);\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      var renderer = hostLView[RENDERER];\n      ngDevMode && ngDevMode.rendererCreateComment++;\n      commentNode = renderer.createComment(ngDevMode ? 'container' : '');\n      var hostNative = getNativeByTNode(hostTNode, hostLView);\n      var parentOfHostNative = nativeParentNode(renderer, hostNative);\n      nativeInsertBefore(renderer, parentOfHostNative, commentNode, nativeNextSibling(renderer, hostNative), false);\n    }\n\n    hostLView[hostTNode.index] = lContainer = createLContainer(slotValue, hostLView, commentNode, hostTNode);\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\n\nfunction expressionChangedAfterItHasBeenCheckedError(context, oldValue, currValue, isFirstCheck) {\n  var msg = \"ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '\".concat(oldValue, \"'. Current value: '\").concat(currValue, \"'.\");\n\n  if (isFirstCheck) {\n    msg += \" It seems like the view has been created after its parent and its children have been dirty checked.\" + \" Has it been created in a change detection hook ?\";\n  }\n\n  return viewDebugError(msg, context);\n}\n\nfunction viewWrappedDebugError(err, context) {\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\n  _addDebugContext(err, context);\n\n  return err;\n}\n\nfunction viewDebugError(msg, context) {\n  var err = new Error(msg);\n\n  _addDebugContext(err, context);\n\n  return err;\n}\n\nfunction _addDebugContext(err, context) {\n  err[ERROR_DEBUG_CONTEXT] = context;\n  err[ERROR_LOGGER] = context.logError.bind(context);\n}\n\nfunction isViewDebugError(err) {\n  return !!getDebugContext(err);\n}\n\nfunction viewDestroyedError(action) {\n  return new Error(\"ViewDestroyedError: Attempt to use a destroyed view: \".concat(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// 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.\n\n\nfunction shiftInitState(view, priorInitState, newInitState) {\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  var state = view.state;\n  var initState = state & 1792\n  /* InitState_Mask */\n  ;\n\n  if (initState === priorInitState) {\n    view.state = state & ~1792\n    /* InitState_Mask */\n    | newInitState;\n    view.initIndex = -1;\n    return true;\n  }\n\n  return initState === newInitState;\n} // Returns true if the lifecycle init method should be called for the node with\n// the given init index.\n\n\nfunction shouldCallLifecycleInitHook(view, initState, index) {\n  if ((view.state & 1792\n  /* InitState_Mask */\n  ) === initState && view.initIndex <= index) {\n    view.initIndex = index + 1;\n    return true;\n  }\n\n  return false;\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 */\n\n\nvar NodeData = /*#__PURE__*/_createClass2(function NodeData() {\n  _classCallCheck(this, NodeData);\n});\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\n\n\nfunction asTextData(view, index) {\n  return view.nodes[index];\n}\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\n\n\nfunction asElementData(view, index) {\n  return view.nodes[index];\n}\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\n\n\nfunction asProviderData(view, index) {\n  return view.nodes[index];\n}\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\n\n\nfunction asPureExpressionData(view, index) {\n  return view.nodes[index];\n}\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\n\n\nfunction asQueryList(view, index) {\n  return view.nodes[index];\n}\n\nvar DebugContext = /*#__PURE__*/_createClass2(function DebugContext() {\n  _classCallCheck(this, DebugContext);\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 */\n\n\nvar 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\nvar NOOP = function NOOP() {};\n\nvar _tokenKeyCache = /*@__PURE__*/new Map();\n\nfunction tokenKey(token) {\n  var key = _tokenKeyCache.get(token);\n\n  if (!key) {\n    key = stringify(token) + '_' + _tokenKeyCache.size;\n\n    _tokenKeyCache.set(token, key);\n  }\n\n  return key;\n}\n\nfunction unwrapValue(view, nodeIdx, bindingIdx, value) {\n  if (WrappedValue.isWrapped(value)) {\n    value = WrappedValue.unwrap(value);\n    var globalBindingIdx = view.def.nodes[nodeIdx].bindingIndex + bindingIdx;\n    var oldValue = WrappedValue.unwrap(view.oldValues[globalBindingIdx]);\n    view.oldValues[globalBindingIdx] = new WrappedValue(oldValue);\n  }\n\n  return value;\n}\n\nvar UNDEFINED_RENDERER_TYPE_ID = '$$undefined';\nvar EMPTY_RENDERER_TYPE_ID = '$$empty'; // Attention: this function is called as top level function.\n// Putting any logic in here will destroy closure tree shaking!\n\nfunction createRendererType2(values) {\n  return {\n    id: UNDEFINED_RENDERER_TYPE_ID,\n    styles: values.styles,\n    encapsulation: values.encapsulation,\n    data: values.data\n  };\n}\n\nvar _renderCompCount$1 = 0;\n\nfunction resolveRendererType2(type) {\n  if (type && type.id === UNDEFINED_RENDERER_TYPE_ID) {\n    // first time we see this RendererType2. Initialize it...\n    var isFilled = type.encapsulation != null && type.encapsulation !== ViewEncapsulation.None || type.styles.length || Object.keys(type.data).length;\n\n    if (isFilled) {\n      type.id = \"c\".concat(_renderCompCount$1++);\n    } else {\n      type.id = EMPTY_RENDERER_TYPE_ID;\n    }\n  }\n\n  if (type && type.id === EMPTY_RENDERER_TYPE_ID) {\n    type = null;\n  }\n\n  return type || null;\n}\n\nfunction checkBinding(view, def, bindingIdx, value) {\n  var oldValues = view.oldValues;\n\n  if (view.state & 2\n  /* FirstCheck */\n  || !Object.is(oldValues[def.bindingIndex + bindingIdx], value)) {\n    return true;\n  }\n\n  return false;\n}\n\nfunction checkAndUpdateBinding(view, def, bindingIdx, value) {\n  if (checkBinding(view, def, bindingIdx, value)) {\n    view.oldValues[def.bindingIndex + bindingIdx] = value;\n    return true;\n  }\n\n  return false;\n}\n\nfunction checkBindingNoChanges(view, def, bindingIdx, value) {\n  var oldValue = view.oldValues[def.bindingIndex + bindingIdx];\n\n  if (view.state & 1\n  /* BeforeFirstCheck */\n  || !devModeEqual(oldValue, value)) {\n    var bindingName = def.bindings[bindingIdx].name;\n    throw expressionChangedAfterItHasBeenCheckedError(Services.createDebugContext(view, def.nodeIndex), \"\".concat(bindingName, \": \").concat(oldValue), \"\".concat(bindingName, \": \").concat(value), (view.state & 1\n    /* BeforeFirstCheck */\n    ) !== 0);\n  }\n}\n\nfunction markParentViewsForCheck(view) {\n  var currView = view;\n\n  while (currView) {\n    if (currView.def.flags & 2\n    /* OnPush */\n    ) {\n      currView.state |= 8\n      /* ChecksEnabled */\n      ;\n    }\n\n    currView = currView.viewContainerParent || currView.parent;\n  }\n}\n\nfunction markParentViewsForCheckProjectedViews(view, endView) {\n  var currView = view;\n\n  while (currView && currView !== endView) {\n    currView.state |= 64\n    /* CheckProjectedViews */\n    ;\n    currView = currView.viewContainerParent || currView.parent;\n  }\n}\n\nfunction dispatchEvent(view, nodeIndex, eventName, event) {\n  try {\n    var nodeDef = view.def.nodes[nodeIndex];\n    var startView = nodeDef.flags & 33554432\n    /* ComponentView */\n    ? asElementData(view, nodeIndex).componentView : 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\nfunction declaredViewContainer(view) {\n  if (view.parent) {\n    var parentView = view.parent;\n    return asElementData(parentView, view.parentNodeDef.nodeIndex);\n  }\n\n  return null;\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 */\n\n\nfunction viewParentEl(view) {\n  var parentView = view.parent;\n\n  if (parentView) {\n    return view.parentNodeDef.parent;\n  } else {\n    return null;\n  }\n}\n\nfunction renderNode(view, def) {\n  switch (def.flags & 201347067\n  /* Types */\n  ) {\n    case 1\n    /* TypeElement */\n    :\n      return asElementData(view, def.nodeIndex).renderElement;\n\n    case 2\n    /* TypeText */\n    :\n      return asTextData(view, def.nodeIndex).renderText;\n  }\n}\n\nfunction elementEventFullName(target, name) {\n  return target ? \"\".concat(target, \":\").concat(name) : name;\n}\n\nfunction isComponentView(view) {\n  return !!view.parent && !!(view.parentNodeDef.flags & 32768\n  /* Component */\n  );\n}\n\nfunction isEmbeddedView(view) {\n  return !!view.parent && !(view.parentNodeDef.flags & 32768\n  /* Component */\n  );\n}\n\nfunction filterQueryId(queryId) {\n  return 1 << queryId % 32;\n}\n\nfunction splitMatchedQueriesDsl(matchedQueriesDsl) {\n  var matchedQueries = {};\n  var matchedQueryIds = 0;\n  var references = {};\n\n  if (matchedQueriesDsl) {\n    matchedQueriesDsl.forEach(function (_ref) {\n      var _ref2 = _slicedToArray(_ref, 2),\n          queryId = _ref2[0],\n          valueType = _ref2[1];\n\n      if (typeof queryId === 'number') {\n        matchedQueries[queryId] = valueType;\n        matchedQueryIds |= filterQueryId(queryId);\n      } else {\n        references[queryId] = valueType;\n      }\n    });\n  }\n\n  return {\n    matchedQueries: matchedQueries,\n    references: references,\n    matchedQueryIds: matchedQueryIds\n  };\n}\n\nfunction splitDepsDsl(deps, sourceName) {\n  return deps.map(function (value) {\n    var token;\n    var flags;\n\n    if (Array.isArray(value)) {\n      var _value2 = _slicedToArray(value, 2);\n\n      flags = _value2[0];\n      token = _value2[1];\n    } else {\n      flags = 0\n      /* None */\n      ;\n      token = value;\n    }\n\n    if (token && (typeof token === 'function' || typeof token === 'object') && sourceName) {\n      Object.defineProperty(token, SOURCE, {\n        value: sourceName,\n        configurable: true\n      });\n    }\n\n    return {\n      flags: flags,\n      token: token,\n      tokenKey: tokenKey(token)\n    };\n  });\n}\n\nfunction getParentRenderElement(view, renderHost, def) {\n  var renderParent = def.renderParent;\n\n  if (renderParent) {\n    if ((renderParent.flags & 1\n    /* TypeElement */\n    ) === 0 || (renderParent.flags & 33554432\n    /* ComponentView */\n    ) === 0 || renderParent.element.componentRendererType && (renderParent.element.componentRendererType.encapsulation === ViewEncapsulation.ShadowDom || // 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\nvar DEFINITION_CACHE = /*@__PURE__*/new WeakMap();\n\nfunction resolveDefinition(factory) {\n  var value = DEFINITION_CACHE.get(factory);\n\n  if (!value) {\n    value = factory(function () {\n      return NOOP;\n    });\n    value.factory = factory;\n    DEFINITION_CACHE.set(factory, value);\n  }\n\n  return value;\n}\n\nfunction rootRenderNodes(view) {\n  var renderNodes = [];\n  visitRootRenderNodes(view, 0\n  /* Collect */\n  , undefined, undefined, renderNodes);\n  return renderNodes;\n}\n\nfunction visitRootRenderNodes(view, action, parentNode, nextSibling, target) {\n  // We need to re-compute the parent node in case the nodes have been moved around manually\n  if (action === 3\n  /* RemoveChild */\n  ) {\n    parentNode = view.renderer.parentNode(renderNode(view, view.def.lastRenderRootNode));\n  }\n\n  visitSiblingRenderNodes(view, action, 0, view.def.nodes.length - 1, parentNode, nextSibling, target);\n}\n\nfunction visitSiblingRenderNodes(view, action, startIndex, endIndex, parentNode, nextSibling, target) {\n  for (var i = startIndex; i <= endIndex; i++) {\n    var nodeDef = view.def.nodes[i];\n\n    if (nodeDef.flags & (1\n    /* TypeElement */\n    | 2\n    /* TypeText */\n    | 8\n    /* TypeNgContent */\n    )) {\n      visitRenderNode(view, nodeDef, action, parentNode, nextSibling, target);\n    } // jump to next sibling\n\n\n    i += nodeDef.childCount;\n  }\n}\n\nfunction visitProjectedRenderNodes(view, ngContentIndex, action, parentNode, nextSibling, target) {\n  var compView = view;\n\n  while (compView && !isComponentView(compView)) {\n    compView = compView.parent;\n  }\n\n  var hostView = compView.parent;\n  var hostElDef = viewParentEl(compView);\n  var startIndex = hostElDef.nodeIndex + 1;\n  var endIndex = hostElDef.nodeIndex + hostElDef.childCount;\n\n  for (var i = startIndex; i <= endIndex; i++) {\n    var nodeDef = hostView.def.nodes[i];\n\n    if (nodeDef.ngContentIndex === ngContentIndex) {\n      visitRenderNode(hostView, nodeDef, action, parentNode, nextSibling, target);\n    } // jump to next sibling\n\n\n    i += nodeDef.childCount;\n  }\n\n  if (!hostView.parent) {\n    // a root view\n    var projectedNodes = view.root.projectableNodes[ngContentIndex];\n\n    if (projectedNodes) {\n      for (var _i7 = 0; _i7 < projectedNodes.length; _i7++) {\n        execRenderNodeAction(view, projectedNodes[_i7], action, parentNode, nextSibling, target);\n      }\n    }\n  }\n}\n\nfunction visitRenderNode(view, nodeDef, action, parentNode, nextSibling, target) {\n  if (nodeDef.flags & 8\n  /* TypeNgContent */\n  ) {\n    visitProjectedRenderNodes(view, nodeDef.ngContent.index, action, parentNode, nextSibling, target);\n  } else {\n    var rn = renderNode(view, nodeDef);\n\n    if (action === 3\n    /* RemoveChild */\n    && nodeDef.flags & 33554432\n    /* ComponentView */\n    && nodeDef.bindingFlags & 48\n    /* CatSyntheticProperty */\n    ) {\n      // Note: we might need to do both actions.\n      if (nodeDef.bindingFlags & 16\n      /* SyntheticProperty */\n      ) {\n        execRenderNodeAction(view, rn, action, parentNode, nextSibling, target);\n      }\n\n      if (nodeDef.bindingFlags & 32\n      /* SyntheticHostProperty */\n      ) {\n        var 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\n    if (nodeDef.flags & 16777216\n    /* EmbeddedViews */\n    ) {\n      var embeddedViews = asElementData(view, nodeDef.nodeIndex).viewContainer._embeddedViews;\n\n      for (var k = 0; k < embeddedViews.length; k++) {\n        visitRootRenderNodes(embeddedViews[k], action, parentNode, nextSibling, target);\n      }\n    }\n\n    if (nodeDef.flags & 1\n    /* TypeElement */\n    && !nodeDef.element.name) {\n      visitSiblingRenderNodes(view, action, nodeDef.nodeIndex + 1, nodeDef.nodeIndex + nodeDef.childCount, parentNode, nextSibling, target);\n    }\n  }\n}\n\nfunction execRenderNodeAction(view, renderNode, action, parentNode, nextSibling, target) {\n  var renderer = view.renderer;\n\n  switch (action) {\n    case 1\n    /* AppendChild */\n    :\n      renderer.appendChild(parentNode, renderNode);\n      break;\n\n    case 2\n    /* InsertBefore */\n    :\n      renderer.insertBefore(parentNode, renderNode, nextSibling);\n      break;\n\n    case 3\n    /* RemoveChild */\n    :\n      renderer.removeChild(parentNode, renderNode);\n      break;\n\n    case 0\n    /* Collect */\n    :\n      target.push(renderNode);\n      break;\n  }\n}\n\nvar NS_PREFIX_RE = /^:([^:]+):(.+)$/;\n\nfunction splitNamespace(name) {\n  if (name[0] === ':') {\n    var match = name.match(NS_PREFIX_RE);\n    return [match[1], match[2]];\n  }\n\n  return ['', name];\n}\n\nfunction calcBindingFlags(bindings) {\n  var flags = 0;\n\n  for (var i = 0; i < bindings.length; i++) {\n    flags |= bindings[i].flags;\n  }\n\n  return flags;\n}\n\nfunction interpolate(valueCount, constAndInterp) {\n  var result = '';\n\n  for (var i = 0; i < valueCount * 2; i = i + 2) {\n    result = result + constAndInterp[i] + _toStringWithNull(constAndInterp[i + 1]);\n  }\n\n  return result + constAndInterp[valueCount * 2];\n}\n\nfunction inlineInterpolate(valueCount, c0, a1, c1, a2, c2, a3, c3, a4, c4, a5, c5, a6, c6, a7, c7, a8, c8, a9, c9) {\n  switch (valueCount) {\n    case 1:\n      return c0 + _toStringWithNull(a1) + c1;\n\n    case 2:\n      return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2;\n\n    case 3:\n      return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) + c3;\n\n    case 4:\n      return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) + c3 + _toStringWithNull(a4) + c4;\n\n    case 5:\n      return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) + c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5;\n\n    case 6:\n      return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) + c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) + c6;\n\n    case 7:\n      return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) + c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) + c6 + _toStringWithNull(a7) + c7;\n\n    case 8:\n      return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) + c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) + c6 + _toStringWithNull(a7) + c7 + _toStringWithNull(a8) + c8;\n\n    case 9:\n      return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) + c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) + c6 + _toStringWithNull(a7) + c7 + _toStringWithNull(a8) + c8 + _toStringWithNull(a9) + c9;\n\n    default:\n      throw new Error(\"Does not support more than 9 expressions\");\n  }\n}\n\nfunction _toStringWithNull(v) {\n  return v != null ? v.toString() : '';\n}\n\nvar EMPTY_MAP = {};\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nvar UNDEFINED_VALUE = {};\nvar InjectorRefTokenKey = /*@__PURE__*/tokenKey(Injector);\nvar INJECTORRefTokenKey = /*@__PURE__*/tokenKey(INJECTOR$1);\nvar NgModuleRefTokenKey = /*@__PURE__*/tokenKey(NgModuleRef);\n\nfunction moduleProvideDef(flags, token, value, deps) {\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  var depDefs = splitDepsDsl(deps, stringify(token));\n  return {\n    // will bet set by the module definition\n    index: -1,\n    deps: depDefs,\n    flags: flags,\n    token: token,\n    value: value\n  };\n}\n\nfunction moduleDef(providers) {\n  var providersByKey = {};\n  var modules = [];\n  var scope = null;\n\n  for (var i = 0; i < providers.length; i++) {\n    var provider = providers[i];\n\n    if (provider.token === INJECTOR_SCOPE) {\n      scope = provider.value;\n    }\n\n    if (provider.flags & 1073741824\n    /* TypeNgModule */\n    ) {\n      modules.push(provider.token);\n    }\n\n    provider.index = i;\n    providersByKey[tokenKey(provider.token)] = provider;\n  }\n\n  return {\n    // Will be filled later...\n    factory: null,\n    providersByKey: providersByKey,\n    providers: providers,\n    modules: modules,\n    scope: scope\n  };\n}\n\nfunction initNgModule(data) {\n  var def = data._def;\n  var providers = data._providers = newArray(def.providers.length);\n\n  for (var i = 0; i < def.providers.length; i++) {\n    var provDef = def.providers[i];\n\n    if (!(provDef.flags & 4096\n    /* LazyProvider */\n    )) {\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\nfunction resolveNgModuleDep(data, depDef) {\n  var notFoundValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : Injector.THROW_IF_NOT_FOUND;\n  var former = setCurrentInjector(data);\n\n  try {\n    if (depDef.flags & 8\n    /* Value */\n    ) {\n      return depDef.token;\n    }\n\n    if (depDef.flags & 2\n    /* Optional */\n    ) {\n      notFoundValue = null;\n    }\n\n    if (depDef.flags & 1\n    /* SkipSelf */\n    ) {\n      return data._parent.get(depDef.token, notFoundValue);\n    }\n\n    var _tokenKey = depDef.tokenKey;\n\n    switch (_tokenKey) {\n      case InjectorRefTokenKey:\n      case INJECTORRefTokenKey:\n      case NgModuleRefTokenKey:\n        return data;\n    }\n\n    var _providerDef = data._def.providersByKey[_tokenKey];\n    var injectableDef;\n\n    if (_providerDef) {\n      var providerInstance = data._providers[_providerDef.index];\n\n      if (providerInstance === undefined) {\n        providerInstance = data._providers[_providerDef.index] = _createProviderInstance(data, _providerDef);\n      }\n\n      return providerInstance === UNDEFINED_VALUE ? undefined : providerInstance;\n    } else if ((injectableDef = getInjectableDef(depDef.token)) && targetsModule(data, injectableDef)) {\n      var index = data._providers.length;\n      data._def.providers[index] = data._def.providersByKey[depDef.tokenKey] = {\n        flags: 1024\n        /* TypeFactoryProvider */\n        | 4096\n        /* LazyProvider */\n        ,\n        value: injectableDef.factory,\n        deps: [],\n        index: index,\n        token: depDef.token\n      };\n      data._providers[index] = UNDEFINED_VALUE;\n      return data._providers[index] = _createProviderInstance(data, data._def.providersByKey[depDef.tokenKey]);\n    } else if (depDef.flags & 4\n    /* Self */\n    ) {\n      return notFoundValue;\n    }\n\n    return data._parent.get(depDef.token, notFoundValue);\n  } finally {\n    setCurrentInjector(former);\n  }\n}\n\nfunction moduleTransitivelyPresent(ngModule, scope) {\n  return ngModule._def.modules.indexOf(scope) > -1;\n}\n\nfunction targetsModule(ngModule, def) {\n  var providedIn = resolveForwardRef(def.providedIn);\n  return providedIn != null && (providedIn === 'any' || providedIn === ngModule._def.scope || moduleTransitivelyPresent(ngModule, providedIn));\n}\n\nfunction _createProviderInstance(ngModule, providerDef) {\n  var injectable;\n\n  switch (providerDef.flags & 201347067\n  /* Types */\n  ) {\n    case 512\n    /* TypeClassProvider */\n    :\n      injectable = _createClass(ngModule, providerDef.value, providerDef.deps);\n      break;\n\n    case 1024\n    /* TypeFactoryProvider */\n    :\n      injectable = _callFactory(ngModule, providerDef.value, providerDef.deps);\n      break;\n\n    case 2048\n    /* TypeUseExistingProvider */\n    :\n      injectable = resolveNgModuleDep(ngModule, providerDef.deps[0]);\n      break;\n\n    case 256\n    /* TypeValueProvider */\n    :\n      injectable = providerDef.value;\n      break;\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\n\n  if (injectable !== UNDEFINED_VALUE && injectable !== null && typeof injectable === 'object' && !(providerDef.flags & 131072\n  /* OnDestroy */\n  ) && typeof injectable.ngOnDestroy === 'function') {\n    providerDef.flags |= 131072\n    /* OnDestroy */\n    ;\n  }\n\n  return injectable === undefined ? UNDEFINED_VALUE : injectable;\n}\n\nfunction _createClass(ngModule, ctor, deps) {\n  var len = deps.length;\n\n  switch (len) {\n    case 0:\n      return new ctor();\n\n    case 1:\n      return new ctor(resolveNgModuleDep(ngModule, deps[0]));\n\n    case 2:\n      return new ctor(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]));\n\n    case 3:\n      return new ctor(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]), resolveNgModuleDep(ngModule, deps[2]));\n\n    default:\n      var depValues = [];\n\n      for (var i = 0; i < len; i++) {\n        depValues[i] = resolveNgModuleDep(ngModule, deps[i]);\n      }\n\n      return _construct(ctor, depValues);\n  }\n}\n\nfunction _callFactory(ngModule, factory, deps) {\n  var len = deps.length;\n\n  switch (len) {\n    case 0:\n      return factory();\n\n    case 1:\n      return factory(resolveNgModuleDep(ngModule, deps[0]));\n\n    case 2:\n      return factory(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]));\n\n    case 3:\n      return factory(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]), resolveNgModuleDep(ngModule, deps[2]));\n\n    default:\n      var depValues = [];\n\n      for (var i = 0; i < len; i++) {\n        depValues[i] = resolveNgModuleDep(ngModule, deps[i]);\n      }\n\n      return factory.apply(void 0, depValues);\n  }\n}\n\nfunction callNgModuleLifecycle(ngModule, lifecycles) {\n  var def = ngModule._def;\n  var destroyed = new Set();\n\n  for (var i = 0; i < def.providers.length; i++) {\n    var provDef = def.providers[i];\n\n    if (provDef.flags & 131072\n    /* OnDestroy */\n    ) {\n      var instance = ngModule._providers[i];\n\n      if (instance && instance !== UNDEFINED_VALUE) {\n        var onDestroy = instance.ngOnDestroy;\n\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\n\nfunction attachEmbeddedView(parentView, elementData, viewIndex, view) {\n  var embeddedViews = elementData.viewContainer._embeddedViews;\n\n  if (viewIndex === null || viewIndex === undefined) {\n    viewIndex = embeddedViews.length;\n  }\n\n  view.viewContainerParent = parentView;\n  addToArray(embeddedViews, viewIndex, view);\n  attachProjectedView(elementData, view);\n  Services.dirtyParentQueries(view);\n  var prevView = viewIndex > 0 ? embeddedViews[viewIndex - 1] : null;\n  renderAttachEmbeddedView(elementData, prevView, view);\n}\n\nfunction attachProjectedView(vcElementData, view) {\n  var dvcElementData = declaredViewContainer(view);\n\n  if (!dvcElementData || dvcElementData === vcElementData || view.state & 16\n  /* IsProjectedView */\n  ) {\n    return;\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\n\n  view.state |= 16\n  /* IsProjectedView */\n  ;\n  var projectedViews = dvcElementData.template._projectedViews;\n\n  if (!projectedViews) {\n    projectedViews = dvcElementData.template._projectedViews = [];\n  }\n\n  projectedViews.push(view); // Note: we are changing the NodeDef here as we cannot calculate\n  // the fact whether a template is used for projection during compilation.\n\n  markNodeAsProjectedTemplate(view.parent.def, view.parentNodeDef);\n}\n\nfunction markNodeAsProjectedTemplate(viewDef, nodeDef) {\n  if (nodeDef.flags & 4\n  /* ProjectedTemplate */\n  ) {\n    return;\n  }\n\n  viewDef.nodeFlags |= 4\n  /* ProjectedTemplate */\n  ;\n  nodeDef.flags |= 4\n  /* ProjectedTemplate */\n  ;\n  var parentNodeDef = nodeDef.parent;\n\n  while (parentNodeDef) {\n    parentNodeDef.childFlags |= 4\n    /* ProjectedTemplate */\n    ;\n    parentNodeDef = parentNodeDef.parent;\n  }\n}\n\nfunction detachEmbeddedView(elementData, viewIndex) {\n  var embeddedViews = elementData.viewContainer._embeddedViews;\n\n  if (viewIndex == null || viewIndex >= embeddedViews.length) {\n    viewIndex = embeddedViews.length - 1;\n  }\n\n  if (viewIndex < 0) {\n    return null;\n  }\n\n  var view = embeddedViews[viewIndex];\n  view.viewContainerParent = null;\n  removeFromArray(embeddedViews, viewIndex); // See attachProjectedView for why we don't update projectedViews here.\n\n  Services.dirtyParentQueries(view);\n  renderDetachView$1(view);\n  return view;\n}\n\nfunction detachProjectedView(view) {\n  if (!(view.state & 16\n  /* IsProjectedView */\n  )) {\n    return;\n  }\n\n  var dvcElementData = declaredViewContainer(view);\n\n  if (dvcElementData) {\n    var projectedViews = dvcElementData.template._projectedViews;\n\n    if (projectedViews) {\n      removeFromArray(projectedViews, projectedViews.indexOf(view));\n      Services.dirtyParentQueries(view);\n    }\n  }\n}\n\nfunction moveEmbeddedView(elementData, oldViewIndex, newViewIndex) {\n  var embeddedViews = elementData.viewContainer._embeddedViews;\n  var view = embeddedViews[oldViewIndex];\n  removeFromArray(embeddedViews, oldViewIndex);\n\n  if (newViewIndex == null) {\n    newViewIndex = embeddedViews.length;\n  }\n\n  addToArray(embeddedViews, newViewIndex, view); // Note: Don't need to change projectedViews as the order in there\n  // as always invalid...\n\n  Services.dirtyParentQueries(view);\n  renderDetachView$1(view);\n  var prevView = newViewIndex > 0 ? embeddedViews[newViewIndex - 1] : null;\n  renderAttachEmbeddedView(elementData, prevView, view);\n  return view;\n}\n\nfunction renderAttachEmbeddedView(elementData, prevView, view) {\n  var prevRenderNode = prevView ? renderNode(prevView, prevView.def.lastRenderRootNode) : elementData.renderElement;\n  var parentNode = view.renderer.parentNode(prevRenderNode);\n  var nextSibling = view.renderer.nextSibling(prevRenderNode); // 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\n  visitRootRenderNodes(view, 2\n  /* InsertBefore */\n  , parentNode, nextSibling, undefined);\n}\n\nfunction renderDetachView$1(view) {\n  visitRootRenderNodes(view, 3\n  /* RemoveChild */\n  , 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\n\nvar EMPTY_CONTEXT = {}; // Attention: this function is called as top level function.\n// Putting any logic in here will destroy closure tree shaking!\n\nfunction createComponentFactory(selector, componentType, viewDefFactory, inputs, outputs, ngContentSelectors) {\n  return new ComponentFactory_(selector, componentType, viewDefFactory, inputs, outputs, ngContentSelectors);\n}\n\nfunction getComponentViewDefinitionFactory(componentFactory) {\n  return componentFactory.viewDefFactory;\n}\n\nvar ComponentFactory_ = /*#__PURE__*/function (_ComponentFactory2) {\n  _inherits(ComponentFactory_, _ComponentFactory2);\n\n  var _super11 = _createSuper(ComponentFactory_);\n\n  function ComponentFactory_(selector, componentType, viewDefFactory, _inputs, _outputs, ngContentSelectors) {\n    var _this12;\n\n    _classCallCheck(this, ComponentFactory_);\n\n    // Attention: this ctor is called as top level function.\n    // Putting any logic in here will destroy closure tree shaking!\n    _this12 = _super11.call(this);\n    _this12.selector = selector;\n    _this12.componentType = componentType;\n    _this12._inputs = _inputs;\n    _this12._outputs = _outputs;\n    _this12.ngContentSelectors = ngContentSelectors;\n    _this12.viewDefFactory = viewDefFactory;\n    return _this12;\n  }\n\n  _createClass2(ComponentFactory_, [{\n    key: \"inputs\",\n    get: function get() {\n      var inputsArr = [];\n      var inputs = this._inputs;\n\n      for (var propName in inputs) {\n        var templateName = inputs[propName];\n        inputsArr.push({\n          propName: propName,\n          templateName: templateName\n        });\n      }\n\n      return inputsArr;\n    }\n  }, {\n    key: \"outputs\",\n    get: function get() {\n      var outputsArr = [];\n\n      for (var propName in this._outputs) {\n        var templateName = this._outputs[propName];\n        outputsArr.push({\n          propName: propName,\n          templateName: templateName\n        });\n      }\n\n      return outputsArr;\n    }\n    /**\n     * Creates a new component.\n     */\n\n  }, {\n    key: \"create\",\n    value: function create(injector, projectableNodes, rootSelectorOrNode, ngModule) {\n      if (!ngModule) {\n        throw new Error('ngModule should be provided');\n      }\n\n      var viewDef = resolveDefinition(this.viewDefFactory);\n      var componentNodeIndex = viewDef.nodes[0].element.componentProvider.nodeIndex;\n      var view = Services.createRootView(injector, projectableNodes || [], rootSelectorOrNode, viewDef, ngModule, EMPTY_CONTEXT);\n      var component = asProviderData(view, componentNodeIndex).instance;\n\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\n  return ComponentFactory_;\n}(ComponentFactory);\n\nvar ComponentRef_ = /*#__PURE__*/function (_ComponentRef) {\n  _inherits(ComponentRef_, _ComponentRef);\n\n  var _super12 = _createSuper(ComponentRef_);\n\n  function ComponentRef_(_view, _viewRef, _component) {\n    var _this13;\n\n    _classCallCheck(this, ComponentRef_);\n\n    _this13 = _super12.call(this);\n    _this13._view = _view;\n    _this13._viewRef = _viewRef;\n    _this13._component = _component;\n    _this13._elDef = _this13._view.def.nodes[0];\n    _this13.hostView = _viewRef;\n    _this13.changeDetectorRef = _viewRef;\n    _this13.instance = _component;\n    return _this13;\n  }\n\n  _createClass2(ComponentRef_, [{\n    key: \"location\",\n    get: function get() {\n      return new ElementRef(asElementData(this._view, this._elDef.nodeIndex).renderElement);\n    }\n  }, {\n    key: \"injector\",\n    get: function get() {\n      return new Injector_(this._view, this._elDef);\n    }\n  }, {\n    key: \"componentType\",\n    get: function get() {\n      return this._component.constructor;\n    }\n  }, {\n    key: \"destroy\",\n    value: function destroy() {\n      this._viewRef.destroy();\n    }\n  }, {\n    key: \"onDestroy\",\n    value: function onDestroy(callback) {\n      this._viewRef.onDestroy(callback);\n    }\n  }]);\n\n  return ComponentRef_;\n}(ComponentRef);\n\nfunction createViewContainerData(view, elDef, elData) {\n  return new ViewContainerRef_(view, elDef, elData);\n}\n\nvar ViewContainerRef_ = /*#__PURE__*/function () {\n  function ViewContainerRef_(_view, _elDef, _data) {\n    _classCallCheck(this, ViewContainerRef_);\n\n    this._view = _view;\n    this._elDef = _elDef;\n    this._data = _data;\n    /**\n     * @internal\n     */\n\n    this._embeddedViews = [];\n  }\n\n  _createClass2(ViewContainerRef_, [{\n    key: \"element\",\n    get: function get() {\n      return new ElementRef(this._data.renderElement);\n    }\n  }, {\n    key: \"injector\",\n    get: function get() {\n      return new Injector_(this._view, this._elDef);\n    }\n    /** @deprecated No replacement */\n\n  }, {\n    key: \"parentInjector\",\n    get: function get() {\n      var view = this._view;\n      var elDef = this._elDef.parent;\n\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    key: \"clear\",\n    value: function clear() {\n      var len = this._embeddedViews.length;\n\n      for (var i = len - 1; i >= 0; i--) {\n        var view = detachEmbeddedView(this._data, i);\n        Services.destroyView(view);\n      }\n    }\n  }, {\n    key: \"get\",\n    value: function get(index) {\n      var view = this._embeddedViews[index];\n\n      if (view) {\n        var ref = new ViewRef_(view);\n        ref.attachToViewContainerRef(this);\n        return ref;\n      }\n\n      return null;\n    }\n  }, {\n    key: \"length\",\n    get: function get() {\n      return this._embeddedViews.length;\n    }\n  }, {\n    key: \"createEmbeddedView\",\n    value: function createEmbeddedView(templateRef, context, index) {\n      var viewRef = templateRef.createEmbeddedView(context || {});\n      this.insert(viewRef, index);\n      return viewRef;\n    }\n  }, {\n    key: \"createComponent\",\n    value: function createComponent(componentFactory, index, injector, projectableNodes, ngModuleRef) {\n      var contextInjector = injector || this.parentInjector;\n\n      if (!ngModuleRef && !(componentFactory instanceof ComponentFactoryBoundToModule)) {\n        ngModuleRef = contextInjector.get(NgModuleRef);\n      }\n\n      var componentRef = componentFactory.create(contextInjector, projectableNodes, undefined, ngModuleRef);\n      this.insert(componentRef.hostView, index);\n      return componentRef;\n    }\n  }, {\n    key: \"insert\",\n    value: function insert(viewRef, index) {\n      if (viewRef.destroyed) {\n        throw new Error('Cannot insert a destroyed View in a ViewContainer!');\n      }\n\n      var viewRef_ = viewRef;\n      var viewData = viewRef_._view;\n      attachEmbeddedView(this._view, this._data, index, viewData);\n      viewRef_.attachToViewContainerRef(this);\n      return viewRef;\n    }\n  }, {\n    key: \"move\",\n    value: function move(viewRef, currentIndex) {\n      if (viewRef.destroyed) {\n        throw new Error('Cannot move a destroyed View in a ViewContainer!');\n      }\n\n      var previousIndex = this._embeddedViews.indexOf(viewRef._view);\n\n      moveEmbeddedView(this._data, previousIndex, currentIndex);\n      return viewRef;\n    }\n  }, {\n    key: \"indexOf\",\n    value: function indexOf(viewRef) {\n      return this._embeddedViews.indexOf(viewRef._view);\n    }\n  }, {\n    key: \"remove\",\n    value: function remove(index) {\n      var viewData = detachEmbeddedView(this._data, index);\n\n      if (viewData) {\n        Services.destroyView(viewData);\n      }\n    }\n  }, {\n    key: \"detach\",\n    value: function detach(index) {\n      var view = detachEmbeddedView(this._data, index);\n      return view ? new ViewRef_(view) : null;\n    }\n  }]);\n\n  return ViewContainerRef_;\n}();\n\nfunction createChangeDetectorRef(view) {\n  return new ViewRef_(view);\n}\n\nvar ViewRef_ = /*#__PURE__*/function () {\n  function ViewRef_(_view) {\n    _classCallCheck(this, ViewRef_);\n\n    this._view = _view;\n    this._viewContainerRef = null;\n    this._appRef = null;\n  }\n\n  _createClass2(ViewRef_, [{\n    key: \"rootNodes\",\n    get: function get() {\n      return rootRenderNodes(this._view);\n    }\n  }, {\n    key: \"context\",\n    get: function get() {\n      return this._view.context;\n    },\n    set: function set(value) {\n      this._view.context = value;\n    }\n  }, {\n    key: \"destroyed\",\n    get: function get() {\n      return (this._view.state & 128\n      /* Destroyed */\n      ) !== 0;\n    }\n  }, {\n    key: \"markForCheck\",\n    value: function markForCheck() {\n      markParentViewsForCheck(this._view);\n    }\n  }, {\n    key: \"detach\",\n    value: function detach() {\n      this._view.state &= ~4\n      /* Attached */\n      ;\n    }\n  }, {\n    key: \"detectChanges\",\n    value: function detectChanges() {\n      var fs = this._view.root.rendererFactory;\n\n      if (fs.begin) {\n        fs.begin();\n      }\n\n      try {\n        Services.checkAndUpdateView(this._view);\n      } finally {\n        if (fs.end) {\n          fs.end();\n        }\n      }\n    }\n  }, {\n    key: \"checkNoChanges\",\n    value: function checkNoChanges() {\n      Services.checkNoChangesView(this._view);\n    }\n  }, {\n    key: \"reattach\",\n    value: function reattach() {\n      this._view.state |= 4\n      /* Attached */\n      ;\n    }\n  }, {\n    key: \"onDestroy\",\n    value: function onDestroy(callback) {\n      if (!this._view.disposables) {\n        this._view.disposables = [];\n      }\n\n      this._view.disposables.push(callback);\n    }\n  }, {\n    key: \"destroy\",\n    value: function 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\n      Services.destroyView(this._view);\n    }\n  }, {\n    key: \"detachFromAppRef\",\n    value: function detachFromAppRef() {\n      this._appRef = null;\n      renderDetachView$1(this._view);\n      Services.dirtyParentQueries(this._view);\n    }\n  }, {\n    key: \"attachToAppRef\",\n    value: function attachToAppRef(appRef) {\n      if (this._viewContainerRef) {\n        throw new Error('This view is already attached to a ViewContainer!');\n      }\n\n      this._appRef = appRef;\n    }\n  }, {\n    key: \"attachToViewContainerRef\",\n    value: function attachToViewContainerRef(vcRef) {\n      if (this._appRef) {\n        throw new Error('This view is already attached directly to the ApplicationRef!');\n      }\n\n      this._viewContainerRef = vcRef;\n    }\n  }]);\n\n  return ViewRef_;\n}();\n\nfunction createTemplateData(view, def) {\n  return new TemplateRef_(view, def);\n}\n\nvar TemplateRef_ = /*#__PURE__*/function (_TemplateRef) {\n  _inherits(TemplateRef_, _TemplateRef);\n\n  var _super13 = _createSuper(TemplateRef_);\n\n  function TemplateRef_(_parentView, _def) {\n    var _this14;\n\n    _classCallCheck(this, TemplateRef_);\n\n    _this14 = _super13.call(this);\n    _this14._parentView = _parentView;\n    _this14._def = _def;\n    return _this14;\n  }\n\n  _createClass2(TemplateRef_, [{\n    key: \"createEmbeddedView\",\n    value: function createEmbeddedView(context) {\n      return new ViewRef_(Services.createEmbeddedView(this._parentView, this._def, this._def.element.template, context));\n    }\n  }, {\n    key: \"elementRef\",\n    get: function get() {\n      return new ElementRef(asElementData(this._parentView, this._def.nodeIndex).renderElement);\n    }\n  }]);\n\n  return TemplateRef_;\n}(TemplateRef);\n\nfunction createInjector$1(view, elDef) {\n  return new Injector_(view, elDef);\n}\n\nvar Injector_ = /*#__PURE__*/function () {\n  function Injector_(view, elDef) {\n    _classCallCheck(this, Injector_);\n\n    this.view = view;\n    this.elDef = elDef;\n  }\n\n  _createClass2(Injector_, [{\n    key: \"get\",\n    value: function get(token) {\n      var notFoundValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Injector.THROW_IF_NOT_FOUND;\n      var allowPrivateServices = this.elDef ? (this.elDef.flags & 33554432\n      /* ComponentView */\n      ) !== 0 : false;\n      return Services.resolveDep(this.view, this.elDef, allowPrivateServices, {\n        flags: 0\n        /* None */\n        ,\n        token: token,\n        tokenKey: tokenKey(token)\n      }, notFoundValue);\n    }\n  }]);\n\n  return Injector_;\n}();\n\nfunction nodeValue(view, index) {\n  var def = view.def.nodes[index];\n\n  if (def.flags & 1\n  /* TypeElement */\n  ) {\n    var elData = asElementData(view, def.nodeIndex);\n    return def.element.template ? elData.template : elData.renderElement;\n  } else if (def.flags & 2\n  /* TypeText */\n  ) {\n    return asTextData(view, def.nodeIndex).renderText;\n  } else if (def.flags & (20224\n  /* CatProvider */\n  | 16\n  /* TypePipe */\n  )) {\n    return asProviderData(view, def.nodeIndex).instance;\n  }\n\n  throw new Error(\"Illegal state: read nodeValue for node index \".concat(index));\n}\n\nfunction createNgModuleRef(moduleType, parent, bootstrapComponents, def) {\n  return new NgModuleRef_(moduleType, parent, bootstrapComponents, def);\n}\n\nvar NgModuleRef_ = /*#__PURE__*/function () {\n  function NgModuleRef_(_moduleType, _parent, _bootstrapComponents, _def) {\n    _classCallCheck(this, NgModuleRef_);\n\n    this._moduleType = _moduleType;\n    this._parent = _parent;\n    this._bootstrapComponents = _bootstrapComponents;\n    this._def = _def;\n    this._destroyListeners = [];\n    this._destroyed = false;\n    this.injector = this;\n    initNgModule(this);\n  }\n\n  _createClass2(NgModuleRef_, [{\n    key: \"get\",\n    value: function get(token) {\n      var notFoundValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Injector.THROW_IF_NOT_FOUND;\n      var injectFlags = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : InjectFlags.Default;\n      var flags = 0\n      /* None */\n      ;\n\n      if (injectFlags & InjectFlags.SkipSelf) {\n        flags |= 1\n        /* SkipSelf */\n        ;\n      } else if (injectFlags & InjectFlags.Self) {\n        flags |= 4\n        /* Self */\n        ;\n      }\n\n      return resolveNgModuleDep(this, {\n        token: token,\n        tokenKey: tokenKey(token),\n        flags: flags\n      }, notFoundValue);\n    }\n  }, {\n    key: \"instance\",\n    get: function get() {\n      return this.get(this._moduleType);\n    }\n  }, {\n    key: \"componentFactoryResolver\",\n    get: function get() {\n      return this.get(ComponentFactoryResolver);\n    }\n  }, {\n    key: \"destroy\",\n    value: function destroy() {\n      if (this._destroyed) {\n        throw new Error(\"The ng module \".concat(stringify(this.instance.constructor), \" has already been destroyed.\"));\n      }\n\n      this._destroyed = true;\n      callNgModuleLifecycle(this, 131072\n      /* OnDestroy */\n      );\n\n      this._destroyListeners.forEach(function (listener) {\n        return listener();\n      });\n    }\n  }, {\n    key: \"onDestroy\",\n    value: function onDestroy(callback) {\n      this._destroyListeners.push(callback);\n    }\n  }]);\n\n  return NgModuleRef_;\n}();\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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\nvar Renderer2TokenKey = /*@__PURE__*/tokenKey(Renderer2);\nvar ElementRefTokenKey = /*@__PURE__*/tokenKey(ElementRef);\nvar ViewContainerRefTokenKey = /*@__PURE__*/tokenKey(ViewContainerRef);\nvar TemplateRefTokenKey = /*@__PURE__*/tokenKey(TemplateRef);\nvar ChangeDetectorRefTokenKey = /*@__PURE__*/tokenKey(ChangeDetectorRef);\nvar InjectorRefTokenKey$1 = /*@__PURE__*/tokenKey(Injector);\nvar INJECTORRefTokenKey$1 = /*@__PURE__*/tokenKey(INJECTOR$1);\n\nfunction directiveDef(checkIndex, flags, matchedQueries, childCount, ctor, deps, props, outputs) {\n  var bindings = [];\n\n  if (props) {\n    for (var prop in props) {\n      var _props$prop = _slicedToArray(props[prop], 2),\n          bindingIndex = _props$prop[0],\n          nonMinifiedName = _props$prop[1];\n\n      bindings[bindingIndex] = {\n        flags: 8\n        /* TypeProperty */\n        ,\n        name: prop,\n        nonMinifiedName: nonMinifiedName,\n        ns: null,\n        securityContext: null,\n        suffix: null\n      };\n    }\n  }\n\n  var outputDefs = [];\n\n  if (outputs) {\n    for (var propName in outputs) {\n      outputDefs.push({\n        type: 1\n        /* DirectiveOutput */\n        ,\n        propName: propName,\n        target: null,\n        eventName: outputs[propName]\n      });\n    }\n  }\n\n  flags |= 16384\n  /* TypeDirective */\n  ;\n  return _def(checkIndex, flags, matchedQueries, childCount, ctor, ctor, deps, bindings, outputDefs);\n}\n\nfunction pipeDef(flags, ctor, deps) {\n  flags |= 16\n  /* TypePipe */\n  ;\n  return _def(-1, flags, null, 0, ctor, ctor, deps);\n}\n\nfunction providerDef(flags, matchedQueries, token, value, deps) {\n  return _def(-1, flags, matchedQueries, 0, token, value, deps);\n}\n\nfunction _def(checkIndex, flags, matchedQueriesDsl, childCount, token, value, deps, bindings, outputs) {\n  var _splitMatchedQueriesD = splitMatchedQueriesDsl(matchedQueriesDsl),\n      matchedQueries = _splitMatchedQueriesD.matchedQueries,\n      references = _splitMatchedQueriesD.references,\n      matchedQueryIds = _splitMatchedQueriesD.matchedQueryIds;\n\n  if (!outputs) {\n    outputs = [];\n  }\n\n  if (!bindings) {\n    bindings = [];\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\n\n  value = resolveForwardRef(value);\n  var depDefs = splitDepsDsl(deps, stringify(token));\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: checkIndex,\n    flags: flags,\n    childFlags: 0,\n    directChildFlags: 0,\n    childMatchedQueries: 0,\n    matchedQueries: matchedQueries,\n    matchedQueryIds: matchedQueryIds,\n    references: references,\n    ngContentIndex: -1,\n    childCount: childCount,\n    bindings: bindings,\n    bindingFlags: calcBindingFlags(bindings),\n    outputs: outputs,\n    element: null,\n    provider: {\n      token: token,\n      value: value,\n      deps: depDefs\n    },\n    text: null,\n    query: null,\n    ngContent: null\n  };\n}\n\nfunction createProviderInstance(view, def) {\n  return _createProviderInstance$1(view, def);\n}\n\nfunction createPipeInstance(view, def) {\n  // deps are looked up from component.\n  var compView = view;\n\n  while (compView.parent && !isComponentView(compView)) {\n    compView = compView.parent;\n  } // pipes can see the private services of the component\n\n\n  var allowPrivateServices = true; // pipes are always eager and classes!\n\n  return createClass(compView.parent, viewParentEl(compView), allowPrivateServices, def.provider.value, def.provider.deps);\n}\n\nfunction createDirectiveInstance(view, def) {\n  // components can see other private services, other directives can't.\n  var allowPrivateServices = (def.flags & 32768\n  /* Component */\n  ) > 0; // directives are always eager and classes!\n\n  var instance = createClass(view, def.parent, allowPrivateServices, def.provider.value, def.provider.deps);\n\n  if (def.outputs.length) {\n    for (var i = 0; i < def.outputs.length; i++) {\n      var output = def.outputs[i];\n      var outputObservable = instance[output.propName];\n\n      if (isObservable(outputObservable)) {\n        var subscription = outputObservable.subscribe(eventHandlerClosure(view, def.parent.nodeIndex, output.eventName));\n        view.disposables[def.outputIndex + i] = subscription.unsubscribe.bind(subscription);\n      } else {\n        throw new Error(\"@Output \".concat(output.propName, \" not initialized in '\").concat(instance.constructor.name, \"'.\"));\n      }\n    }\n  }\n\n  return instance;\n}\n\nfunction eventHandlerClosure(view, index, eventName) {\n  return function (event) {\n    return dispatchEvent(view, index, eventName, event);\n  };\n}\n\nfunction checkAndUpdateDirectiveInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n  var providerData = asProviderData(view, def.nodeIndex);\n  var directive = providerData.instance;\n  var changed = false;\n  var changes = undefined;\n  var bindLen = def.bindings.length;\n\n  if (bindLen > 0 && checkBinding(view, def, 0, v0)) {\n    changed = true;\n    changes = updateProp(view, providerData, def, 0, v0, changes);\n  }\n\n  if (bindLen > 1 && checkBinding(view, def, 1, v1)) {\n    changed = true;\n    changes = updateProp(view, providerData, def, 1, v1, changes);\n  }\n\n  if (bindLen > 2 && checkBinding(view, def, 2, v2)) {\n    changed = true;\n    changes = updateProp(view, providerData, def, 2, v2, changes);\n  }\n\n  if (bindLen > 3 && checkBinding(view, def, 3, v3)) {\n    changed = true;\n    changes = updateProp(view, providerData, def, 3, v3, changes);\n  }\n\n  if (bindLen > 4 && checkBinding(view, def, 4, v4)) {\n    changed = true;\n    changes = updateProp(view, providerData, def, 4, v4, changes);\n  }\n\n  if (bindLen > 5 && checkBinding(view, def, 5, v5)) {\n    changed = true;\n    changes = updateProp(view, providerData, def, 5, v5, changes);\n  }\n\n  if (bindLen > 6 && checkBinding(view, def, 6, v6)) {\n    changed = true;\n    changes = updateProp(view, providerData, def, 6, v6, changes);\n  }\n\n  if (bindLen > 7 && checkBinding(view, def, 7, v7)) {\n    changed = true;\n    changes = updateProp(view, providerData, def, 7, v7, changes);\n  }\n\n  if (bindLen > 8 && checkBinding(view, def, 8, v8)) {\n    changed = true;\n    changes = updateProp(view, providerData, def, 8, v8, changes);\n  }\n\n  if (bindLen > 9 && checkBinding(view, def, 9, v9)) {\n    changed = true;\n    changes = updateProp(view, providerData, def, 9, v9, changes);\n  }\n\n  if (changes) {\n    directive.ngOnChanges(changes);\n  }\n\n  if (def.flags & 65536\n  /* OnInit */\n  && shouldCallLifecycleInitHook(view, 256\n  /* InitState_CallingOnInit */\n  , def.nodeIndex)) {\n    directive.ngOnInit();\n  }\n\n  if (def.flags & 262144\n  /* DoCheck */\n  ) {\n    directive.ngDoCheck();\n  }\n\n  return changed;\n}\n\nfunction checkAndUpdateDirectiveDynamic(view, def, values) {\n  var providerData = asProviderData(view, def.nodeIndex);\n  var directive = providerData.instance;\n  var changed = false;\n  var changes = undefined;\n\n  for (var 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\n  if (changes) {\n    directive.ngOnChanges(changes);\n  }\n\n  if (def.flags & 65536\n  /* OnInit */\n  && shouldCallLifecycleInitHook(view, 256\n  /* InitState_CallingOnInit */\n  , def.nodeIndex)) {\n    directive.ngOnInit();\n  }\n\n  if (def.flags & 262144\n  /* DoCheck */\n  ) {\n    directive.ngDoCheck();\n  }\n\n  return changed;\n}\n\nfunction _createProviderInstance$1(view, def) {\n  // private services can see other private services\n  var allowPrivateServices = (def.flags & 8192\n  /* PrivateProvider */\n  ) > 0;\n  var providerDef = def.provider;\n\n  switch (def.flags & 201347067\n  /* Types */\n  ) {\n    case 512\n    /* TypeClassProvider */\n    :\n      return createClass(view, def.parent, allowPrivateServices, providerDef.value, providerDef.deps);\n\n    case 1024\n    /* TypeFactoryProvider */\n    :\n      return callFactory(view, def.parent, allowPrivateServices, providerDef.value, providerDef.deps);\n\n    case 2048\n    /* TypeUseExistingProvider */\n    :\n      return resolveDep(view, def.parent, allowPrivateServices, providerDef.deps[0]);\n\n    case 256\n    /* TypeValueProvider */\n    :\n      return providerDef.value;\n  }\n}\n\nfunction createClass(view, elDef, allowPrivateServices, ctor, deps) {\n  var len = deps.length;\n\n  switch (len) {\n    case 0:\n      return new ctor();\n\n    case 1:\n      return new ctor(resolveDep(view, elDef, allowPrivateServices, deps[0]));\n\n    case 2:\n      return new ctor(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]));\n\n    case 3:\n      return new ctor(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]), resolveDep(view, elDef, allowPrivateServices, deps[2]));\n\n    default:\n      var depValues = [];\n\n      for (var i = 0; i < len; i++) {\n        depValues.push(resolveDep(view, elDef, allowPrivateServices, deps[i]));\n      }\n\n      return _construct(ctor, depValues);\n  }\n}\n\nfunction callFactory(view, elDef, allowPrivateServices, factory, deps) {\n  var len = deps.length;\n\n  switch (len) {\n    case 0:\n      return factory();\n\n    case 1:\n      return factory(resolveDep(view, elDef, allowPrivateServices, deps[0]));\n\n    case 2:\n      return factory(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]));\n\n    case 3:\n      return factory(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]), resolveDep(view, elDef, allowPrivateServices, deps[2]));\n\n    default:\n      var depValues = [];\n\n      for (var i = 0; i < len; i++) {\n        depValues.push(resolveDep(view, elDef, allowPrivateServices, deps[i]));\n      }\n\n      return factory.apply(void 0, depValues);\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)\n\n\nvar NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR = {};\n\nfunction resolveDep(view, elDef, allowPrivateServices, depDef) {\n  var notFoundValue = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : Injector.THROW_IF_NOT_FOUND;\n\n  if (depDef.flags & 8\n  /* Value */\n  ) {\n    return depDef.token;\n  }\n\n  var startView = view;\n\n  if (depDef.flags & 2\n  /* Optional */\n  ) {\n    notFoundValue = null;\n  }\n\n  var 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 & 1\n  /* SkipSelf */\n  ) {\n    allowPrivateServices = false;\n    elDef = elDef.parent;\n  }\n\n  var searchView = view;\n\n  while (searchView) {\n    if (elDef) {\n      switch (tokenKey) {\n        case Renderer2TokenKey:\n          {\n            var compView = findCompView(searchView, elDef, allowPrivateServices);\n            return compView.renderer;\n          }\n\n        case ElementRefTokenKey:\n          return new ElementRef(asElementData(searchView, elDef.nodeIndex).renderElement);\n\n        case ViewContainerRefTokenKey:\n          return asElementData(searchView, elDef.nodeIndex).viewContainer;\n\n        case TemplateRefTokenKey:\n          {\n            if (elDef.element.template) {\n              return asElementData(searchView, elDef.nodeIndex).template;\n            }\n\n            break;\n          }\n\n        case ChangeDetectorRefTokenKey:\n          {\n            var cdView = findCompView(searchView, elDef, allowPrivateServices);\n            return createChangeDetectorRef(cdView);\n          }\n\n        case InjectorRefTokenKey$1:\n        case INJECTORRefTokenKey$1:\n          return createInjector$1(searchView, elDef);\n\n        default:\n          var _providerDef2 = (allowPrivateServices ? elDef.element.allProviders : elDef.element.publicProviders)[tokenKey];\n\n          if (_providerDef2) {\n            var providerData = asProviderData(searchView, _providerDef2.nodeIndex);\n\n            if (!providerData) {\n              providerData = {\n                instance: _createProviderInstance$1(searchView, _providerDef2)\n              };\n              searchView.nodes[_providerDef2.nodeIndex] = providerData;\n            }\n\n            return providerData.instance;\n          }\n\n      }\n    }\n\n    allowPrivateServices = isComponentView(searchView);\n    elDef = viewParentEl(searchView);\n    searchView = searchView.parent;\n\n    if (depDef.flags & 4\n    /* Self */\n    ) {\n      searchView = null;\n    }\n  }\n\n  var value = startView.root.injector.get(depDef.token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR);\n\n  if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR || 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, elDef, allowPrivateServices) {\n  var compView;\n\n  if (allowPrivateServices) {\n    compView = asElementData(view, elDef.nodeIndex).componentView;\n  } else {\n    compView = view;\n\n    while (compView.parent && !isComponentView(compView)) {\n      compView = compView.parent;\n    }\n  }\n\n  return compView;\n}\n\nfunction updateProp(view, providerData, def, bindingIdx, value, changes) {\n  if (def.flags & 32768\n  /* Component */\n  ) {\n    var compView = asElementData(view, def.parent.nodeIndex).componentView;\n\n    if (compView.def.flags & 2\n    /* OnPush */\n    ) {\n      compView.state |= 8\n      /* ChecksEnabled */\n      ;\n    }\n  }\n\n  var binding = def.bindings[bindingIdx];\n  var propName = binding.name; // 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\n  providerData.instance[propName] = value;\n\n  if (def.flags & 524288\n  /* OnChanges */\n  ) {\n    changes = changes || {};\n    var oldValue = WrappedValue.unwrap(view.oldValues[def.bindingIndex + bindingIdx]);\n    var _binding = def.bindings[bindingIdx];\n    changes[_binding.nonMinifiedName] = new SimpleChange(oldValue, value, (view.state & 2\n    /* FirstCheck */\n    ) !== 0);\n  }\n\n  view.oldValues[def.bindingIndex + bindingIdx] = value;\n  return changes;\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().\n\n\nfunction callLifecycleHooksChildrenFirst(view, lifecycles) {\n  if (!(view.def.nodeFlags & lifecycles)) {\n    return;\n  }\n\n  var nodes = view.def.nodes;\n  var initIndex = 0;\n\n  for (var i = 0; i < nodes.length; i++) {\n    var nodeDef = nodes[i];\n    var parent = nodeDef.parent;\n\n    if (!parent && nodeDef.flags & lifecycles) {\n      // matching root node (e.g. a pipe)\n      callProviderLifecycles(view, i, nodeDef.flags & lifecycles, initIndex++);\n    }\n\n    if ((nodeDef.childFlags & lifecycles) === 0) {\n      // no child matches one of the lifecycles\n      i += nodeDef.childCount;\n    }\n\n    while (parent && parent.flags & 1\n    /* 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\n      parent = parent.parent;\n    }\n  }\n}\n\nfunction callElementProvidersLifecycles(view, elDef, lifecycles, initIndex) {\n  for (var i = elDef.nodeIndex + 1; i <= elDef.nodeIndex + elDef.childCount; i++) {\n    var nodeDef = view.def.nodes[i];\n\n    if (nodeDef.flags & lifecycles) {\n      callProviderLifecycles(view, i, nodeDef.flags & lifecycles, initIndex++);\n    } // only visit direct children\n\n\n    i += nodeDef.childCount;\n  }\n\n  return initIndex;\n}\n\nfunction callProviderLifecycles(view, index, lifecycles, initIndex) {\n  var providerData = asProviderData(view, index);\n\n  if (!providerData) {\n    return;\n  }\n\n  var provider = providerData.instance;\n\n  if (!provider) {\n    return;\n  }\n\n  Services.setCurrentNode(view, index);\n\n  if (lifecycles & 1048576\n  /* AfterContentInit */\n  && shouldCallLifecycleInitHook(view, 512\n  /* InitState_CallingAfterContentInit */\n  , initIndex)) {\n    provider.ngAfterContentInit();\n  }\n\n  if (lifecycles & 2097152\n  /* AfterContentChecked */\n  ) {\n    provider.ngAfterContentChecked();\n  }\n\n  if (lifecycles & 4194304\n  /* AfterViewInit */\n  && shouldCallLifecycleInitHook(view, 768\n  /* InitState_CallingAfterViewInit */\n  , initIndex)) {\n    provider.ngAfterViewInit();\n  }\n\n  if (lifecycles & 8388608\n  /* AfterViewChecked */\n  ) {\n    provider.ngAfterViewChecked();\n  }\n\n  if (lifecycles & 131072\n  /* OnDestroy */\n  ) {\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\n\nvar ComponentFactoryResolver$1 = /*#__PURE__*/function (_ComponentFactoryReso) {\n  _inherits(ComponentFactoryResolver$1, _ComponentFactoryReso);\n\n  var _super14 = _createSuper(ComponentFactoryResolver$1);\n\n  /**\n   * @param ngModule The NgModuleRef to which all resolved factories are bound.\n   */\n  function ComponentFactoryResolver$1(ngModule) {\n    var _this15;\n\n    _classCallCheck(this, ComponentFactoryResolver$1);\n\n    _this15 = _super14.call(this);\n    _this15.ngModule = ngModule;\n    return _this15;\n  }\n\n  _createClass2(ComponentFactoryResolver$1, [{\n    key: \"resolveComponentFactory\",\n    value: function resolveComponentFactory(component) {\n      ngDevMode && assertComponentType(component);\n      var componentDef = getComponentDef(component);\n      return new ComponentFactory$1(componentDef, this.ngModule);\n    }\n  }]);\n\n  return ComponentFactoryResolver$1;\n}(ComponentFactoryResolver);\n\nfunction toRefArray(map) {\n  var array = [];\n\n  for (var nonMinified in map) {\n    if (map.hasOwnProperty(nonMinified)) {\n      var minified = map[nonMinified];\n      array.push({\n        propName: minified,\n        templateName: nonMinified\n      });\n    }\n  }\n\n  return array;\n}\n\nfunction getNamespace$1(elementName) {\n  var name = elementName.toLowerCase();\n  return name === 'svg' ? SVG_NAMESPACE : name === 'math' ? MATH_ML_NAMESPACE : null;\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 */\n\n\nvar SCHEDULER = /*@__PURE__*/new InjectionToken('SCHEDULER_TOKEN', {\n  providedIn: 'root',\n  factory: function factory() {\n    return defaultScheduler;\n  }\n});\n\nfunction createChainedInjector(rootViewInjector, moduleInjector) {\n  return {\n    get: function get(token, notFoundValue, flags) {\n      var value = rootViewInjector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, flags);\n\n      if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR || 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 * Render3 implementation of {@link viewEngine_ComponentFactory}.\n */\n\n\nvar ComponentFactory$1 = /*#__PURE__*/function (_ComponentFactory3) {\n  _inherits(ComponentFactory$1, _ComponentFactory3);\n\n  var _super15 = _createSuper(ComponentFactory$1);\n\n  /**\n   * @param componentDef The component definition.\n   * @param ngModule The NgModuleRef to which the factory is bound.\n   */\n  function ComponentFactory$1(componentDef, ngModule) {\n    var _this16;\n\n    _classCallCheck(this, ComponentFactory$1);\n\n    _this16 = _super15.call(this);\n    _this16.componentDef = componentDef;\n    _this16.ngModule = ngModule;\n    _this16.componentType = componentDef.type;\n    _this16.selector = stringifyCSSSelectorList(componentDef.selectors);\n    _this16.ngContentSelectors = componentDef.ngContentSelectors ? componentDef.ngContentSelectors : [];\n    _this16.isBoundToModule = !!ngModule;\n    return _this16;\n  }\n\n  _createClass2(ComponentFactory$1, [{\n    key: \"inputs\",\n    get: function get() {\n      return toRefArray(this.componentDef.inputs);\n    }\n  }, {\n    key: \"outputs\",\n    get: function get() {\n      return toRefArray(this.componentDef.outputs);\n    }\n  }, {\n    key: \"create\",\n    value: function create(injector, projectableNodes, rootSelectorOrNode, ngModule) {\n      ngModule = ngModule || this.ngModule;\n      var rootViewInjector = ngModule ? createChainedInjector(injector, ngModule.injector) : injector;\n      var rendererFactory = rootViewInjector.get(RendererFactory2, domRendererFactory3);\n      var sanitizer = rootViewInjector.get(Sanitizer, null);\n      var hostRenderer = rendererFactory.createRenderer(null, this.componentDef); // 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\n      var elementName = this.componentDef.selectors[0][0] || 'div';\n      var hostRNode = rootSelectorOrNode ? locateHostElement(hostRenderer, rootSelectorOrNode, this.componentDef.encapsulation) : createElementNode(rendererFactory.createRenderer(null, this.componentDef), elementName, getNamespace$1(elementName));\n      var rootFlags = this.componentDef.onPush ? 64\n      /* Dirty */\n      | 512\n      /* IsRoot */\n      : 16\n      /* CheckAlways */\n      | 512\n      /* IsRoot */\n      ;\n      var rootContext = createRootContext(); // Create the root view. Uses empty TView and ContentTemplate.\n\n      var rootTView = createTView(0\n      /* Root */\n      , null, null, 1, 0, null, null, null, null, null);\n      var rootLView = createLView(null, rootTView, rootContext, rootFlags, null, null, rendererFactory, hostRenderer, sanitizer, rootViewInjector); // 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\n      enterView(rootLView);\n      var component;\n      var tElementNode;\n\n      try {\n        var componentView = createRootComponentView(hostRNode, this.componentDef, rootLView, rendererFactory, hostRenderer);\n\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            var _extractAttrsAndClass = extractAttrsAndClassesFromSelector(this.componentDef.selectors[0]),\n                attrs = _extractAttrsAndClass.attrs,\n                classes = _extractAttrsAndClass.classes;\n\n            if (attrs) {\n              setUpAttributes(hostRenderer, hostRNode, attrs);\n            }\n\n            if (classes && classes.length > 0) {\n              writeDirectClass(hostRenderer, hostRNode, classes.join(' '));\n            }\n          }\n        }\n\n        tElementNode = getTNode(rootTView, HEADER_OFFSET);\n\n        if (projectableNodes !== undefined) {\n          var projection = tElementNode.projection = [];\n\n          for (var i = 0; i < this.ngContentSelectors.length; i++) {\n            var nodesforSlot = projectableNodes[i]; // 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\n            projection.push(nodesforSlot != null ? Array.from(nodesforSlot) : null);\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\n\n        component = createRootComponent(componentView, this.componentDef, rootLView, rootContext, [LifecycleHooksFeature]);\n        renderView(rootTView, rootLView, null);\n      } finally {\n        leaveView();\n      }\n\n      return new ComponentRef$1(this.componentType, component, createElementRef(tElementNode, rootLView), rootLView, tElementNode);\n    }\n  }]);\n\n  return ComponentFactory$1;\n}(ComponentFactory);\n\nvar componentFactoryResolver = /*@__PURE__*/new ComponentFactoryResolver$1();\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 */\n\nfunction injectComponentFactoryResolver() {\n  return componentFactoryResolver;\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 */\n\n\nvar ComponentRef$1 = /*#__PURE__*/function (_ComponentRef2) {\n  _inherits(ComponentRef$1, _ComponentRef2);\n\n  var _super16 = _createSuper(ComponentRef$1);\n\n  function ComponentRef$1(componentType, instance, location, _rootLView, _tNode) {\n    var _this17;\n\n    _classCallCheck(this, ComponentRef$1);\n\n    _this17 = _super16.call(this);\n    _this17.location = location;\n    _this17._rootLView = _rootLView;\n    _this17._tNode = _tNode;\n    _this17.instance = instance;\n    _this17.hostView = _this17.changeDetectorRef = new RootViewRef(_rootLView);\n    _this17.componentType = componentType;\n    return _this17;\n  }\n\n  _createClass2(ComponentRef$1, [{\n    key: \"injector\",\n    get: function get() {\n      return new NodeInjector(this._tNode, this._rootLView);\n    }\n  }, {\n    key: \"destroy\",\n    value: function destroy() {\n      this.hostView.destroy();\n    }\n  }, {\n    key: \"onDestroy\",\n    value: function onDestroy(callback) {\n      this.hostView.onDestroy(callback);\n    }\n  }]);\n\n  return ComponentRef$1;\n}(ComponentRef);\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * 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 */\n\n\nfunction setClassMetadata(type, decorators, ctorParameters, propDecorators) {\n  return noSideEffects(function () {\n    var clazz = type;\n\n    if (decorators !== null) {\n      if (clazz.hasOwnProperty('decorators') && clazz.decorators !== undefined) {\n        var _clazz$decorators;\n\n        (_clazz$decorators = clazz.decorators).push.apply(_clazz$decorators, _toConsumableArray(decorators));\n      } else {\n        clazz.decorators = decorators;\n      }\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\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 = Object.assign(Object.assign({}, clazz.propDecorators), propDecorators);\n      } else {\n        clazz.propDecorators = propDecorators;\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\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 */\n\n\nvar modules = /*@__PURE__*/new Map();\n/**\n * Registers a loaded module. Should only be called from generated NgModuleFactory code.\n * @publicApi\n */\n\nfunction registerModuleFactory(id, factory) {\n  var existing = modules.get(id);\n  assertSameOrNotExisting(id, existing && existing.moduleType, factory.moduleType);\n  modules.set(id, factory);\n}\n\nfunction assertSameOrNotExisting(id, type, incoming) {\n  if (type && type !== incoming) {\n    throw new Error(\"Duplicate module registered for \".concat(id, \" - \").concat(stringify(type), \" vs \").concat(stringify(type.name)));\n  }\n}\n\nfunction registerNgModuleType(ngModuleType) {\n  var visited = new Set();\n  recurse(ngModuleType);\n\n  function recurse(ngModuleType) {\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    var def = getNgModuleDef(ngModuleType,\n    /* throwNotFound */\n    true);\n    var id = def.id;\n\n    if (id !== null) {\n      var existing = modules.get(id);\n      assertSameOrNotExisting(id, existing, ngModuleType);\n      modules.set(id, ngModuleType);\n    }\n\n    var imports = maybeUnwrapFn(def.imports);\n\n    var _iterator4 = _createForOfIteratorHelper(imports),\n        _step4;\n\n    try {\n      for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n        var i = _step4.value;\n\n        if (!visited.has(i)) {\n          visited.add(i);\n          recurse(i);\n        }\n      }\n    } catch (err) {\n      _iterator4.e(err);\n    } finally {\n      _iterator4.f();\n    }\n  }\n}\n\nfunction clearModulesForTest() {\n  modules.clear();\n}\n\nfunction getRegisteredNgModuleType(id) {\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\n\nvar NgModuleRef$1 = /*#__PURE__*/function (_NgModuleRef) {\n  _inherits(NgModuleRef$1, _NgModuleRef);\n\n  var _super17 = _createSuper(NgModuleRef$1);\n\n  function NgModuleRef$1(ngModuleType, _parent) {\n    var _this18;\n\n    _classCallCheck(this, NgModuleRef$1);\n\n    _this18 = _super17.call(this);\n    _this18._parent = _parent; // tslint:disable-next-line:require-internal-with-underscore\n\n    _this18._bootstrapComponents = [];\n    _this18.injector = _assertThisInitialized(_this18);\n    _this18.destroyCbs = []; // 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\n    _this18.componentFactoryResolver = new ComponentFactoryResolver$1(_assertThisInitialized(_this18));\n    var ngModuleDef = getNgModuleDef(ngModuleType);\n    ngDevMode && assertDefined(ngModuleDef, \"NgModule '\".concat(stringify(ngModuleType), \"' is not a subtype of 'NgModuleType'.\"));\n    var ngLocaleIdDef = getNgLocaleIdDef(ngModuleType);\n    ngLocaleIdDef && setLocaleId(ngLocaleIdDef);\n    _this18._bootstrapComponents = maybeUnwrapFn(ngModuleDef.bootstrap);\n    _this18._r3Injector = createInjectorWithoutInjectorInstances(ngModuleType, _parent, [{\n      provide: NgModuleRef,\n      useValue: _assertThisInitialized(_this18)\n    }, {\n      provide: ComponentFactoryResolver,\n      useValue: _this18.componentFactoryResolver\n    }], stringify(ngModuleType)); // 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\n    _this18._r3Injector._resolveInjectorDefTypes();\n\n    _this18.instance = _this18.get(ngModuleType);\n    return _this18;\n  }\n\n  _createClass2(NgModuleRef$1, [{\n    key: \"get\",\n    value: function get(token) {\n      var notFoundValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Injector.THROW_IF_NOT_FOUND;\n      var injectFlags = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : InjectFlags.Default;\n\n      if (token === Injector || token === NgModuleRef || token === INJECTOR$1) {\n        return this;\n      }\n\n      return this._r3Injector.get(token, notFoundValue, injectFlags);\n    }\n  }, {\n    key: \"destroy\",\n    value: function destroy() {\n      ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');\n      var injector = this._r3Injector;\n      !injector.destroyed && injector.destroy();\n      this.destroyCbs.forEach(function (fn) {\n        return fn();\n      });\n      this.destroyCbs = null;\n    }\n  }, {\n    key: \"onDestroy\",\n    value: function onDestroy(callback) {\n      ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');\n      this.destroyCbs.push(callback);\n    }\n  }]);\n\n  return NgModuleRef$1;\n}(NgModuleRef);\n\nvar NgModuleFactory$1 = /*#__PURE__*/function (_NgModuleFactory) {\n  _inherits(NgModuleFactory$1, _NgModuleFactory);\n\n  var _super18 = _createSuper(NgModuleFactory$1);\n\n  function NgModuleFactory$1(moduleType) {\n    var _this19;\n\n    _classCallCheck(this, NgModuleFactory$1);\n\n    _this19 = _super18.call(this);\n    _this19.moduleType = moduleType;\n    var ngModuleDef = getNgModuleDef(moduleType);\n\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);\n    }\n\n    return _this19;\n  }\n\n  _createClass2(NgModuleFactory$1, [{\n    key: \"create\",\n    value: function create(parentInjector) {\n      return new NgModuleRef$1(this.moduleType, parentInjector);\n    }\n  }]);\n\n  return NgModuleFactory$1;\n}(NgModuleFactory);\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * 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 */\n\n\nfunction ɵɵpureFunction0(slotOffset, pureFn, thisArg) {\n  var bindingIndex = getBindingRoot() + slotOffset;\n  var lView = getLView();\n  return lView[bindingIndex] === NO_CHANGE ? updateBinding(lView, bindingIndex, thisArg ? pureFn.call(thisArg) : pureFn()) : getBinding(lView, bindingIndex);\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 */\n\n\nfunction ɵɵpureFunction1(slotOffset, pureFn, exp, thisArg) {\n  return pureFunction1Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp, thisArg);\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 */\n\n\nfunction ɵɵpureFunction2(slotOffset, pureFn, exp1, exp2, thisArg) {\n  return pureFunction2Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, thisArg);\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 */\n\n\nfunction ɵɵpureFunction3(slotOffset, pureFn, exp1, exp2, exp3, thisArg) {\n  return pureFunction3Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, exp3, thisArg);\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 */\n\n\nfunction ɵɵpureFunction4(slotOffset, pureFn, exp1, exp2, exp3, exp4, thisArg) {\n  return pureFunction4Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, exp3, exp4, thisArg);\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 */\n\n\nfunction ɵɵpureFunction5(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, thisArg) {\n  var bindingIndex = getBindingRoot() + slotOffset;\n  var lView = getLView();\n  var different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n  return bindingUpdated(lView, bindingIndex + 4, exp5) || different ? updateBinding(lView, bindingIndex + 5, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5) : pureFn(exp1, exp2, exp3, exp4, exp5)) : getBinding(lView, bindingIndex + 5);\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 */\n\n\nfunction ɵɵpureFunction6(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, thisArg) {\n  var bindingIndex = getBindingRoot() + slotOffset;\n  var lView = getLView();\n  var different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n  return bindingUpdated2(lView, bindingIndex + 4, exp5, exp6) || different ? updateBinding(lView, bindingIndex + 6, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6) : pureFn(exp1, exp2, exp3, exp4, exp5, exp6)) : getBinding(lView, bindingIndex + 6);\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 */\n\n\nfunction ɵɵpureFunction7(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, exp7, thisArg) {\n  var bindingIndex = getBindingRoot() + slotOffset;\n  var lView = getLView();\n  var different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n  return bindingUpdated3(lView, bindingIndex + 4, exp5, exp6, exp7) || different ? updateBinding(lView, bindingIndex + 7, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7) : pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7)) : getBinding(lView, bindingIndex + 7);\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 */\n\n\nfunction ɵɵpureFunction8(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8, thisArg) {\n  var bindingIndex = getBindingRoot() + slotOffset;\n  var lView = getLView();\n  var different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n  return bindingUpdated4(lView, bindingIndex + 4, exp5, exp6, exp7, exp8) || different ? updateBinding(lView, bindingIndex + 8, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8) : pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8)) : getBinding(lView, bindingIndex + 8);\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 */\n\n\nfunction ɵɵpureFunctionV(slotOffset, pureFn, exps, thisArg) {\n  return pureFunctionVInternal(getLView(), getBindingRoot(), slotOffset, pureFn, exps, thisArg);\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 */\n\n\nfunction getPureFunctionReturnValue(lView, returnValueIndex) {\n  ngDevMode && assertIndexInRange(lView, returnValueIndex);\n  var lastReturnValue = lView[returnValueIndex];\n  return lastReturnValue === NO_CHANGE ? undefined : lastReturnValue;\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 */\n\n\nfunction pureFunction1Internal(lView, bindingRoot, slotOffset, pureFn, exp, thisArg) {\n  var bindingIndex = bindingRoot + slotOffset;\n  return bindingUpdated(lView, bindingIndex, exp) ? updateBinding(lView, bindingIndex + 1, thisArg ? pureFn.call(thisArg, exp) : pureFn(exp)) : getPureFunctionReturnValue(lView, bindingIndex + 1);\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 */\n\n\nfunction pureFunction2Internal(lView, bindingRoot, slotOffset, pureFn, exp1, exp2, thisArg) {\n  var bindingIndex = bindingRoot + slotOffset;\n  return bindingUpdated2(lView, bindingIndex, exp1, exp2) ? updateBinding(lView, bindingIndex + 2, thisArg ? pureFn.call(thisArg, exp1, exp2) : pureFn(exp1, exp2)) : getPureFunctionReturnValue(lView, bindingIndex + 2);\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 */\n\n\nfunction pureFunction3Internal(lView, bindingRoot, slotOffset, pureFn, exp1, exp2, exp3, thisArg) {\n  var bindingIndex = bindingRoot + slotOffset;\n  return bindingUpdated3(lView, bindingIndex, exp1, exp2, exp3) ? updateBinding(lView, bindingIndex + 3, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3) : pureFn(exp1, exp2, exp3)) : getPureFunctionReturnValue(lView, bindingIndex + 3);\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 */\n\n\nfunction pureFunction4Internal(lView, bindingRoot, slotOffset, pureFn, exp1, exp2, exp3, exp4, thisArg) {\n  var bindingIndex = bindingRoot + slotOffset;\n  return bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4) ? updateBinding(lView, bindingIndex + 4, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4) : pureFn(exp1, exp2, exp3, exp4)) : getPureFunctionReturnValue(lView, bindingIndex + 4);\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 */\n\n\nfunction pureFunctionVInternal(lView, bindingRoot, slotOffset, pureFn, exps, thisArg) {\n  var bindingIndex = bindingRoot + slotOffset;\n  var different = false;\n\n  for (var i = 0; i < exps.length; i++) {\n    bindingUpdated(lView, bindingIndex++, exps[i]) && (different = true);\n  }\n\n  return different ? updateBinding(lView, bindingIndex, pureFn.apply(thisArg, exps)) : 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\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 */\n\n\nfunction ɵɵpipe(index, pipeName) {\n  var tView = getTView();\n  var pipeDef;\n  var adjustedIndex = index + HEADER_OFFSET;\n\n  if (tView.firstCreatePass) {\n    pipeDef = getPipeDef$1(pipeName, tView.pipeRegistry);\n    tView.data[adjustedIndex] = pipeDef;\n\n    if (pipeDef.onDestroy) {\n      (tView.destroyHooks || (tView.destroyHooks = [])).push(adjustedIndex, pipeDef.onDestroy);\n    }\n  } else {\n    pipeDef = tView.data[adjustedIndex];\n  }\n\n  var pipeFactory = pipeDef.factory || (pipeDef.factory = getFactoryDef(pipeDef.type, true));\n  var previousInjectImplementation = setInjectImplementation(ɵɵdirectiveInject);\n\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    var previousIncludeViewProviders = setIncludeViewProviders(false);\n    var 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 * 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 */\n\n\nfunction getPipeDef$1(name, registry) {\n  if (registry) {\n    for (var i = registry.length - 1; i >= 0; i--) {\n      var _pipeDef = registry[i];\n\n      if (name === _pipeDef.name) {\n        return _pipeDef;\n      }\n    }\n  }\n\n  throw new RuntimeError(\"302\"\n  /* PIPE_NOT_FOUND */\n  , \"The pipe '\".concat(name, \"' could not be found!\"));\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 */\n\n\nfunction ɵɵpipeBind1(index, slotOffset, v1) {\n  var adjustedIndex = index + HEADER_OFFSET;\n  var lView = getLView();\n  var pipeInstance = load(lView, adjustedIndex);\n  return unwrapValue$1(lView, isPure(lView, adjustedIndex) ? pureFunction1Internal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, pipeInstance) : pipeInstance.transform(v1));\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 */\n\n\nfunction ɵɵpipeBind2(index, slotOffset, v1, v2) {\n  var adjustedIndex = index + HEADER_OFFSET;\n  var lView = getLView();\n  var pipeInstance = load(lView, adjustedIndex);\n  return unwrapValue$1(lView, isPure(lView, adjustedIndex) ? pureFunction2Internal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, v2, pipeInstance) : pipeInstance.transform(v1, v2));\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 */\n\n\nfunction ɵɵpipeBind3(index, slotOffset, v1, v2, v3) {\n  var adjustedIndex = index + HEADER_OFFSET;\n  var lView = getLView();\n  var pipeInstance = load(lView, adjustedIndex);\n  return unwrapValue$1(lView, isPure(lView, adjustedIndex) ? pureFunction3Internal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, v2, v3, pipeInstance) : pipeInstance.transform(v1, v2, v3));\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 */\n\n\nfunction ɵɵpipeBind4(index, slotOffset, v1, v2, v3, v4) {\n  var adjustedIndex = index + HEADER_OFFSET;\n  var lView = getLView();\n  var pipeInstance = load(lView, adjustedIndex);\n  return unwrapValue$1(lView, isPure(lView, adjustedIndex) ? pureFunction4Internal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, v2, v3, v4, pipeInstance) : pipeInstance.transform(v1, v2, v3, v4));\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 */\n\n\nfunction ɵɵpipeBindV(index, slotOffset, values) {\n  var adjustedIndex = index + HEADER_OFFSET;\n  var lView = getLView();\n  var pipeInstance = load(lView, adjustedIndex);\n  return unwrapValue$1(lView, isPure(lView, adjustedIndex) ? pureFunctionVInternal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, values, pipeInstance) : pipeInstance.transform.apply(pipeInstance, values));\n}\n\nfunction isPure(lView, index) {\n  return lView[TVIEW].data[index].pure;\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 */\n\n\nfunction unwrapValue$1(lView, newValue) {\n  if (WrappedValue.isWrapped(newValue)) {\n    newValue = WrappedValue.unwrap(newValue); // The NO_CHANGE value needs to be written at the index where the impacted binding value is\n    // stored\n\n    var bindingToInvalidateIdx = getBindingIndex();\n    lView[bindingToInvalidateIdx] = NO_CHANGE;\n  }\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\nvar EventEmitter_ = /*#__PURE__*/function (_Subject) {\n  _inherits(EventEmitter_, _Subject);\n\n  var _super19 = _createSuper(EventEmitter_);\n\n  function EventEmitter_() {\n    var _this20;\n\n    var isAsync = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n    _classCallCheck(this, EventEmitter_);\n\n    _this20 = _super19.call(this);\n    _this20.__isAsync = isAsync;\n    return _this20;\n  }\n\n  _createClass2(EventEmitter_, [{\n    key: \"emit\",\n    value: function emit(value) {\n      _get(_getPrototypeOf(EventEmitter_.prototype), \"next\", this).call(this, value);\n    }\n  }, {\n    key: \"subscribe\",\n    value: function subscribe(observerOrNext, error, complete) {\n      var _a, _b, _c;\n\n      var nextFn = observerOrNext;\n\n      var errorFn = error || function () {\n        return null;\n      };\n\n      var completeFn = complete;\n\n      if (observerOrNext && typeof observerOrNext === 'object') {\n        var observer = observerOrNext;\n        nextFn = (_a = observer.next) === null || _a === void 0 ? void 0 : _a.bind(observer);\n        errorFn = (_b = observer.error) === null || _b === void 0 ? void 0 : _b.bind(observer);\n        completeFn = (_c = observer.complete) === null || _c === void 0 ? void 0 : _c.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      var sink = _get(_getPrototypeOf(EventEmitter_.prototype), \"subscribe\", this).call(this, {\n        next: nextFn,\n        error: errorFn,\n        complete: completeFn\n      });\n\n      if (observerOrNext instanceof Subscription) {\n        observerOrNext.add(sink);\n      }\n\n      return sink;\n    }\n  }]);\n\n  return EventEmitter_;\n}(Subject);\n\nfunction _wrapInTimeout(fn) {\n  return function (value) {\n    setTimeout(fn, undefined, value);\n  };\n}\n/**\n * @publicApi\n */\n\n\nvar EventEmitter = EventEmitter_;\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nfunction symbolIterator() {\n  return this._results[getSymbolIterator()]();\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 */\n\n\nvar QueryList = /*#__PURE__*/function () {\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  function QueryList() {\n    var _emitDistinctChangesOnly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n    _classCallCheck(this, QueryList);\n\n    this._emitDistinctChangesOnly = _emitDistinctChangesOnly;\n    this.dirty = true;\n    this._results = [];\n    this._changesDetected = false;\n    this._changes = null;\n    this.length = 0;\n    this.first = undefined;\n    this.last = undefined; // 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\n    var symbol = getSymbolIterator();\n    var proto = QueryList.prototype;\n    if (!proto[symbol]) proto[symbol] = symbolIterator;\n  }\n  /**\n   * Returns `Observable` of `QueryList` notifying the subscriber of changes.\n   */\n\n\n  _createClass2(QueryList, [{\n    key: \"changes\",\n    get: function get() {\n      return this._changes || (this._changes = new EventEmitter());\n    }\n    /**\n     * Returns the QueryList entry at `index`.\n     */\n\n  }, {\n    key: \"get\",\n    value: function get(index) {\n      return this._results[index];\n    }\n    /**\n     * See\n     * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\n     */\n\n  }, {\n    key: \"map\",\n    value: function map(fn) {\n      return this._results.map(fn);\n    }\n    /**\n     * See\n     * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)\n     */\n\n  }, {\n    key: \"filter\",\n    value: function filter(fn) {\n      return this._results.filter(fn);\n    }\n    /**\n     * See\n     * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)\n     */\n\n  }, {\n    key: \"find\",\n    value: function find(fn) {\n      return this._results.find(fn);\n    }\n    /**\n     * See\n     * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)\n     */\n\n  }, {\n    key: \"reduce\",\n    value: function reduce(fn, init) {\n      return this._results.reduce(fn, init);\n    }\n    /**\n     * See\n     * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)\n     */\n\n  }, {\n    key: \"forEach\",\n    value: function forEach(fn) {\n      this._results.forEach(fn);\n    }\n    /**\n     * See\n     * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)\n     */\n\n  }, {\n    key: \"some\",\n    value: function some(fn) {\n      return this._results.some(fn);\n    }\n    /**\n     * Returns a copy of the internal results list as an Array.\n     */\n\n  }, {\n    key: \"toArray\",\n    value: function toArray() {\n      return this._results.slice();\n    }\n  }, {\n    key: \"toString\",\n    value: function toString() {\n      return this._results.toString();\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\n  }, {\n    key: \"reset\",\n    value: function reset(resultsTree, identityAccessor) {\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      var self = this;\n      self.dirty = false;\n      var newResultFlat = flatten(resultsTree);\n\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     * Triggers a change event by emitting on the `changes` {@link EventEmitter}.\n     */\n\n  }, {\n    key: \"notifyOnChanges\",\n    value: function notifyOnChanges() {\n      if (this._changes && (this._changesDetected || !this._emitDistinctChangesOnly)) this._changes.emit(this);\n    }\n    /** internal */\n\n  }, {\n    key: \"setDirty\",\n    value: function setDirty() {\n      this.dirty = true;\n    }\n    /** internal */\n\n  }, {\n    key: \"destroy\",\n    value: function destroy() {\n      this.changes.complete();\n      this.changes.unsubscribe();\n    }\n  }]);\n\n  return QueryList;\n}();\n\nSymbol.iterator;\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\n\nvar unusedValueExportToPlacateAjd$7 = 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// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\n\nvar unusedValueExportToPlacateAjd$8 = 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\nvar unusedValueToPlacateAjd$2 = unusedValueExportToPlacateAjd$7 + unusedValueExportToPlacateAjd$3 + unusedValueExportToPlacateAjd$4 + unusedValueExportToPlacateAjd$8;\n\nvar LQuery_ = /*#__PURE__*/function () {\n  function LQuery_(queryList) {\n    _classCallCheck(this, LQuery_);\n\n    this.queryList = queryList;\n    this.matches = null;\n  }\n\n  _createClass2(LQuery_, [{\n    key: \"clone\",\n    value: function clone() {\n      return new LQuery_(this.queryList);\n    }\n  }, {\n    key: \"setDirty\",\n    value: function setDirty() {\n      this.queryList.setDirty();\n    }\n  }]);\n\n  return LQuery_;\n}();\n\nvar LQueries_ = /*#__PURE__*/function () {\n  function LQueries_() {\n    var queries = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\n    _classCallCheck(this, LQueries_);\n\n    this.queries = queries;\n  }\n\n  _createClass2(LQueries_, [{\n    key: \"createEmbeddedView\",\n    value: function createEmbeddedView(tView) {\n      var tQueries = tView.queries;\n\n      if (tQueries !== null) {\n        var noOfInheritedQueries = tView.contentQueries !== null ? tView.contentQueries[0] : tQueries.length;\n        var viewLQueries = []; // 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\n        for (var i = 0; i < noOfInheritedQueries; i++) {\n          var tQuery = tQueries.getByIndex(i);\n          var 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    key: \"insertView\",\n    value: function insertView(tView) {\n      this.dirtyQueriesWithMatches(tView);\n    }\n  }, {\n    key: \"detachView\",\n    value: function detachView(tView) {\n      this.dirtyQueriesWithMatches(tView);\n    }\n  }, {\n    key: \"dirtyQueriesWithMatches\",\n    value: function dirtyQueriesWithMatches(tView) {\n      for (var i = 0; i < this.queries.length; i++) {\n        if (getTQuery(tView, i).matches !== null) {\n          this.queries[i].setDirty();\n        }\n      }\n    }\n  }]);\n\n  return LQueries_;\n}();\n\nvar TQueryMetadata_ = /*#__PURE__*/_createClass2(function TQueryMetadata_(predicate, flags) {\n  var read = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n\n  _classCallCheck(this, TQueryMetadata_);\n\n  this.predicate = predicate;\n  this.flags = flags;\n  this.read = read;\n});\n\nvar TQueries_ = /*#__PURE__*/function () {\n  function TQueries_() {\n    var queries = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\n    _classCallCheck(this, TQueries_);\n\n    this.queries = queries;\n  }\n\n  _createClass2(TQueries_, [{\n    key: \"elementStart\",\n    value: function elementStart(tView, tNode) {\n      ngDevMode && assertFirstCreatePass(tView, 'Queries should collect results on the first template pass only');\n\n      for (var i = 0; i < this.queries.length; i++) {\n        this.queries[i].elementStart(tView, tNode);\n      }\n    }\n  }, {\n    key: \"elementEnd\",\n    value: function elementEnd(tNode) {\n      for (var i = 0; i < this.queries.length; i++) {\n        this.queries[i].elementEnd(tNode);\n      }\n    }\n  }, {\n    key: \"embeddedTView\",\n    value: function embeddedTView(tNode) {\n      var queriesForTemplateRef = null;\n\n      for (var i = 0; i < this.length; i++) {\n        var childQueryIndex = queriesForTemplateRef !== null ? queriesForTemplateRef.length : 0;\n        var tqueryClone = this.getByIndex(i).embeddedTView(tNode, childQueryIndex);\n\n        if (tqueryClone) {\n          tqueryClone.indexInDeclarationView = i;\n\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    key: \"template\",\n    value: function template(tView, tNode) {\n      ngDevMode && assertFirstCreatePass(tView, 'Queries should collect results on the first template pass only');\n\n      for (var i = 0; i < this.queries.length; i++) {\n        this.queries[i].template(tView, tNode);\n      }\n    }\n  }, {\n    key: \"getByIndex\",\n    value: function getByIndex(index) {\n      ngDevMode && assertIndexInRange(this.queries, index);\n      return this.queries[index];\n    }\n  }, {\n    key: \"length\",\n    get: function get() {\n      return this.queries.length;\n    }\n  }, {\n    key: \"track\",\n    value: function track(tquery) {\n      this.queries.push(tquery);\n    }\n  }]);\n\n  return TQueries_;\n}();\n\nvar TQuery_ = /*#__PURE__*/function () {\n  function TQuery_(metadata) {\n    var nodeIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : -1;\n\n    _classCallCheck(this, TQuery_);\n\n    this.metadata = metadata;\n    this.matches = null;\n    this.indexInDeclarationView = -1;\n    this.crossesNgTemplate = false;\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\n    this._appliesToNextNode = true;\n    this._declarationNodeIndex = nodeIndex;\n  }\n\n  _createClass2(TQuery_, [{\n    key: \"elementStart\",\n    value: function elementStart(tView, tNode) {\n      if (this.isApplyingToNode(tNode)) {\n        this.matchTNode(tView, tNode);\n      }\n    }\n  }, {\n    key: \"elementEnd\",\n    value: function elementEnd(tNode) {\n      if (this._declarationNodeIndex === tNode.index) {\n        this._appliesToNextNode = false;\n      }\n    }\n  }, {\n    key: \"template\",\n    value: function template(tView, tNode) {\n      this.elementStart(tView, tNode);\n    }\n  }, {\n    key: \"embeddedTView\",\n    value: function embeddedTView(tNode, childQueryIndex) {\n      if (this.isApplyingToNode(tNode)) {\n        this.crossesNgTemplate = true; // A marker indicating a `<ng-template>` element (a placeholder for query results from\n        // embedded views created based on this `<ng-template>`).\n\n        this.addMatch(-tNode.index, childQueryIndex);\n        return new TQuery_(this.metadata);\n      }\n\n      return null;\n    }\n  }, {\n    key: \"isApplyingToNode\",\n    value: function isApplyingToNode(tNode) {\n      if (this._appliesToNextNode && (this.metadata.flags & 1\n      /* descendants */\n      ) !== 1\n      /* descendants */\n      ) {\n        var declarationNodeIdx = this._declarationNodeIndex;\n        var parent = tNode.parent; // 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\n        while (parent !== null && parent.type & 8\n        /* ElementContainer */\n        && parent.index !== declarationNodeIdx) {\n          parent = parent.parent;\n        }\n\n        return declarationNodeIdx === (parent !== null ? parent.index : -1);\n      }\n\n      return this._appliesToNextNode;\n    }\n  }, {\n    key: \"matchTNode\",\n    value: function matchTNode(tView, tNode) {\n      var predicate = this.metadata.predicate;\n\n      if (Array.isArray(predicate)) {\n        for (var i = 0; i < predicate.length; i++) {\n          var name = predicate[i];\n          this.matchTNodeWithReadOption(tView, tNode, getIdxOfMatchingSelector(tNode, name)); // Also try matching the name to a provider since strings can be used as DI tokens too.\n\n          this.matchTNodeWithReadOption(tView, tNode, locateDirectiveOrProvider(tNode, tView, name, false, false));\n        }\n      } else {\n        if (predicate === TemplateRef) {\n          if (tNode.type & 4\n          /* Container */\n          ) {\n            this.matchTNodeWithReadOption(tView, tNode, -1);\n          }\n        } else {\n          this.matchTNodeWithReadOption(tView, tNode, locateDirectiveOrProvider(tNode, tView, predicate, false, false));\n        }\n      }\n    }\n  }, {\n    key: \"matchTNodeWithReadOption\",\n    value: function matchTNodeWithReadOption(tView, tNode, nodeMatchIdx) {\n      if (nodeMatchIdx !== null) {\n        var read = this.metadata.read;\n\n        if (read !== null) {\n          if (read === ElementRef || read === ViewContainerRef || read === TemplateRef && tNode.type & 4\n          /* Container */\n          ) {\n            this.addMatch(tNode.index, -2);\n          } else {\n            var directiveOrProviderIdx = locateDirectiveOrProvider(tNode, tView, read, false, false);\n\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    key: \"addMatch\",\n    value: function addMatch(tNodeIdx, matchIdx) {\n      if (this.matches === null) {\n        this.matches = [tNodeIdx, matchIdx];\n      } else {\n        this.matches.push(tNodeIdx, matchIdx);\n      }\n    }\n  }]);\n\n  return TQuery_;\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 */\n\n\nfunction getIdxOfMatchingSelector(tNode, selector) {\n  var localNames = tNode.localNames;\n\n  if (localNames !== null) {\n    for (var i = 0; i < localNames.length; i += 2) {\n      if (localNames[i] === selector) {\n        return localNames[i + 1];\n      }\n    }\n  }\n\n  return null;\n}\n\nfunction createResultByTNodeType(tNode, currentView) {\n  if (tNode.type & (3\n  /* AnyRNode */\n  | 8\n  /* ElementContainer */\n  )) {\n    return createElementRef(tNode, currentView);\n  } else if (tNode.type & 4\n  /* Container */\n  ) {\n    return createTemplateRef(tNode, currentView);\n  }\n\n  return null;\n}\n\nfunction createResultForNode(lView, tNode, matchingIdx, read) {\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);\n  }\n}\n\nfunction createSpecialToken(lView, tNode, read) {\n  if (read === ElementRef) {\n    return createElementRef(tNode, lView);\n  } else if (read === TemplateRef) {\n    return createTemplateRef(tNode, lView);\n  } else if (read === ViewContainerRef) {\n    ngDevMode && assertTNodeType(tNode, 3\n    /* AnyRNode */\n    | 12\n    /* AnyContainer */\n    );\n    return createContainerRef(tNode, lView);\n  } else {\n    ngDevMode && throwError(\"Special token to read should be one of ElementRef, TemplateRef or ViewContainerRef but got \".concat(stringify(read), \".\"));\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 */\n\n\nfunction materializeViewResults(tView, lView, tQuery, queryIndex) {\n  var lQuery = lView[QUERIES].queries[queryIndex];\n\n  if (lQuery.matches === null) {\n    var tViewData = tView.data;\n    var tQueryMatches = tQuery.matches;\n    var result = [];\n\n    for (var i = 0; i < tQueryMatches.length; i += 2) {\n      var matchedNodeIdx = tQueryMatches[i];\n\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        var tNode = tViewData[matchedNodeIdx];\n        result.push(createResultForNode(lView, tNode, tQueryMatches[i + 1], tQuery.metadata.read));\n      }\n    }\n\n    lQuery.matches = result;\n  }\n\n  return lQuery.matches;\n}\n/**\n * A helper function that collects (already materialized) query results from a tree of views,\n * starting with a provided LView.\n */\n\n\nfunction collectQueryResults(tView, lView, queryIndex, result) {\n  var tQuery = tView.queries.getByIndex(queryIndex);\n  var tQueryMatches = tQuery.matches;\n\n  if (tQueryMatches !== null) {\n    var lViewResults = materializeViewResults(tView, lView, tQuery, queryIndex);\n\n    for (var i = 0; i < tQueryMatches.length; i += 2) {\n      var tNodeIdx = tQueryMatches[i];\n\n      if (tNodeIdx > 0) {\n        result.push(lViewResults[i / 2]);\n      } else {\n        var childQueryIndex = tQueryMatches[i + 1];\n        var declarationLContainer = lView[-tNodeIdx];\n        ngDevMode && assertLContainer(declarationLContainer); // collect matches for views inserted in this container\n\n        for (var _i8 = CONTAINER_HEADER_OFFSET; _i8 < declarationLContainer.length; _i8++) {\n          var embeddedLView = declarationLContainer[_i8];\n\n          if (embeddedLView[DECLARATION_LCONTAINER] === embeddedLView[PARENT]) {\n            collectQueryResults(embeddedLView[TVIEW], embeddedLView, childQueryIndex, result);\n          }\n        } // collect matches for views created from this declaration container and inserted into\n        // different containers\n\n\n        if (declarationLContainer[MOVED_VIEWS] !== null) {\n          var embeddedLViews = declarationLContainer[MOVED_VIEWS];\n\n          for (var _i9 = 0; _i9 < embeddedLViews.length; _i9++) {\n            var _embeddedLView = embeddedLViews[_i9];\n            collectQueryResults(_embeddedLView[TVIEW], _embeddedLView, childQueryIndex, result);\n          }\n        }\n      }\n    }\n  }\n\n  return result;\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 */\n\n\nfunction ɵɵqueryRefresh(queryList) {\n  var lView = getLView();\n  var tView = getTView();\n  var queryIndex = getCurrentQueryIndex();\n  setCurrentQueryIndex(queryIndex + 1);\n  var tQuery = getTQuery(tView, queryIndex);\n\n  if (queryList.dirty && isCreationMode(lView) === ((tQuery.metadata.flags & 2\n  /* isStatic */\n  ) === 2\n  /* isStatic */\n  )) {\n    if (tQuery.matches === null) {\n      queryList.reset([]);\n    } else {\n      var result = tQuery.crossesNgTemplate ? collectQueryResults(tView, lView, queryIndex, []) : materializeViewResults(tView, lView, tQuery, queryIndex);\n      queryList.reset(result, unwrapElementRef);\n      queryList.notifyOnChanges();\n    }\n\n    return true;\n  }\n\n  return false;\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 */\n\n\nfunction ɵɵviewQuery(predicate, flags, read) {\n  ngDevMode && assertNumber(flags, 'Expecting flags');\n  var tView = getTView();\n\n  if (tView.firstCreatePass) {\n    createTQuery(tView, new TQueryMetadata_(predicate, flags, read), -1);\n\n    if ((flags & 2\n    /* isStatic */\n    ) === 2\n    /* isStatic */\n    ) {\n      tView.staticViewQueries = true;\n    }\n  }\n\n  createLQuery(tView, getLView(), flags);\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 */\n\n\nfunction ɵɵcontentQuery(directiveIndex, predicate, flags, read) {\n  ngDevMode && assertNumber(flags, 'Expecting flags');\n  var tView = getTView();\n\n  if (tView.firstCreatePass) {\n    var tNode = getCurrentTNode();\n    createTQuery(tView, new TQueryMetadata_(predicate, flags, read), tNode.index);\n    saveContentQueryAndDirectiveIndex(tView, directiveIndex);\n\n    if ((flags & 2\n    /* isStatic */\n    ) === 2\n    /* isStatic */\n    ) {\n      tView.staticContentQueries = true;\n    }\n  }\n\n  createLQuery(tView, getLView(), flags);\n}\n/**\n * Loads a QueryList corresponding to the current view or content query.\n *\n * @codeGenApi\n */\n\n\nfunction ɵɵloadQuery() {\n  return loadQueryInternal(getLView(), getCurrentQueryIndex());\n}\n\nfunction loadQueryInternal(lView, queryIndex) {\n  ngDevMode && 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(tView, lView, flags) {\n  var queryList = new QueryList((flags & 4\n  /* emitDistinctChangesOnly */\n  ) === 4\n  /* emitDistinctChangesOnly */\n  );\n  storeCleanupWithContext(tView, lView, queryList, queryList.destroy);\n  if (lView[QUERIES] === null) lView[QUERIES] = new LQueries_();\n  lView[QUERIES].queries.push(new LQuery_(queryList));\n}\n\nfunction createTQuery(tView, metadata, nodeIndex) {\n  if (tView.queries === null) tView.queries = new TQueries_();\n  tView.queries.track(new TQuery_(metadata, nodeIndex));\n}\n\nfunction saveContentQueryAndDirectiveIndex(tView, directiveIndex) {\n  var tViewContentQueries = tView.contentQueries || (tView.contentQueries = []);\n  var lastSavedDirectiveIndex = tViewContentQueries.length ? tViewContentQueries[tViewContentQueries.length - 1] : -1;\n\n  if (directiveIndex !== lastSavedDirectiveIndex) {\n    tViewContentQueries.push(tView.queries.length - 1, directiveIndex);\n  }\n}\n\nfunction getTQuery(tView, index) {\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/**\n * Retrieves `TemplateRef` instance from `Injector` when a local reference is placed on the\n * `<ng-template>` element.\n *\n * @codeGenApi\n */\n\n\nfunction ɵɵtemplateRefExtractor(tNode, lView) {\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 */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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\nvar ɵ0$c = function ɵ0$c() {\n  return {\n    'ɵɵattribute': ɵɵattribute,\n    'ɵɵattributeInterpolate1': ɵɵattributeInterpolate1,\n    'ɵɵattributeInterpolate2': ɵɵattributeInterpolate2,\n    'ɵɵattributeInterpolate3': ɵɵattributeInterpolate3,\n    'ɵɵattributeInterpolate4': ɵɵattributeInterpolate4,\n    'ɵɵattributeInterpolate5': ɵɵattributeInterpolate5,\n    'ɵɵattributeInterpolate6': ɵɵattributeInterpolate6,\n    'ɵɵattributeInterpolate7': ɵɵattributeInterpolate7,\n    'ɵɵattributeInterpolate8': ɵɵattributeInterpolate8,\n    'ɵɵattributeInterpolateV': ɵɵattributeInterpolateV,\n    'ɵɵdefineComponent': ɵɵdefineComponent,\n    'ɵɵdefineDirective': ɵɵdefineDirective,\n    'ɵɵdefineInjectable': ɵɵdefineInjectable,\n    'ɵɵdefineInjector': ɵɵdefineInjector,\n    'ɵɵdefineNgModule': ɵɵdefineNgModule,\n    'ɵɵdefinePipe': ɵɵdefinePipe,\n    'ɵɵdirectiveInject': ɵɵdirectiveInject,\n    'ɵɵgetInheritedFactory': ɵɵgetInheritedFactory,\n    'ɵɵinject': ɵɵinject,\n    'ɵɵinjectAttribute': ɵɵinjectAttribute,\n    'ɵɵinvalidFactory': ɵɵinvalidFactory,\n    'ɵɵinvalidFactoryDep': ɵɵinvalidFactoryDep,\n    'ɵɵtemplateRefExtractor': ɵɵtemplateRefExtractor,\n    'ɵɵNgOnChangesFeature': ɵɵNgOnChangesFeature,\n    'ɵɵProvidersFeature': ɵɵProvidersFeature,\n    'ɵɵCopyDefinitionFeature': ɵɵCopyDefinitionFeature,\n    'ɵɵInheritDefinitionFeature': ɵɵInheritDefinitionFeature,\n    'ɵɵnextContext': ɵɵnextContext,\n    'ɵɵnamespaceHTML': ɵɵnamespaceHTML,\n    'ɵɵnamespaceMathML': ɵɵnamespaceMathML,\n    'ɵɵnamespaceSVG': ɵɵnamespaceSVG,\n    'ɵɵenableBindings': ɵɵenableBindings,\n    'ɵɵdisableBindings': ɵɵdisableBindings,\n    'ɵɵelementStart': ɵɵelementStart,\n    'ɵɵelementEnd': ɵɵelementEnd,\n    'ɵɵelement': ɵɵelement,\n    'ɵɵelementContainerStart': ɵɵelementContainerStart,\n    'ɵɵelementContainerEnd': ɵɵelementContainerEnd,\n    'ɵɵelementContainer': ɵɵelementContainer,\n    'ɵɵpureFunction0': ɵɵpureFunction0,\n    'ɵɵpureFunction1': ɵɵpureFunction1,\n    'ɵɵpureFunction2': ɵɵpureFunction2,\n    'ɵɵpureFunction3': ɵɵpureFunction3,\n    'ɵɵpureFunction4': ɵɵpureFunction4,\n    'ɵɵpureFunction5': ɵɵpureFunction5,\n    'ɵɵpureFunction6': ɵɵpureFunction6,\n    'ɵɵpureFunction7': ɵɵpureFunction7,\n    'ɵɵpureFunction8': ɵɵpureFunction8,\n    'ɵɵpureFunctionV': ɵɵpureFunctionV,\n    'ɵɵgetCurrentView': ɵɵgetCurrentView,\n    'ɵɵrestoreView': ɵɵrestoreView,\n    'ɵɵlistener': ɵɵlistener,\n    'ɵɵprojection': ɵɵprojection,\n    'ɵɵsyntheticHostProperty': ɵɵsyntheticHostProperty,\n    'ɵɵsyntheticHostListener': ɵɵsyntheticHostListener,\n    'ɵɵpipeBind1': ɵɵpipeBind1,\n    'ɵɵpipeBind2': ɵɵpipeBind2,\n    'ɵɵpipeBind3': ɵɵpipeBind3,\n    'ɵɵpipeBind4': ɵɵpipeBind4,\n    'ɵɵpipeBindV': ɵɵpipeBindV,\n    'ɵɵprojectionDef': ɵɵprojectionDef,\n    'ɵɵhostProperty': ɵɵhostProperty,\n    'ɵɵproperty': ɵɵproperty,\n    'ɵɵpropertyInterpolate': ɵɵpropertyInterpolate,\n    'ɵɵpropertyInterpolate1': ɵɵpropertyInterpolate1,\n    'ɵɵpropertyInterpolate2': ɵɵpropertyInterpolate2,\n    'ɵɵpropertyInterpolate3': ɵɵpropertyInterpolate3,\n    'ɵɵpropertyInterpolate4': ɵɵpropertyInterpolate4,\n    'ɵɵpropertyInterpolate5': ɵɵpropertyInterpolate5,\n    'ɵɵpropertyInterpolate6': ɵɵpropertyInterpolate6,\n    'ɵɵpropertyInterpolate7': ɵɵpropertyInterpolate7,\n    'ɵɵpropertyInterpolate8': ɵɵpropertyInterpolate8,\n    'ɵɵpropertyInterpolateV': ɵɵpropertyInterpolateV,\n    'ɵɵpipe': ɵɵpipe,\n    'ɵɵqueryRefresh': ɵɵqueryRefresh,\n    'ɵɵviewQuery': ɵɵviewQuery,\n    'ɵɵloadQuery': ɵɵloadQuery,\n    'ɵɵcontentQuery': ɵɵcontentQuery,\n    'ɵɵreference': ɵɵreference,\n    'ɵɵclassMap': ɵɵclassMap,\n    'ɵɵclassMapInterpolate1': ɵɵclassMapInterpolate1,\n    'ɵɵclassMapInterpolate2': ɵɵclassMapInterpolate2,\n    'ɵɵclassMapInterpolate3': ɵɵclassMapInterpolate3,\n    'ɵɵclassMapInterpolate4': ɵɵclassMapInterpolate4,\n    'ɵɵclassMapInterpolate5': ɵɵclassMapInterpolate5,\n    'ɵɵclassMapInterpolate6': ɵɵclassMapInterpolate6,\n    'ɵɵclassMapInterpolate7': ɵɵclassMapInterpolate7,\n    'ɵɵclassMapInterpolate8': ɵɵclassMapInterpolate8,\n    'ɵɵclassMapInterpolateV': ɵɵclassMapInterpolateV,\n    'ɵɵstyleMap': ɵɵstyleMap,\n    'ɵɵstyleMapInterpolate1': ɵɵstyleMapInterpolate1,\n    'ɵɵstyleMapInterpolate2': ɵɵstyleMapInterpolate2,\n    'ɵɵstyleMapInterpolate3': ɵɵstyleMapInterpolate3,\n    'ɵɵstyleMapInterpolate4': ɵɵstyleMapInterpolate4,\n    'ɵɵstyleMapInterpolate5': ɵɵstyleMapInterpolate5,\n    'ɵɵstyleMapInterpolate6': ɵɵstyleMapInterpolate6,\n    'ɵɵstyleMapInterpolate7': ɵɵstyleMapInterpolate7,\n    'ɵɵstyleMapInterpolate8': ɵɵstyleMapInterpolate8,\n    'ɵɵstyleMapInterpolateV': ɵɵstyleMapInterpolateV,\n    'ɵɵstyleProp': ɵɵstyleProp,\n    'ɵɵstylePropInterpolate1': ɵɵstylePropInterpolate1,\n    'ɵɵstylePropInterpolate2': ɵɵstylePropInterpolate2,\n    'ɵɵstylePropInterpolate3': ɵɵstylePropInterpolate3,\n    'ɵɵstylePropInterpolate4': ɵɵstylePropInterpolate4,\n    'ɵɵstylePropInterpolate5': ɵɵstylePropInterpolate5,\n    'ɵɵstylePropInterpolate6': ɵɵstylePropInterpolate6,\n    'ɵɵstylePropInterpolate7': ɵɵstylePropInterpolate7,\n    'ɵɵstylePropInterpolate8': ɵɵstylePropInterpolate8,\n    'ɵɵstylePropInterpolateV': ɵɵstylePropInterpolateV,\n    'ɵɵclassProp': ɵɵclassProp,\n    'ɵɵadvance': ɵɵadvance,\n    'ɵɵtemplate': ɵɵtemplate,\n    'ɵɵtext': ɵɵtext,\n    'ɵɵtextInterpolate': ɵɵtextInterpolate,\n    'ɵɵtextInterpolate1': ɵɵtextInterpolate1,\n    'ɵɵtextInterpolate2': ɵɵtextInterpolate2,\n    'ɵɵtextInterpolate3': ɵɵtextInterpolate3,\n    'ɵɵtextInterpolate4': ɵɵtextInterpolate4,\n    'ɵɵtextInterpolate5': ɵɵtextInterpolate5,\n    'ɵɵtextInterpolate6': ɵɵtextInterpolate6,\n    'ɵɵtextInterpolate7': ɵɵtextInterpolate7,\n    'ɵɵtextInterpolate8': ɵɵtextInterpolate8,\n    'ɵɵtextInterpolateV': ɵɵtextInterpolateV,\n    'ɵɵi18n': ɵɵi18n,\n    'ɵɵi18nAttributes': ɵɵi18nAttributes,\n    'ɵɵi18nExp': ɵɵi18nExp,\n    'ɵɵi18nStart': ɵɵi18nStart,\n    'ɵɵi18nEnd': ɵɵi18nEnd,\n    'ɵɵi18nApply': ɵɵi18nApply,\n    'ɵɵi18nPostprocess': ɵɵi18nPostprocess,\n    'ɵɵresolveWindow': ɵɵresolveWindow,\n    'ɵɵresolveDocument': ɵɵresolveDocument,\n    'ɵɵresolveBody': ɵɵresolveBody,\n    'ɵɵsetComponentScope': ɵɵsetComponentScope,\n    'ɵɵsetNgModuleScope': ɵɵsetNgModuleScope,\n    'ɵɵsanitizeHtml': ɵɵsanitizeHtml,\n    'ɵɵsanitizeStyle': ɵɵsanitizeStyle,\n    'ɵɵsanitizeResourceUrl': ɵɵsanitizeResourceUrl,\n    'ɵɵsanitizeScript': ɵɵsanitizeScript,\n    'ɵɵsanitizeUrl': ɵɵsanitizeUrl,\n    'ɵɵsanitizeUrlOrResourceUrl': ɵɵsanitizeUrlOrResourceUrl,\n    'ɵɵtrustConstantHtml': ɵɵtrustConstantHtml,\n    'ɵɵtrustConstantResourceUrl': ɵɵtrustConstantResourceUrl,\n    'forwardRef': forwardRef,\n    'resolveForwardRef': resolveForwardRef\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 */\n\n\nvar angularCoreEnv = /*@__PURE__*/ɵ0$c();\nvar jitOptions = null;\n\nfunction setJitOptions(options) {\n  if (jitOptions !== null) {\n    if (options.defaultEncapsulation !== jitOptions.defaultEncapsulation) {\n      ngDevMode && console.error('Provided value for `defaultEncapsulation` can not be changed once it has been set.');\n      return;\n    }\n\n    if (options.preserveWhitespaces !== jitOptions.preserveWhitespaces) {\n      ngDevMode && console.error('Provided value for `preserveWhitespaces` can not be changed once it has been set.');\n      return;\n    }\n  }\n\n  jitOptions = options;\n}\n\nfunction getJitOptions() {\n  return jitOptions;\n}\n\nfunction resetJitOptions() {\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\n\nvar moduleQueue = [];\n/**\n * Enqueues moduleDef to be checked later to see if scope can be set on its\n * component declarations.\n */\n\nfunction enqueueModuleForDelayedScoping(moduleType, ngModule) {\n  moduleQueue.push({\n    moduleType: moduleType,\n    ngModule: ngModule\n  });\n}\n\nvar 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 */\n\nfunction flushModuleScopingQueueAsMuchAsPossible() {\n  if (!flushingModuleQueue) {\n    flushingModuleQueue = true;\n\n    try {\n      for (var i = moduleQueue.length - 1; i >= 0; i--) {\n        var _moduleQueue$i = moduleQueue[i],\n            moduleType = _moduleQueue$i.moduleType,\n            ngModule = _moduleQueue$i.ngModule;\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 * 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 */\n\n\nfunction isResolvedDeclaration(declaration) {\n  if (Array.isArray(declaration)) {\n    return declaration.every(isResolvedDeclaration);\n  }\n\n  return !!resolveForwardRef(declaration);\n}\n/**\n * Compiles a module in JIT mode.\n *\n * This function automatically gets called when a class has a `@NgModule` decorator.\n */\n\n\nfunction compileNgModule(moduleType) {\n  var ngModule = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  compileNgModuleDefs(moduleType, ngModule); // 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\n  enqueueModuleForDelayedScoping(moduleType, ngModule);\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 */\n\n\nfunction compileNgModuleDefs(moduleType, ngModule) {\n  var allowDuplicateDeclarationsInRoot = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n  ngDevMode && assertDefined(moduleType, 'Required value moduleType');\n  ngDevMode && assertDefined(ngModule, 'Required value ngModule');\n  var declarations = flatten(ngModule.declarations || EMPTY_ARRAY);\n  var ngModuleDef = null;\n  Object.defineProperty(moduleType, NG_MOD_DEF, {\n    configurable: true,\n    get: function 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(\"'\".concat(stringifyForError(moduleType), \"' module can't import itself\"));\n        }\n\n        var compiler = getCompilerFacade({\n          usage: 0\n          /* Decorator */\n          ,\n          kind: 'NgModule',\n          type: moduleType\n        });\n        ngModuleDef = compiler.compileNgModule(angularCoreEnv, \"ng:///\".concat(moduleType.name, \"/\\u0275mod.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).map(resolveForwardRef).map(expandModuleWithProviders),\n          exports: flatten(ngModule.exports || EMPTY_ARRAY).map(resolveForwardRef).map(expandModuleWithProviders),\n          schemas: ngModule.schemas ? flatten(ngModule.schemas) : null,\n          id: ngModule.id || null\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\n        if (!ngModuleDef.schemas) {\n          ngModuleDef.schemas = [];\n        }\n      }\n\n      return ngModuleDef;\n    }\n  });\n  var ngFactoryDef = null;\n  Object.defineProperty(moduleType, NG_FACTORY_DEF, {\n    get: function get() {\n      if (ngFactoryDef === null) {\n        var compiler = getCompilerFacade({\n          usage: 0\n          /* Decorator */\n          ,\n          kind: 'NgModule',\n          type: moduleType\n        });\n        ngFactoryDef = compiler.compileFactory(angularCoreEnv, \"ng:///\".concat(moduleType.name, \"/\\u0275fac.js\"), {\n          name: moduleType.name,\n          type: moduleType,\n          deps: reflectDependencies(moduleType),\n          target: compiler.FactoryTarget.NgModule,\n          typeArgumentCount: 0\n        });\n      }\n\n      return ngFactoryDef;\n    },\n    // Make the property configurable in dev mode to allow overriding in tests\n    configurable: !!ngDevMode\n  });\n  var ngInjectorDef = null;\n  Object.defineProperty(moduleType, NG_INJ_DEF, {\n    get: function get() {\n      if (ngInjectorDef === null) {\n        ngDevMode && verifySemanticsOfNgModuleDef(moduleType, allowDuplicateDeclarationsInRoot);\n        var meta = {\n          name: moduleType.name,\n          type: moduleType,\n          providers: ngModule.providers || EMPTY_ARRAY,\n          imports: [(ngModule.imports || EMPTY_ARRAY).map(resolveForwardRef), (ngModule.exports || EMPTY_ARRAY).map(resolveForwardRef)]\n        };\n        var compiler = getCompilerFacade({\n          usage: 0\n          /* Decorator */\n          ,\n          kind: 'NgModule',\n          type: moduleType\n        });\n        ngInjectorDef = compiler.compileInjector(angularCoreEnv, \"ng:///\".concat(moduleType.name, \"/\\u0275inj.js\"), meta);\n      }\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(moduleType, allowDuplicateDeclarationsInRoot, importingModule) {\n  if (verifiedNgModule.get(moduleType)) return;\n  verifiedNgModule.set(moduleType, true);\n  moduleType = resolveForwardRef(moduleType);\n  var ngModuleDef;\n\n  if (importingModule) {\n    ngModuleDef = getNgModuleDef(moduleType);\n\n    if (!ngModuleDef) {\n      throw new Error(\"Unexpected value '\".concat(moduleType.name, \"' imported by the module '\").concat(importingModule.name, \"'. Please add an @NgModule annotation.\"));\n    }\n  } else {\n    ngModuleDef = getNgModuleDef(moduleType, true);\n  }\n\n  var errors = [];\n  var declarations = maybeUnwrapFn(ngModuleDef.declarations);\n  var imports = maybeUnwrapFn(ngModuleDef.imports);\n  flatten(imports).map(unwrapModuleWithProvidersImports).forEach(function (mod) {\n    verifySemanticsOfNgModuleImport(mod, moduleType);\n    verifySemanticsOfNgModuleDef(mod, false, moduleType);\n  });\n  var exports = maybeUnwrapFn(ngModuleDef.exports);\n  declarations.forEach(verifyDeclarationsHaveDefinitions);\n  declarations.forEach(verifyDirectivesHaveSelector);\n  var combinedDeclarations = [].concat(_toConsumableArray(declarations.map(resolveForwardRef)), _toConsumableArray(flatten(imports.map(computeCombinedExports)).map(resolveForwardRef)));\n  exports.forEach(verifyExportsAreDeclaredOrReExported);\n  declarations.forEach(function (decl) {\n    return verifyDeclarationIsUnique(decl, allowDuplicateDeclarationsInRoot);\n  });\n  declarations.forEach(verifyComponentEntryComponentsIsPartOfNgModule);\n  var ngModule = getAnnotation(moduleType, 'NgModule');\n\n  if (ngModule) {\n    ngModule.imports && flatten(ngModule.imports).map(unwrapModuleWithProvidersImports).forEach(function (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 && deepForEach(ngModule.entryComponents, verifyComponentIsPartOfNgModule);\n  } // Throw Error if any errors were detected.\n\n\n  if (errors.length) {\n    throw new Error(errors.join('\\n'));\n  } ////////////////////////////////////////////////////////////////////////////////////////////////\n\n\n  function verifyDeclarationsHaveDefinitions(type) {\n    type = resolveForwardRef(type);\n    var def = getComponentDef(type) || getDirectiveDef(type) || getPipeDef(type);\n\n    if (!def) {\n      errors.push(\"Unexpected value '\".concat(stringifyForError(type), \"' declared by the module '\").concat(stringifyForError(moduleType), \"'. Please add a @Pipe/@Directive/@Component annotation.\"));\n    }\n  }\n\n  function verifyDirectivesHaveSelector(type) {\n    type = resolveForwardRef(type);\n    var def = getDirectiveDef(type);\n\n    if (!getComponentDef(type) && def && def.selectors.length == 0) {\n      errors.push(\"Directive \".concat(stringifyForError(type), \" has no selector, please add it!\"));\n    }\n  }\n\n  function verifyExportsAreDeclaredOrReExported(type) {\n    type = resolveForwardRef(type);\n    var kind = getComponentDef(type) && 'component' || getDirectiveDef(type) && 'directive' || getPipeDef(type) && 'pipe';\n\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 \".concat(kind, \" \").concat(stringifyForError(type), \" from \").concat(stringifyForError(moduleType), \" as it was neither declared nor imported!\"));\n      }\n    }\n  }\n\n  function verifyDeclarationIsUnique(type, suppressErrors) {\n    type = resolveForwardRef(type);\n    var existingModule = ownerNgModule.get(type);\n\n    if (existingModule && existingModule !== moduleType) {\n      if (!suppressErrors) {\n        var _modules = [existingModule, moduleType].map(stringifyForError).sort();\n\n        errors.push(\"Type \".concat(stringifyForError(type), \" is part of the declarations of 2 modules: \").concat(_modules[0], \" and \").concat(_modules[1], \"! \") + \"Please consider moving \".concat(stringifyForError(type), \" to a higher module that imports \").concat(_modules[0], \" and \").concat(_modules[1], \". \") + \"You can also create a new NgModule that exports and includes \".concat(stringifyForError(type), \" then import that NgModule in \").concat(_modules[0], \" and \").concat(_modules[1], \".\"));\n      }\n    } else {\n      // Mark type as having owner.\n      ownerNgModule.set(type, moduleType);\n    }\n  }\n\n  function verifyComponentIsPartOfNgModule(type) {\n    type = resolveForwardRef(type);\n    var existingModule = ownerNgModule.get(type);\n\n    if (!existingModule) {\n      errors.push(\"Component \".concat(stringifyForError(type), \" is not part of any NgModule or the module has not been imported into your module.\"));\n    }\n  }\n\n  function verifyCorrectBootstrapType(type) {\n    type = resolveForwardRef(type);\n\n    if (!getComponentDef(type)) {\n      errors.push(\"\".concat(stringifyForError(type), \" cannot be used as an entry component.\"));\n    }\n  }\n\n  function verifyComponentEntryComponentsIsPartOfNgModule(type) {\n    type = resolveForwardRef(type);\n\n    if (getComponentDef(type)) {\n      // We know we are component\n      var component = getAnnotation(type, 'Component');\n\n      if (component && component.entryComponents) {\n        deepForEach(component.entryComponents, verifyComponentIsPartOfNgModule);\n      }\n    }\n  }\n\n  function verifySemanticsOfNgModuleImport(type, importingModule) {\n    type = resolveForwardRef(type);\n\n    if (getComponentDef(type) || getDirectiveDef(type)) {\n      throw new Error(\"Unexpected directive '\".concat(type.name, \"' imported by the module '\").concat(importingModule.name, \"'. Please add an @NgModule annotation.\"));\n    }\n\n    if (getPipeDef(type)) {\n      throw new Error(\"Unexpected pipe '\".concat(type.name, \"' imported by the module '\").concat(importingModule.name, \"'. Please add an @NgModule annotation.\"));\n    }\n  }\n}\n\nfunction unwrapModuleWithProvidersImports(typeOrWithProviders) {\n  typeOrWithProviders = resolveForwardRef(typeOrWithProviders);\n  return typeOrWithProviders.ngModule || typeOrWithProviders;\n}\n\nfunction getAnnotation(type, name) {\n  var annotation = null;\n  collect(type.__annotations__);\n  collect(type.decorators);\n  return annotation;\n\n  function collect(annotations) {\n    if (annotations) {\n      annotations.forEach(readAnnotation);\n    }\n  }\n\n  function readAnnotation(decorator) {\n    if (!annotation) {\n      var proto = Object.getPrototypeOf(decorator);\n\n      if (proto.ngMetadataName == name) {\n        annotation = decorator;\n      } else if (decorator.type) {\n        var _proto = Object.getPrototypeOf(decorator.type);\n\n        if (_proto.ngMetadataName == name) {\n          annotation = decorator.args[0];\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 */\n\n\nvar ownerNgModule = /*@__PURE__*/new WeakMap();\nvar verifiedNgModule = /*@__PURE__*/new WeakMap();\n\nfunction resetCompiledComponents() {\n  ownerNgModule = new WeakMap();\n  verifiedNgModule = new WeakMap();\n  moduleQueue.length = 0;\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 */\n\n\nfunction computeCombinedExports(type) {\n  type = resolveForwardRef(type);\n  var ngModuleDef = getNgModuleDef(type, true);\n  return _toConsumableArray(flatten(maybeUnwrapFn(ngModuleDef.exports).map(function (type) {\n    var ngModuleDef = getNgModuleDef(type);\n\n    if (ngModuleDef) {\n      verifySemanticsOfNgModuleDef(type, false);\n      return computeCombinedExports(type);\n    } else {\n      return type;\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 */\n\n\nfunction setScopeOnDeclaredComponents(moduleType, ngModule) {\n  var declarations = flatten(ngModule.declarations || EMPTY_ARRAY);\n  var transitiveScopes = transitiveScopesFor(moduleType);\n  declarations.forEach(function (declaration) {\n    if (declaration.hasOwnProperty(NG_COMP_DEF)) {\n      // A `ɵcmp` field exists - go ahead and patch the component directly.\n      var component = declaration;\n      var componentDef = getComponentDef(component);\n      patchComponentDefWithScope(componentDef, transitiveScopes);\n    } else if (!declaration.hasOwnProperty(NG_DIR_DEF) && !declaration.hasOwnProperty(NG_PIPE_DEF)) {\n      // Set `ngSelectorScope` for future reference when the component compilation finishes.\n      declaration.ngSelectorScope = moduleType;\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 */\n\n\nfunction patchComponentDefWithScope(componentDef, transitiveScopes) {\n  componentDef.directiveDefs = function () {\n    return Array.from(transitiveScopes.compilation.directives).map(function (dir) {\n      return dir.hasOwnProperty(NG_COMP_DEF) ? getComponentDef(dir) : getDirectiveDef(dir);\n    }).filter(function (def) {\n      return !!def;\n    });\n  };\n\n  componentDef.pipeDefs = function () {\n    return Array.from(transitiveScopes.compilation.pipes).map(function (pipe) {\n      return getPipeDef(pipe);\n    });\n  };\n\n  componentDef.schemas = transitiveScopes.schemas; // 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\n  componentDef.tView = null;\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 */\n\n\nfunction transitiveScopesFor(moduleType) {\n  if (!isNgModule(moduleType)) {\n    throw new Error(\"\".concat(moduleType.name, \" does not have a module def (\\u0275mod property)\"));\n  }\n\n  var def = getNgModuleDef(moduleType);\n\n  if (def.transitiveCompileScopes !== null) {\n    return def.transitiveCompileScopes;\n  }\n\n  var scopes = {\n    schemas: def.schemas || null,\n    compilation: {\n      directives: new Set(),\n      pipes: new Set()\n    },\n    exported: {\n      directives: new Set(),\n      pipes: new Set()\n    }\n  };\n  maybeUnwrapFn(def.imports).forEach(function (imported) {\n    var importedType = imported;\n\n    if (!isNgModule(importedType)) {\n      throw new Error(\"Importing \".concat(importedType.name, \" which does not have a \\u0275mod property\"));\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\n\n    var importedScope = transitiveScopesFor(importedType);\n    importedScope.exported.directives.forEach(function (entry) {\n      return scopes.compilation.directives.add(entry);\n    });\n    importedScope.exported.pipes.forEach(function (entry) {\n      return scopes.compilation.pipes.add(entry);\n    });\n  });\n  maybeUnwrapFn(def.declarations).forEach(function (declared) {\n    var declaredWithDefs = declared;\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  maybeUnwrapFn(def.exports).forEach(function (exported) {\n    var exportedType = exported; // 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\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      var exportedScope = transitiveScopesFor(exportedType);\n      exportedScope.exported.directives.forEach(function (entry) {\n        scopes.compilation.directives.add(entry);\n        scopes.exported.directives.add(entry);\n      });\n      exportedScope.exported.pipes.forEach(function (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  def.transitiveCompileScopes = scopes;\n  return scopes;\n}\n\nfunction expandModuleWithProviders(value) {\n  if (isModuleWithProviders(value)) {\n    return value.ngModule;\n  }\n\n  return value;\n}\n\nfunction isModuleWithProviders(value) {\n  return value.ngModule !== undefined;\n}\n\nfunction isNgModule(value) {\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\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 */\n\n\nvar compilationDepth = 0;\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 */\n\nfunction compileComponent(type, metadata) {\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  var ngComponentDef = null; // Metadata may have resources which need to be resolved.\n\n  maybeQueueResolutionOfComponentResources(type, metadata); // 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\n  addDirectiveFactoryDef(type, metadata);\n  Object.defineProperty(type, NG_COMP_DEF, {\n    get: function get() {\n      if (ngComponentDef === null) {\n        var compiler = getCompilerFacade({\n          usage: 0\n          /* Decorator */\n          ,\n          kind: 'component',\n          type: type\n        });\n\n        if (componentNeedsResolution(metadata)) {\n          var error = [\"Component '\".concat(type.name, \"' is not resolved:\")];\n\n          if (metadata.templateUrl) {\n            error.push(\" - templateUrl: \".concat(metadata.templateUrl));\n          }\n\n          if (metadata.styleUrls && metadata.styleUrls.length) {\n            error.push(\" - styleUrls: \".concat(JSON.stringify(metadata.styleUrls)));\n          }\n\n          error.push(\"Did you run and wait for 'resolveComponentResources()'?\");\n          throw new Error(error.join('\\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\n\n        var options = getJitOptions();\n        var preserveWhitespaces = metadata.preserveWhitespaces;\n\n        if (preserveWhitespaces === undefined) {\n          if (options !== null && options.preserveWhitespaces !== undefined) {\n            preserveWhitespaces = options.preserveWhitespaces;\n          } else {\n            preserveWhitespaces = false;\n          }\n        }\n\n        var encapsulation = metadata.encapsulation;\n\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        var templateUrl = metadata.templateUrl || \"ng:///\".concat(type.name, \"/template.html\");\n        var meta = Object.assign(Object.assign({}, directiveMetadata(type, metadata)), {\n          typeSourceSpan: compiler.createParseSourceSpan('Component', type.name, templateUrl),\n          template: metadata.template || '',\n          preserveWhitespaces: preserveWhitespaces,\n          styles: metadata.styles || EMPTY_ARRAY,\n          animations: metadata.animations,\n          directives: [],\n          changeDetection: metadata.changeDetection,\n          pipes: new Map(),\n          encapsulation: encapsulation,\n          interpolation: metadata.interpolation,\n          viewProviders: metadata.viewProviders || null\n        });\n        compilationDepth++;\n\n        try {\n          if (meta.usesInheritance) {\n            addDirectiveDefToUndecoratedParents(type);\n          }\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        } // 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\n\n        if (hasSelectorScope(type)) {\n          var scopes = transitiveScopesFor(type.ngSelectorScope);\n          patchComponentDefWithScope(ngComponentDef, scopes);\n        }\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(component) {\n  return component.ngSelectorScope !== undefined;\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 */\n\n\nfunction compileDirective(type, directive) {\n  var ngDirectiveDef = null;\n  addDirectiveFactoryDef(type, directive || {});\n  Object.defineProperty(type, NG_DIR_DEF, {\n    get: function 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        var meta = getDirectiveMetadata$1(type, directive || {});\n        var compiler = getCompilerFacade({\n          usage: 0\n          /* Decorator */\n          ,\n          kind: 'directive',\n          type: type\n        });\n        ngDirectiveDef = compiler.compileDirective(angularCoreEnv, meta.sourceMapUrl, meta.metadata);\n      }\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$1(type, metadata) {\n  var name = type && type.name;\n  var sourceMapUrl = \"ng:///\".concat(name, \"/\\u0275dir.js\");\n  var compiler = getCompilerFacade({\n    usage: 0\n    /* Decorator */\n    ,\n    kind: 'directive',\n    type: type\n  });\n  var facade = directiveMetadata(type, metadata);\n  facade.typeSourceSpan = compiler.createParseSourceSpan('Directive', name, sourceMapUrl);\n\n  if (facade.usesInheritance) {\n    addDirectiveDefToUndecoratedParents(type);\n  }\n\n  return {\n    metadata: facade,\n    sourceMapUrl: sourceMapUrl\n  };\n}\n\nfunction addDirectiveFactoryDef(type, metadata) {\n  var ngFactoryDef = null;\n  Object.defineProperty(type, NG_FACTORY_DEF, {\n    get: function get() {\n      if (ngFactoryDef === null) {\n        var meta = getDirectiveMetadata$1(type, metadata);\n        var compiler = getCompilerFacade({\n          usage: 0\n          /* Decorator */\n          ,\n          kind: 'directive',\n          type: type\n        });\n        ngFactoryDef = compiler.compileFactory(angularCoreEnv, \"ng:///\".concat(type.name, \"/\\u0275fac.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\n      return ngFactoryDef;\n    },\n    // Make the property configurable in dev mode to allow overriding in tests\n    configurable: !!ngDevMode\n  });\n}\n\nfunction extendsDirectlyFromObject(type) {\n  return Object.getPrototypeOf(type.prototype) === Object.prototype;\n}\n/**\n * Extract the `R3DirectiveMetadata` for a particular directive (either a `Directive` or a\n * `Component`).\n */\n\n\nfunction directiveMetadata(type, metadata) {\n  // Reflect inputs and outputs.\n  var reflect = getReflect();\n  var propMetadata = reflect.ownPropMetadata(type);\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: {\n      usesOnChanges: reflect.hasLifecycleHook(type, 'ngOnChanges')\n    },\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 * Adds a directive definition to all parent classes of a type that don't have an Angular decorator.\n */\n\n\nfunction addDirectiveDefToUndecoratedParents(type) {\n  var objPrototype = Object.prototype;\n  var parent = Object.getPrototypeOf(type.prototype).constructor; // Go up the prototype until we hit `Object`.\n\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) && shouldAddAbstractDirective(parent)) {\n      compileDirective(parent, null);\n    }\n\n    parent = Object.getPrototypeOf(parent);\n  }\n}\n\nfunction convertToR3QueryPredicate(selector) {\n  return typeof selector === 'string' ? splitByComma(selector) : resolveForwardRef(selector);\n}\n\nfunction convertToR3QueryMetadata(propertyName, ann) {\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}\n\nfunction extractQueriesMetadata(type, propMetadata, isQueryAnn) {\n  var queriesMeta = [];\n\n  var _loop2 = function _loop2(field) {\n    if (propMetadata.hasOwnProperty(field)) {\n      var annotations = propMetadata[field];\n      annotations.forEach(function (ann) {\n        if (isQueryAnn(ann)) {\n          if (!ann.selector) {\n            throw new Error(\"Can't construct a query for the property \\\"\".concat(field, \"\\\" of \") + \"\\\"\".concat(stringifyForError(type), \"\\\" since the query selector wasn't defined.\"));\n          }\n\n          if (annotations.some(isInputAnnotation)) {\n            throw new Error(\"Cannot combine @Input decorators with query decorators\");\n          }\n\n          queriesMeta.push(convertToR3QueryMetadata(field, ann));\n        }\n      });\n    }\n  };\n\n  for (var field in propMetadata) {\n    _loop2(field);\n  }\n\n  return queriesMeta;\n}\n\nfunction extractExportAs(exportAs) {\n  return exportAs === undefined ? null : splitByComma(exportAs);\n}\n\nfunction isContentQuery(value) {\n  var name = value.ngMetadataName;\n  return name === 'ContentChild' || name === 'ContentChildren';\n}\n\nfunction isViewQuery(value) {\n  var name = value.ngMetadataName;\n  return name === 'ViewChild' || name === 'ViewChildren';\n}\n\nfunction isInputAnnotation(value) {\n  return value.ngMetadataName === 'Input';\n}\n\nfunction splitByComma(value) {\n  return value.split(',').map(function (piece) {\n    return piece.trim();\n  });\n}\n\nvar LIFECYCLE_HOOKS = ['ngOnChanges', 'ngOnInit', 'ngOnDestroy', 'ngDoCheck', 'ngAfterViewInit', 'ngAfterViewChecked', 'ngAfterContentInit', 'ngAfterContentChecked'];\n\nfunction shouldAddAbstractDirective(type) {\n  var reflect = getReflect();\n\n  if (LIFECYCLE_HOOKS.some(function (hookName) {\n    return reflect.hasLifecycleHook(type, hookName);\n  })) {\n    return true;\n  }\n\n  var propMetadata = reflect.propMetadata(type);\n\n  for (var field in propMetadata) {\n    var annotations = propMetadata[field];\n\n    for (var i = 0; i < annotations.length; i++) {\n      var current = annotations[i];\n      var metadataName = current.ngMetadataName;\n\n      if (isInputAnnotation(current) || isContentQuery(current) || isViewQuery(current) || metadataName === 'Output' || metadataName === 'HostBinding' || 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\n\nfunction compilePipe(type, meta) {\n  var ngPipeDef = null;\n  var ngFactoryDef = null;\n  Object.defineProperty(type, NG_FACTORY_DEF, {\n    get: function get() {\n      if (ngFactoryDef === null) {\n        var metadata = getPipeMetadata(type, meta);\n        var compiler = getCompilerFacade({\n          usage: 0\n          /* Decorator */\n          ,\n          kind: 'pipe',\n          type: metadata.type\n        });\n        ngFactoryDef = compiler.compileFactory(angularCoreEnv, \"ng:///\".concat(metadata.name, \"/\\u0275fac.js\"), {\n          name: metadata.name,\n          type: metadata.type,\n          typeArgumentCount: 0,\n          deps: reflectDependencies(type),\n          target: compiler.FactoryTarget.Pipe\n        });\n      }\n\n      return ngFactoryDef;\n    },\n    // Make the property configurable in dev mode to allow overriding in tests\n    configurable: !!ngDevMode\n  });\n  Object.defineProperty(type, NG_PIPE_DEF, {\n    get: function get() {\n      if (ngPipeDef === null) {\n        var metadata = getPipeMetadata(type, meta);\n        var compiler = getCompilerFacade({\n          usage: 0\n          /* Decorator */\n          ,\n          kind: 'pipe',\n          type: metadata.type\n        });\n        ngPipeDef = compiler.compilePipe(angularCoreEnv, \"ng:///\".concat(metadata.name, \"/\\u0275pipe.js\"), metadata);\n      }\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, meta) {\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\n\nvar ɵ0$d = function ɵ0$d() {\n  var dir = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  return dir;\n},\n    ɵ1$2 = function ɵ1$2(type, meta) {\n  return SWITCH_COMPILE_DIRECTIVE(type, meta);\n};\n/**\n * Type of the Directive metadata.\n *\n * @publicApi\n */\n\n\nvar Directive = /*@__PURE__*/makeDecorator('Directive', ɵ0$d, undefined, undefined, ɵ1$2);\n\nvar ɵ2$1 = function ɵ2$1() {\n  var c = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  return Object.assign({\n    changeDetection: ChangeDetectionStrategy.Default\n  }, c);\n},\n    ɵ3$1 = function ɵ3$1(type, meta) {\n  return SWITCH_COMPILE_COMPONENT(type, meta);\n};\n/**\n * Component decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\n\n\nvar Component = /*@__PURE__*/makeDecorator('Component', ɵ2$1, Directive, undefined, ɵ3$1);\n\nvar ɵ4 = function ɵ4(p) {\n  return Object.assign({\n    pure: true\n  }, p);\n},\n    ɵ5 = function ɵ5(type, meta) {\n  return SWITCH_COMPILE_PIPE(type, meta);\n};\n/**\n * @Annotation\n * @publicApi\n */\n\n\nvar Pipe = /*@__PURE__*/makeDecorator('Pipe', ɵ4, undefined, undefined, ɵ5);\n\nvar ɵ6 = function ɵ6(bindingPropertyName) {\n  return {\n    bindingPropertyName: bindingPropertyName\n  };\n};\n/**\n * @Annotation\n * @publicApi\n */\n\n\nvar Input = /*@__PURE__*/makePropDecorator('Input', ɵ6);\n\nvar ɵ7 = function ɵ7(bindingPropertyName) {\n  return {\n    bindingPropertyName: bindingPropertyName\n  };\n};\n/**\n * @Annotation\n * @publicApi\n */\n\n\nvar Output = /*@__PURE__*/makePropDecorator('Output', ɵ7);\n\nvar ɵ8 = function ɵ8(hostPropertyName) {\n  return {\n    hostPropertyName: hostPropertyName\n  };\n};\n/**\n * @Annotation\n * @publicApi\n */\n\n\nvar HostBinding = /*@__PURE__*/makePropDecorator('HostBinding', ɵ8);\n\nvar ɵ9 = function ɵ9(eventName, args) {\n  return {\n    eventName: eventName,\n    args: args\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 */\n\n\nvar HostListener = /*@__PURE__*/makePropDecorator('HostListener', ɵ9);\nvar SWITCH_COMPILE_COMPONENT__POST_R3__ = compileComponent;\nvar SWITCH_COMPILE_DIRECTIVE__POST_R3__ = compileDirective;\nvar SWITCH_COMPILE_PIPE__POST_R3__ = compilePipe;\nvar SWITCH_COMPILE_COMPONENT__PRE_R3__ = noop;\nvar SWITCH_COMPILE_DIRECTIVE__PRE_R3__ = noop;\nvar SWITCH_COMPILE_PIPE__PRE_R3__ = noop;\nvar SWITCH_COMPILE_COMPONENT = SWITCH_COMPILE_COMPONENT__POST_R3__;\nvar SWITCH_COMPILE_DIRECTIVE = SWITCH_COMPILE_DIRECTIVE__POST_R3__;\nvar SWITCH_COMPILE_PIPE = SWITCH_COMPILE_PIPE__POST_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\nvar ɵ0$e = function ɵ0$e(ngModule) {\n  return ngModule;\n},\n    ɵ1$3 =\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 */\nfunction ɵ1$3(type, meta) {\n  return SWITCH_COMPILE_NGMODULE(type, meta);\n};\n/**\n * @Annotation\n * @publicApi\n */\n\n\nvar NgModule = /*@__PURE__*/makeDecorator('NgModule', ɵ0$e, undefined, undefined, ɵ1$3);\n\nfunction preR3NgModuleCompile(moduleType, metadata) {\n  var imports = metadata && metadata.imports || [];\n\n  if (metadata && metadata.exports) {\n    imports = [].concat(_toConsumableArray(imports), [metadata.exports]);\n  }\n\n  var moduleInjectorType = moduleType;\n  moduleInjectorType.ɵfac = convertInjectableProviderToFactory(moduleType, {\n    useClass: moduleType\n  });\n  moduleInjectorType.ɵinj = ɵɵdefineInjector({\n    providers: metadata && metadata.providers,\n    imports: imports\n  });\n}\n\nvar SWITCH_COMPILE_NGMODULE__POST_R3__ = compileNgModule;\nvar SWITCH_COMPILE_NGMODULE__PRE_R3__ = preR3NgModuleCompile;\nvar SWITCH_COMPILE_NGMODULE = SWITCH_COMPILE_NGMODULE__POST_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 * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 [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 */\n\nvar APP_INITIALIZER = /*@__PURE__*/new InjectionToken('Application Initializer');\n\nvar ApplicationInitStatus = /*@__PURE__*/function () {\n  var ApplicationInitStatus = /*#__PURE__*/function () {\n    function ApplicationInitStatus(appInits) {\n      var _this21 = this;\n\n      _classCallCheck(this, ApplicationInitStatus);\n\n      this.appInits = appInits;\n      this.resolve = noop;\n      this.reject = noop;\n      this.initialized = false;\n      this.done = false;\n      this.donePromise = new Promise(function (res, rej) {\n        _this21.resolve = res;\n        _this21.reject = rej;\n      });\n    }\n    /** @internal */\n\n\n    _createClass2(ApplicationInitStatus, [{\n      key: \"runInitializers\",\n      value: function runInitializers() {\n        var _this22 = this;\n\n        if (this.initialized) {\n          return;\n        }\n\n        var asyncInitPromises = [];\n\n        var complete = function complete() {\n          _this22.done = true;\n\n          _this22.resolve();\n        };\n\n        if (this.appInits) {\n          var _loop3 = function _loop3(i) {\n            var initResult = _this22.appInits[i]();\n\n            if (isPromise(initResult)) {\n              asyncInitPromises.push(initResult);\n            } else if (isObservable(initResult)) {\n              var observableAsPromise = new Promise(function (resolve, reject) {\n                initResult.subscribe({\n                  complete: resolve,\n                  error: reject\n                });\n              });\n              asyncInitPromises.push(observableAsPromise);\n            }\n          };\n\n          for (var i = 0; i < this.appInits.length; i++) {\n            _loop3(i);\n          }\n        }\n\n        Promise.all(asyncInitPromises).then(function () {\n          complete();\n        }).catch(function (e) {\n          _this22.reject(e);\n        });\n\n        if (asyncInitPromises.length === 0) {\n          complete();\n        }\n\n        this.initialized = true;\n      }\n    }]);\n\n    return ApplicationInitStatus;\n  }();\n\n  ApplicationInitStatus.ɵfac = function ApplicationInitStatus_Factory(t) {\n    return new (t || ApplicationInitStatus)(ɵɵinject(APP_INITIALIZER, 8));\n  };\n\n  ApplicationInitStatus.ɵprov =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵɵdefineInjectable({\n    token: ApplicationInitStatus,\n    factory: ApplicationInitStatus.ɵfac\n  });\n  return ApplicationInitStatus;\n}();\n/*@__PURE__*/\n\n\n(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(ApplicationInitStatus, [{\n    type: Injectable\n  }], function () {\n    return [{\n      type: undefined,\n      decorators: [{\n        type: Inject,\n        args: [APP_INITIALIZER]\n      }, {\n        type: Optional\n      }]\n    }];\n  }, 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 * 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 */\n\n\nvar APP_ID = /*@__PURE__*/new InjectionToken('AppId');\n\nfunction _appIdRandomProviderFactory() {\n  return \"\".concat(_randomChar()).concat(_randomChar()).concat(_randomChar());\n}\n/**\n * Providers that generate a random `APP_ID_TOKEN`.\n * @publicApi\n */\n\n\nvar APP_ID_RANDOM_PROVIDER = {\n  provide: APP_ID,\n  useFactory: _appIdRandomProviderFactory,\n  deps: []\n};\n\nfunction _randomChar() {\n  return String.fromCharCode(97 + Math.floor(Math.random() * 25));\n}\n/**\n * A function that is executed when a platform is initialized.\n * @publicApi\n */\n\n\nvar PLATFORM_INITIALIZER = /*@__PURE__*/new InjectionToken('Platform Initializer');\n/**\n * A token that indicates an opaque platform ID.\n * @publicApi\n */\n\nvar PLATFORM_ID = /*@__PURE__*/new InjectionToken('Platform ID');\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 */\n\nvar APP_BOOTSTRAP_LISTENER = /*@__PURE__*/new InjectionToken('appBootstrapListener');\n/**\n * A [DI token](guide/glossary#di-token \"DI token definition\") that indicates the root directory of\n * the application\n * @publicApi\n */\n\nvar PACKAGE_ROOT_URL = /*@__PURE__*/new InjectionToken('Application Packages Root URL');\n\nvar Console = /*@__PURE__*/function () {\n  var Console = /*#__PURE__*/function () {\n    function Console() {\n      _classCallCheck(this, Console);\n    }\n\n    _createClass2(Console, [{\n      key: \"log\",\n      value: function log(message) {\n        // tslint:disable-next-line:no-console\n        console.log(message);\n      } // Note: for reporting errors use `DOM.logError()` as it is platform specific\n\n    }, {\n      key: \"warn\",\n      value: function warn(message) {\n        // tslint:disable-next-line:no-console\n        console.warn(message);\n      }\n    }]);\n\n    return Console;\n  }();\n\n  Console.ɵfac = function Console_Factory(t) {\n    return new (t || Console)();\n  };\n\n  Console.ɵprov =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵɵdefineInjectable({\n    token: Console,\n    factory: Console.ɵfac\n  });\n  return Console;\n}();\n/*@__PURE__*/\n\n\n(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(Console, [{\n    type: Injectable\n  }], null, 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 * 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 */\n\n\nvar LOCALE_ID$1 = /*@__PURE__*/new InjectionToken('LocaleId');\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 */\n\nvar DEFAULT_CURRENCY_CODE = /*@__PURE__*/new InjectionToken('DefaultCurrencyCode');\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 */\n\nvar TRANSLATIONS = /*@__PURE__*/new InjectionToken('Translations');\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 */\n\nvar TRANSLATIONS_FORMAT = /*@__PURE__*/new InjectionToken('TranslationsFormat');\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 */\n\nvar MissingTranslationStrategy = /*@__PURE__*/function (MissingTranslationStrategy) {\n  MissingTranslationStrategy[MissingTranslationStrategy[\"Error\"] = 0] = \"Error\";\n  MissingTranslationStrategy[MissingTranslationStrategy[\"Warning\"] = 1] = \"Warning\";\n  MissingTranslationStrategy[MissingTranslationStrategy[\"Ignore\"] = 2] = \"Ignore\";\n  return MissingTranslationStrategy;\n}({});\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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\nvar SWITCH_IVY_ENABLED__POST_R3__ = true;\nvar SWITCH_IVY_ENABLED__PRE_R3__ = false;\nvar ivyEnabled = SWITCH_IVY_ENABLED__POST_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 * Combination of NgModuleFactory and ComponentFactories.\n *\n * @publicApi\n */\n\nvar ModuleWithComponentFactories = /*#__PURE__*/_createClass2(function ModuleWithComponentFactories(ngModuleFactory, componentFactories) {\n  _classCallCheck(this, ModuleWithComponentFactories);\n\n  this.ngModuleFactory = ngModuleFactory;\n  this.componentFactories = componentFactories;\n});\n\nfunction _throwError() {\n  throw new Error(\"Runtime compiler is not loaded\");\n}\n\nvar Compiler_compileModuleSync__PRE_R3__ = _throwError;\n\nvar Compiler_compileModuleSync__POST_R3__ = function Compiler_compileModuleSync__POST_R3__(moduleType) {\n  return new NgModuleFactory$1(moduleType);\n};\n\nvar Compiler_compileModuleSync = Compiler_compileModuleSync__POST_R3__;\nvar Compiler_compileModuleAsync__PRE_R3__ = _throwError;\n\nvar Compiler_compileModuleAsync__POST_R3__ = function Compiler_compileModuleAsync__POST_R3__(moduleType) {\n  return Promise.resolve(Compiler_compileModuleSync__POST_R3__(moduleType));\n};\n\nvar Compiler_compileModuleAsync = Compiler_compileModuleAsync__POST_R3__;\nvar Compiler_compileModuleAndAllComponentsSync__PRE_R3__ = _throwError;\n\nvar Compiler_compileModuleAndAllComponentsSync__POST_R3__ = function Compiler_compileModuleAndAllComponentsSync__POST_R3__(moduleType) {\n  var ngModuleFactory = Compiler_compileModuleSync__POST_R3__(moduleType);\n  var moduleDef = getNgModuleDef(moduleType);\n  var componentFactories = maybeUnwrapFn(moduleDef.declarations).reduce(function (factories, declaration) {\n    var componentDef = getComponentDef(declaration);\n    componentDef && factories.push(new ComponentFactory$1(componentDef));\n    return factories;\n  }, []);\n  return new ModuleWithComponentFactories(ngModuleFactory, componentFactories);\n};\n\nvar Compiler_compileModuleAndAllComponentsSync = Compiler_compileModuleAndAllComponentsSync__POST_R3__;\nvar Compiler_compileModuleAndAllComponentsAsync__PRE_R3__ = _throwError;\n\nvar Compiler_compileModuleAndAllComponentsAsync__POST_R3__ = function Compiler_compileModuleAndAllComponentsAsync__POST_R3__(moduleType) {\n  return Promise.resolve(Compiler_compileModuleAndAllComponentsSync__POST_R3__(moduleType));\n};\n\nvar Compiler_compileModuleAndAllComponentsAsync = Compiler_compileModuleAndAllComponentsAsync__POST_R3__;\n\nvar Compiler = /*@__PURE__*/function () {\n  var Compiler = /*#__PURE__*/function () {\n    function Compiler() {\n      _classCallCheck(this, Compiler);\n\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      this.compileModuleSync = Compiler_compileModuleSync;\n      /**\n       * Compiles the given NgModule and all of its components\n       */\n\n      this.compileModuleAsync = Compiler_compileModuleAsync;\n      /**\n       * Same as {@link #compileModuleSync} but also creates ComponentFactories for all components.\n       */\n\n      this.compileModuleAndAllComponentsSync = Compiler_compileModuleAndAllComponentsSync;\n      /**\n       * Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components.\n       */\n\n      this.compileModuleAndAllComponentsAsync = Compiler_compileModuleAndAllComponentsAsync;\n    }\n    /**\n     * Clears all caches.\n     */\n\n\n    _createClass2(Compiler, [{\n      key: \"clearCache\",\n      value: function clearCache() {}\n      /**\n       * Clears the cache for the given component/ngModule.\n       */\n\n    }, {\n      key: \"clearCacheFor\",\n      value: function clearCacheFor(type) {}\n      /**\n       * Returns the id for a given NgModule, if one is defined and known to the compiler.\n       */\n\n    }, {\n      key: \"getModuleId\",\n      value: function getModuleId(moduleType) {\n        return undefined;\n      }\n    }]);\n\n    return Compiler;\n  }();\n\n  Compiler.ɵfac = function Compiler_Factory(t) {\n    return new (t || Compiler)();\n  };\n\n  Compiler.ɵprov =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵɵdefineInjectable({\n    token: Compiler,\n    factory: Compiler.ɵfac\n  });\n  return Compiler;\n}();\n/*@__PURE__*/\n\n\n(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(Compiler, [{\n    type: Injectable\n  }], function () {\n    return [];\n  }, null);\n})();\n/**\n * Token to provide CompilerOptions in the platform injector.\n *\n * @publicApi\n */\n\n\nvar COMPILER_OPTIONS = /*@__PURE__*/new InjectionToken('compilerOptions');\n/**\n * A factory for creating a Compiler\n *\n * @publicApi\n */\n\nvar CompilerFactory = /*#__PURE__*/_createClass2(function CompilerFactory() {\n  _classCallCheck(this, CompilerFactory);\n});\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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\nvar promise = /*@__PURE__*/function () {\n  return Promise.resolve(0);\n}();\n\nfunction scheduleMicroTask(fn) {\n  if (typeof Zone === 'undefined') {\n    // use promise to schedule microTask instead of use Zone\n    promise.then(function () {\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 */\n\n\nfunction getNativeRequestAnimationFrame() {\n  var nativeRequestAnimationFrame = _global['requestAnimationFrame'];\n  var nativeCancelAnimationFrame = _global['cancelAnimationFrame'];\n\n  if (typeof Zone !== 'undefined' && nativeRequestAnimationFrame && nativeCancelAnimationFrame) {\n    // use unpatched version of requestAnimationFrame(native delegate) if possible\n    // to avoid another Change detection\n    var unpatchedRequestAnimationFrame = nativeRequestAnimationFrame[Zone.__symbol__('OriginalDelegate')];\n\n    if (unpatchedRequestAnimationFrame) {\n      nativeRequestAnimationFrame = unpatchedRequestAnimationFrame;\n    }\n\n    var unpatchedCancelAnimationFrame = nativeCancelAnimationFrame[Zone.__symbol__('OriginalDelegate')];\n\n    if (unpatchedCancelAnimationFrame) {\n      nativeCancelAnimationFrame = unpatchedCancelAnimationFrame;\n    }\n  }\n\n  return {\n    nativeRequestAnimationFrame: nativeRequestAnimationFrame,\n    nativeCancelAnimationFrame: nativeCancelAnimationFrame\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 * 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 */\n\n\nvar NgZone = /*#__PURE__*/function () {\n  function NgZone(_ref3) {\n    var _ref3$enableLongStack = _ref3.enableLongStackTrace,\n        enableLongStackTrace = _ref3$enableLongStack === void 0 ? false : _ref3$enableLongStack,\n        _ref3$shouldCoalesceE = _ref3.shouldCoalesceEventChangeDetection,\n        shouldCoalesceEventChangeDetection = _ref3$shouldCoalesceE === void 0 ? false : _ref3$shouldCoalesceE,\n        _ref3$shouldCoalesceR = _ref3.shouldCoalesceRunChangeDetection,\n        shouldCoalesceRunChangeDetection = _ref3$shouldCoalesceR === void 0 ? false : _ref3$shouldCoalesceR;\n\n    _classCallCheck(this, NgZone);\n\n    this.hasPendingMacrotasks = false;\n    this.hasPendingMicrotasks = false;\n    /**\n     * Whether there are no outstanding microtasks or macrotasks.\n     */\n\n    this.isStable = true;\n    /**\n     * Notifies when code enters Angular Zone. This gets fired first on VM Turn.\n     */\n\n    this.onUnstable = new EventEmitter(false);\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\n    this.onMicrotaskEmpty = new EventEmitter(false);\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\n    this.onStable = new EventEmitter(false);\n    /**\n     * Notifies that an error has been delivered.\n     */\n\n    this.onError = new EventEmitter(false);\n\n    if (typeof Zone == 'undefined') {\n      throw new Error(\"In this configuration Angular requires Zone.js\");\n    }\n\n    Zone.assertZonePatched();\n    var self = this;\n    self._nesting = 0;\n    self._outer = self._inner = Zone.current;\n\n    if (Zone['TaskTrackingZoneSpec']) {\n      self._inner = self._inner.fork(new Zone['TaskTrackingZoneSpec']());\n    }\n\n    if (enableLongStackTrace && Zone['longStackTraceZoneSpec']) {\n      self._inner = self._inner.fork(Zone['longStackTraceZoneSpec']);\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\n\n    self.shouldCoalesceEventChangeDetection = !shouldCoalesceRunChangeDetection && shouldCoalesceEventChangeDetection;\n    self.shouldCoalesceRunChangeDetection = shouldCoalesceRunChangeDetection;\n    self.lastRequestAnimationFrameId = -1;\n    self.nativeRequestAnimationFrame = getNativeRequestAnimationFrame().nativeRequestAnimationFrame;\n    forkInnerZoneWithAngularBehavior(self);\n  }\n\n  _createClass2(NgZone, [{\n    key: \"run\",\n    value:\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    function run(fn, applyThis, applyArgs) {\n      return this._inner.run(fn, applyThis, applyArgs);\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\n  }, {\n    key: \"runTask\",\n    value: function runTask(fn, applyThis, applyArgs, name) {\n      var zone = this._inner;\n      var task = zone.scheduleEventTask('NgZoneEvent: ' + name, fn, EMPTY_PAYLOAD, noop, noop);\n\n      try {\n        return zone.runTask(task, applyThis, applyArgs);\n      } finally {\n        zone.cancelTask(task);\n      }\n    }\n    /**\n     * Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not\n     * rethrown.\n     */\n\n  }, {\n    key: \"runGuarded\",\n    value: function runGuarded(fn, applyThis, applyArgs) {\n      return this._inner.runGuarded(fn, applyThis, applyArgs);\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\n  }, {\n    key: \"runOutsideAngular\",\n    value: function runOutsideAngular(fn) {\n      return this._outer.run(fn);\n    }\n  }], [{\n    key: \"isInAngularZone\",\n    value: function isInAngularZone() {\n      return Zone.current.get('isAngularZone') === true;\n    }\n  }, {\n    key: \"assertInAngularZone\",\n    value: function assertInAngularZone() {\n      if (!NgZone.isInAngularZone()) {\n        throw new Error('Expected to be in Angular Zone, but it is not!');\n      }\n    }\n  }, {\n    key: \"assertNotInAngularZone\",\n    value: function assertNotInAngularZone() {\n      if (NgZone.isInAngularZone()) {\n        throw new Error('Expected to not be in Angular Zone, but it is!');\n      }\n    }\n  }]);\n\n  return NgZone;\n}();\n\nvar EMPTY_PAYLOAD = {};\n\nfunction checkStable(zone) {\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\n      if (!zone.hasPendingMicrotasks) {\n        try {\n          zone.runOutsideAngular(function () {\n            return zone.onStable.emit(null);\n          });\n        } finally {\n          zone.isStable = true;\n        }\n      }\n    }\n  }\n}\n\nfunction delayChangeDetectionForEvents(zone) {\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\n  zone.lastRequestAnimationFrameId = zone.nativeRequestAnimationFrame.call(_global, function () {\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', function () {\n        zone.lastRequestAnimationFrameId = -1;\n        updateMicroTaskStatus(zone);\n        zone.isCheckStableRunning = true;\n        checkStable(zone);\n        zone.isCheckStableRunning = false;\n      }, undefined, function () {}, function () {});\n    }\n\n    zone.fakeTopEventTask.invoke();\n  });\n  updateMicroTaskStatus(zone);\n}\n\nfunction forkInnerZoneWithAngularBehavior(zone) {\n  var delayChangeDetectionForEventsDelegate = function delayChangeDetectionForEventsDelegate() {\n    delayChangeDetectionForEvents(zone);\n  };\n\n  zone._inner = zone._inner.fork({\n    name: 'angular',\n    properties: {\n      'isAngularZone': true\n    },\n    onInvokeTask: function onInvokeTask(delegate, current, target, task, applyThis, applyArgs) {\n      try {\n        onEnter(zone);\n        return delegate.invokeTask(target, task, applyThis, applyArgs);\n      } finally {\n        if (zone.shouldCoalesceEventChangeDetection && task.type === 'eventTask' || zone.shouldCoalesceRunChangeDetection) {\n          delayChangeDetectionForEventsDelegate();\n        }\n\n        onLeave(zone);\n      }\n    },\n    onInvoke: function onInvoke(delegate, current, target, callback, applyThis, applyArgs, source) {\n      try {\n        onEnter(zone);\n        return delegate.invoke(target, callback, applyThis, applyArgs, source);\n      } finally {\n        if (zone.shouldCoalesceRunChangeDetection) {\n          delayChangeDetectionForEventsDelegate();\n        }\n\n        onLeave(zone);\n      }\n    },\n    onHasTask: function onHasTask(delegate, current, target, hasTaskState) {\n      delegate.hasTask(target, hasTaskState);\n\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    onHandleError: function onHandleError(delegate, current, target, error) {\n      delegate.handleError(target, error);\n      zone.runOutsideAngular(function () {\n        return zone.onError.emit(error);\n      });\n      return false;\n    }\n  });\n}\n\nfunction updateMicroTaskStatus(zone) {\n  if (zone._hasPendingMicrotasks || (zone.shouldCoalesceEventChangeDetection || zone.shouldCoalesceRunChangeDetection) && zone.lastRequestAnimationFrameId !== -1) {\n    zone.hasPendingMicrotasks = true;\n  } else {\n    zone.hasPendingMicrotasks = false;\n  }\n}\n\nfunction onEnter(zone) {\n  zone._nesting++;\n\n  if (zone.isStable) {\n    zone.isStable = false;\n    zone.onUnstable.emit(null);\n  }\n}\n\nfunction onLeave(zone) {\n  zone._nesting--;\n  checkStable(zone);\n}\n/**\n * Provides a noop implementation of `NgZone` which does nothing. This zone requires explicit calls\n * to framework to perform rendering.\n */\n\n\nvar NoopNgZone = /*#__PURE__*/function () {\n  function NoopNgZone() {\n    _classCallCheck(this, NoopNgZone);\n\n    this.hasPendingMicrotasks = false;\n    this.hasPendingMacrotasks = false;\n    this.isStable = true;\n    this.onUnstable = new EventEmitter();\n    this.onMicrotaskEmpty = new EventEmitter();\n    this.onStable = new EventEmitter();\n    this.onError = new EventEmitter();\n  }\n\n  _createClass2(NoopNgZone, [{\n    key: \"run\",\n    value: function run(fn, applyThis, applyArgs) {\n      return fn.apply(applyThis, applyArgs);\n    }\n  }, {\n    key: \"runGuarded\",\n    value: function runGuarded(fn, applyThis, applyArgs) {\n      return fn.apply(applyThis, applyArgs);\n    }\n  }, {\n    key: \"runOutsideAngular\",\n    value: function runOutsideAngular(fn) {\n      return fn();\n    }\n  }, {\n    key: \"runTask\",\n    value: function runTask(fn, applyThis, applyArgs, name) {\n      return fn.apply(applyThis, applyArgs);\n    }\n  }]);\n\n  return NoopNgZone;\n}();\n\nvar Testability = /*@__PURE__*/function () {\n  var Testability = /*#__PURE__*/function () {\n    function Testability(_ngZone) {\n      var _this23 = this;\n\n      _classCallCheck(this, Testability);\n\n      this._ngZone = _ngZone;\n      this._pendingCount = 0;\n      this._isZoneStable = 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\n      this._didWork = false;\n      this._callbacks = [];\n      this.taskTrackingZone = null;\n\n      this._watchAngularEvents();\n\n      _ngZone.run(function () {\n        _this23.taskTrackingZone = typeof Zone == 'undefined' ? null : Zone.current.get('TaskTrackingZone');\n      });\n    }\n\n    _createClass2(Testability, [{\n      key: \"_watchAngularEvents\",\n      value: function _watchAngularEvents() {\n        var _this24 = this;\n\n        this._ngZone.onUnstable.subscribe({\n          next: function next() {\n            _this24._didWork = true;\n            _this24._isZoneStable = false;\n          }\n        });\n\n        this._ngZone.runOutsideAngular(function () {\n          _this24._ngZone.onStable.subscribe({\n            next: function next() {\n              NgZone.assertNotInAngularZone();\n              scheduleMicroTask(function () {\n                _this24._isZoneStable = true;\n\n                _this24._runCallbacksIfReady();\n              });\n            }\n          });\n        });\n      }\n      /**\n       * Increases the number of pending request\n       * @deprecated pending requests are now tracked with zones.\n       */\n\n    }, {\n      key: \"increasePendingRequestCount\",\n      value: function increasePendingRequestCount() {\n        this._pendingCount += 1;\n        this._didWork = true;\n        return this._pendingCount;\n      }\n      /**\n       * Decreases the number of pending request\n       * @deprecated pending requests are now tracked with zones\n       */\n\n    }, {\n      key: \"decreasePendingRequestCount\",\n      value: function decreasePendingRequestCount() {\n        this._pendingCount -= 1;\n\n        if (this._pendingCount < 0) {\n          throw new Error('pending async requests below zero');\n        }\n\n        this._runCallbacksIfReady();\n\n        return this._pendingCount;\n      }\n      /**\n       * Whether an associated application is stable\n       */\n\n    }, {\n      key: \"isStable\",\n      value: function isStable() {\n        return this._isZoneStable && this._pendingCount === 0 && !this._ngZone.hasPendingMacrotasks;\n      }\n    }, {\n      key: \"_runCallbacksIfReady\",\n      value: function _runCallbacksIfReady() {\n        var _this25 = this;\n\n        if (this.isStable()) {\n          // Schedules the call backs in a new frame so that it is always async.\n          scheduleMicroTask(function () {\n            while (_this25._callbacks.length !== 0) {\n              var cb = _this25._callbacks.pop();\n\n              clearTimeout(cb.timeoutId);\n              cb.doneCb(_this25._didWork);\n            }\n\n            _this25._didWork = false;\n          });\n        } else {\n          // Still not stable, send updates.\n          var pending = this.getPendingTasks();\n          this._callbacks = this._callbacks.filter(function (cb) {\n            if (cb.updateCb && cb.updateCb(pending)) {\n              clearTimeout(cb.timeoutId);\n              return false;\n            }\n\n            return true;\n          });\n          this._didWork = true;\n        }\n      }\n    }, {\n      key: \"getPendingTasks\",\n      value: function getPendingTasks() {\n        if (!this.taskTrackingZone) {\n          return [];\n        } // Copy the tasks data so that we don't leak tasks.\n\n\n        return this.taskTrackingZone.macroTasks.map(function (t) {\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.creationLocation,\n            data: t.data\n          };\n        });\n      }\n    }, {\n      key: \"addCallback\",\n      value: function addCallback(cb, timeout, updateCb) {\n        var _this26 = this;\n\n        var timeoutId = -1;\n\n        if (timeout && timeout > 0) {\n          timeoutId = setTimeout(function () {\n            _this26._callbacks = _this26._callbacks.filter(function (cb) {\n              return cb.timeoutId !== timeoutId;\n            });\n            cb(_this26._didWork, _this26.getPendingTasks());\n          }, timeout);\n        }\n\n        this._callbacks.push({\n          doneCb: cb,\n          timeoutId: timeoutId,\n          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\n    }, {\n      key: \"whenStable\",\n      value: function whenStable(doneCb, timeout, updateCb) {\n        if (updateCb && !this.taskTrackingZone) {\n          throw new Error('Task tracking zone is required when passing an update callback to ' + 'whenStable(). Is \"zone.js/plugins/task-tracking\" loaded?');\n        } // These arguments are 'Function' above to keep the public API simple.\n\n\n        this.addCallback(doneCb, timeout, updateCb);\n\n        this._runCallbacksIfReady();\n      }\n      /**\n       * Get the number of pending requests\n       * @deprecated pending requests are now tracked with zones\n       */\n\n    }, {\n      key: \"getPendingRequestCount\",\n      value: function getPendingRequestCount() {\n        return this._pendingCount;\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\n    }, {\n      key: \"findProviders\",\n      value: function findProviders(using, provider, exactMatch) {\n        // TODO(juliemr): implement.\n        return [];\n      }\n    }]);\n\n    return Testability;\n  }();\n\n  Testability.ɵfac = function Testability_Factory(t) {\n    return new (t || Testability)(ɵɵinject(NgZone));\n  };\n\n  Testability.ɵprov =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵɵdefineInjectable({\n    token: Testability,\n    factory: Testability.ɵfac\n  });\n  return Testability;\n}();\n/*@__PURE__*/\n\n\n(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(Testability, [{\n    type: Injectable\n  }], function () {\n    return [{\n      type: NgZone\n    }];\n  }, null);\n})();\n\nvar TestabilityRegistry = /*@__PURE__*/function () {\n  var TestabilityRegistry = /*#__PURE__*/function () {\n    function TestabilityRegistry() {\n      _classCallCheck(this, TestabilityRegistry);\n\n      /** @internal */\n      this._applications = new Map();\n\n      _testabilityGetter.addToWindow(this);\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\n\n    _createClass2(TestabilityRegistry, [{\n      key: \"registerApplication\",\n      value: function registerApplication(token, testability) {\n        this._applications.set(token, testability);\n      }\n      /**\n       * Unregisters an application.\n       * @param token token of application, root element\n       */\n\n    }, {\n      key: \"unregisterApplication\",\n      value: function unregisterApplication(token) {\n        this._applications.delete(token);\n      }\n      /**\n       * Unregisters all applications\n       */\n\n    }, {\n      key: \"unregisterAllApplications\",\n      value: function unregisterAllApplications() {\n        this._applications.clear();\n      }\n      /**\n       * Get a testability hook associated with the application\n       * @param elem root element\n       */\n\n    }, {\n      key: \"getTestability\",\n      value: function getTestability(elem) {\n        return this._applications.get(elem) || null;\n      }\n      /**\n       * Get all registered testabilities\n       */\n\n    }, {\n      key: \"getAllTestabilities\",\n      value: function getAllTestabilities() {\n        return Array.from(this._applications.values());\n      }\n      /**\n       * Get all registered applications(root elements)\n       */\n\n    }, {\n      key: \"getAllRootElements\",\n      value: function getAllRootElements() {\n        return Array.from(this._applications.keys());\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\n    }, {\n      key: \"findTestabilityInTree\",\n      value: function findTestabilityInTree(elem) {\n        var findInAncestors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n        return _testabilityGetter.findTestabilityInTree(this, elem, findInAncestors);\n      }\n    }]);\n\n    return TestabilityRegistry;\n  }();\n\n  TestabilityRegistry.ɵfac = function TestabilityRegistry_Factory(t) {\n    return new (t || TestabilityRegistry)();\n  };\n\n  TestabilityRegistry.ɵprov =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵɵdefineInjectable({\n    token: TestabilityRegistry,\n    factory: TestabilityRegistry.ɵfac\n  });\n  return TestabilityRegistry;\n}();\n/*@__PURE__*/\n\n\n(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(TestabilityRegistry, [{\n    type: Injectable\n  }], function () {\n    return [];\n  }, null);\n})();\n\nvar _NoopGetTestability = /*#__PURE__*/function () {\n  function _NoopGetTestability() {\n    _classCallCheck(this, _NoopGetTestability);\n  }\n\n  _createClass2(_NoopGetTestability, [{\n    key: \"addToWindow\",\n    value: function addToWindow(registry) {}\n  }, {\n    key: \"findTestabilityInTree\",\n    value: function findTestabilityInTree(registry, elem, findInAncestors) {\n      return null;\n    }\n  }]);\n\n  return _NoopGetTestability;\n}();\n/**\n * Set the {@link GetTestability} implementation used by the Angular testing framework.\n * @publicApi\n */\n\n\nfunction setTestabilityGetter(getter) {\n  _testabilityGetter = getter;\n}\n\nvar _testabilityGetter = /*@__PURE__*/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\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\n\nvar _devMode = true;\nvar _runModeLocked = false;\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 */\n\nfunction isDevMode() {\n  _runModeLocked = true;\n  return _devMode;\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 */\n\n\nfunction enableProdMode() {\n  if (_runModeLocked) {\n    throw new Error('Cannot enable prod mode after platform setup.');\n  } // The below check is there so when ngDevMode is set via terser\n  // `global['ngDevMode'] = false;` is also dropped.\n\n\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\n\nvar _platform;\n\nvar compileNgModuleFactory = compileNgModuleFactory__POST_R3__;\n\nfunction compileNgModuleFactory__PRE_R3__(injector, options, moduleType) {\n  var compilerFactory = injector.get(CompilerFactory);\n  var compiler = compilerFactory.createCompiler([options]);\n  return compiler.compileModuleAsync(moduleType);\n}\n\nfunction compileNgModuleFactory__POST_R3__(injector, options, moduleType) {\n  ngDevMode && assertNgModuleType(moduleType);\n  var moduleFactory = new NgModuleFactory$1(moduleType); // All of the logic below is irrelevant for AOT-compiled code.\n\n  if (typeof ngJitMode !== 'undefined' && !ngJitMode) {\n    return Promise.resolve(moduleFactory);\n  }\n\n  var compilerOptions = injector.get(COMPILER_OPTIONS, []).concat(options); // 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\n  setJitOptions({\n    defaultEncapsulation: _lastDefined(compilerOptions.map(function (opts) {\n      return opts.defaultEncapsulation;\n    })),\n    preserveWhitespaces: _lastDefined(compilerOptions.map(function (opts) {\n      return opts.preserveWhitespaces;\n    }))\n  });\n\n  if (isComponentResourceResolutionQueueEmpty()) {\n    return Promise.resolve(moduleFactory);\n  }\n\n  var compilerProviders = _mergeArrays(compilerOptions.map(function (o) {\n    return o.providers;\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\n\n  if (compilerProviders.length === 0) {\n    return Promise.resolve(moduleFactory);\n  }\n\n  var compiler = getCompilerFacade({\n    usage: 0\n    /* Decorator */\n    ,\n    kind: 'NgModule',\n    type: moduleType\n  });\n  var compilerInjector = Injector.create({\n    providers: compilerProviders\n  });\n  var resourceLoader = compilerInjector.get(compiler.ResourceLoader); // 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\n  return resolveComponentResources(function (url) {\n    return Promise.resolve(resourceLoader.get(url));\n  }).then(function () {\n    return moduleFactory;\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.\n\n\nfunction publishDefaultGlobalUtils__PRE_R3__() {}\n\nfunction publishDefaultGlobalUtils__POST_R3__() {\n  ngDevMode && publishDefaultGlobalUtils();\n}\n\nvar publishDefaultGlobalUtils$1 = publishDefaultGlobalUtils__POST_R3__;\nvar isBoundToModule = isBoundToModule__POST_R3__;\n\nfunction isBoundToModule__PRE_R3__(cf) {\n  return cf instanceof ComponentFactoryBoundToModule;\n}\n\nfunction isBoundToModule__POST_R3__(cf) {\n  return cf.isBoundToModule;\n}\n\nvar ALLOW_MULTIPLE_PLATFORMS = /*@__PURE__*/new InjectionToken('AllowMultipleToken');\n/**\n * A token for third-party components that can register themselves with NgProbe.\n *\n * @publicApi\n */\n\nvar NgProbeToken = /*#__PURE__*/_createClass2(function NgProbeToken(name, token) {\n  _classCallCheck(this, NgProbeToken);\n\n  this.name = name;\n  this.token = token;\n});\n/**\n * Creates a platform.\n * Platforms must be created on launch using this function.\n *\n * @publicApi\n */\n\n\nfunction createPlatform(injector) {\n  if (_platform && !_platform.destroyed && !_platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {\n    throw new Error('There can be only one platform. Destroy the previous one to create a new one.');\n  }\n\n  publishDefaultGlobalUtils$1();\n  _platform = injector.get(PlatformRef);\n  var inits = injector.get(PLATFORM_INITIALIZER, null);\n  if (inits) inits.forEach(function (init) {\n    return init();\n  });\n  return _platform;\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 */\n\n\nfunction createPlatformFactory(parentPlatformFactory, name) {\n  var providers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n  var desc = \"Platform: \".concat(name);\n  var marker = new InjectionToken(desc);\n  return function () {\n    var extraProviders = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n    var platform = getPlatform();\n\n    if (!platform || platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {\n      if (parentPlatformFactory) {\n        parentPlatformFactory(providers.concat(extraProviders).concat({\n          provide: marker,\n          useValue: true\n        }));\n      } else {\n        var injectedProviders = providers.concat(extraProviders).concat({\n          provide: marker,\n          useValue: true\n        }, {\n          provide: INJECTOR_SCOPE,\n          useValue: 'platform'\n        });\n        createPlatform(Injector.create({\n          providers: injectedProviders,\n          name: desc\n        }));\n      }\n    }\n\n    return assertPlatform(marker);\n  };\n}\n/**\n * Checks that there is currently a platform that contains the given token as a provider.\n *\n * @publicApi\n */\n\n\nfunction assertPlatform(requiredToken) {\n  var 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('A platform with a different configuration has been created. Please destroy it first.');\n  }\n\n  return platform;\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 */\n\n\nfunction destroyPlatform() {\n  if (_platform && !_platform.destroyed) {\n    _platform.destroy();\n  }\n}\n/**\n * Returns the current platform.\n *\n * @publicApi\n */\n\n\nfunction getPlatform() {\n  return _platform && !_platform.destroyed ? _platform : null;\n}\n\nvar PlatformRef = /*@__PURE__*/function () {\n  var PlatformRef = /*#__PURE__*/function () {\n    /** @internal */\n    function PlatformRef(_injector) {\n      _classCallCheck(this, PlatformRef);\n\n      this._injector = _injector;\n      this._modules = [];\n      this._destroyListeners = [];\n      this._destroyed = false;\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\n\n    _createClass2(PlatformRef, [{\n      key: \"bootstrapModuleFactory\",\n      value: function bootstrapModuleFactory(moduleFactory, options) {\n        var _this27 = this;\n\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        var ngZoneOption = options ? options.ngZone : undefined;\n        var ngZoneEventCoalescing = options && options.ngZoneEventCoalescing || false;\n        var ngZoneRunCoalescing = options && options.ngZoneRunCoalescing || false;\n        var ngZone = getNgZone(ngZoneOption, {\n          ngZoneEventCoalescing: ngZoneEventCoalescing,\n          ngZoneRunCoalescing: ngZoneRunCoalescing\n        });\n        var providers = [{\n          provide: NgZone,\n          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\n        return ngZone.run(function () {\n          var ngZoneInjector = Injector.create({\n            providers: providers,\n            parent: _this27.injector,\n            name: moduleFactory.moduleType.name\n          });\n          var moduleRef = moduleFactory.create(ngZoneInjector);\n          var exceptionHandler = moduleRef.injector.get(ErrorHandler, null);\n\n          if (!exceptionHandler) {\n            throw new Error('No ErrorHandler. Is platform module (BrowserModule) included?');\n          }\n\n          ngZone.runOutsideAngular(function () {\n            var subscription = ngZone.onError.subscribe({\n              next: function next(error) {\n                exceptionHandler.handleError(error);\n              }\n            });\n            moduleRef.onDestroy(function () {\n              remove(_this27._modules, moduleRef);\n              subscription.unsubscribe();\n            });\n          });\n          return _callAndReportToErrorHandler(exceptionHandler, ngZone, function () {\n            var initStatus = moduleRef.injector.get(ApplicationInitStatus);\n            initStatus.runInitializers();\n            return initStatus.donePromise.then(function () {\n              if (ivyEnabled) {\n                // If the `LOCALE_ID` provider is defined at bootstrap then we set the value for ivy\n                var localeId = moduleRef.injector.get(LOCALE_ID$1, DEFAULT_LOCALE_ID);\n                setLocaleId(localeId || DEFAULT_LOCALE_ID);\n              }\n\n              _this27._moduleDoBootstrap(moduleRef);\n\n              return moduleRef;\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\n    }, {\n      key: \"bootstrapModule\",\n      value: function bootstrapModule(moduleType) {\n        var _this28 = this;\n\n        var compilerOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n        var options = optionsReducer({}, compilerOptions);\n        return compileNgModuleFactory(this.injector, options, moduleType).then(function (moduleFactory) {\n          return _this28.bootstrapModuleFactory(moduleFactory, options);\n        });\n      }\n    }, {\n      key: \"_moduleDoBootstrap\",\n      value: function _moduleDoBootstrap(moduleRef) {\n        var appRef = moduleRef.injector.get(ApplicationRef);\n\n        if (moduleRef._bootstrapComponents.length > 0) {\n          moduleRef._bootstrapComponents.forEach(function (f) {\n            return appRef.bootstrap(f);\n          });\n        } else if (moduleRef.instance.ngDoBootstrap) {\n          moduleRef.instance.ngDoBootstrap(appRef);\n        } else {\n          throw new Error(\"The module \".concat(stringify(moduleRef.instance.constructor), \" was bootstrapped, but it does not declare \\\"@NgModule.bootstrap\\\" components nor a \\\"ngDoBootstrap\\\" method. \") + \"Please define one of these.\");\n        }\n\n        this._modules.push(moduleRef);\n      }\n      /**\n       * Registers a listener to be called when the platform is destroyed.\n       */\n\n    }, {\n      key: \"onDestroy\",\n      value: function onDestroy(callback) {\n        this._destroyListeners.push(callback);\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\n    }, {\n      key: \"injector\",\n      get: function get() {\n        return this._injector;\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\n    }, {\n      key: \"destroy\",\n      value: function destroy() {\n        if (this._destroyed) {\n          throw new Error('The platform has already been destroyed!');\n        }\n\n        this._modules.slice().forEach(function (module) {\n          return module.destroy();\n        });\n\n        this._destroyListeners.forEach(function (listener) {\n          return listener();\n        });\n\n        this._destroyed = true;\n      }\n    }, {\n      key: \"destroyed\",\n      get: function get() {\n        return this._destroyed;\n      }\n    }]);\n\n    return PlatformRef;\n  }();\n\n  PlatformRef.ɵfac = function PlatformRef_Factory(t) {\n    return new (t || PlatformRef)(ɵɵinject(Injector));\n  };\n\n  PlatformRef.ɵprov =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵɵdefineInjectable({\n    token: PlatformRef,\n    factory: PlatformRef.ɵfac\n  });\n  return PlatformRef;\n}();\n/*@__PURE__*/\n\n\n(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(PlatformRef, [{\n    type: Injectable\n  }], function () {\n    return [{\n      type: Injector\n    }];\n  }, null);\n})();\n\nfunction getNgZone(ngZoneOption, extra) {\n  var 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 === null || extra === void 0 ? void 0 : extra.ngZoneEventCoalescing),\n      shouldCoalesceRunChangeDetection: !!(extra === null || extra === void 0 ? void 0 : extra.ngZoneRunCoalescing)\n    });\n  }\n\n  return ngZone;\n}\n\nfunction _callAndReportToErrorHandler(errorHandler, ngZone, callback) {\n  try {\n    var result = callback();\n\n    if (isPromise(result)) {\n      return result.catch(function (e) {\n        ngZone.runOutsideAngular(function () {\n          return errorHandler.handleError(e);\n        }); // rethrow as the exception handler might not do it\n\n        throw e;\n      });\n    }\n\n    return result;\n  } catch (e) {\n    ngZone.runOutsideAngular(function () {\n      return errorHandler.handleError(e);\n    }); // rethrow as the exception handler might not do it\n\n    throw e;\n  }\n}\n\nfunction optionsReducer(dst, objs) {\n  if (Array.isArray(objs)) {\n    dst = objs.reduce(optionsReducer, dst);\n  } else {\n    dst = Object.assign(Object.assign({}, dst), objs);\n  }\n\n  return dst;\n}\n\nvar ApplicationRef = /*@__PURE__*/function () {\n  var ApplicationRef = /*#__PURE__*/function () {\n    /** @internal */\n    function ApplicationRef(_zone, _injector, _exceptionHandler, _componentFactoryResolver, _initStatus) {\n      var _this29 = this;\n\n      _classCallCheck(this, ApplicationRef);\n\n      this._zone = _zone;\n      this._injector = _injector;\n      this._exceptionHandler = _exceptionHandler;\n      this._componentFactoryResolver = _componentFactoryResolver;\n      this._initStatus = _initStatus;\n      /** @internal */\n\n      this._bootstrapListeners = [];\n      this._views = [];\n      this._runningTick = false;\n      this._stable = true;\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\n      this.componentTypes = [];\n      /**\n       * Get a list of components registered to this application.\n       */\n\n      this.components = [];\n      this._onMicrotaskEmptySubscription = this._zone.onMicrotaskEmpty.subscribe({\n        next: function next() {\n          _this29._zone.run(function () {\n            _this29.tick();\n          });\n        }\n      });\n      var isCurrentlyStable = new Observable(function (observer) {\n        _this29._stable = _this29._zone.isStable && !_this29._zone.hasPendingMacrotasks && !_this29._zone.hasPendingMicrotasks;\n\n        _this29._zone.runOutsideAngular(function () {\n          observer.next(_this29._stable);\n          observer.complete();\n        });\n      });\n      var isStable = new Observable(function (observer) {\n        // Create the subscription to onStable outside the Angular Zone so that\n        // the callback is run outside the Angular Zone.\n        var stableSub;\n\n        _this29._zone.runOutsideAngular(function () {\n          stableSub = _this29._zone.onStable.subscribe(function () {\n            NgZone.assertNotInAngularZone(); // Check whether there are no pending macro/micro tasks in the next tick\n            // to allow for NgZone to update the state.\n\n            scheduleMicroTask(function () {\n              if (!_this29._stable && !_this29._zone.hasPendingMacrotasks && !_this29._zone.hasPendingMicrotasks) {\n                _this29._stable = true;\n                observer.next(true);\n              }\n            });\n          });\n        });\n\n        var unstableSub = _this29._zone.onUnstable.subscribe(function () {\n          NgZone.assertInAngularZone();\n\n          if (_this29._stable) {\n            _this29._stable = false;\n\n            _this29._zone.runOutsideAngular(function () {\n              observer.next(false);\n            });\n          }\n        });\n\n        return function () {\n          stableSub.unsubscribe();\n          unstableSub.unsubscribe();\n        };\n      });\n      this.isStable = merge$1(isCurrentlyStable, isStable.pipe(share()));\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\n\n    _createClass2(ApplicationRef, [{\n      key: \"bootstrap\",\n      value: function bootstrap(componentOrFactory, rootSelectorOrNode) {\n        var _this30 = this;\n\n        if (!this._initStatus.done) {\n          throw new Error('Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.');\n        }\n\n        var componentFactory;\n\n        if (componentOrFactory instanceof ComponentFactory) {\n          componentFactory = componentOrFactory;\n        } else {\n          componentFactory = this._componentFactoryResolver.resolveComponentFactory(componentOrFactory);\n        }\n\n        this.componentTypes.push(componentFactory.componentType); // Create a factory associated with the current module if it's not bound to some other\n\n        var ngModule = isBoundToModule(componentFactory) ? undefined : this._injector.get(NgModuleRef);\n        var selectorOrNode = rootSelectorOrNode || componentFactory.selector;\n        var compRef = componentFactory.create(Injector.NULL, [], selectorOrNode, ngModule);\n        var nativeElement = compRef.location.nativeElement;\n        var testability = compRef.injector.get(Testability, null);\n        var testabilityRegistry = testability && compRef.injector.get(TestabilityRegistry);\n\n        if (testability && testabilityRegistry) {\n          testabilityRegistry.registerApplication(nativeElement, testability);\n        }\n\n        compRef.onDestroy(function () {\n          _this30.detachView(compRef.hostView);\n\n          remove(_this30.components, compRef);\n\n          if (testabilityRegistry) {\n            testabilityRegistry.unregisterApplication(nativeElement);\n          }\n        });\n\n        this._loadComponent(compRef); // 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\n\n        if ((typeof ngDevMode === 'undefined' || ngDevMode) && isDevMode()) {\n          var _console = this._injector.get(Console);\n\n          _console.log(\"Angular is running in development mode. Call enableProdMode() to enable production mode.\");\n        }\n\n        return compRef;\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\n    }, {\n      key: \"tick\",\n      value: function tick() {\n        var _this31 = this;\n\n        if (this._runningTick) {\n          throw new Error('ApplicationRef.tick is called recursively');\n        }\n\n        try {\n          this._runningTick = true;\n\n          var _iterator5 = _createForOfIteratorHelper(this._views),\n              _step5;\n\n          try {\n            for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {\n              var _view2 = _step5.value;\n\n              _view2.detectChanges();\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\n          } catch (err) {\n            _iterator5.e(err);\n          } finally {\n            _iterator5.f();\n          }\n\n          if ((typeof ngDevMode === 'undefined' || ngDevMode) && isDevMode()) {\n            var _iterator6 = _createForOfIteratorHelper(this._views),\n                _step6;\n\n            try {\n              for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {\n                var view = _step6.value;\n                view.checkNoChanges();\n              }\n            } catch (err) {\n              _iterator6.e(err);\n            } finally {\n              _iterator6.f();\n            }\n          }\n        } catch (e) {\n          // Attention: Don't rethrow as it could cancel subscriptions to Observables!\n          this._zone.runOutsideAngular(function () {\n            return _this31._exceptionHandler.handleError(e);\n          });\n        } finally {\n          this._runningTick = false;\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\n    }, {\n      key: \"attachView\",\n      value: function attachView(viewRef) {\n        var view = viewRef;\n\n        this._views.push(view);\n\n        view.attachToAppRef(this);\n      }\n      /**\n       * Detaches a view from dirty checking again.\n       */\n\n    }, {\n      key: \"detachView\",\n      value: function detachView(viewRef) {\n        var view = viewRef;\n        remove(this._views, view);\n        view.detachFromAppRef();\n      }\n    }, {\n      key: \"_loadComponent\",\n      value: function _loadComponent(componentRef) {\n        this.attachView(componentRef.hostView);\n        this.tick();\n        this.components.push(componentRef); // Get the listeners lazily to prevent DI cycles.\n\n        var listeners = this._injector.get(APP_BOOTSTRAP_LISTENER, []).concat(this._bootstrapListeners);\n\n        listeners.forEach(function (listener) {\n          return listener(componentRef);\n        });\n      }\n      /** @internal */\n\n    }, {\n      key: \"ngOnDestroy\",\n      value: function ngOnDestroy() {\n        this._views.slice().forEach(function (view) {\n          return view.destroy();\n        });\n\n        this._onMicrotaskEmptySubscription.unsubscribe();\n      }\n      /**\n       * Returns the number of attached views.\n       */\n\n    }, {\n      key: \"viewCount\",\n      get: function get() {\n        return this._views.length;\n      }\n    }]);\n\n    return ApplicationRef;\n  }();\n\n  ApplicationRef.ɵfac = function ApplicationRef_Factory(t) {\n    return new (t || ApplicationRef)(ɵɵinject(NgZone), ɵɵinject(Injector), ɵɵinject(ErrorHandler), ɵɵinject(ComponentFactoryResolver), ɵɵinject(ApplicationInitStatus));\n  };\n\n  ApplicationRef.ɵprov =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵɵdefineInjectable({\n    token: ApplicationRef,\n    factory: ApplicationRef.ɵfac\n  });\n  return ApplicationRef;\n}();\n/*@__PURE__*/\n\n\n(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(ApplicationRef, [{\n    type: Injectable\n  }], function () {\n    return [{\n      type: NgZone\n    }, {\n      type: Injector\n    }, {\n      type: ErrorHandler\n    }, {\n      type: ComponentFactoryResolver\n    }, {\n      type: ApplicationInitStatus\n    }];\n  }, null);\n})();\n\nfunction remove(list, el) {\n  var index = list.indexOf(el);\n\n  if (index > -1) {\n    list.splice(index, 1);\n  }\n}\n\nfunction _lastDefined(args) {\n  for (var i = args.length - 1; i >= 0; i--) {\n    if (args[i] !== undefined) {\n      return args[i];\n    }\n  }\n\n  return undefined;\n}\n\nfunction _mergeArrays(parts) {\n  var result = [];\n  parts.forEach(function (part) {\n    return part && result.push.apply(result, _toConsumableArray(part));\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\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 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 */\n\n\nvar NgModuleFactoryLoader = /*#__PURE__*/_createClass2(function NgModuleFactoryLoader() {\n  _classCallCheck(this, NgModuleFactoryLoader);\n});\n\nfunction getModuleFactory__PRE_R3__(id) {\n  var factory = getRegisteredNgModuleType(id);\n  if (!factory) throw noModuleError(id);\n  return factory;\n}\n\nfunction getModuleFactory__POST_R3__(id) {\n  var type = getRegisteredNgModuleType(id);\n  if (!type) throw noModuleError(id);\n  return new NgModuleFactory$1(type);\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 */\n\n\nvar getModuleFactory = getModuleFactory__POST_R3__;\n\nfunction noModuleError(id) {\n  return new Error(\"No module with ID \".concat(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\nvar _SEPARATOR = '#';\nvar FACTORY_CLASS_SUFFIX = 'NgFactory';\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 */\n\nvar SystemJsNgModuleLoaderConfig = /*#__PURE__*/_createClass2(function SystemJsNgModuleLoaderConfig() {\n  _classCallCheck(this, SystemJsNgModuleLoaderConfig);\n});\n\nvar DEFAULT_CONFIG = {\n  factoryPathPrefix: '',\n  factoryPathSuffix: '.ngfactory'\n};\n\nvar SystemJsNgModuleLoader = /*@__PURE__*/function () {\n  var SystemJsNgModuleLoader = /*#__PURE__*/function () {\n    function SystemJsNgModuleLoader(_compiler, config) {\n      _classCallCheck(this, SystemJsNgModuleLoader);\n\n      this._compiler = _compiler;\n      this._config = config || DEFAULT_CONFIG;\n    }\n\n    _createClass2(SystemJsNgModuleLoader, [{\n      key: \"load\",\n      value: function load(path) {\n        var legacyOfflineMode = !ivyEnabled && this._compiler instanceof Compiler;\n        return legacyOfflineMode ? this.loadFactory(path) : this.loadAndCompile(path);\n      }\n    }, {\n      key: \"loadAndCompile\",\n      value: function loadAndCompile(path) {\n        var _this32 = this;\n\n        var _path$split = path.split(_SEPARATOR),\n            _path$split2 = _slicedToArray(_path$split, 2),\n            module = _path$split2[0],\n            exportName = _path$split2[1];\n\n        if (exportName === undefined) {\n          exportName = 'default';\n        }\n\n        return System.import(module).then(function (module) {\n          return module[exportName];\n        }).then(function (type) {\n          return checkNotEmpty(type, module, exportName);\n        }).then(function (type) {\n          return _this32._compiler.compileModuleAsync(type);\n        });\n      }\n    }, {\n      key: \"loadFactory\",\n      value: function loadFactory(path) {\n        var _path$split3 = path.split(_SEPARATOR),\n            _path$split4 = _slicedToArray(_path$split3, 2),\n            module = _path$split4[0],\n            exportName = _path$split4[1];\n\n        var factoryClassSuffix = FACTORY_CLASS_SUFFIX;\n\n        if (exportName === undefined) {\n          exportName = 'default';\n          factoryClassSuffix = '';\n        }\n\n        return System.import(this._config.factoryPathPrefix + module + this._config.factoryPathSuffix).then(function (module) {\n          return module[exportName + factoryClassSuffix];\n        }).then(function (factory) {\n          return checkNotEmpty(factory, module, exportName);\n        });\n      }\n    }]);\n\n    return SystemJsNgModuleLoader;\n  }();\n\n  SystemJsNgModuleLoader.ɵfac = function SystemJsNgModuleLoader_Factory(t) {\n    return new (t || SystemJsNgModuleLoader)(ɵɵinject(Compiler), ɵɵinject(SystemJsNgModuleLoaderConfig, 8));\n  };\n\n  SystemJsNgModuleLoader.ɵprov =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵɵdefineInjectable({\n    token: SystemJsNgModuleLoader,\n    factory: SystemJsNgModuleLoader.ɵfac\n  });\n  return SystemJsNgModuleLoader;\n}();\n/*@__PURE__*/\n\n\n(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(SystemJsNgModuleLoader, [{\n    type: Injectable\n  }], function () {\n    return [{\n      type: Compiler\n    }, {\n      type: SystemJsNgModuleLoaderConfig,\n      decorators: [{\n        type: Optional\n      }]\n    }];\n  }, null);\n})();\n\nfunction checkNotEmpty(value, modulePath, exportName) {\n  if (!value) {\n    throw new Error(\"Cannot find '\".concat(exportName, \"' in '\").concat(modulePath, \"'\"));\n  }\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\n/**\n * Represents an Angular [view](guide/glossary#view \"Definition\").\n *\n * @see {@link ChangeDetectorRef#usage-notes Change detection usage}\n *\n * @publicApi\n */\n\n\nvar ViewRef$1 = /*#__PURE__*/function (_ChangeDetectorRef) {\n  _inherits(ViewRef$1, _ChangeDetectorRef);\n\n  var _super20 = _createSuper(ViewRef$1);\n\n  function ViewRef$1() {\n    _classCallCheck(this, ViewRef$1);\n\n    return _super20.apply(this, arguments);\n  }\n\n  return _createClass2(ViewRef$1);\n}(ChangeDetectorRef);\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 */\n\n\nvar EmbeddedViewRef = /*#__PURE__*/function (_ViewRef$) {\n  _inherits(EmbeddedViewRef, _ViewRef$);\n\n  var _super21 = _createSuper(EmbeddedViewRef);\n\n  function EmbeddedViewRef() {\n    _classCallCheck(this, EmbeddedViewRef);\n\n    return _super21.apply(this, arguments);\n  }\n\n  return _createClass2(EmbeddedViewRef);\n}(ViewRef$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/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * @publicApi\n */\n\n\nvar DebugEventListener = /*#__PURE__*/_createClass2(function DebugEventListener(name, callback) {\n  _classCallCheck(this, DebugEventListener);\n\n  this.name = name;\n  this.callback = callback;\n});\n\nvar DebugNode__PRE_R3__ = /*#__PURE__*/function () {\n  function DebugNode__PRE_R3__(nativeNode, parent, _debugContext) {\n    _classCallCheck(this, DebugNode__PRE_R3__);\n\n    this.listeners = [];\n    this.parent = null;\n    this._debugContext = _debugContext;\n    this.nativeNode = nativeNode;\n\n    if (parent && parent instanceof DebugElement__PRE_R3__) {\n      parent.addChild(this);\n    }\n  }\n\n  _createClass2(DebugNode__PRE_R3__, [{\n    key: \"injector\",\n    get: function get() {\n      return this._debugContext.injector;\n    }\n  }, {\n    key: \"componentInstance\",\n    get: function get() {\n      return this._debugContext.component;\n    }\n  }, {\n    key: \"context\",\n    get: function get() {\n      return this._debugContext.context;\n    }\n  }, {\n    key: \"references\",\n    get: function get() {\n      return this._debugContext.references;\n    }\n  }, {\n    key: \"providerTokens\",\n    get: function get() {\n      return this._debugContext.providerTokens;\n    }\n  }]);\n\n  return DebugNode__PRE_R3__;\n}();\n\nvar DebugElement__PRE_R3__ = /*#__PURE__*/function (_DebugNode__PRE_R3__) {\n  _inherits(DebugElement__PRE_R3__, _DebugNode__PRE_R3__);\n\n  var _super22 = _createSuper(DebugElement__PRE_R3__);\n\n  function DebugElement__PRE_R3__(nativeNode, parent, _debugContext) {\n    var _this33;\n\n    _classCallCheck(this, DebugElement__PRE_R3__);\n\n    _this33 = _super22.call(this, nativeNode, parent, _debugContext);\n    _this33.properties = {};\n    _this33.attributes = {};\n    _this33.classes = {};\n    _this33.styles = {};\n    _this33.childNodes = [];\n    _this33.nativeElement = nativeNode;\n    return _this33;\n  }\n\n  _createClass2(DebugElement__PRE_R3__, [{\n    key: \"addChild\",\n    value: function addChild(child) {\n      if (child) {\n        this.childNodes.push(child);\n        child.parent = this;\n      }\n    }\n  }, {\n    key: \"removeChild\",\n    value: function removeChild(child) {\n      var childIndex = this.childNodes.indexOf(child);\n\n      if (childIndex !== -1) {\n        child.parent = null;\n        this.childNodes.splice(childIndex, 1);\n      }\n    }\n  }, {\n    key: \"insertChildrenAfter\",\n    value: function insertChildrenAfter(child, newChildren) {\n      var _this34 = this;\n\n      var siblingIndex = this.childNodes.indexOf(child);\n\n      if (siblingIndex !== -1) {\n        var _this$childNodes;\n\n        (_this$childNodes = this.childNodes).splice.apply(_this$childNodes, [siblingIndex + 1, 0].concat(_toConsumableArray(newChildren)));\n\n        newChildren.forEach(function (c) {\n          if (c.parent) {\n            c.parent.removeChild(c);\n          }\n\n          child.parent = _this34;\n        });\n      }\n    }\n  }, {\n    key: \"insertBefore\",\n    value: function insertBefore(refChild, newChild) {\n      var refIndex = this.childNodes.indexOf(refChild);\n\n      if (refIndex === -1) {\n        this.addChild(newChild);\n      } else {\n        if (newChild.parent) {\n          newChild.parent.removeChild(newChild);\n        }\n\n        newChild.parent = this;\n        this.childNodes.splice(refIndex, 0, newChild);\n      }\n    }\n  }, {\n    key: \"query\",\n    value: function query(predicate) {\n      var results = this.queryAll(predicate);\n      return results[0] || null;\n    }\n  }, {\n    key: \"queryAll\",\n    value: function queryAll(predicate) {\n      var matches = [];\n\n      _queryElementChildren(this, predicate, matches);\n\n      return matches;\n    }\n  }, {\n    key: \"queryAllNodes\",\n    value: function queryAllNodes(predicate) {\n      var matches = [];\n\n      _queryNodeChildren(this, predicate, matches);\n\n      return matches;\n    }\n  }, {\n    key: \"children\",\n    get: function get() {\n      return this.childNodes //\n      .filter(function (node) {\n        return node instanceof DebugElement__PRE_R3__;\n      });\n    }\n  }, {\n    key: \"triggerEventHandler\",\n    value: function triggerEventHandler(eventName, eventObj) {\n      this.listeners.forEach(function (listener) {\n        if (listener.name == eventName) {\n          listener.callback(eventObj);\n        }\n      });\n    }\n  }]);\n\n  return DebugElement__PRE_R3__;\n}(DebugNode__PRE_R3__);\n/**\n * @publicApi\n */\n\n\nfunction asNativeElements(debugEls) {\n  return debugEls.map(function (el) {\n    return el.nativeElement;\n  });\n}\n\nfunction _queryElementChildren(element, predicate, matches) {\n  element.childNodes.forEach(function (node) {\n    if (node instanceof DebugElement__PRE_R3__) {\n      if (predicate(node)) {\n        matches.push(node);\n      }\n\n      _queryElementChildren(node, predicate, matches);\n    }\n  });\n}\n\nfunction _queryNodeChildren(parentNode, predicate, matches) {\n  if (parentNode instanceof DebugElement__PRE_R3__) {\n    parentNode.childNodes.forEach(function (node) {\n      if (predicate(node)) {\n        matches.push(node);\n      }\n\n      if (node instanceof DebugElement__PRE_R3__) {\n        _queryNodeChildren(node, predicate, matches);\n      }\n    });\n  }\n}\n\nvar DebugNode__POST_R3__ = /*#__PURE__*/function () {\n  function DebugNode__POST_R3__(nativeNode) {\n    _classCallCheck(this, DebugNode__POST_R3__);\n\n    this.nativeNode = nativeNode;\n  }\n\n  _createClass2(DebugNode__POST_R3__, [{\n    key: \"parent\",\n    get: function get() {\n      var parent = this.nativeNode.parentNode;\n      return parent ? new DebugElement__POST_R3__(parent) : null;\n    }\n  }, {\n    key: \"injector\",\n    get: function get() {\n      return getInjector(this.nativeNode);\n    }\n  }, {\n    key: \"componentInstance\",\n    get: function get() {\n      var nativeElement = this.nativeNode;\n      return nativeElement && (getComponent(nativeElement) || getOwningComponent(nativeElement));\n    }\n  }, {\n    key: \"context\",\n    get: function get() {\n      return getComponent(this.nativeNode) || getContext(this.nativeNode);\n    }\n  }, {\n    key: \"listeners\",\n    get: function get() {\n      return getListeners(this.nativeNode).filter(function (listener) {\n        return listener.type === 'dom';\n      });\n    }\n  }, {\n    key: \"references\",\n    get: function get() {\n      return getLocalRefs(this.nativeNode);\n    }\n  }, {\n    key: \"providerTokens\",\n    get: function get() {\n      return getInjectionTokens(this.nativeNode);\n    }\n  }]);\n\n  return DebugNode__POST_R3__;\n}();\n\nvar DebugElement__POST_R3__ = /*#__PURE__*/function (_DebugNode__POST_R3__) {\n  _inherits(DebugElement__POST_R3__, _DebugNode__POST_R3__);\n\n  var _super23 = _createSuper(DebugElement__POST_R3__);\n\n  function DebugElement__POST_R3__(nativeNode) {\n    _classCallCheck(this, DebugElement__POST_R3__);\n\n    ngDevMode && assertDomNode(nativeNode);\n    return _super23.call(this, nativeNode);\n  }\n\n  _createClass2(DebugElement__POST_R3__, [{\n    key: \"nativeElement\",\n    get: function get() {\n      return this.nativeNode.nodeType == Node.ELEMENT_NODE ? this.nativeNode : null;\n    }\n  }, {\n    key: \"name\",\n    get: function get() {\n      var context = getLContext(this.nativeNode);\n\n      if (context !== null) {\n        var lView = context.lView;\n        var tData = lView[TVIEW].data;\n        var tNode = tData[context.nodeIndex];\n        return tNode.value;\n      } else {\n        return this.nativeNode.nodeName;\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\n  }, {\n    key: \"properties\",\n    get: function get() {\n      var context = getLContext(this.nativeNode);\n\n      if (context === null) {\n        return {};\n      }\n\n      var lView = context.lView;\n      var tData = lView[TVIEW].data;\n      var tNode = tData[context.nodeIndex];\n      var properties = {}; // Collect properties from the DOM.\n\n      copyDomProperties(this.nativeElement, properties); // 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\n      collectPropertyBindings(properties, tNode, lView, tData);\n      return properties;\n    }\n  }, {\n    key: \"attributes\",\n    get: function get() {\n      var attributes = {};\n      var element = this.nativeElement;\n\n      if (!element) {\n        return attributes;\n      }\n\n      var context = getLContext(element);\n\n      if (context === null) {\n        return {};\n      }\n\n      var lView = context.lView;\n      var tNodeAttrs = lView[TVIEW].data[context.nodeIndex].attrs;\n      var lowercaseTNodeAttrs = []; // 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\n      if (tNodeAttrs) {\n        var i = 0;\n\n        while (i < tNodeAttrs.length) {\n          var attrName = tNodeAttrs[i]; // 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\n          if (typeof attrName !== 'string') break;\n          var attrValue = tNodeAttrs[i + 1];\n          attributes[attrName] = attrValue;\n          lowercaseTNodeAttrs.push(attrName.toLowerCase());\n          i += 2;\n        }\n      }\n\n      var eAttrs = element.attributes;\n\n      for (var _i10 = 0; _i10 < eAttrs.length; _i10++) {\n        var attr = eAttrs[_i10];\n        var lowercaseName = attr.name.toLowerCase(); // 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\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    key: \"styles\",\n    get: function get() {\n      if (this.nativeElement && this.nativeElement.style) {\n        return this.nativeElement.style;\n      }\n\n      return {};\n    }\n  }, {\n    key: \"classes\",\n    get: function get() {\n      var result = {};\n      var element = this.nativeElement; // SVG elements return an `SVGAnimatedString` instead of a plain string for the `className`.\n\n      var className = element.className;\n      var classes = className && typeof className !== 'string' ? className.baseVal.split(' ') : className.split(' ');\n      classes.forEach(function (value) {\n        return result[value] = true;\n      });\n      return result;\n    }\n  }, {\n    key: \"childNodes\",\n    get: function get() {\n      var childNodes = this.nativeNode.childNodes;\n      var children = [];\n\n      for (var i = 0; i < childNodes.length; i++) {\n        var element = childNodes[i];\n        children.push(getDebugNode__POST_R3__(element));\n      }\n\n      return children;\n    }\n  }, {\n    key: \"children\",\n    get: function get() {\n      var nativeElement = this.nativeElement;\n      if (!nativeElement) return [];\n      var childNodes = nativeElement.children;\n      var children = [];\n\n      for (var i = 0; i < childNodes.length; i++) {\n        var element = childNodes[i];\n        children.push(getDebugNode__POST_R3__(element));\n      }\n\n      return children;\n    }\n  }, {\n    key: \"query\",\n    value: function query(predicate) {\n      var results = this.queryAll(predicate);\n      return results[0] || null;\n    }\n  }, {\n    key: \"queryAll\",\n    value: function queryAll(predicate) {\n      var matches = [];\n\n      _queryAllR3(this, predicate, matches, true);\n\n      return matches;\n    }\n  }, {\n    key: \"queryAllNodes\",\n    value: function queryAllNodes(predicate) {\n      var matches = [];\n\n      _queryAllR3(this, predicate, matches, false);\n\n      return matches;\n    }\n  }, {\n    key: \"triggerEventHandler\",\n    value: function triggerEventHandler(eventName, eventObj) {\n      var node = this.nativeNode;\n      var invokedListeners = [];\n      this.listeners.forEach(function (listener) {\n        if (listener.name === eventName) {\n          var callback = listener.callback;\n          callback.call(node, eventObj);\n          invokedListeners.push(callback);\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\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(function (listener) {\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            var unwrappedListener = listener('__ngUnwrap__');\n            return invokedListeners.indexOf(unwrappedListener) === -1 && unwrappedListener.call(node, eventObj);\n          }\n        });\n      }\n    }\n  }]);\n\n  return DebugElement__POST_R3__;\n}(DebugNode__POST_R3__);\n\nfunction copyDomProperties(element, properties) {\n  if (element) {\n    // Skip own properties (as those are patched)\n    var obj = Object.getPrototypeOf(element);\n    var NodePrototype = Node.prototype;\n\n    while (obj !== null && obj !== NodePrototype) {\n      var descriptors = Object.getOwnPropertyDescriptors(obj);\n\n      for (var 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          var value = element[key];\n\n          if (isPrimitiveValue(value)) {\n            properties[key] = value;\n          }\n        }\n      }\n\n      obj = Object.getPrototypeOf(obj);\n    }\n  }\n}\n\nfunction isPrimitiveValue(value) {\n  return typeof value === 'string' || typeof value === 'boolean' || typeof value === 'number' || value === null;\n}\n\nfunction _queryAllR3(parentElement, predicate, matches, elementsOnly) {\n  var context = getLContext(parentElement.nativeNode);\n\n  if (context !== null) {\n    var parentTNode = context.lView[TVIEW].data[context.nodeIndex];\n\n    _queryNodeChildrenR3(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 * 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 */\n\n\nfunction _queryNodeChildrenR3(tNode, lView, predicate, matches, elementsOnly, rootNativeNode) {\n  ngDevMode && assertTNodeForLView(tNode, lView);\n  var nativeNode = getNativeByTNodeOrNull(tNode, lView); // For each type of TNode, specific logic is executed.\n\n  if (tNode.type & (3\n  /* AnyRNode */\n  | 8\n  /* ElementContainer */\n  )) {\n    // Case 1: the TNode is an element\n    // The native node has to be checked.\n    _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode);\n\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      var componentView = getComponentLViewByIndex(tNode.index, lView);\n\n      if (componentView && componentView[TVIEW].firstChild) {\n        _queryNodeChildrenR3(componentView[TVIEW].firstChild, componentView, predicate, matches, elementsOnly, 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      } // 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\n\n      nativeNode && _queryNativeNodeDescendants(nativeNode, predicate, matches, elementsOnly);\n    } // In all cases, if a dynamic container exists for this node, each view inside it has to be\n    // processed.\n\n\n    var nodeOrContainer = lView[tNode.index];\n\n    if (isLContainer(nodeOrContainer)) {\n      _queryNodeChildrenInContainerR3(nodeOrContainer, predicate, matches, elementsOnly, rootNativeNode);\n    }\n  } else if (tNode.type & 4\n  /* Container */\n  ) {\n    // Case 2: the TNode is a container\n    // The native node has to be checked.\n    var lContainer = lView[tNode.index];\n\n    _addQueryMatchR3(lContainer[NATIVE], predicate, matches, elementsOnly, rootNativeNode); // Each view inside the container has to be processed.\n\n\n    _queryNodeChildrenInContainerR3(lContainer, predicate, matches, elementsOnly, rootNativeNode);\n  } else if (tNode.type & 16\n  /* Projection */\n  ) {\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    var _componentView = lView[DECLARATION_COMPONENT_VIEW];\n    var componentHost = _componentView[T_HOST];\n    var head = componentHost.projection[tNode.projection];\n\n    if (Array.isArray(head)) {\n      var _iterator7 = _createForOfIteratorHelper(head),\n          _step7;\n\n      try {\n        for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {\n          var _nativeNode2 = _step7.value;\n\n          _addQueryMatchR3(_nativeNode2, predicate, matches, elementsOnly, rootNativeNode);\n        }\n      } catch (err) {\n        _iterator7.e(err);\n      } finally {\n        _iterator7.f();\n      }\n    } else if (head) {\n      var nextLView = _componentView[PARENT];\n      var nextTNode = nextLView[TVIEW].data[head.index];\n\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  } // We don't want to go to the next sibling of the root node.\n\n\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    var _nextTNode = tNode.flags & 4\n    /* isProjected */\n    ? tNode.projectionNext : tNode.next;\n\n    if (_nextTNode) {\n      _queryNodeChildrenR3(_nextTNode, lView, predicate, matches, elementsOnly, rootNativeNode);\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 */\n\n\nfunction _queryNodeChildrenInContainerR3(lContainer, predicate, matches, elementsOnly, rootNativeNode) {\n  for (var i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n    var childView = lContainer[i];\n    var firstChild = childView[TVIEW].firstChild;\n\n    if (firstChild) {\n      _queryNodeChildrenR3(firstChild, childView, predicate, matches, elementsOnly, rootNativeNode);\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 */\n\n\nfunction _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode) {\n  if (rootNativeNode !== nativeNode) {\n    var debugNode = getDebugNode$1(nativeNode);\n\n    if (!debugNode) {\n      return;\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\n\n    if (elementsOnly && debugNode instanceof DebugElement__POST_R3__ && predicate(debugNode) && matches.indexOf(debugNode) === -1) {\n      matches.push(debugNode);\n    } else if (!elementsOnly && predicate(debugNode) && matches.indexOf(debugNode) === -1) {\n      matches.push(debugNode);\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 */\n\n\nfunction _queryNativeNodeDescendants(parentNode, predicate, matches, elementsOnly) {\n  var nodes = parentNode.childNodes;\n  var length = nodes.length;\n\n  for (var i = 0; i < length; i++) {\n    var node = nodes[i];\n    var debugNode = getDebugNode$1(node);\n\n    if (debugNode) {\n      if (elementsOnly && debugNode instanceof DebugElement__POST_R3__ && predicate(debugNode) && matches.indexOf(debugNode) === -1) {\n        matches.push(debugNode);\n      } else if (!elementsOnly && predicate(debugNode) && matches.indexOf(debugNode) === -1) {\n        matches.push(debugNode);\n      }\n\n      _queryNativeNodeDescendants(node, predicate, matches, elementsOnly);\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 */\n\n\nfunction collectPropertyBindings(properties, tNode, lView, tData) {\n  var bindingIndexes = tNode.propertyBindings;\n\n  if (bindingIndexes !== null) {\n    for (var i = 0; i < bindingIndexes.length; i++) {\n      var bindingIndex = bindingIndexes[i];\n      var propMetadata = tData[bindingIndex];\n      var metadataParts = propMetadata.split(INTERPOLATION_DELIMITER);\n      var propertyName = metadataParts[0];\n\n      if (metadataParts.length > 1) {\n        var value = metadataParts[1];\n\n        for (var j = 1; j < metadataParts.length - 1; j++) {\n          value += renderStringify(lView[bindingIndex + j - 1]) + metadataParts[j + 1];\n        }\n\n        properties[propertyName] = value;\n      } else {\n        properties[propertyName] = lView[bindingIndex];\n      }\n    }\n  }\n} // Need to keep the nodes in a global Map so that multiple angular apps are supported.\n\n\nvar _nativeNodeToDebugNode = /*@__PURE__*/new Map();\n\nfunction getDebugNode__PRE_R3__(nativeNode) {\n  return _nativeNodeToDebugNode.get(nativeNode) || null;\n}\n\nvar NG_DEBUG_PROPERTY = '__ng_debug__';\n\nfunction getDebugNode__POST_R3__(nativeNode) {\n  if (nativeNode instanceof Node) {\n    if (!nativeNode.hasOwnProperty(NG_DEBUG_PROPERTY)) {\n      nativeNode[NG_DEBUG_PROPERTY] = nativeNode.nodeType == Node.ELEMENT_NODE ? new DebugElement__POST_R3__(nativeNode) : new DebugNode__POST_R3__(nativeNode);\n    }\n\n    return nativeNode[NG_DEBUG_PROPERTY];\n  }\n\n  return null;\n}\n/**\n * @publicApi\n */\n\n\nvar getDebugNode$1 = getDebugNode__POST_R3__;\n\nfunction getDebugNodeR2__PRE_R3__(nativeNode) {\n  return getDebugNode__PRE_R3__(nativeNode);\n}\n\nfunction getDebugNodeR2__POST_R3__(_nativeNode) {\n  return null;\n}\n\nvar getDebugNodeR2 = getDebugNodeR2__POST_R3__;\n\nfunction getAllDebugNodes() {\n  return Array.from(_nativeNodeToDebugNode.values());\n}\n\nfunction indexDebugNode(node) {\n  _nativeNodeToDebugNode.set(node.nativeNode, node);\n}\n\nfunction removeDebugNodeFromIndex(node) {\n  _nativeNodeToDebugNode.delete(node.nativeNode);\n}\n/**\n * @publicApi\n */\n\n\nvar DebugNode = DebugNode__POST_R3__;\n/**\n * @publicApi\n */\n\nvar DebugElement = DebugElement__POST_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 * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nvar _CORE_PLATFORM_PROVIDERS = [// Set a default platform name for platforms that don't set it explicitly.\n{\n  provide: PLATFORM_ID,\n  useValue: 'unknown'\n}, {\n  provide: PlatformRef,\n  deps: [Injector]\n}, {\n  provide: TestabilityRegistry,\n  deps: []\n}, {\n  provide: Console,\n  deps: []\n}];\n/**\n * This platform has to be included in any other platform\n *\n * @publicApi\n */\n\nvar platformCore = /*@__PURE__*/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\nfunction _iterableDiffersFactory() {\n  return defaultIterableDiffers;\n}\n\nfunction _keyValueDiffersFactory() {\n  return defaultKeyValueDiffers;\n}\n\nfunction _localeFactory(locale) {\n  locale = locale || getGlobalLocale();\n\n  if (ivyEnabled) {\n    setLocaleId(locale);\n  }\n\n  return locale;\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 */\n\n\nfunction getGlobalLocale() {\n  if (typeof ngI18nClosureMode !== 'undefined' && ngI18nClosureMode && 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 || DEFAULT_LOCALE_ID;\n  }\n}\n\nvar ɵ0$f = USD_CURRENCY_CODE;\n/**\n * A built-in [dependency injection token](guide/glossary#di-token)\n * that is used to configure the root injector for bootstrapping.\n */\n\nvar APPLICATION_MODULE_PROVIDERS = [{\n  provide: ApplicationRef,\n  useClass: ApplicationRef,\n  deps: [NgZone, Injector, ErrorHandler, ComponentFactoryResolver, ApplicationInitStatus]\n}, {\n  provide: SCHEDULER,\n  deps: [NgZone],\n  useFactory: zoneSchedulerFactory\n}, {\n  provide: ApplicationInitStatus,\n  useClass: ApplicationInitStatus,\n  deps: [[/*@__PURE__*/new Optional(), APP_INITIALIZER]]\n}, {\n  provide: Compiler,\n  useClass: Compiler,\n  deps: []\n}, APP_ID_RANDOM_PROVIDER, {\n  provide: IterableDiffers,\n  useFactory: _iterableDiffersFactory,\n  deps: []\n}, {\n  provide: KeyValueDiffers,\n  useFactory: _keyValueDiffersFactory,\n  deps: []\n}, {\n  provide: LOCALE_ID$1,\n  useFactory: _localeFactory,\n  deps: [[/*@__PURE__*/new Inject(LOCALE_ID$1), /*@__PURE__*/new Optional(), /*@__PURE__*/new SkipSelf()]]\n}, {\n  provide: DEFAULT_CURRENCY_CODE,\n  useValue: ɵ0$f\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 */\n\nfunction zoneSchedulerFactory(ngZone) {\n  var queue = [];\n  ngZone.onStable.subscribe(function () {\n    while (queue.length) {\n      queue.pop()();\n    }\n  });\n  return function (fn) {\n    queue.push(fn);\n  };\n}\n\nvar ApplicationModule = /*@__PURE__*/function () {\n  var ApplicationModule = /*#__PURE__*/_createClass2( // Inject ApplicationRef to make it eager...\n  function ApplicationModule(appRef) {\n    _classCallCheck(this, ApplicationModule);\n  });\n\n  ApplicationModule.ɵfac = function ApplicationModule_Factory(t) {\n    return new (t || ApplicationModule)(ɵɵinject(ApplicationRef));\n  };\n\n  ApplicationModule.ɵmod =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵɵdefineNgModule({\n    type: ApplicationModule\n  });\n  ApplicationModule.ɵinj =\n  /*@__PURE__*/\n\n  /*@__PURE__*/\n  ɵɵdefineInjector({\n    providers: APPLICATION_MODULE_PROVIDERS\n  });\n  return ApplicationModule;\n}();\n/*@__PURE__*/\n\n\n(function () {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(ApplicationModule, [{\n    type: NgModule,\n    args: [{\n      providers: APPLICATION_MODULE_PROVIDERS\n    }]\n  }], function () {\n    return [{\n      type: ApplicationRef\n    }];\n  }, 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\nfunction anchorDef(flags, matchedQueriesDsl, ngContentIndex, childCount, handleEvent, templateFactory) {\n  flags |= 1\n  /* TypeElement */\n  ;\n\n  var _splitMatchedQueriesD2 = splitMatchedQueriesDsl(matchedQueriesDsl),\n      matchedQueries = _splitMatchedQueriesD2.matchedQueries,\n      references = _splitMatchedQueriesD2.references,\n      matchedQueryIds = _splitMatchedQueriesD2.matchedQueryIds;\n\n  var template = templateFactory ? resolveDefinition(templateFactory) : null;\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: flags,\n    checkIndex: -1,\n    childFlags: 0,\n    directChildFlags: 0,\n    childMatchedQueries: 0,\n    matchedQueries: matchedQueries,\n    matchedQueryIds: matchedQueryIds,\n    references: references,\n    ngContentIndex: ngContentIndex,\n    childCount: childCount,\n    bindings: [],\n    bindingFlags: 0,\n    outputs: [],\n    element: {\n      ns: null,\n      name: null,\n      attrs: null,\n      template: 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\nfunction elementDef(checkIndex, flags, matchedQueriesDsl, ngContentIndex, childCount, namespaceAndName) {\n  var fixedAttrs = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : [];\n  var bindings = arguments.length > 7 ? arguments[7] : undefined;\n  var outputs = arguments.length > 8 ? arguments[8] : undefined;\n  var handleEvent = arguments.length > 9 ? arguments[9] : undefined;\n  var componentView = arguments.length > 10 ? arguments[10] : undefined;\n  var componentRendererType = arguments.length > 11 ? arguments[11] : undefined;\n\n  if (!handleEvent) {\n    handleEvent = NOOP;\n  }\n\n  var _splitMatchedQueriesD3 = splitMatchedQueriesDsl(matchedQueriesDsl),\n      matchedQueries = _splitMatchedQueriesD3.matchedQueries,\n      references = _splitMatchedQueriesD3.references,\n      matchedQueryIds = _splitMatchedQueriesD3.matchedQueryIds;\n\n  var ns = null;\n  var name = null;\n\n  if (namespaceAndName) {\n    var _splitNamespace = splitNamespace(namespaceAndName);\n\n    var _splitNamespace2 = _slicedToArray(_splitNamespace, 2);\n\n    ns = _splitNamespace2[0];\n    name = _splitNamespace2[1];\n  }\n\n  bindings = bindings || [];\n  var bindingDefs = [];\n\n  for (var i = 0; i < bindings.length; i++) {\n    var _bindings$i = _slicedToArray(bindings[i], 3),\n        bindingFlags = _bindings$i[0],\n        _namespaceAndName = _bindings$i[1],\n        suffixOrSecurityContext = _bindings$i[2];\n\n    var _splitNamespace3 = splitNamespace(_namespaceAndName),\n        _splitNamespace4 = _slicedToArray(_splitNamespace3, 2),\n        _ns = _splitNamespace4[0],\n        _name = _splitNamespace4[1];\n\n    var securityContext = undefined;\n    var suffix = undefined;\n\n    switch (bindingFlags & 15\n    /* Types */\n    ) {\n      case 4\n      /* TypeElementStyle */\n      :\n        suffix = suffixOrSecurityContext;\n        break;\n\n      case 1\n      /* TypeElementAttribute */\n      :\n      case 8\n      /* TypeProperty */\n      :\n        securityContext = suffixOrSecurityContext;\n        break;\n    }\n\n    bindingDefs[i] = {\n      flags: bindingFlags,\n      ns: _ns,\n      name: _name,\n      nonMinifiedName: _name,\n      securityContext: securityContext,\n      suffix: suffix\n    };\n  }\n\n  outputs = outputs || [];\n  var outputDefs = [];\n\n  for (var _i11 = 0; _i11 < outputs.length; _i11++) {\n    var _outputs$_i = _slicedToArray(outputs[_i11], 2),\n        target = _outputs$_i[0],\n        eventName = _outputs$_i[1];\n\n    outputDefs[_i11] = {\n      type: 0\n      /* ElementOutput */\n      ,\n      target: target,\n      eventName: eventName,\n      propName: null\n    };\n  }\n\n  fixedAttrs = fixedAttrs || [];\n  var attrs = fixedAttrs.map(function (_ref4) {\n    var _ref5 = _slicedToArray(_ref4, 2),\n        namespaceAndName = _ref5[0],\n        value = _ref5[1];\n\n    var _splitNamespace5 = splitNamespace(namespaceAndName),\n        _splitNamespace6 = _slicedToArray(_splitNamespace5, 2),\n        ns = _splitNamespace6[0],\n        name = _splitNamespace6[1];\n\n    return [ns, name, value];\n  });\n  componentRendererType = resolveRendererType2(componentRendererType);\n\n  if (componentView) {\n    flags |= 33554432\n    /* ComponentView */\n    ;\n  }\n\n  flags |= 1\n  /* TypeElement */\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: checkIndex,\n    flags: flags,\n    childFlags: 0,\n    directChildFlags: 0,\n    childMatchedQueries: 0,\n    matchedQueries: matchedQueries,\n    matchedQueryIds: matchedQueryIds,\n    references: references,\n    ngContentIndex: ngContentIndex,\n    childCount: childCount,\n    bindings: bindingDefs,\n    bindingFlags: calcBindingFlags(bindingDefs),\n    outputs: outputDefs,\n    element: {\n      ns: ns,\n      name: name,\n      attrs: 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\nfunction createElement(view, renderHost, def) {\n  var elDef = def.element;\n  var rootSelectorOrNode = view.root.selectorOrNode;\n  var renderer = view.renderer;\n  var el;\n\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\n    var parentEl = getParentRenderElement(view, renderHost, def);\n\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    var preserveContent = !!elDef.componentRendererType && elDef.componentRendererType.encapsulation === ViewEncapsulation.ShadowDom;\n    el = renderer.selectRootElement(rootSelectorOrNode, preserveContent);\n  }\n\n  if (elDef.attrs) {\n    for (var i = 0; i < elDef.attrs.length; i++) {\n      var _elDef$attrs$i = _slicedToArray(elDef.attrs[i], 3),\n          ns = _elDef$attrs$i[0],\n          name = _elDef$attrs$i[1],\n          value = _elDef$attrs$i[2];\n\n      renderer.setAttribute(el, name, value, ns);\n    }\n  }\n\n  return el;\n}\n\nfunction listenToElementOutputs(view, compView, def, el) {\n  for (var i = 0; i < def.outputs.length; i++) {\n    var output = def.outputs[i];\n    var handleEventClosure = renderEventHandlerClosure(view, def.nodeIndex, elementEventFullName(output.target, output.eventName));\n    var listenTarget = output.target;\n    var listenerView = view;\n\n    if (output.target === 'component') {\n      listenTarget = null;\n      listenerView = compView;\n    }\n\n    var disposable = listenerView.renderer.listen(listenTarget || el, output.eventName, handleEventClosure);\n    view.disposables[def.outputIndex + i] = disposable;\n  }\n}\n\nfunction renderEventHandlerClosure(view, index, eventName) {\n  return function (event) {\n    return dispatchEvent(view, index, eventName, event);\n  };\n}\n\nfunction checkAndUpdateElementInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n  var bindLen = def.bindings.length;\n  var 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\nfunction checkAndUpdateElementDynamic(view, def, values) {\n  var changed = false;\n\n  for (var i = 0; i < values.length; i++) {\n    if (checkAndUpdateElementValue(view, def, i, values[i])) changed = true;\n  }\n\n  return changed;\n}\n\nfunction checkAndUpdateElementValue(view, def, bindingIdx, value) {\n  if (!checkAndUpdateBinding(view, def, bindingIdx, value)) {\n    return false;\n  }\n\n  var binding = def.bindings[bindingIdx];\n  var elData = asElementData(view, def.nodeIndex);\n  var renderNode = elData.renderElement;\n  var name = binding.name;\n\n  switch (binding.flags & 15\n  /* Types */\n  ) {\n    case 1\n    /* TypeElementAttribute */\n    :\n      setElementAttribute$1(view, binding, renderNode, binding.ns, name, value);\n      break;\n\n    case 2\n    /* TypeElementClass */\n    :\n      setElementClass(view, renderNode, name, value);\n      break;\n\n    case 4\n    /* TypeElementStyle */\n    :\n      setElementStyle(view, binding, renderNode, name, value);\n      break;\n\n    case 8\n    /* TypeProperty */\n    :\n      var bindView = def.flags & 33554432\n      /* ComponentView */\n      && binding.flags & 32\n      /* SyntheticHostProperty */\n      ? elData.componentView : view;\n      setElementProperty(bindView, binding, renderNode, name, value);\n      break;\n  }\n\n  return true;\n}\n\nfunction setElementAttribute$1(view, binding, renderNode, ns, name, value) {\n  var securityContext = binding.securityContext;\n  var renderValue = securityContext ? view.root.sanitizer.sanitize(securityContext, value) : value;\n  renderValue = renderValue != null ? renderValue.toString() : null;\n  var renderer = view.renderer;\n\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, renderNode, name, value) {\n  var renderer = view.renderer;\n\n  if (value) {\n    renderer.addClass(renderNode, name);\n  } else {\n    renderer.removeClass(renderNode, name);\n  }\n}\n\nfunction setElementStyle(view, binding, renderNode, name, value) {\n  var renderValue = view.root.sanitizer.sanitize(SecurityContext.STYLE, value);\n\n  if (renderValue != null) {\n    renderValue = renderValue.toString();\n    var unit = binding.suffix;\n\n    if (unit != null) {\n      renderValue = renderValue + unit;\n    }\n  } else {\n    renderValue = null;\n  }\n\n  var renderer = view.renderer;\n\n  if (renderValue != null) {\n    renderer.setStyle(renderNode, name, renderValue);\n  } else {\n    renderer.removeStyle(renderNode, name);\n  }\n}\n\nfunction setElementProperty(view, binding, renderNode, name, value) {\n  var securityContext = binding.securityContext;\n  var 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\n\nfunction queryDef(flags, id, bindings) {\n  var bindingDefs = [];\n\n  for (var propName in bindings) {\n    var bindingType = bindings[propName];\n    bindingDefs.push({\n      propName: propName,\n      bindingType: bindingType\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    // TODO(vicb): check\n    checkIndex: -1,\n    flags: 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: {\n      id: id,\n      filterId: filterQueryId(id),\n      bindings: bindingDefs\n    },\n    ngContent: null\n  };\n}\n\nfunction createQuery(emitDistinctChangesOnly) {\n  return new QueryList(emitDistinctChangesOnly);\n}\n\nfunction dirtyParentQueries(view) {\n  var queryIds = view.def.nodeMatchedQueries;\n\n  while (view.parent && isEmbeddedView(view)) {\n    var tplDef = view.parentNodeDef;\n    view = view.parent; // content queries\n\n    var end = tplDef.nodeIndex + tplDef.childCount;\n\n    for (var i = 0; i <= end; i++) {\n      var nodeDef = view.def.nodes[i];\n\n      if (nodeDef.flags & 67108864\n      /* TypeContentQuery */\n      && nodeDef.flags & 536870912\n      /* DynamicQuery */\n      && (nodeDef.query.filterId & queryIds) === nodeDef.query.filterId) {\n        asQueryList(view, i).setDirty();\n      }\n\n      if (nodeDef.flags & 1\n      /* TypeElement */\n      && i + nodeDef.childCount < tplDef.nodeIndex || !(nodeDef.childFlags & 67108864\n      /* TypeContentQuery */\n      ) || !(nodeDef.childFlags & 536870912\n      /* DynamicQuery */\n      )) {\n        // skip elements that don't contain the template element or no query.\n        i += nodeDef.childCount;\n      }\n    }\n  } // view queries\n\n\n  if (view.def.nodeFlags & 134217728\n  /* TypeViewQuery */\n  ) {\n    for (var _i12 = 0; _i12 < view.def.nodes.length; _i12++) {\n      var _nodeDef = view.def.nodes[_i12];\n\n      if (_nodeDef.flags & 134217728\n      /* TypeViewQuery */\n      && _nodeDef.flags & 536870912\n      /* DynamicQuery */\n      ) {\n        asQueryList(view, _i12).setDirty();\n      } // only visit the root nodes\n\n\n      _i12 += _nodeDef.childCount;\n    }\n  }\n}\n\nfunction checkAndUpdateQuery(view, nodeDef) {\n  var queryList = asQueryList(view, nodeDef.nodeIndex);\n\n  if (!queryList.dirty) {\n    return;\n  }\n\n  var directiveInstance;\n  var newValues = undefined;\n\n  if (nodeDef.flags & 67108864\n  /* TypeContentQuery */\n  ) {\n    var _elementDef = nodeDef.parent.parent;\n    newValues = calcQueryValues(view, _elementDef.nodeIndex, _elementDef.nodeIndex + _elementDef.childCount, nodeDef.query, []);\n    directiveInstance = asProviderData(view, nodeDef.parent.nodeIndex).instance;\n  } else if (nodeDef.flags & 134217728\n  /* TypeViewQuery */\n  ) {\n    newValues = calcQueryValues(view, 0, view.def.nodes.length - 1, nodeDef.query, []);\n    directiveInstance = view.component;\n  }\n\n  queryList.reset(newValues, unwrapElementRef);\n  var bindings = nodeDef.query.bindings;\n  var notify = false;\n\n  for (var i = 0; i < bindings.length; i++) {\n    var binding = bindings[i];\n    var boundValue = void 0;\n\n    switch (binding.bindingType) {\n      case 0\n      /* First */\n      :\n        boundValue = queryList.first;\n        break;\n\n      case 1\n      /* All */\n      :\n        boundValue = queryList;\n        notify = true;\n        break;\n    }\n\n    directiveInstance[binding.propName] = boundValue;\n  }\n\n  if (notify) {\n    queryList.notifyOnChanges();\n  }\n}\n\nfunction calcQueryValues(view, startIndex, endIndex, queryDef, values) {\n  for (var i = startIndex; i <= endIndex; i++) {\n    var nodeDef = view.def.nodes[i];\n    var valueType = nodeDef.matchedQueries[queryDef.id];\n\n    if (valueType != null) {\n      values.push(getQueryValue(view, nodeDef, valueType));\n    }\n\n    if (nodeDef.flags & 1\n    /* TypeElement */\n    && nodeDef.element.template && (nodeDef.element.template.nodeMatchedQueries & queryDef.filterId) === queryDef.filterId) {\n      var elementData = asElementData(view, i); // 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\n      if ((nodeDef.childMatchedQueries & queryDef.filterId) === queryDef.filterId) {\n        calcQueryValues(view, i + 1, i + nodeDef.childCount, queryDef, values);\n        i += nodeDef.childCount;\n      }\n\n      if (nodeDef.flags & 16777216\n      /* EmbeddedViews */\n      ) {\n        var embeddedViews = elementData.viewContainer._embeddedViews;\n\n        for (var k = 0; k < embeddedViews.length; k++) {\n          var embeddedView = embeddedViews[k];\n          var dvc = declaredViewContainer(embeddedView);\n\n          if (dvc && dvc === elementData) {\n            calcQueryValues(embeddedView, 0, embeddedView.def.nodes.length - 1, queryDef, values);\n          }\n        }\n      }\n\n      var projectedViews = elementData.template._projectedViews;\n\n      if (projectedViews) {\n        for (var _k = 0; _k < projectedViews.length; _k++) {\n          var projectedView = projectedViews[_k];\n          calcQueryValues(projectedView, 0, projectedView.def.nodes.length - 1, queryDef, values);\n        }\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\n  return values;\n}\n\nfunction getQueryValue(view, nodeDef, queryValueType) {\n  if (queryValueType != null) {\n    // a match\n    switch (queryValueType) {\n      case 1\n      /* RenderElement */\n      :\n        return asElementData(view, nodeDef.nodeIndex).renderElement;\n\n      case 0\n      /* ElementRef */\n      :\n        return new ElementRef(asElementData(view, nodeDef.nodeIndex).renderElement);\n\n      case 2\n      /* TemplateRef */\n      :\n        return asElementData(view, nodeDef.nodeIndex).template;\n\n      case 3\n      /* ViewContainerRef */\n      :\n        return asElementData(view, nodeDef.nodeIndex).viewContainer;\n\n      case 4\n      /* Provider */\n      :\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\n\nfunction ngContentDef(ngContentIndex, index) {\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: 8\n    /* TypeNgContent */\n    ,\n    childFlags: 0,\n    directChildFlags: 0,\n    childMatchedQueries: 0,\n    matchedQueries: {},\n    matchedQueryIds: 0,\n    references: {},\n    ngContentIndex: 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: {\n      index: index\n    }\n  };\n}\n\nfunction appendNgContent(view, renderHost, def) {\n  var parentEl = getParentRenderElement(view, renderHost, def);\n\n  if (!parentEl) {\n    // Nothing to do if there is no parent element.\n    return;\n  }\n\n  var ngContentIndex = def.ngContent.index;\n  visitProjectedRenderNodes(view, ngContentIndex, 1\n  /* AppendChild */\n  , 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\n\nfunction purePipeDef(checkIndex, argCount) {\n  // argCount + 1 to include the pipe as first arg\n  return _pureExpressionDef(128\n  /* TypePurePipe */\n  , checkIndex, newArray(argCount + 1));\n}\n\nfunction pureArrayDef(checkIndex, argCount) {\n  return _pureExpressionDef(32\n  /* TypePureArray */\n  , checkIndex, newArray(argCount));\n}\n\nfunction pureObjectDef(checkIndex, propToIndex) {\n  var keys = Object.keys(propToIndex);\n  var nbKeys = keys.length;\n  var propertyNames = [];\n\n  for (var i = 0; i < nbKeys; i++) {\n    var key = keys[i];\n    var index = propToIndex[key];\n    propertyNames.push(key);\n  }\n\n  return _pureExpressionDef(64\n  /* TypePureObject */\n  , checkIndex, propertyNames);\n}\n\nfunction _pureExpressionDef(flags, checkIndex, propertyNames) {\n  var bindings = [];\n\n  for (var i = 0; i < propertyNames.length; i++) {\n    var prop = propertyNames[i];\n    bindings.push({\n      flags: 8\n      /* TypeProperty */\n      ,\n      name: prop,\n      ns: null,\n      nonMinifiedName: prop,\n      securityContext: null,\n      suffix: null\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: checkIndex,\n    flags: 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: 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\nfunction createPureExpression(view, def) {\n  return {\n    value: undefined\n  };\n}\n\nfunction checkAndUpdatePureExpressionInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n  var bindings = def.bindings;\n  var changed = false;\n  var 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    var data = asPureExpressionData(view, def.nodeIndex);\n    var value;\n\n    switch (def.flags & 201347067\n    /* Types */\n    ) {\n      case 32\n      /* TypePureArray */\n      :\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\n      case 64\n      /* TypePureObject */\n      :\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\n      case 128\n      /* TypePurePipe */\n      :\n        var pipe = v0;\n\n        switch (bindLen) {\n          case 1:\n            value = pipe.transform(v0);\n            break;\n\n          case 2:\n            value = pipe.transform(v1);\n            break;\n\n          case 3:\n            value = pipe.transform(v1, v2);\n            break;\n\n          case 4:\n            value = pipe.transform(v1, v2, v3);\n            break;\n\n          case 5:\n            value = pipe.transform(v1, v2, v3, v4);\n            break;\n\n          case 6:\n            value = pipe.transform(v1, v2, v3, v4, v5);\n            break;\n\n          case 7:\n            value = pipe.transform(v1, v2, v3, v4, v5, v6);\n            break;\n\n          case 8:\n            value = pipe.transform(v1, v2, v3, v4, v5, v6, v7);\n            break;\n\n          case 9:\n            value = pipe.transform(v1, v2, v3, v4, v5, v6, v7, v8);\n            break;\n\n          case 10:\n            value = pipe.transform(v1, v2, v3, v4, v5, v6, v7, v8, v9);\n            break;\n        }\n\n        break;\n    }\n\n    data.value = value;\n  }\n\n  return changed;\n}\n\nfunction checkAndUpdatePureExpressionDynamic(view, def, values) {\n  var bindings = def.bindings;\n  var changed = false;\n\n  for (var 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\n  if (changed) {\n    var data = asPureExpressionData(view, def.nodeIndex);\n    var value;\n\n    switch (def.flags & 201347067\n    /* Types */\n    ) {\n      case 32\n      /* TypePureArray */\n      :\n        value = values;\n        break;\n\n      case 64\n      /* TypePureObject */\n      :\n        value = {};\n\n        for (var _i13 = 0; _i13 < values.length; _i13++) {\n          value[bindings[_i13].name] = values[_i13];\n        }\n\n        break;\n\n      case 128\n      /* TypePurePipe */\n      :\n        var pipe = values[0];\n        var params = values.slice(1);\n        value = pipe.transform.apply(pipe, _toConsumableArray(params));\n        break;\n    }\n\n    data.value = value;\n  }\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\n\nfunction textDef(checkIndex, ngContentIndex, staticText) {\n  var bindings = [];\n\n  for (var i = 1; i < staticText.length; i++) {\n    bindings[i - 1] = {\n      flags: 8\n      /* TypeProperty */\n      ,\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: checkIndex,\n    flags: 2\n    /* TypeText */\n    ,\n    childFlags: 0,\n    directChildFlags: 0,\n    childMatchedQueries: 0,\n    matchedQueries: {},\n    matchedQueryIds: 0,\n    references: {},\n    ngContentIndex: ngContentIndex,\n    childCount: 0,\n    bindings: bindings,\n    bindingFlags: 8\n    /* TypeProperty */\n    ,\n    outputs: [],\n    element: null,\n    provider: null,\n    text: {\n      prefix: staticText[0]\n    },\n    query: null,\n    ngContent: null\n  };\n}\n\nfunction createText(view, renderHost, def) {\n  var renderNode;\n  var renderer = view.renderer;\n  renderNode = renderer.createText(def.text.prefix);\n  var parentEl = getParentRenderElement(view, renderHost, def);\n\n  if (parentEl) {\n    renderer.appendChild(parentEl, renderNode);\n  }\n\n  return {\n    renderText: renderNode\n  };\n}\n\nfunction checkAndUpdateTextInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n  var changed = false;\n  var bindings = def.bindings;\n  var 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    var 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    var _renderNode = asTextData(view, def.nodeIndex).renderText;\n    view.renderer.setValue(_renderNode, value);\n  }\n\n  return changed;\n}\n\nfunction checkAndUpdateTextDynamic(view, def, values) {\n  var bindings = def.bindings;\n  var changed = false;\n\n  for (var 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\n  if (changed) {\n    var value = '';\n\n    for (var _i14 = 0; _i14 < values.length; _i14++) {\n      value = value + _addInterpolationPart(values[_i14], bindings[_i14]);\n    }\n\n    value = def.text.prefix + value;\n    var _renderNode2 = asTextData(view, def.nodeIndex).renderText;\n    view.renderer.setValue(_renderNode2, value);\n  }\n\n  return changed;\n}\n\nfunction _addInterpolationPart(value, binding) {\n  var 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\n\nfunction viewDef(flags, nodes, updateDirectives, updateRenderer) {\n  // clone nodes and set auto calculated values\n  var viewBindingCount = 0;\n  var viewDisposableCount = 0;\n  var viewNodeFlags = 0;\n  var viewRootNodeFlags = 0;\n  var viewMatchedQueries = 0;\n  var currentParent = null;\n  var currentRenderParent = null;\n  var currentElementHasPublicProviders = false;\n  var currentElementHasPrivateProviders = false;\n  var lastRenderRootNode = null;\n\n  for (var i = 0; i < nodes.length; i++) {\n    var node = nodes[i];\n    node.nodeIndex = i;\n    node.parent = currentParent;\n    node.bindingIndex = viewBindingCount;\n    node.outputIndex = viewDisposableCount;\n    node.renderParent = currentRenderParent;\n    viewNodeFlags |= node.flags;\n    viewMatchedQueries |= node.matchedQueryIds;\n\n    if (node.element) {\n      var elDef = node.element;\n      elDef.publicProviders = currentParent ? currentParent.element.publicProviders : Object.create(null);\n      elDef.allProviders = elDef.publicProviders; // Note: We assume that all providers of an element are before any child element!\n\n      currentElementHasPublicProviders = false;\n      currentElementHasPrivateProviders = false;\n\n      if (node.element.template) {\n        viewMatchedQueries |= node.element.template.nodeMatchedQueries;\n      }\n    }\n\n    validateNode(currentParent, node, nodes.length);\n    viewBindingCount += node.bindings.length;\n    viewDisposableCount += node.outputs.length;\n\n    if (!currentRenderParent && node.flags & 3\n    /* CatRenderNode */\n    ) {\n      lastRenderRootNode = node;\n    }\n\n    if (node.flags & 20224\n    /* CatProvider */\n    ) {\n      if (!currentElementHasPublicProviders) {\n        currentElementHasPublicProviders = true; // Use prototypical inheritance to not get O(n^2) complexity...\n\n        currentParent.element.publicProviders = Object.create(currentParent.element.publicProviders);\n        currentParent.element.allProviders = currentParent.element.publicProviders;\n      }\n\n      var isPrivateService = (node.flags & 8192\n      /* PrivateProvider */\n      ) !== 0;\n      var isComponent = (node.flags & 32768\n      /* Component */\n      ) !== 0;\n\n      if (!isPrivateService || isComponent) {\n        currentParent.element.publicProviders[tokenKey(node.provider.token)] = node;\n      } else {\n        if (!currentElementHasPrivateProviders) {\n          currentElementHasPrivateProviders = true; // Use prototypical inheritance to not get O(n^2) complexity...\n\n          currentParent.element.allProviders = Object.create(currentParent.element.publicProviders);\n        }\n\n        currentParent.element.allProviders[tokenKey(node.provider.token)] = node;\n      }\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\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        var newParent = currentParent.parent;\n\n        if (newParent) {\n          newParent.childFlags |= currentParent.childFlags;\n          newParent.childMatchedQueries |= currentParent.childMatchedQueries;\n        }\n\n        currentParent = newParent; // We also need to update the render parent & account for ng-container\n\n        if (currentParent && isNgContainer(currentParent)) {\n          currentRenderParent = currentParent.renderParent;\n        } else {\n          currentRenderParent = currentParent;\n        }\n      }\n    }\n  }\n\n  var handleEvent = function handleEvent(view, nodeIndex, eventName, event) {\n    return nodes[nodeIndex].element.handleEvent(view, eventName, event);\n  };\n\n  return {\n    // Will be filled later...\n    factory: null,\n    nodeFlags: viewNodeFlags,\n    rootNodeFlags: viewRootNodeFlags,\n    nodeMatchedQueries: viewMatchedQueries,\n    flags: flags,\n    nodes: nodes,\n    updateDirectives: updateDirectives || NOOP,\n    updateRenderer: updateRenderer || NOOP,\n    handleEvent: handleEvent,\n    bindingCount: viewBindingCount,\n    outputCount: viewDisposableCount,\n    lastRenderRootNode: lastRenderRootNode\n  };\n}\n\nfunction isNgContainer(node) {\n  return (node.flags & 1\n  /* TypeElement */\n  ) !== 0 && node.element.name === null;\n}\n\nfunction validateNode(parent, node, nodeCount) {\n  var template = node.element && node.element.template;\n\n  if (template) {\n    if (!template.lastRenderRootNode) {\n      throw new Error(\"Illegal State: Embedded templates without nodes are not allowed!\");\n    }\n\n    if (template.lastRenderRootNode && template.lastRenderRootNode.flags & 16777216\n    /* EmbeddedViews */\n    ) {\n      throw new Error(\"Illegal State: Last root node of a template can't have embedded views, at index \".concat(node.nodeIndex, \"!\"));\n    }\n  }\n\n  if (node.flags & 20224\n  /* CatProvider */\n  ) {\n    var parentFlags = parent ? parent.flags : 0;\n\n    if ((parentFlags & 1\n    /* TypeElement */\n    ) === 0) {\n      throw new Error(\"Illegal State: StaticProvider/Directive nodes need to be children of elements or anchors, at index \".concat(node.nodeIndex, \"!\"));\n    }\n  }\n\n  if (node.query) {\n    if (node.flags & 67108864\n    /* TypeContentQuery */\n    && (!parent || (parent.flags & 16384\n    /* TypeDirective */\n    ) === 0)) {\n      throw new Error(\"Illegal State: Content Query nodes need to be children of directives, at index \".concat(node.nodeIndex, \"!\"));\n    }\n\n    if (node.flags & 134217728\n    /* TypeViewQuery */\n    && parent) {\n      throw new Error(\"Illegal State: View Query nodes have to be top level nodes, at index \".concat(node.nodeIndex, \"!\"));\n    }\n  }\n\n  if (node.childCount) {\n    var parentEnd = parent ? parent.nodeIndex + parent.childCount : nodeCount - 1;\n\n    if (node.nodeIndex <= parentEnd && node.nodeIndex + node.childCount > parentEnd) {\n      throw new Error(\"Illegal State: childCount of node leads outside of parent, at index \".concat(node.nodeIndex, \"!\"));\n    }\n  }\n}\n\nfunction createEmbeddedView(parent, anchorDef, viewDef, context) {\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  var view = createView(parent.root, parent.renderer, parent, anchorDef, viewDef);\n  initView(view, parent.component, context);\n  createViewNodes(view);\n  return view;\n}\n\nfunction createRootView(root, def, context) {\n  var view = createView(root, root.renderer, null, null, def);\n  initView(view, context, context);\n  createViewNodes(view);\n  return view;\n}\n\nfunction createComponentView(parentView, nodeDef, viewDef, hostElement) {\n  var rendererType = nodeDef.element.componentRendererType;\n  var compRenderer;\n\n  if (!rendererType) {\n    compRenderer = parentView.root.renderer;\n  } else {\n    compRenderer = parentView.root.rendererFactory.createRenderer(hostElement, rendererType);\n  }\n\n  return createView(parentView.root, compRenderer, parentView, nodeDef.element.componentProvider, viewDef);\n}\n\nfunction createView(root, renderer, parent, parentNodeDef, def) {\n  var nodes = new Array(def.nodes.length);\n  var disposables = def.outputCount ? new Array(def.outputCount) : null;\n  var view = {\n    def: def,\n    parent: parent,\n    viewContainerParent: null,\n    parentNodeDef: parentNodeDef,\n    context: null,\n    component: null,\n    nodes: nodes,\n    state: 13\n    /* CatInit */\n    ,\n    root: root,\n    renderer: renderer,\n    oldValues: new Array(def.bindingCount),\n    disposables: disposables,\n    initIndex: -1\n  };\n  return view;\n}\n\nfunction initView(view, component, context) {\n  view.component = component;\n  view.context = context;\n}\n\nfunction createViewNodes(view) {\n  var renderHost;\n\n  if (isComponentView(view)) {\n    var hostDef = view.parentNodeDef;\n    renderHost = asElementData(view.parent, hostDef.parent.nodeIndex).renderElement;\n  }\n\n  var def = view.def;\n  var nodes = view.nodes;\n\n  for (var i = 0; i < def.nodes.length; i++) {\n    var nodeDef = def.nodes[i];\n    Services.setCurrentNode(view, i);\n    var nodeData = void 0;\n\n    switch (nodeDef.flags & 201347067\n    /* Types */\n    ) {\n      case 1\n      /* TypeElement */\n      :\n        var el = createElement(view, renderHost, nodeDef);\n        var componentView = undefined;\n\n        if (nodeDef.flags & 33554432\n        /* ComponentView */\n        ) {\n          var compViewDef = resolveDefinition(nodeDef.element.componentView);\n          componentView = Services.createComponentView(view, nodeDef, compViewDef, el);\n        }\n\n        listenToElementOutputs(view, componentView, nodeDef, el);\n        nodeData = {\n          renderElement: el,\n          componentView: componentView,\n          viewContainer: null,\n          template: nodeDef.element.template ? createTemplateData(view, nodeDef) : undefined\n        };\n\n        if (nodeDef.flags & 16777216\n        /* EmbeddedViews */\n        ) {\n          nodeData.viewContainer = createViewContainerData(view, nodeDef, nodeData);\n        }\n\n        break;\n\n      case 2\n      /* TypeText */\n      :\n        nodeData = createText(view, renderHost, nodeDef);\n        break;\n\n      case 512\n      /* TypeClassProvider */\n      :\n      case 1024\n      /* TypeFactoryProvider */\n      :\n      case 2048\n      /* TypeUseExistingProvider */\n      :\n      case 256\n      /* TypeValueProvider */\n      :\n        {\n          nodeData = nodes[i];\n\n          if (!nodeData && !(nodeDef.flags & 4096\n          /* LazyProvider */\n          )) {\n            var instance = createProviderInstance(view, nodeDef);\n            nodeData = {\n              instance: instance\n            };\n          }\n\n          break;\n        }\n\n      case 16\n      /* TypePipe */\n      :\n        {\n          var _instance = createPipeInstance(view, nodeDef);\n\n          nodeData = {\n            instance: _instance\n          };\n          break;\n        }\n\n      case 16384\n      /* TypeDirective */\n      :\n        {\n          nodeData = nodes[i];\n\n          if (!nodeData) {\n            var _instance2 = createDirectiveInstance(view, nodeDef);\n\n            nodeData = {\n              instance: _instance2\n            };\n          }\n\n          if (nodeDef.flags & 32768\n          /* Component */\n          ) {\n            var compView = asElementData(view, nodeDef.parent.nodeIndex).componentView;\n            initView(compView, nodeData.instance, nodeData.instance);\n          }\n\n          break;\n        }\n\n      case 32\n      /* TypePureArray */\n      :\n      case 64\n      /* TypePureObject */\n      :\n      case 128\n      /* TypePurePipe */\n      :\n        nodeData = createPureExpression(view, nodeDef);\n        break;\n\n      case 67108864\n      /* TypeContentQuery */\n      :\n      case 134217728\n      /* TypeViewQuery */\n      :\n        nodeData = createQuery((nodeDef.flags & -2147483648\n        /* EmitDistinctChangesOnly */\n        ) === -2147483648\n        /* EmitDistinctChangesOnly */\n        );\n        break;\n\n      case 8\n      /* TypeNgContent */\n      :\n        appendNgContent(view, renderHost, nodeDef); // no runtime data needed for NgContent...\n\n        nodeData = undefined;\n        break;\n    }\n\n    nodes[i] = nodeData;\n  } // Create the ViewData.nodes of component views after we created everything else,\n  // so that e.g. ng-content works\n\n\n  execComponentViewsAction(view, ViewAction.CreateViewNodes); // fill static content and view queries\n\n  execQueriesAction(view, 67108864\n  /* TypeContentQuery */\n  | 134217728\n  /* TypeViewQuery */\n  , 268435456\n  /* StaticQuery */\n  , 0\n  /* CheckAndUpdate */\n  );\n}\n\nfunction checkNoChangesView(view) {\n  markProjectedViewsForCheck(view);\n  Services.updateDirectives(view, 1\n  /* CheckNoChanges */\n  );\n  execEmbeddedViewsAction(view, ViewAction.CheckNoChanges);\n  Services.updateRenderer(view, 1\n  /* CheckNoChanges */\n  );\n  execComponentViewsAction(view, ViewAction.CheckNoChanges); // 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\n  view.state &= ~(64\n  /* CheckProjectedViews */\n  | 32\n  /* CheckProjectedView */\n  );\n}\n\nfunction checkAndUpdateView(view) {\n  if (view.state & 1\n  /* BeforeFirstCheck */\n  ) {\n    view.state &= ~1\n    /* BeforeFirstCheck */\n    ;\n    view.state |= 2\n    /* FirstCheck */\n    ;\n  } else {\n    view.state &= ~2\n    /* FirstCheck */\n    ;\n  }\n\n  shiftInitState(view, 0\n  /* InitState_BeforeInit */\n  , 256\n  /* InitState_CallingOnInit */\n  );\n  markProjectedViewsForCheck(view);\n  Services.updateDirectives(view, 0\n  /* CheckAndUpdate */\n  );\n  execEmbeddedViewsAction(view, ViewAction.CheckAndUpdate);\n  execQueriesAction(view, 67108864\n  /* TypeContentQuery */\n  , 536870912\n  /* DynamicQuery */\n  , 0\n  /* CheckAndUpdate */\n  );\n  var callInit = shiftInitState(view, 256\n  /* InitState_CallingOnInit */\n  , 512\n  /* InitState_CallingAfterContentInit */\n  );\n  callLifecycleHooksChildrenFirst(view, 2097152\n  /* AfterContentChecked */\n  | (callInit ? 1048576\n  /* AfterContentInit */\n  : 0));\n  Services.updateRenderer(view, 0\n  /* CheckAndUpdate */\n  );\n  execComponentViewsAction(view, ViewAction.CheckAndUpdate);\n  execQueriesAction(view, 134217728\n  /* TypeViewQuery */\n  , 536870912\n  /* DynamicQuery */\n  , 0\n  /* CheckAndUpdate */\n  );\n  callInit = shiftInitState(view, 512\n  /* InitState_CallingAfterContentInit */\n  , 768\n  /* InitState_CallingAfterViewInit */\n  );\n  callLifecycleHooksChildrenFirst(view, 8388608\n  /* AfterViewChecked */\n  | (callInit ? 4194304\n  /* AfterViewInit */\n  : 0));\n\n  if (view.def.flags & 2\n  /* OnPush */\n  ) {\n    view.state &= ~8\n    /* ChecksEnabled */\n    ;\n  }\n\n  view.state &= ~(64\n  /* CheckProjectedViews */\n  | 32\n  /* CheckProjectedView */\n  );\n  shiftInitState(view, 768\n  /* InitState_CallingAfterViewInit */\n  , 1024\n  /* InitState_AfterInit */\n  );\n}\n\nfunction checkAndUpdateNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n  if (argStyle === 0\n  /* Inline */\n  ) {\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) {\n  var def = view.def;\n\n  if (!(def.nodeFlags & 4\n  /* ProjectedTemplate */\n  )) {\n    return;\n  }\n\n  for (var i = 0; i < def.nodes.length; i++) {\n    var nodeDef = def.nodes[i];\n\n    if (nodeDef.flags & 4\n    /* ProjectedTemplate */\n    ) {\n      var projectedViews = asElementData(view, i).template._projectedViews;\n\n      if (projectedViews) {\n        for (var _i15 = 0; _i15 < projectedViews.length; _i15++) {\n          var projectedView = projectedViews[_i15];\n          projectedView.state |= 32\n          /* CheckProjectedView */\n          ;\n          markParentViewsForCheckProjectedViews(projectedView, view);\n        }\n      }\n    } else if ((nodeDef.childFlags & 4\n    /* ProjectedTemplate */\n    ) === 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(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n  switch (nodeDef.flags & 201347067\n  /* Types */\n  ) {\n    case 1\n    /* TypeElement */\n    :\n      return checkAndUpdateElementInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n\n    case 2\n    /* TypeText */\n    :\n      return checkAndUpdateTextInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n\n    case 16384\n    /* TypeDirective */\n    :\n      return checkAndUpdateDirectiveInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n\n    case 32\n    /* TypePureArray */\n    :\n    case 64\n    /* TypePureObject */\n    :\n    case 128\n    /* TypePurePipe */\n    :\n      return checkAndUpdatePureExpressionInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n\n    default:\n      throw 'unreachable';\n  }\n}\n\nfunction checkAndUpdateNodeDynamic(view, nodeDef, values) {\n  switch (nodeDef.flags & 201347067\n  /* Types */\n  ) {\n    case 1\n    /* TypeElement */\n    :\n      return checkAndUpdateElementDynamic(view, nodeDef, values);\n\n    case 2\n    /* TypeText */\n    :\n      return checkAndUpdateTextDynamic(view, nodeDef, values);\n\n    case 16384\n    /* TypeDirective */\n    :\n      return checkAndUpdateDirectiveDynamic(view, nodeDef, values);\n\n    case 32\n    /* TypePureArray */\n    :\n    case 64\n    /* TypePureObject */\n    :\n    case 128\n    /* TypePurePipe */\n    :\n      return checkAndUpdatePureExpressionDynamic(view, nodeDef, values);\n\n    default:\n      throw 'unreachable';\n  }\n}\n\nfunction checkNoChangesNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n  if (argStyle === 0\n  /* Inline */\n  ) {\n    checkNoChangesNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n  } else {\n    checkNoChangesNodeDynamic(view, nodeDef, v0);\n  } // Returning false is ok here as we would have thrown in case of a change.\n\n\n  return false;\n}\n\nfunction checkNoChangesNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n  var 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, nodeDef, values) {\n  for (var i = 0; i < values.length; i++) {\n    checkBindingNoChanges(view, nodeDef, i, values[i]);\n  }\n}\n/**\n * Workaround https://github.com/angular/tsickle/issues/497\n * @suppress {misplacedTypeAnnotation}\n */\n\n\nfunction checkNoChangesQuery(view, nodeDef) {\n  var queryList = asQueryList(view, nodeDef.nodeIndex);\n\n  if (queryList.dirty) {\n    throw expressionChangedAfterItHasBeenCheckedError(Services.createDebugContext(view, nodeDef.nodeIndex), \"Query \".concat(nodeDef.query.id, \" not dirty\"), \"Query \".concat(nodeDef.query.id, \" dirty\"), (view.state & 1\n    /* BeforeFirstCheck */\n    ) !== 0);\n  }\n}\n\nfunction destroyView(view) {\n  if (view.state & 128\n  /* Destroyed */\n  ) {\n    return;\n  }\n\n  execEmbeddedViewsAction(view, ViewAction.Destroy);\n  execComponentViewsAction(view, ViewAction.Destroy);\n  callLifecycleHooksChildrenFirst(view, 131072\n  /* OnDestroy */\n  );\n\n  if (view.disposables) {\n    for (var i = 0; i < view.disposables.length; i++) {\n      view.disposables[i]();\n    }\n  }\n\n  detachProjectedView(view);\n\n  if (view.renderer.destroyNode) {\n    destroyViewNodes(view);\n  }\n\n  if (isComponentView(view)) {\n    view.renderer.destroy();\n  }\n\n  view.state |= 128\n  /* Destroyed */\n  ;\n}\n\nfunction destroyViewNodes(view) {\n  var len = view.def.nodes.length;\n\n  for (var i = 0; i < len; i++) {\n    var def = view.def.nodes[i];\n\n    if (def.flags & 1\n    /* TypeElement */\n    ) {\n      view.renderer.destroyNode(asElementData(view, i).renderElement);\n    } else if (def.flags & 2\n    /* TypeText */\n    ) {\n      view.renderer.destroyNode(asTextData(view, i).renderText);\n    } else if (def.flags & 67108864\n    /* TypeContentQuery */\n    || def.flags & 134217728\n    /* TypeViewQuery */\n    ) {\n      asQueryList(view, i).destroy();\n    }\n  }\n}\n\nvar ViewAction = /*@__PURE__*/function (ViewAction) {\n  ViewAction[ViewAction[\"CreateViewNodes\"] = 0] = \"CreateViewNodes\";\n  ViewAction[ViewAction[\"CheckNoChanges\"] = 1] = \"CheckNoChanges\";\n  ViewAction[ViewAction[\"CheckNoChangesProjectedViews\"] = 2] = \"CheckNoChangesProjectedViews\";\n  ViewAction[ViewAction[\"CheckAndUpdate\"] = 3] = \"CheckAndUpdate\";\n  ViewAction[ViewAction[\"CheckAndUpdateProjectedViews\"] = 4] = \"CheckAndUpdateProjectedViews\";\n  ViewAction[ViewAction[\"Destroy\"] = 5] = \"Destroy\";\n  return ViewAction;\n}({});\n\nfunction execComponentViewsAction(view, action) {\n  var def = view.def;\n\n  if (!(def.nodeFlags & 33554432\n  /* ComponentView */\n  )) {\n    return;\n  }\n\n  for (var i = 0; i < def.nodes.length; i++) {\n    var nodeDef = def.nodes[i];\n\n    if (nodeDef.flags & 33554432\n    /* ComponentView */\n    ) {\n      // a leaf\n      callViewAction(asElementData(view, i).componentView, action);\n    } else if ((nodeDef.childFlags & 33554432\n    /* ComponentView */\n    ) === 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, action) {\n  var def = view.def;\n\n  if (!(def.nodeFlags & 16777216\n  /* EmbeddedViews */\n  )) {\n    return;\n  }\n\n  for (var i = 0; i < def.nodes.length; i++) {\n    var nodeDef = def.nodes[i];\n\n    if (nodeDef.flags & 16777216\n    /* EmbeddedViews */\n    ) {\n      // a leaf\n      var embeddedViews = asElementData(view, i).viewContainer._embeddedViews;\n\n      for (var k = 0; k < embeddedViews.length; k++) {\n        callViewAction(embeddedViews[k], action);\n      }\n    } else if ((nodeDef.childFlags & 16777216\n    /* EmbeddedViews */\n    ) === 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, action) {\n  var viewState = view.state;\n\n  switch (action) {\n    case ViewAction.CheckNoChanges:\n      if ((viewState & 128\n      /* Destroyed */\n      ) === 0) {\n        if ((viewState & 12\n        /* CatDetectChanges */\n        ) === 12\n        /* CatDetectChanges */\n        ) {\n          checkNoChangesView(view);\n        } else if (viewState & 64\n        /* CheckProjectedViews */\n        ) {\n          execProjectedViewsAction(view, ViewAction.CheckNoChangesProjectedViews);\n        }\n      }\n\n      break;\n\n    case ViewAction.CheckNoChangesProjectedViews:\n      if ((viewState & 128\n      /* Destroyed */\n      ) === 0) {\n        if (viewState & 32\n        /* CheckProjectedView */\n        ) {\n          checkNoChangesView(view);\n        } else if (viewState & 64\n        /* CheckProjectedViews */\n        ) {\n          execProjectedViewsAction(view, action);\n        }\n      }\n\n      break;\n\n    case ViewAction.CheckAndUpdate:\n      if ((viewState & 128\n      /* Destroyed */\n      ) === 0) {\n        if ((viewState & 12\n        /* CatDetectChanges */\n        ) === 12\n        /* CatDetectChanges */\n        ) {\n          checkAndUpdateView(view);\n        } else if (viewState & 64\n        /* CheckProjectedViews */\n        ) {\n          execProjectedViewsAction(view, ViewAction.CheckAndUpdateProjectedViews);\n        }\n      }\n\n      break;\n\n    case ViewAction.CheckAndUpdateProjectedViews:\n      if ((viewState & 128\n      /* Destroyed */\n      ) === 0) {\n        if (viewState & 32\n        /* CheckProjectedView */\n        ) {\n          checkAndUpdateView(view);\n        } else if (viewState & 64\n        /* CheckProjectedViews */\n        ) {\n          execProjectedViewsAction(view, action);\n        }\n      }\n\n      break;\n\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\n    case ViewAction.CreateViewNodes:\n      createViewNodes(view);\n      break;\n  }\n}\n\nfunction execProjectedViewsAction(view, action) {\n  execEmbeddedViewsAction(view, action);\n  execComponentViewsAction(view, action);\n}\n\nfunction execQueriesAction(view, queryFlags, staticDynamicQueryFlag, checkType) {\n  if (!(view.def.nodeFlags & queryFlags) || !(view.def.nodeFlags & staticDynamicQueryFlag)) {\n    return;\n  }\n\n  var nodeCount = view.def.nodes.length;\n\n  for (var i = 0; i < nodeCount; i++) {\n    var nodeDef = view.def.nodes[i];\n\n    if (nodeDef.flags & queryFlags && nodeDef.flags & staticDynamicQueryFlag) {\n      Services.setCurrentNode(view, nodeDef.nodeIndex);\n\n      switch (checkType) {\n        case 0\n        /* CheckAndUpdate */\n        :\n          checkAndUpdateQuery(view, nodeDef);\n          break;\n\n        case 1\n        /* CheckNoChanges */\n        :\n          checkNoChangesQuery(view, nodeDef);\n          break;\n      }\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\n\nvar initialized = false;\n\nfunction initServicesIfNeeded() {\n  if (initialized) {\n    return;\n  }\n\n  initialized = true;\n  var 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: function 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: function createDebugContext(view, nodeIndex) {\n      return new DebugContext_(view, nodeIndex);\n    },\n    handleEvent: function handleEvent(view, nodeIndex, eventName, event) {\n      return view.def.handleEvent(view, nodeIndex, eventName, event);\n    },\n    updateDirectives: function updateDirectives(view, checkType) {\n      return view.def.updateDirectives(checkType === 0\n      /* CheckAndUpdate */\n      ? prodCheckAndUpdateNode : prodCheckNoChangesNode, view);\n    },\n    updateRenderer: function updateRenderer(view, checkType) {\n      return view.def.updateRenderer(checkType === 0\n      /* CheckAndUpdate */\n      ? prodCheckAndUpdateNode : prodCheckNoChangesNode, view);\n    }\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: function createDebugContext(view, nodeIndex) {\n      return new DebugContext_(view, nodeIndex);\n    },\n    handleEvent: debugHandleEvent,\n    updateDirectives: debugUpdateDirectives,\n    updateRenderer: debugUpdateRenderer\n  };\n}\n\nfunction createProdRootView(elInjector, projectableNodes, rootSelectorOrNode, def, ngModule, context) {\n  var rendererFactory = ngModule.injector.get(RendererFactory2);\n  return createRootView(createRootData(elInjector, ngModule, rendererFactory, projectableNodes, rootSelectorOrNode), def, context);\n}\n\nfunction debugCreateRootView(elInjector, projectableNodes, rootSelectorOrNode, def, ngModule, context) {\n  var rendererFactory = ngModule.injector.get(RendererFactory2);\n  var root = createRootData(elInjector, ngModule, new DebugRendererFactory2(rendererFactory), projectableNodes, rootSelectorOrNode);\n  var defWithOverride = applyProviderOverridesToView(def);\n  return callWithDebugContext(DebugAction.create, createRootView, null, [root, defWithOverride, context]);\n}\n\nfunction createRootData(elInjector, ngModule, rendererFactory, projectableNodes, rootSelectorOrNode) {\n  var sanitizer = ngModule.injector.get(Sanitizer);\n  var errorHandler = ngModule.injector.get(ErrorHandler);\n  var renderer = rendererFactory.createRenderer(null, null);\n  return {\n    ngModule: ngModule,\n    injector: elInjector,\n    projectableNodes: projectableNodes,\n    selectorOrNode: rootSelectorOrNode,\n    sanitizer: sanitizer,\n    rendererFactory: rendererFactory,\n    renderer: renderer,\n    errorHandler: errorHandler\n  };\n}\n\nfunction debugCreateEmbeddedView(parentView, anchorDef, viewDef, context) {\n  var defWithOverride = applyProviderOverridesToView(viewDef);\n  return callWithDebugContext(DebugAction.create, createEmbeddedView, null, [parentView, anchorDef, defWithOverride, context]);\n}\n\nfunction debugCreateComponentView(parentView, nodeDef, viewDef, hostElement) {\n  var overrideComponentView = viewDefOverrides.get(nodeDef.element.componentProvider.provider.token);\n\n  if (overrideComponentView) {\n    viewDef = overrideComponentView;\n  } else {\n    viewDef = applyProviderOverridesToView(viewDef);\n  }\n\n  return callWithDebugContext(DebugAction.create, createComponentView, null, [parentView, nodeDef, viewDef, hostElement]);\n}\n\nfunction debugCreateNgModuleRef(moduleType, parentInjector, bootstrapComponents, def) {\n  var defWithOverride = applyProviderOverridesToNgModule(def);\n  return createNgModuleRef(moduleType, parentInjector, bootstrapComponents, defWithOverride);\n}\n\nvar providerOverrides = /*@__PURE__*/new Map();\nvar providerOverridesWithScope = /*@__PURE__*/new Map();\nvar viewDefOverrides = /*@__PURE__*/new Map();\n\nfunction debugOverrideProvider(override) {\n  providerOverrides.set(override.token, override);\n  var injectableDef;\n\n  if (typeof override.token === 'function' && (injectableDef = getInjectableDef(override.token)) && typeof injectableDef.providedIn === 'function') {\n    providerOverridesWithScope.set(override.token, override);\n  }\n}\n\nfunction debugOverrideComponentView(comp, compFactory) {\n  var hostViewDef = resolveDefinition(getComponentViewDefinitionFactory(compFactory));\n  var 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} // 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.\n\n\nfunction applyProviderOverridesToView(def) {\n  if (providerOverrides.size === 0) {\n    return def;\n  }\n\n  var elementIndicesWithOverwrittenProviders = findElementIndicesWithOverwrittenProviders(def);\n\n  if (elementIndicesWithOverwrittenProviders.length === 0) {\n    return def;\n  } // clone the whole view definition,\n  // as it maintains references between the nodes that are hard to update.\n\n\n  def = def.factory(function () {\n    return NOOP;\n  });\n\n  for (var i = 0; i < elementIndicesWithOverwrittenProviders.length; i++) {\n    applyProviderOverridesToElement(def, elementIndicesWithOverwrittenProviders[i]);\n  }\n\n  return def;\n\n  function findElementIndicesWithOverwrittenProviders(def) {\n    var elIndicesWithOverwrittenProviders = [];\n    var lastElementDef = null;\n\n    for (var _i16 = 0; _i16 < def.nodes.length; _i16++) {\n      var nodeDef = def.nodes[_i16];\n\n      if (nodeDef.flags & 1\n      /* TypeElement */\n      ) {\n        lastElementDef = nodeDef;\n      }\n\n      if (lastElementDef && nodeDef.flags & 3840\n      /* CatProviderNoDirective */\n      && providerOverrides.has(nodeDef.provider.token)) {\n        elIndicesWithOverwrittenProviders.push(lastElementDef.nodeIndex);\n        lastElementDef = null;\n      }\n    }\n\n    return elIndicesWithOverwrittenProviders;\n  }\n\n  function applyProviderOverridesToElement(viewDef, elIndex) {\n    for (var _i17 = elIndex + 1; _i17 < viewDef.nodes.length; _i17++) {\n      var nodeDef = viewDef.nodes[_i17];\n\n      if (nodeDef.flags & 1\n      /* TypeElement */\n      ) {\n        // stop at the next element\n        return;\n      }\n\n      if (nodeDef.flags & 3840\n      /* CatProviderNoDirective */\n      ) {\n        var provider = nodeDef.provider;\n        var override = providerOverrides.get(provider.token);\n\n        if (override) {\n          nodeDef.flags = nodeDef.flags & ~3840\n          /* CatProviderNoDirective */\n          | override.flags;\n          provider.deps = splitDepsDsl(override.deps);\n          provider.value = override.value;\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.\n\n\nfunction applyProviderOverridesToNgModule(def) {\n  var _calcHasOverrides = calcHasOverrides(def),\n      hasOverrides = _calcHasOverrides.hasOverrides,\n      hasDeprecatedOverrides = _calcHasOverrides.hasDeprecatedOverrides;\n\n  if (!hasOverrides) {\n    return def;\n  } // clone the whole view definition,\n  // as it maintains references between the nodes that are hard to update.\n\n\n  def = def.factory(function () {\n    return NOOP;\n  });\n  applyProviderOverrides(def);\n  return def;\n\n  function calcHasOverrides(def) {\n    var hasOverrides = false;\n    var hasDeprecatedOverrides = false;\n\n    if (providerOverrides.size === 0) {\n      return {\n        hasOverrides: hasOverrides,\n        hasDeprecatedOverrides: hasDeprecatedOverrides\n      };\n    }\n\n    def.providers.forEach(function (node) {\n      var override = providerOverrides.get(node.token);\n\n      if (node.flags & 3840\n      /* CatProviderNoDirective */\n      && override) {\n        hasOverrides = true;\n        hasDeprecatedOverrides = hasDeprecatedOverrides || override.deprecatedBehavior;\n      }\n    });\n    def.modules.forEach(function (module) {\n      providerOverridesWithScope.forEach(function (override, token) {\n        if (resolveForwardRef(getInjectableDef(token).providedIn) === module) {\n          hasOverrides = true;\n          hasDeprecatedOverrides = hasDeprecatedOverrides || override.deprecatedBehavior;\n        }\n      });\n    });\n    return {\n      hasOverrides: hasOverrides,\n      hasDeprecatedOverrides: hasDeprecatedOverrides\n    };\n  }\n\n  function applyProviderOverrides(def) {\n    for (var i = 0; i < def.providers.length; i++) {\n      var provider = def.providers[i];\n\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 |= 4096\n        /* LazyProvider */\n        ;\n      }\n\n      var override = providerOverrides.get(provider.token);\n\n      if (override) {\n        provider.flags = provider.flags & ~3840\n        /* CatProviderNoDirective */\n        | override.flags;\n        provider.deps = splitDepsDsl(override.deps);\n        provider.value = override.value;\n      }\n    }\n\n    if (providerOverridesWithScope.size > 0) {\n      var moduleSet = new Set(def.modules);\n      providerOverridesWithScope.forEach(function (override, token) {\n        if (moduleSet.has(resolveForwardRef(getInjectableDef(token).providedIn))) {\n          var _provider = {\n            token: token,\n            flags: override.flags | (hasDeprecatedOverrides ? 4096\n            /* LazyProvider */\n            : 0\n            /* None */\n            ),\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(view, checkIndex, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n  var nodeDef = view.def.nodes[checkIndex];\n  checkAndUpdateNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n  return nodeDef.flags & 224\n  /* CatPureExpression */\n  ? asPureExpressionData(view, checkIndex).value : undefined;\n}\n\nfunction prodCheckNoChangesNode(view, checkIndex, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n  var nodeDef = view.def.nodes[checkIndex];\n  checkNoChangesNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n  return nodeDef.flags & 224\n  /* CatPureExpression */\n  ? asPureExpressionData(view, checkIndex).value : undefined;\n}\n\nfunction debugCheckAndUpdateView(view) {\n  return callWithDebugContext(DebugAction.detectChanges, checkAndUpdateView, null, [view]);\n}\n\nfunction debugCheckNoChangesView(view) {\n  return callWithDebugContext(DebugAction.checkNoChanges, checkNoChangesView, null, [view]);\n}\n\nfunction debugDestroyView(view) {\n  return callWithDebugContext(DebugAction.destroy, destroyView, null, [view]);\n}\n\nvar DebugAction = /*@__PURE__*/function (DebugAction) {\n  DebugAction[DebugAction[\"create\"] = 0] = \"create\";\n  DebugAction[DebugAction[\"detectChanges\"] = 1] = \"detectChanges\";\n  DebugAction[DebugAction[\"checkNoChanges\"] = 2] = \"checkNoChanges\";\n  DebugAction[DebugAction[\"destroy\"] = 3] = \"destroy\";\n  DebugAction[DebugAction[\"handleEvent\"] = 4] = \"handleEvent\";\n  return DebugAction;\n}({});\n\nvar _currentAction;\n\nvar _currentView;\n\nvar _currentNodeIndex;\n\nfunction debugSetCurrentNode(view, nodeIndex) {\n  _currentView = view;\n  _currentNodeIndex = nodeIndex;\n}\n\nfunction debugHandleEvent(view, nodeIndex, eventName, event) {\n  debugSetCurrentNode(view, nodeIndex);\n  return callWithDebugContext(DebugAction.handleEvent, view.def.handleEvent, null, [view, nodeIndex, eventName, event]);\n}\n\nfunction debugUpdateDirectives(view, checkType) {\n  if (view.state & 128\n  /* Destroyed */\n  ) {\n    throw viewDestroyedError(DebugAction[_currentAction]);\n  }\n\n  debugSetCurrentNode(view, nextDirectiveWithBinding(view, 0));\n  return view.def.updateDirectives(debugCheckDirectivesFn, view);\n\n  function debugCheckDirectivesFn(view, nodeIndex, argStyle) {\n    var nodeDef = view.def.nodes[nodeIndex];\n\n    for (var _len11 = arguments.length, values = new Array(_len11 > 3 ? _len11 - 3 : 0), _key11 = 3; _key11 < _len11; _key11++) {\n      values[_key11 - 3] = arguments[_key11];\n    }\n\n    if (checkType === 0\n    /* CheckAndUpdate */\n    ) {\n      debugCheckAndUpdateNode(view, nodeDef, argStyle, values);\n    } else {\n      debugCheckNoChangesNode(view, nodeDef, argStyle, values);\n    }\n\n    if (nodeDef.flags & 16384\n    /* TypeDirective */\n    ) {\n      debugSetCurrentNode(view, nextDirectiveWithBinding(view, nodeIndex));\n    }\n\n    return nodeDef.flags & 224\n    /* CatPureExpression */\n    ? asPureExpressionData(view, nodeDef.nodeIndex).value : undefined;\n  }\n}\n\nfunction debugUpdateRenderer(view, checkType) {\n  if (view.state & 128\n  /* Destroyed */\n  ) {\n    throw viewDestroyedError(DebugAction[_currentAction]);\n  }\n\n  debugSetCurrentNode(view, nextRenderNodeWithBinding(view, 0));\n  return view.def.updateRenderer(debugCheckRenderNodeFn, view);\n\n  function debugCheckRenderNodeFn(view, nodeIndex, argStyle) {\n    var nodeDef = view.def.nodes[nodeIndex];\n\n    for (var _len12 = arguments.length, values = new Array(_len12 > 3 ? _len12 - 3 : 0), _key12 = 3; _key12 < _len12; _key12++) {\n      values[_key12 - 3] = arguments[_key12];\n    }\n\n    if (checkType === 0\n    /* CheckAndUpdate */\n    ) {\n      debugCheckAndUpdateNode(view, nodeDef, argStyle, values);\n    } else {\n      debugCheckNoChangesNode(view, nodeDef, argStyle, values);\n    }\n\n    if (nodeDef.flags & 3\n    /* CatRenderNode */\n    ) {\n      debugSetCurrentNode(view, nextRenderNodeWithBinding(view, nodeIndex));\n    }\n\n    return nodeDef.flags & 224\n    /* CatPureExpression */\n    ? asPureExpressionData(view, nodeDef.nodeIndex).value : undefined;\n  }\n}\n\nfunction debugCheckAndUpdateNode(view, nodeDef, argStyle, givenValues) {\n  var changed = checkAndUpdateNode.apply(void 0, [view, nodeDef, argStyle].concat(_toConsumableArray(givenValues)));\n\n  if (changed) {\n    var values = argStyle === 1\n    /* Dynamic */\n    ? givenValues[0] : givenValues;\n\n    if (nodeDef.flags & 16384\n    /* TypeDirective */\n    ) {\n      var bindingValues = {};\n\n      for (var i = 0; i < nodeDef.bindings.length; i++) {\n        var binding = nodeDef.bindings[i];\n        var value = values[i];\n\n        if (binding.flags & 8\n        /* TypeProperty */\n        ) {\n          bindingValues[normalizeDebugBindingName(binding.nonMinifiedName)] = normalizeDebugBindingValue(value);\n        }\n      }\n\n      var elDef = nodeDef.parent;\n      var el = asElementData(view, elDef.nodeIndex).renderElement;\n\n      if (!elDef.element.name) {\n        // a comment.\n        view.renderer.setValue(el, escapeCommentText(\"bindings=\".concat(JSON.stringify(bindingValues, null, 2))));\n      } else {\n        // a regular element.\n        for (var attr in bindingValues) {\n          var _value3 = bindingValues[attr];\n\n          if (_value3 != null) {\n            view.renderer.setAttribute(el, attr, _value3);\n          } else {\n            view.renderer.removeAttribute(el, attr);\n          }\n        }\n      }\n    }\n  }\n}\n\nfunction debugCheckNoChangesNode(view, nodeDef, argStyle, values) {\n  checkNoChangesNode.apply(void 0, [view, nodeDef, argStyle].concat(_toConsumableArray(values)));\n}\n\nfunction nextDirectiveWithBinding(view, nodeIndex) {\n  for (var i = nodeIndex; i < view.def.nodes.length; i++) {\n    var nodeDef = view.def.nodes[i];\n\n    if (nodeDef.flags & 16384\n    /* TypeDirective */\n    && nodeDef.bindings && nodeDef.bindings.length) {\n      return i;\n    }\n  }\n\n  return null;\n}\n\nfunction nextRenderNodeWithBinding(view, nodeIndex) {\n  for (var i = nodeIndex; i < view.def.nodes.length; i++) {\n    var nodeDef = view.def.nodes[i];\n\n    if (nodeDef.flags & 3\n    /* CatRenderNode */\n    && nodeDef.bindings && nodeDef.bindings.length) {\n      return i;\n    }\n  }\n\n  return null;\n}\n\nvar DebugContext_ = /*#__PURE__*/function () {\n  function DebugContext_(view, nodeIndex) {\n    _classCallCheck(this, DebugContext_);\n\n    this.view = view;\n    this.nodeIndex = nodeIndex;\n\n    if (nodeIndex == null) {\n      this.nodeIndex = nodeIndex = 0;\n    }\n\n    this.nodeDef = view.def.nodes[nodeIndex];\n    var elDef = this.nodeDef;\n    var elView = view;\n\n    while (elDef && (elDef.flags & 1\n    /* TypeElement */\n    ) === 0) {\n      elDef = elDef.parent;\n    }\n\n    if (!elDef) {\n      while (!elDef && elView) {\n        elDef = viewParentEl(elView);\n        elView = elView.parent;\n      }\n    }\n\n    this.elDef = elDef;\n    this.elView = elView;\n  }\n\n  _createClass2(DebugContext_, [{\n    key: \"elOrCompView\",\n    get: function get() {\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    key: \"injector\",\n    get: function get() {\n      return createInjector$1(this.elView, this.elDef);\n    }\n  }, {\n    key: \"component\",\n    get: function get() {\n      return this.elOrCompView.component;\n    }\n  }, {\n    key: \"context\",\n    get: function get() {\n      return this.elOrCompView.context;\n    }\n  }, {\n    key: \"providerTokens\",\n    get: function get() {\n      var tokens = [];\n\n      if (this.elDef) {\n        for (var i = this.elDef.nodeIndex + 1; i <= this.elDef.nodeIndex + this.elDef.childCount; i++) {\n          var childDef = this.elView.def.nodes[i];\n\n          if (childDef.flags & 20224\n          /* CatProvider */\n          ) {\n            tokens.push(childDef.provider.token);\n          }\n\n          i += childDef.childCount;\n        }\n      }\n\n      return tokens;\n    }\n  }, {\n    key: \"references\",\n    get: function get() {\n      var references = {};\n\n      if (this.elDef) {\n        collectReferences(this.elView, this.elDef, references);\n\n        for (var i = this.elDef.nodeIndex + 1; i <= this.elDef.nodeIndex + this.elDef.childCount; i++) {\n          var childDef = this.elView.def.nodes[i];\n\n          if (childDef.flags & 20224\n          /* CatProvider */\n          ) {\n            collectReferences(this.elView, childDef, references);\n          }\n\n          i += childDef.childCount;\n        }\n      }\n\n      return references;\n    }\n  }, {\n    key: \"componentRenderElement\",\n    get: function get() {\n      var elData = findHostElement(this.elOrCompView);\n      return elData ? elData.renderElement : undefined;\n    }\n  }, {\n    key: \"renderNode\",\n    get: function get() {\n      return this.nodeDef.flags & 2\n      /* TypeText */\n      ? renderNode(this.view, this.nodeDef) : renderNode(this.elView, this.elDef);\n    }\n  }, {\n    key: \"logError\",\n    value: function logError(console) {\n      for (var _len13 = arguments.length, values = new Array(_len13 > 1 ? _len13 - 1 : 0), _key13 = 1; _key13 < _len13; _key13++) {\n        values[_key13 - 1] = arguments[_key13];\n      }\n\n      var logViewDef;\n      var logNodeIndex;\n\n      if (this.nodeDef.flags & 2\n      /* TypeText */\n      ) {\n        logViewDef = this.view.def;\n        logNodeIndex = this.nodeDef.nodeIndex;\n      } else {\n        logViewDef = this.elView.def;\n        logNodeIndex = this.elDef.nodeIndex;\n      } // Note: we only generate a log function for text and element nodes\n      // to make the generated code as small as possible.\n\n\n      var renderNodeIndex = getRenderNodeIndex(logViewDef, logNodeIndex);\n      var currRenderNodeIndex = -1;\n\n      var nodeLogger = function nodeLogger() {\n        currRenderNodeIndex++;\n\n        if (currRenderNodeIndex === renderNodeIndex) {\n          var _console$error;\n\n          return (_console$error = console.error).bind.apply(_console$error, [console].concat(values));\n        } else {\n          return NOOP;\n        }\n      };\n\n      logViewDef.factory(nodeLogger);\n\n      if (currRenderNodeIndex < renderNodeIndex) {\n        console.error('Illegal state: the ViewDefinitionFactory did not call the logger!');\n        console.error.apply(console, values);\n      }\n    }\n  }]);\n\n  return DebugContext_;\n}();\n\nfunction getRenderNodeIndex(viewDef, nodeIndex) {\n  var renderNodeIndex = -1;\n\n  for (var i = 0; i <= nodeIndex; i++) {\n    var nodeDef = viewDef.nodes[i];\n\n    if (nodeDef.flags & 3\n    /* CatRenderNode */\n    ) {\n      renderNodeIndex++;\n    }\n  }\n\n  return renderNodeIndex;\n}\n\nfunction findHostElement(view) {\n  while (view && !isComponentView(view)) {\n    view = view.parent;\n  }\n\n  if (view.parent) {\n    return asElementData(view.parent, viewParentEl(view).nodeIndex);\n  }\n\n  return null;\n}\n\nfunction collectReferences(view, nodeDef, references) {\n  for (var refName in nodeDef.references) {\n    references[refName] = getQueryValue(view, nodeDef, nodeDef.references[refName]);\n  }\n}\n\nfunction callWithDebugContext(action, fn, self, args) {\n  var oldAction = _currentAction;\n  var oldView = _currentView;\n  var oldNodeIndex = _currentNodeIndex;\n\n  try {\n    _currentAction = action;\n    var 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\n    throw viewWrappedDebugError(e, getCurrentDebugContext());\n  }\n}\n\nfunction getCurrentDebugContext() {\n  return _currentView ? new DebugContext_(_currentView, _currentNodeIndex) : null;\n}\n\nvar DebugRendererFactory2 = /*#__PURE__*/function () {\n  function DebugRendererFactory2(delegate) {\n    _classCallCheck(this, DebugRendererFactory2);\n\n    this.delegate = delegate;\n  }\n\n  _createClass2(DebugRendererFactory2, [{\n    key: \"createRenderer\",\n    value: function createRenderer(element, renderData) {\n      return new DebugRenderer2(this.delegate.createRenderer(element, renderData));\n    }\n  }, {\n    key: \"begin\",\n    value: function begin() {\n      if (this.delegate.begin) {\n        this.delegate.begin();\n      }\n    }\n  }, {\n    key: \"end\",\n    value: function end() {\n      if (this.delegate.end) {\n        this.delegate.end();\n      }\n    }\n  }, {\n    key: \"whenRenderingDone\",\n    value: function whenRenderingDone() {\n      if (this.delegate.whenRenderingDone) {\n        return this.delegate.whenRenderingDone();\n      }\n\n      return Promise.resolve(null);\n    }\n  }]);\n\n  return DebugRendererFactory2;\n}();\n\nvar DebugRenderer2 = /*#__PURE__*/function () {\n  function DebugRenderer2(delegate) {\n    _classCallCheck(this, DebugRenderer2);\n\n    this.delegate = delegate;\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\n    this.debugContextFactory = getCurrentDebugContext;\n    this.data = this.delegate.data;\n  }\n\n  _createClass2(DebugRenderer2, [{\n    key: \"createDebugContext\",\n    value: function createDebugContext(nativeElement) {\n      return this.debugContextFactory(nativeElement);\n    }\n  }, {\n    key: \"destroyNode\",\n    value: function destroyNode(node) {\n      var debugNode = getDebugNode$1(node);\n\n      if (debugNode) {\n        removeDebugNodeFromIndex(debugNode);\n\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    key: \"destroy\",\n    value: function destroy() {\n      this.delegate.destroy();\n    }\n  }, {\n    key: \"createElement\",\n    value: function createElement(name, namespace) {\n      var el = this.delegate.createElement(name, namespace);\n      var debugCtx = this.createDebugContext(el);\n\n      if (debugCtx) {\n        var debugEl = new DebugElement__PRE_R3__(el, null, debugCtx);\n        debugEl.name = name;\n        indexDebugNode(debugEl);\n      }\n\n      return el;\n    }\n  }, {\n    key: \"createComment\",\n    value: function createComment(value) {\n      var comment = this.delegate.createComment(escapeCommentText(value));\n      var debugCtx = this.createDebugContext(comment);\n\n      if (debugCtx) {\n        indexDebugNode(new DebugNode__PRE_R3__(comment, null, debugCtx));\n      }\n\n      return comment;\n    }\n  }, {\n    key: \"createText\",\n    value: function createText(value) {\n      var text = this.delegate.createText(value);\n      var debugCtx = this.createDebugContext(text);\n\n      if (debugCtx) {\n        indexDebugNode(new DebugNode__PRE_R3__(text, null, debugCtx));\n      }\n\n      return text;\n    }\n  }, {\n    key: \"appendChild\",\n    value: function appendChild(parent, newChild) {\n      var debugEl = getDebugNode$1(parent);\n      var debugChildEl = getDebugNode$1(newChild);\n\n      if (debugEl && debugChildEl && debugEl instanceof DebugElement__PRE_R3__) {\n        debugEl.addChild(debugChildEl);\n      }\n\n      this.delegate.appendChild(parent, newChild);\n    }\n  }, {\n    key: \"insertBefore\",\n    value: function insertBefore(parent, newChild, refChild, isMove) {\n      var debugEl = getDebugNode$1(parent);\n      var debugChildEl = getDebugNode$1(newChild);\n      var debugRefEl = getDebugNode$1(refChild);\n\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    key: \"removeChild\",\n    value: function removeChild(parent, oldChild) {\n      var debugEl = getDebugNode$1(parent);\n      var debugChildEl = getDebugNode$1(oldChild);\n\n      if (debugEl && debugChildEl && debugEl instanceof DebugElement__PRE_R3__) {\n        debugEl.removeChild(debugChildEl);\n      }\n\n      this.delegate.removeChild(parent, oldChild);\n    }\n  }, {\n    key: \"selectRootElement\",\n    value: function selectRootElement(selectorOrNode, preserveContent) {\n      var el = this.delegate.selectRootElement(selectorOrNode, preserveContent);\n      var debugCtx = getCurrentDebugContext();\n\n      if (debugCtx) {\n        indexDebugNode(new DebugElement__PRE_R3__(el, null, debugCtx));\n      }\n\n      return el;\n    }\n  }, {\n    key: \"setAttribute\",\n    value: function setAttribute(el, name, value, namespace) {\n      var debugEl = getDebugNode$1(el);\n\n      if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n        var fullName = namespace ? namespace + ':' + name : name;\n        debugEl.attributes[fullName] = value;\n      }\n\n      this.delegate.setAttribute(el, name, value, namespace);\n    }\n  }, {\n    key: \"removeAttribute\",\n    value: function removeAttribute(el, name, namespace) {\n      var debugEl = getDebugNode$1(el);\n\n      if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n        var fullName = namespace ? namespace + ':' + name : name;\n        debugEl.attributes[fullName] = null;\n      }\n\n      this.delegate.removeAttribute(el, name, namespace);\n    }\n  }, {\n    key: \"addClass\",\n    value: function addClass(el, name) {\n      var debugEl = getDebugNode$1(el);\n\n      if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n        debugEl.classes[name] = true;\n      }\n\n      this.delegate.addClass(el, name);\n    }\n  }, {\n    key: \"removeClass\",\n    value: function removeClass(el, name) {\n      var debugEl = getDebugNode$1(el);\n\n      if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n        debugEl.classes[name] = false;\n      }\n\n      this.delegate.removeClass(el, name);\n    }\n  }, {\n    key: \"setStyle\",\n    value: function setStyle(el, style, value, flags) {\n      var debugEl = getDebugNode$1(el);\n\n      if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n        debugEl.styles[style] = value;\n      }\n\n      this.delegate.setStyle(el, style, value, flags);\n    }\n  }, {\n    key: \"removeStyle\",\n    value: function removeStyle(el, style, flags) {\n      var debugEl = getDebugNode$1(el);\n\n      if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n        debugEl.styles[style] = null;\n      }\n\n      this.delegate.removeStyle(el, style, flags);\n    }\n  }, {\n    key: \"setProperty\",\n    value: function setProperty(el, name, value) {\n      var debugEl = getDebugNode$1(el);\n\n      if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n        debugEl.properties[name] = value;\n      }\n\n      this.delegate.setProperty(el, name, value);\n    }\n  }, {\n    key: \"listen\",\n    value: function listen(target, eventName, callback) {\n      if (typeof target !== 'string') {\n        var debugEl = getDebugNode$1(target);\n\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    key: \"parentNode\",\n    value: function parentNode(node) {\n      return this.delegate.parentNode(node);\n    }\n  }, {\n    key: \"nextSibling\",\n    value: function nextSibling(node) {\n      return this.delegate.nextSibling(node);\n    }\n  }, {\n    key: \"setValue\",\n    value: function setValue(node, value) {\n      return this.delegate.setValue(node, value);\n    }\n  }]);\n\n  return DebugRenderer2;\n}();\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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\nfunction overrideProvider(override) {\n  initServicesIfNeeded();\n  return Services.overrideProvider(override);\n}\n\nfunction overrideComponentView(comp, componentFactory) {\n  initServicesIfNeeded();\n  return Services.overrideComponentView(comp, componentFactory);\n}\n\nfunction clearOverrides() {\n  initServicesIfNeeded();\n  return Services.clearOverrides();\n} // Attention: this function is called as top level function.\n// Putting any logic in here will destroy closure tree shaking!\n\n\nfunction createNgModuleFactory(ngModuleType, bootstrapComponents, defFactory) {\n  return new NgModuleFactory_(ngModuleType, bootstrapComponents, defFactory);\n}\n\nfunction cloneNgModuleDefinition(def) {\n  var providers = Array.from(def.providers);\n  var modules = Array.from(def.modules);\n  var providersByKey = {};\n\n  for (var key in def.providersByKey) {\n    providersByKey[key] = def.providersByKey[key];\n  }\n\n  return {\n    factory: def.factory,\n    scope: def.scope,\n    providers: providers,\n    modules: modules,\n    providersByKey: providersByKey\n  };\n}\n\nvar NgModuleFactory_ = /*#__PURE__*/function (_NgModuleFactory2) {\n  _inherits(NgModuleFactory_, _NgModuleFactory2);\n\n  var _super24 = _createSuper(NgModuleFactory_);\n\n  function NgModuleFactory_(moduleType, _bootstrapComponents, _ngModuleDefFactory) {\n    var _this35;\n\n    _classCallCheck(this, NgModuleFactory_);\n\n    // Attention: this ctor is called as top level function.\n    // Putting any logic in here will destroy closure tree shaking!\n    _this35 = _super24.call(this);\n    _this35.moduleType = moduleType;\n    _this35._bootstrapComponents = _bootstrapComponents;\n    _this35._ngModuleDefFactory = _ngModuleDefFactory;\n    return _this35;\n  }\n\n  _createClass2(NgModuleFactory_, [{\n    key: \"create\",\n    value: function create(parentInjector) {\n      initServicesIfNeeded(); // 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\n      var def = cloneNgModuleDefinition(resolveDefinition(this._ngModuleDefFactory));\n      return Services.createNgModuleRef(this.moduleType, parentInjector || Injector.NULL, this._bootstrapComponents, def);\n    }\n  }]);\n\n  return NgModuleFactory_;\n}(NgModuleFactory);\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Compiles a partial directive declaration object into a full directive definition object.\n *\n * @codeGenApi\n */\n\n\nfunction ɵɵngDeclareDirective(decl) {\n  var compiler = getCompilerFacade({\n    usage: 1\n    /* PartialDeclaration */\n    ,\n    kind: 'directive',\n    type: decl.type\n  });\n  return compiler.compileDirectiveDeclaration(angularCoreEnv, \"ng:///\".concat(decl.type.name, \"/\\u0275fac.js\"), decl);\n}\n/**\n * Evaluates the class metadata declaration.\n *\n * @codeGenApi\n */\n\n\nfunction ɵɵngDeclareClassMetadata(decl) {\n  var _a, _b;\n\n  setClassMetadata(decl.type, decl.decorators, (_a = decl.ctorParameters) !== null && _a !== void 0 ? _a : null, (_b = decl.propDecorators) !== null && _b !== void 0 ? _b : null);\n}\n/**\n * Compiles a partial component declaration object into a full component definition object.\n *\n * @codeGenApi\n */\n\n\nfunction ɵɵngDeclareComponent(decl) {\n  var compiler = getCompilerFacade({\n    usage: 1\n    /* PartialDeclaration */\n    ,\n    kind: 'component',\n    type: decl.type\n  });\n  return compiler.compileComponentDeclaration(angularCoreEnv, \"ng:///\".concat(decl.type.name, \"/\\u0275cmp.js\"), decl);\n}\n/**\n * Compiles a partial pipe declaration object into a full pipe definition object.\n *\n * @codeGenApi\n */\n\n\nfunction ɵɵngDeclareFactory(decl) {\n  var compiler = getCompilerFacade({\n    usage: 1\n    /* PartialDeclaration */\n    ,\n    kind: getFactoryKind(decl.target),\n    type: decl.type\n  });\n  return compiler.compileFactoryDeclaration(angularCoreEnv, \"ng:///\".concat(decl.type.name, \"/\\u0275fac.js\"), decl);\n}\n\nfunction getFactoryKind(target) {\n  switch (target) {\n    case FactoryTarget.Directive:\n      return 'directive';\n\n    case FactoryTarget.Component:\n      return 'component';\n\n    case FactoryTarget.Injectable:\n      return 'injectable';\n\n    case FactoryTarget.Pipe:\n      return 'pipe';\n\n    case FactoryTarget.NgModule:\n      return 'NgModule';\n  }\n}\n/**\n * Compiles a partial injectable declaration object into a full injectable definition object.\n *\n * @codeGenApi\n */\n\n\nfunction ɵɵngDeclareInjectable(decl) {\n  var compiler = getCompilerFacade({\n    usage: 1\n    /* PartialDeclaration */\n    ,\n    kind: 'injectable',\n    type: decl.type\n  });\n  return compiler.compileInjectableDeclaration(angularCoreEnv, \"ng:///\".concat(decl.type.name, \"/\\u0275prov.js\"), decl);\n}\n/**\n * Compiles a partial injector declaration object into a full injector definition object.\n *\n * @codeGenApi\n */\n\n\nfunction ɵɵngDeclareInjector(decl) {\n  var compiler = getCompilerFacade({\n    usage: 1\n    /* PartialDeclaration */\n    ,\n    kind: 'NgModule',\n    type: decl.type\n  });\n  return compiler.compileInjectorDeclaration(angularCoreEnv, \"ng:///\".concat(decl.type.name, \"/\\u0275inj.js\"), decl);\n}\n/**\n * Compiles a partial NgModule declaration object into a full NgModule definition object.\n *\n * @codeGenApi\n */\n\n\nfunction ɵɵngDeclareNgModule(decl) {\n  var compiler = getCompilerFacade({\n    usage: 1\n    /* PartialDeclaration */\n    ,\n    kind: 'NgModule',\n    type: decl.type\n  });\n  return compiler.compileNgModuleDeclaration(angularCoreEnv, \"ng:///\".concat(decl.type.name, \"/\\u0275mod.js\"), decl);\n}\n/**\n * Compiles a partial pipe declaration object into a full pipe definition object.\n *\n * @codeGenApi\n */\n\n\nfunction ɵɵngDeclarePipe(decl) {\n  var compiler = getCompilerFacade({\n    usage: 1\n    /* PartialDeclaration */\n    ,\n    kind: 'pipe',\n    type: decl.type\n  });\n  return compiler.compilePipeDeclaration(angularCoreEnv, \"ng:///\".concat(decl.type.name, \"/\\u0275pipe.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// clang-format on\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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\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('It looks like your application or one of its dependencies is using i18n.\\n' + 'Angular 9 introduced a global `$localize()` function that needs to be loaded.\\n' + 'Please run `ng add @angular/localize` from the Angular CLI.\\n' + '(For non-CLI projects, add `import \\'@angular/localize/init\\';` to your `polyfills.ts` file.\\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// This file only reexports content of the `src` folder. Keep it that way.\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Generated bundle index. Do not edit.\n */\n\n\nexport { ANALYZE_FOR_ENTRY_COMPONENTS, APP_BOOTSTRAP_LISTENER, APP_ID, APP_INITIALIZER, ApplicationInitStatus, ApplicationModule, ApplicationRef, Attribute, COMPILER_OPTIONS, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, ChangeDetectorRef, Compiler, CompilerFactory, Component, ComponentFactory, ComponentFactoryResolver, ComponentRef, ContentChild, ContentChildren, DEFAULT_CURRENCY_CODE, DebugElement, DebugEventListener, DebugNode, DefaultIterableDiffer, Directive, ElementRef, EmbeddedViewRef, ErrorHandler, EventEmitter, Host, HostBinding, HostListener, INJECTOR$1 as INJECTOR, Inject, InjectFlags, Injectable, InjectionToken, Injector, Input, IterableDiffers, KeyValueDiffers, LOCALE_ID$1 as LOCALE_ID, MissingTranslationStrategy, ModuleWithComponentFactories, NO_ERRORS_SCHEMA, NgModule, NgModuleFactory, NgModuleFactoryLoader, NgModuleRef, NgProbeToken, NgZone, Optional, Output, PACKAGE_ROOT_URL, PLATFORM_ID, PLATFORM_INITIALIZER, Pipe, PlatformRef, Query, QueryList, ReflectiveInjector, ReflectiveKey, Renderer2, RendererFactory2, RendererStyleFlags2, ResolvedReflectiveFactory, Sanitizer, SecurityContext, Self, SimpleChange, SkipSelf, SystemJsNgModuleLoader, SystemJsNgModuleLoaderConfig, TRANSLATIONS, TRANSLATIONS_FORMAT, TemplateRef, Testability, TestabilityRegistry, Type, VERSION, Version, ViewChild, ViewChildren, ViewContainerRef, ViewEncapsulation, ViewRef$1 as ViewRef, WrappedValue, asNativeElements, assertPlatform, createPlatform, createPlatformFactory, defineInjectable, destroyPlatform, enableProdMode, forwardRef, getDebugNode$1 as getDebugNode, getModuleFactory, getPlatform, inject, isDevMode, platformCore, resolveForwardRef, setTestabilityGetter, ɵ0$3 as ɵ0, ALLOW_MULTIPLE_PLATFORMS as ɵALLOW_MULTIPLE_PLATFORMS, APP_ID_RANDOM_PROVIDER as ɵAPP_ID_RANDOM_PROVIDER, CREATE_ATTRIBUTE_DECORATOR__POST_R3__ as ɵCREATE_ATTRIBUTE_DECORATOR__POST_R3__, ChangeDetectorStatus as ɵChangeDetectorStatus, CodegenComponentFactoryResolver as ɵCodegenComponentFactoryResolver, Compiler_compileModuleAndAllComponentsAsync__POST_R3__ as ɵCompiler_compileModuleAndAllComponentsAsync__POST_R3__, Compiler_compileModuleAndAllComponentsSync__POST_R3__ as ɵCompiler_compileModuleAndAllComponentsSync__POST_R3__, Compiler_compileModuleAsync__POST_R3__ as ɵCompiler_compileModuleAsync__POST_R3__, Compiler_compileModuleSync__POST_R3__ as ɵCompiler_compileModuleSync__POST_R3__, ComponentFactory as ɵComponentFactory, Console as ɵConsole, DEFAULT_LOCALE_ID as ɵDEFAULT_LOCALE_ID, EMPTY_ARRAY as ɵEMPTY_ARRAY, EMPTY_MAP as ɵEMPTY_MAP, INJECTOR_IMPL__POST_R3__ as ɵINJECTOR_IMPL__POST_R3__, INJECTOR_SCOPE as ɵINJECTOR_SCOPE, LifecycleHooksFeature as ɵLifecycleHooksFeature, LocaleDataIndex as ɵLocaleDataIndex, NG_COMP_DEF as ɵNG_COMP_DEF, NG_DIR_DEF as ɵNG_DIR_DEF, NG_ELEMENT_ID as ɵNG_ELEMENT_ID, NG_INJ_DEF as ɵNG_INJ_DEF, NG_MOD_DEF as ɵNG_MOD_DEF, NG_PIPE_DEF as ɵNG_PIPE_DEF, NG_PROV_DEF as ɵNG_PROV_DEF, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, NO_CHANGE as ɵNO_CHANGE, NgModuleFactory$1 as ɵNgModuleFactory, NoopNgZone as ɵNoopNgZone, ReflectionCapabilities as ɵReflectionCapabilities, ComponentFactory$1 as ɵRender3ComponentFactory, ComponentRef$1 as ɵRender3ComponentRef, NgModuleRef$1 as ɵRender3NgModuleRef, RuntimeError as ɵRuntimeError, SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__ as ɵSWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__, SWITCH_COMPILE_COMPONENT__POST_R3__ as ɵSWITCH_COMPILE_COMPONENT__POST_R3__, SWITCH_COMPILE_DIRECTIVE__POST_R3__ as ɵSWITCH_COMPILE_DIRECTIVE__POST_R3__, SWITCH_COMPILE_INJECTABLE__POST_R3__ as ɵSWITCH_COMPILE_INJECTABLE__POST_R3__, SWITCH_COMPILE_NGMODULE__POST_R3__ as ɵSWITCH_COMPILE_NGMODULE__POST_R3__, SWITCH_COMPILE_PIPE__POST_R3__ as ɵSWITCH_COMPILE_PIPE__POST_R3__, SWITCH_ELEMENT_REF_FACTORY__POST_R3__ as ɵSWITCH_ELEMENT_REF_FACTORY__POST_R3__, SWITCH_IVY_ENABLED__POST_R3__ as ɵSWITCH_IVY_ENABLED__POST_R3__, SWITCH_RENDERER2_FACTORY__POST_R3__ as ɵSWITCH_RENDERER2_FACTORY__POST_R3__, SWITCH_TEMPLATE_REF_FACTORY__POST_R3__ as ɵSWITCH_TEMPLATE_REF_FACTORY__POST_R3__, SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__ as ɵSWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__, _sanitizeHtml as ɵ_sanitizeHtml, _sanitizeUrl as ɵ_sanitizeUrl, allowSanitizationBypassAndThrow as ɵallowSanitizationBypassAndThrow, anchorDef as ɵand, isForwardRef as ɵangular_packages_core_core_a, injectInjectorOnly as ɵangular_packages_core_core_b, zoneSchedulerFactory as ɵangular_packages_core_core_ba, USD_CURRENCY_CODE as ɵangular_packages_core_core_bb, _def as ɵangular_packages_core_core_bc, DebugContext as ɵangular_packages_core_core_bd, NgOnChangesFeatureImpl as ɵangular_packages_core_core_be, SCHEDULER as ɵangular_packages_core_core_bf, injectAttributeImpl as ɵangular_packages_core_core_bg, getLView as ɵangular_packages_core_core_bh, getBindingRoot as ɵangular_packages_core_core_bi, nextContextImpl as ɵangular_packages_core_core_bj, 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, getUrlSanitizer as ɵangular_packages_core_core_bq, makePropDecorator as ɵangular_packages_core_core_br, makeParamDecorator as ɵangular_packages_core_core_bs, getClosureSafeProperty as ɵangular_packages_core_core_bv, NullInjector as ɵangular_packages_core_core_bw, getInjectImplementation as ɵangular_packages_core_core_bx, getNativeByTNode as ɵangular_packages_core_core_bz, attachInjectFlag as ɵangular_packages_core_core_c, getRootContext as ɵangular_packages_core_core_cb, i18nPostprocess as ɵangular_packages_core_core_cc, ReflectiveInjector_ as ɵangular_packages_core_core_d, ReflectiveDependency as ɵangular_packages_core_core_e, resolveReflectiveProviders as ɵangular_packages_core_core_f, _appIdRandomProviderFactory as ɵangular_packages_core_core_g, injectRenderer2 as ɵangular_packages_core_core_h, injectElementRef as ɵangular_packages_core_core_i, createElementRef as ɵangular_packages_core_core_j, getModuleFactory__PRE_R3__ as ɵangular_packages_core_core_k, injectTemplateRef as ɵangular_packages_core_core_l, createTemplateRef as ɵangular_packages_core_core_m, injectViewContainerRef as ɵangular_packages_core_core_n, DebugNode__PRE_R3__ as ɵangular_packages_core_core_o, DebugElement__PRE_R3__ as ɵangular_packages_core_core_p, getDebugNodeR2__PRE_R3__ as ɵangular_packages_core_core_q, injectChangeDetectorRef as ɵangular_packages_core_core_r, DefaultIterableDifferFactory as ɵangular_packages_core_core_s, DefaultKeyValueDifferFactory as ɵangular_packages_core_core_t, defaultIterableDiffersFactory as ɵangular_packages_core_core_u, defaultKeyValueDiffersFactory as ɵangular_packages_core_core_v, _iterableDiffersFactory as ɵangular_packages_core_core_w, _keyValueDiffersFactory as ɵangular_packages_core_core_x, _localeFactory as ɵangular_packages_core_core_y, APPLICATION_MODULE_PROVIDERS as ɵangular_packages_core_core_z, bypassSanitizationTrustHtml as ɵbypassSanitizationTrustHtml, bypassSanitizationTrustResourceUrl as ɵbypassSanitizationTrustResourceUrl, bypassSanitizationTrustScript as ɵbypassSanitizationTrustScript, bypassSanitizationTrustStyle as ɵbypassSanitizationTrustStyle, bypassSanitizationTrustUrl as ɵbypassSanitizationTrustUrl, createComponentFactory as ɵccf, clearOverrides as ɵclearOverrides, clearResolutionOfComponentResourcesQueue as ɵclearResolutionOfComponentResourcesQueue, createNgModuleFactory as ɵcmf, compileComponent as ɵcompileComponent, compileDirective as ɵcompileDirective, compileNgModule as ɵcompileNgModule, compileNgModuleDefs as ɵcompileNgModuleDefs, compileNgModuleFactory__POST_R3__ as ɵcompileNgModuleFactory__POST_R3__, compilePipe as ɵcompilePipe, createInjector as ɵcreateInjector, createRendererType2 as ɵcrt, defaultIterableDiffers as ɵdefaultIterableDiffers, defaultKeyValueDiffers as ɵdefaultKeyValueDiffers, detectChanges as ɵdetectChanges, devModeEqual as ɵdevModeEqual, directiveDef as ɵdid, elementDef as ɵeld, findLocaleData as ɵfindLocaleData, flushModuleScopingQueueAsMuchAsPossible as ɵflushModuleScopingQueueAsMuchAsPossible, getComponentViewDefinitionFactory as ɵgetComponentViewDefinitionFactory, getDebugNodeR2 as ɵgetDebugNodeR2, getDebugNode__POST_R3__ as ɵgetDebugNode__POST_R3__, getDirectives as ɵgetDirectives, getHostElement as ɵgetHostElement, getInjectableDef as ɵgetInjectableDef, getLContext as ɵgetLContext, getLocaleCurrencyCode as ɵgetLocaleCurrencyCode, getLocalePluralCase as ɵgetLocalePluralCase, getModuleFactory__POST_R3__ as ɵgetModuleFactory__POST_R3__, getSanitizationBypassType as ɵgetSanitizationBypassType, _global as ɵglobal, initServicesIfNeeded as ɵinitServicesIfNeeded, inlineInterpolate as ɵinlineInterpolate, interpolate as ɵinterpolate, isBoundToModule__POST_R3__ as ɵisBoundToModule__POST_R3__, isDefaultChangeDetectionStrategy as ɵisDefaultChangeDetectionStrategy, isListLikeIterable as ɵisListLikeIterable, isObservable as ɵisObservable, isPromise as ɵisPromise, isSubscribable as ɵisSubscribable, ivyEnabled as ɵivyEnabled, makeDecorator as ɵmakeDecorator, markDirty as ɵmarkDirty, moduleDef as ɵmod, moduleProvideDef as ɵmpd, ngContentDef as ɵncd, noSideEffects as ɵnoSideEffects, nodeValue as ɵnov, overrideComponentView as ɵoverrideComponentView, overrideProvider as ɵoverrideProvider, pureArrayDef as ɵpad, patchComponentDefWithScope as ɵpatchComponentDefWithScope, pipeDef as ɵpid, pureObjectDef as ɵpod, purePipeDef as ɵppd, providerDef as ɵprd, publishDefaultGlobalUtils as ɵpublishDefaultGlobalUtils, publishGlobalUtil as ɵpublishGlobalUtil, queryDef as ɵqud, registerLocaleData as ɵregisterLocaleData, registerModuleFactory as ɵregisterModuleFactory, registerNgModuleType as ɵregisterNgModuleType, renderComponent$1 as ɵrenderComponent, resetCompiledComponents as ɵresetCompiledComponents, resetJitOptions as ɵresetJitOptions, resolveComponentResources as ɵresolveComponentResources, setClassMetadata as ɵsetClassMetadata, setCurrentInjector as ɵsetCurrentInjector, setDocument as ɵsetDocument, setLocaleId as ɵsetLocaleId, store as ɵstore, stringify as ɵstringify, textDef as ɵted, transitiveScopesFor as ɵtransitiveScopesFor, unregisterAllLocaleData as ɵunregisterLocaleData, unwrapValue as ɵunv, unwrapSafeValue as ɵunwrapSafeValue, viewDef as ɵvid, whenRendered as ɵwhenRendered, ɵɵCopyDefinitionFeature, FactoryTarget as ɵɵFactoryTarget, ɵɵInheritDefinitionFeature, ɵɵNgOnChangesFeature, ɵɵProvidersFeature, ɵɵadvance, ɵɵattribute, ɵɵattributeInterpolate1, ɵɵattributeInterpolate2, ɵɵattributeInterpolate3, ɵɵattributeInterpolate4, ɵɵattributeInterpolate5, ɵɵattributeInterpolate6, ɵɵattributeInterpolate7, ɵɵattributeInterpolate8, ɵɵattributeInterpolateV, ɵɵclassMap, ɵɵclassMapInterpolate1, ɵɵclassMapInterpolate2, ɵɵclassMapInterpolate3, ɵɵclassMapInterpolate4, ɵɵclassMapInterpolate5, ɵɵclassMapInterpolate6, ɵɵclassMapInterpolate7, ɵɵclassMapInterpolate8, ɵɵclassMapInterpolateV, ɵɵclassProp, ɵɵcontentQuery, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdefineInjectable, ɵɵdefineInjector, ɵɵdefineNgModule, ɵɵdefinePipe, ɵɵdirectiveInject, ɵɵdisableBindings, ɵɵelement, ɵɵelementContainer, ɵɵelementContainerEnd, ɵɵelementContainerStart, ɵɵelementEnd, ɵɵelementStart, ɵɵenableBindings, ɵɵgetCurrentView, ɵɵgetInheritedFactory, ɵɵhostProperty, ɵɵi18n, ɵɵi18nApply, ɵɵi18nAttributes, ɵɵi18nEnd, ɵɵi18nExp, ɵɵi18nPostprocess, ɵɵi18nStart, ɵɵinject, ɵɵinjectAttribute, ɵɵinvalidFactory, ɵɵinvalidFactoryDep, ɵɵlistener, ɵɵloadQuery, ɵɵnamespaceHTML, ɵɵnamespaceMathML, ɵɵnamespaceSVG, ɵɵnextContext, ɵɵngDeclareClassMetadata, ɵɵngDeclareComponent, ɵɵngDeclareDirective, ɵɵngDeclareFactory, ɵɵngDeclareInjectable, ɵɵngDeclareInjector, ɵɵngDeclareNgModule, ɵɵngDeclarePipe, ɵɵpipe, ɵɵpipeBind1, ɵɵpipeBind2, ɵɵpipeBind3, ɵɵpipeBind4, ɵɵpipeBindV, ɵɵprojection, ɵɵprojectionDef, ɵɵproperty, ɵɵpropertyInterpolate, ɵɵpropertyInterpolate1, ɵɵpropertyInterpolate2, ɵɵpropertyInterpolate3, ɵɵpropertyInterpolate4, ɵɵpropertyInterpolate5, ɵɵpropertyInterpolate6, ɵɵpropertyInterpolate7, ɵɵpropertyInterpolate8, ɵɵpropertyInterpolateV, ɵɵpureFunction0, ɵɵpureFunction1, ɵɵpureFunction2, ɵɵpureFunction3, ɵɵpureFunction4, ɵɵpureFunction5, ɵɵpureFunction6, ɵɵpureFunction7, ɵɵpureFunction8, ɵɵpureFunctionV, ɵɵqueryRefresh, ɵɵreference, ɵɵresolveBody, ɵɵresolveDocument, ɵɵresolveWindow, ɵɵrestoreView, ɵɵsanitizeHtml, ɵɵsanitizeResourceUrl, ɵɵsanitizeScript, ɵɵsanitizeStyle, ɵɵsanitizeUrl, ɵɵsanitizeUrlOrResourceUrl, ɵɵsetComponentScope, ɵɵsetNgModuleScope, ɵɵstyleMap, ɵɵstyleMapInterpolate1, ɵɵstyleMapInterpolate2, ɵɵstyleMapInterpolate3, ɵɵstyleMapInterpolate4, ɵɵstyleMapInterpolate5, ɵɵstyleMapInterpolate6, ɵɵstyleMapInterpolate7, ɵɵstyleMapInterpolate8, ɵɵstyleMapInterpolateV, ɵɵstyleProp, ɵɵstylePropInterpolate1, ɵɵstylePropInterpolate2, ɵɵstylePropInterpolate3, ɵɵstylePropInterpolate4, ɵɵstylePropInterpolate5, ɵɵstylePropInterpolate6, ɵɵstylePropInterpolate7, ɵɵstylePropInterpolate8, ɵɵstylePropInterpolateV, ɵɵsyntheticHostListener, ɵɵsyntheticHostProperty, ɵɵtemplate, ɵɵtemplateRefExtractor, ɵɵtext, ɵɵtextInterpolate, ɵɵtextInterpolate1, ɵɵtextInterpolate2, ɵɵtextInterpolate3, ɵɵtextInterpolate4, ɵɵtextInterpolate5, ɵɵtextInterpolate6, ɵɵtextInterpolate7, ɵɵtextInterpolate8, ɵɵtextInterpolateV, ɵɵtrustConstantHtml, ɵɵtrustConstantResourceUrl, ɵɵviewQuery }; //# sourceMappingURL=core.js.map","map":null,"metadata":{},"sourceType":"module"}